Class DefaultCommerceAddToCartStrategy
java.lang.Object
de.hybris.platform.commerceservices.order.impl.AbstractCommerceCartStrategy
de.hybris.platform.commerceservices.order.impl.AbstractCommerceAddToCartStrategy
de.hybris.platform.commerceservices.order.impl.DefaultCommerceAddToCartStrategy
- All Implemented Interfaces:
CommerceAddToCartStrategy
- Direct Known Subclasses:
BundleCommerceAddToCartStrategy,CommerceAddToCartStrictStrategy,ProductConfigAddToCartStrategy,SelectiveCartAddToCartStrategy
-
Field Summary
Fields inherited from class de.hybris.platform.commerceservices.order.impl.AbstractCommerceAddToCartStrategy
APPEND_AS_LASTFields 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 CartEntryModeladdCartEntry(CommerceCartParameter parameter, long actualAllowedQuantityChange) addToCart(CommerceCartParameter parameter) Adds an item to the cart for pickup in a given locationaddToCart(List<CommerceCartParameter> parameterList) Adds a list of items to the cart.protected CommerceCartModificationcreateAddToCartResp(CommerceCartParameter parameter, String status, CartEntryModel entry, long quantityAdded) protected CartEntryModelcreateEmptyCartEntry(CommerceCartParameter parameter) protected CommerceCartModificationdoAddToCart(CommerceCartParameter parameter) Do add to cart.protected EntryMergeStrategyprotected StringgetStatusCodeAllowedQuantityChange(long actualAllowedQuantityChange, Integer maxOrderQuantity, long quantityToAdd, long cartLevelAfterQuantityChange) protected StringgetStatusCodeForNotAllowedQuantityChange(Integer maxOrderQuantity, Integer cartLevelAfterQuantityChange) protected UnitModelgetUnit(CommerceCartParameter parameter) protected BooleanisProductForCode(CommerceCartParameter parameter) protected voidmergeEntry(CommerceCartModification modification, CommerceCartParameter parameter) voidsetEntryMergeStrategy(EntryMergeStrategy entryMergeStrategy) Methods inherited from class de.hybris.platform.commerceservices.order.impl.AbstractCommerceAddToCartStrategy
afterAddToCart, beforeAddToCart, getAddToCartValidators, getCommerceAddToCartMethodHooks, getConfigurationService, getFallbackAddToCartValidator, setAddToCartValidators, setCommerceAddToCartMethodHooks, setConfigurationService, setFallbackAddToCartValidator, validateAddToCartMethods 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, setProductService
-
Constructor Details
-
DefaultCommerceAddToCartStrategy
public DefaultCommerceAddToCartStrategy()
-
-
Method Details
-
addToCart
public List<CommerceCartModification> addToCart(List<CommerceCartParameter> parameterList) throws CommerceCartMergingException Description copied from interface:CommerceAddToCartStrategyAdds a list of items to the cart.- Parameters:
parameterList- a list ofCommerceCartParameteritems- Returns:
- a list of
CommerceCartModificationitems - Throws:
CommerceCartMergingException
-
addToCart
public CommerceCartModification addToCart(CommerceCartParameter parameter) throws CommerceCartModificationException Adds an item to the cart for pickup in a given location- Parameters:
parameter- Cart parameters- Returns:
- Cart modification information
- Throws:
CommerceCartModificationException
-
doAddToCart
protected CommerceCartModification doAddToCart(CommerceCartParameter parameter) throws CommerceCartModificationException Do add to cart.- Parameters:
parameter- the parameter- Returns:
- the commerce cart modification
- Throws:
CommerceCartModificationException- the commerce cart modification exception
-
isProductForCode
-
createAddToCartResp
protected CommerceCartModification createAddToCartResp(CommerceCartParameter parameter, String status, CartEntryModel entry, long quantityAdded) -
getUnit
protected UnitModel getUnit(CommerceCartParameter parameter) throws CommerceCartModificationException -
addCartEntry
protected CartEntryModel addCartEntry(CommerceCartParameter parameter, long actualAllowedQuantityChange) throws CommerceCartModificationException -
mergeEntry
protected void mergeEntry(@Nonnull CommerceCartModification modification, @Nonnull CommerceCartParameter parameter) throws CommerceCartModificationException -
getStatusCodeAllowedQuantityChange
-
getStatusCodeForNotAllowedQuantityChange
-
createEmptyCartEntry
-
getEntryMergeStrategy
-
setEntryMergeStrategy
-