Class DefaultCommerceUpdateCartEntryStrategy
java.lang.Object
de.hybris.platform.commerceservices.order.impl.AbstractCommerceCartStrategy
de.hybris.platform.commerceservices.order.impl.DefaultCommerceUpdateCartEntryStrategy
- All Implemented Interfaces:
CommerceUpdateCartEntryStrategy
- Direct Known Subclasses:
CommerceUpdateCartEntryStrictStrategy
public class DefaultCommerceUpdateCartEntryStrategy
extends AbstractCommerceCartStrategy
implements CommerceUpdateCartEntryStrategy
-
Field Summary
Fields 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 voidafterUpdateCartEntry(CommerceCartParameter parameter, CommerceCartModification result) protected voidbeforeUpdateCartEntry(CommerceCartParameter parameter) protected List<CommerceUpdateCartEntryHook>protected ConfigurationServiceprotected EntryMergeStrategyprotected CommerceCartModificationmergeEntries(AbstractOrderEntryModel mergeCandidate, AbstractOrderEntryModel mergeTarget, CartModel cart) protected CommerceCartModificationmodifyEntry(CartModel cartModel, AbstractOrderEntryModel entryToUpdate, long actualAllowedQuantityChange, long newQuantity, Integer maxOrderQuantity) voidsetCommerceUpdateCartEntryHooks(List<CommerceUpdateCartEntryHook> commerceUpdateCartEntryHooks) voidsetConfigurationService(ConfigurationService configurationService) voidsetEntryMergeStrategy(EntryMergeStrategy entryMergeStrategy) Update point of service for cart entry.updateQuantityForCartEntry(CommerceCartParameter parameters) Update quantity for cart entry.Update to shipping mode for cart entry.protected voidvalidateEntryBeforeModification(long newQuantity, AbstractOrderEntryModel entryToUpdate) protected voidvalidateEntryBeforeSetShippingMode(AbstractOrderEntryModel entryToUpdate) 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, setProductService
-
Constructor Details
-
DefaultCommerceUpdateCartEntryStrategy
public DefaultCommerceUpdateCartEntryStrategy()
-
-
Method Details
-
updateQuantityForCartEntry
public CommerceCartModification updateQuantityForCartEntry(CommerceCartParameter parameters) throws CommerceCartModificationException Description copied from interface:CommerceUpdateCartEntryStrategyUpdate quantity for cart entry.- Specified by:
updateQuantityForCartEntryin interfaceCommerceUpdateCartEntryStrategy- Parameters:
parameters- the parameters- Returns:
- the commerce cart modification
- Throws:
CommerceCartModificationException- the commerce cart modification exception
-
updatePointOfServiceForCartEntry
public CommerceCartModification updatePointOfServiceForCartEntry(CommerceCartParameter parameters) throws CommerceCartModificationException Description copied from interface:CommerceUpdateCartEntryStrategyUpdate point of service for cart entry.- Specified by:
updatePointOfServiceForCartEntryin interfaceCommerceUpdateCartEntryStrategy- Parameters:
parameters- the parameters- Returns:
- the commerce cart modification
- Throws:
CommerceCartModificationException- the commerce cart modification exception
-
updateToShippingModeForCartEntry
public CommerceCartModification updateToShippingModeForCartEntry(CommerceCartParameter parameters) throws CommerceCartModificationException Description copied from interface:CommerceUpdateCartEntryStrategyUpdate to shipping mode for cart entry.- Specified by:
updateToShippingModeForCartEntryin interfaceCommerceUpdateCartEntryStrategy- Parameters:
parameters- the parameters- Returns:
- the commerce cart modification
- Throws:
CommerceCartModificationException- the commerce cart modification exception
-
mergeEntries
protected CommerceCartModification mergeEntries(AbstractOrderEntryModel mergeCandidate, AbstractOrderEntryModel mergeTarget, CartModel cart) throws CommerceCartModificationException -
validateEntryBeforeSetShippingMode
protected void validateEntryBeforeSetShippingMode(AbstractOrderEntryModel entryToUpdate) throws CommerceCartModificationException -
validateEntryBeforeModification
protected void validateEntryBeforeModification(long newQuantity, AbstractOrderEntryModel entryToUpdate) throws CommerceCartModificationException -
modifyEntry
protected CommerceCartModification modifyEntry(CartModel cartModel, AbstractOrderEntryModel entryToUpdate, long actualAllowedQuantityChange, long newQuantity, Integer maxOrderQuantity) -
beforeUpdateCartEntry
-
afterUpdateCartEntry
protected void afterUpdateCartEntry(CommerceCartParameter parameter, CommerceCartModification result) -
getCommerceUpdateCartEntryHooks
-
setCommerceUpdateCartEntryHooks
public void setCommerceUpdateCartEntryHooks(List<CommerceUpdateCartEntryHook> commerceUpdateCartEntryHooks) -
getConfigurationService
-
setConfigurationService
-
getEntryMergeStrategy
-
setEntryMergeStrategy
-