public class DefaultAddToCartStrategy extends AbstractBusinessService implements AddToCartStrategy
AddToCartStrategy.AbstractService.SerializableDTOmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultAddToCartStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToCart(CartModel cart,
ProductModel product,
long quantity,
UnitModel unit)
Deprecated.
since ages
|
void |
setProductService(ProductService productService) |
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace@Deprecated public void addToCart(CartModel cart, ProductModel product, long quantity, UnitModel unit) throws InvalidCartException
AddToCartStrategyCartModel the (existing) ProductModel in the given UnitModel and
with the given quantity. If in the cart already an entry with the given product and given unit exists
the given quantity is added to the the quantity of this cart entry.addToCart in interface AddToCartStrategycart - the cart, must existproduct - the product which is added to the cartquantity - the quantity of the productunit - if null ProductService.getOrderableUnit(ProductModel) is used to determine the unitInvalidCartException - if the product is a base product OR the quantity is less 1 or no usable unit was found
(only when given unit is also null)public void setProductService(ProductService productService)
Copyright © 2018 SAP SE. All Rights Reserved.