Class AbstractCommerceAddToCartStrategy
java.lang.Object
de.hybris.platform.commerceservices.order.impl.AbstractCommerceCartStrategy
de.hybris.platform.commerceservices.order.impl.AbstractCommerceAddToCartStrategy
- All Implemented Interfaces:
CommerceAddToCartStrategy
- Direct Known Subclasses:
DefaultCommerceAddToCartStrategy
public abstract class AbstractCommerceAddToCartStrategy
extends AbstractCommerceCartStrategy
implements CommerceAddToCartStrategy
Abstract strategy for adding items to the cart
-
Field Summary
FieldsFields inherited from class de.hybris.platform.commerceservices.order.impl.AbstractCommerceCartStrategy
DEFAULT_FORCE_IN_STOCK_MAX_QUANTITY, forceInStockMaxQuantity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterAddToCart(CommerceCartParameter parameters, CommerceCartModification result) protected voidbeforeAddToCart(CommerceCartParameter parameters) protected List<AddToCartValidator>protected List<CommerceAddToCartMethodHook>protected ConfigurationServiceprotected AddToCartValidatorvoidsetAddToCartValidators(List<AddToCartValidator> addToCartValidators) voidsetCommerceAddToCartMethodHooks(List<CommerceAddToCartMethodHook> commerceAddToCartMethodHooks) Optional setter for hooking into before and after execution ofCommerceAddToCartStrategy.addToCart(de.hybris.platform.commerceservices.service.data.CommerceCartParameter)voidsetConfigurationService(ConfigurationService configurationService) voidsetFallbackAddToCartValidator(AddToCartValidator fallbackAddToCartValidator) protected voidvalidateAddToCart(CommerceCartParameter parameters) Methods inherited from class de.hybris.platform.commerceservices.order.impl.AbstractCommerceCartStrategy
checkCartLevel, getAllowedCartAdjustmentForProduct, getAvailableStockLevel, getBaseStoreService, getCartEntryDao, getCartService, getCommerceCartCalculationStrategy, getCommerceStockService, getEntryForNumber, getEntryForProductAndPointOfService, getEntryOrderChecker, getForceInStockMaxQuantity, getModelService, getProductService, isMaxOrderQuantitySet, isOrderEntryUpdatable, isStockLevelSufficient, normalizeEntryNumbers, setBaseStoreService, setCartEntryDao, setCartService, setCommerceCartCalculationStrategy, setCommerceStockService, setEntryOrderChecker, setForceInStockMaxQuantity, setModelService, setProductServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.commerceservices.order.CommerceAddToCartStrategy
addToCart, addToCart
-
Field Details
-
APPEND_AS_LAST
protected static final int APPEND_AS_LAST- See Also:
-
-
Constructor Details
-
AbstractCommerceAddToCartStrategy
public AbstractCommerceAddToCartStrategy()
-
-
Method Details
-
validateAddToCart
protected void validateAddToCart(CommerceCartParameter parameters) throws CommerceCartModificationException -
beforeAddToCart
protected void beforeAddToCart(CommerceCartParameter parameters) throws CommerceCartModificationException -
afterAddToCart
protected void afterAddToCart(CommerceCartParameter parameters, CommerceCartModification result) throws CommerceCartModificationException -
getCommerceAddToCartMethodHooks
-
setCommerceAddToCartMethodHooks
public void setCommerceAddToCartMethodHooks(List<CommerceAddToCartMethodHook> commerceAddToCartMethodHooks) Optional setter for hooking into before and after execution ofCommerceAddToCartStrategy.addToCart(de.hybris.platform.commerceservices.service.data.CommerceCartParameter)- Parameters:
commerceAddToCartMethodHooks-
-
getConfigurationService
-
setConfigurationService
-
setAddToCartValidators
- Parameters:
addToCartValidators- List of product validators
-
getAddToCartValidators
-
setFallbackAddToCartValidator
- Parameters:
fallbackAddToCartValidator- Fallback product validator that will be active if no other validators are configured
-
getFallbackAddToCartValidator
-