Class DefaultAddToCartStrategy
java.lang.Object
de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
de.hybris.platform.order.strategies.impl.DefaultAddToCartStrategy
- All Implemented Interfaces:
AddToCartStrategy,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
Default implementation of the
AddToCartStrategy.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO -
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManagerFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCart(CartModel cart, ProductModel product, long quantity, UnitModel unit) Deprecated, for removal: This API element is subject to removal in a future version.since agesvoidsetProductService(ProductService productService) Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
Constructor Details
-
DefaultAddToCartStrategy
public DefaultAddToCartStrategy()
-
-
Method Details
-
addToCart
@Deprecated(since="ages", forRemoval=true) public void addToCart(CartModel cart, ProductModel product, long quantity, UnitModel unit) throws InvalidCartException Deprecated, for removal: This API element is subject to removal in a future version.since agesDescription copied from interface:AddToCartStrategyAdds to the (existing)CartModelthe (existing)ProductModelin the givenUnitModeland with the givenquantity. If in the cart already an entry with the given product and given unit exists the givenquantityis added to the the quantity of this cart entry.- Specified by:
addToCartin interfaceAddToCartStrategy- Parameters:
cart- the cart, must existproduct- the product which is added to the cartquantity- the quantity of the productunit- ifnullProductService.getOrderableUnit(ProductModel)is used to determine the unit- Throws:
InvalidCartException- if theproductis a base product OR the quantity is less 1 or no usable unit was found (only when givenunitis alsonull)
-
setProductService
-