Class DefaultCommerceCartMergingStrategy
java.lang.Object
de.hybris.platform.commerceservices.order.impl.AbstractCommerceCartStrategy
de.hybris.platform.commerceservices.order.impl.DefaultCommerceCartMergingStrategy
- All Implemented Interfaces:
CommerceCartMergingStrategy
public class DefaultCommerceCartMergingStrategy
extends AbstractCommerceCartStrategy
implements CommerceCartMergingStrategy
-
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 voidafterCartMerge(CartModel fromCart, CartModel toCart) protected voidbeforeCartMerge(CartModel fromCart, CartModel toCart) protected voidcopyEntryGroups(CartModel fromCart, CartModel toCart) protected List<EntryGroup>flatten(List<EntryGroup> roots) protected EntryGroupServiceprotected EntryMergeStrategyvoidmergeCarts(CartModel fromCart, CartModel toCart, List<CommerceCartModification> modifications) Merge two carts and add modificationsprotected CommerceCartModificationmergeEntryWithCart(AbstractOrderEntryModel entry, CartModel toCart) protected voidreindexEntries(List<AbstractOrderEntryModel> entries, Map<Integer, Integer> indexMap) reindexEntryGroups(List<EntryGroup> roots, List<EntryGroup> refRoots) voidsetBaseSiteService(BaseSiteService baseSiteService) voidsetCommerceCartMergingMethodHooks(List<CommerceCartMergingMethodHook> commerceCartMergingMethodHooks) voidsetCommerceCartService(CommerceCartService commerceCartService) voidsetConfigurationService(ConfigurationService configurationService) voidsetEntryGroupService(EntryGroupService entryGroupService) voidsetEntryMergeStrategy(EntryMergeStrategy entryMergeStrategy) voidsetUserService(UserService userService) protected voidupdateEntryNumber(AbstractOrderEntryModel entry, CartModel toCart) protected voidvalidationBeforeMerge(CartModel fromCart, CartModel toCart, List<CommerceCartModification> modifications, UserModel currentUser) protected voidvalidationBeforeMergeResult(CartModel fromCart) 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
-
DefaultCommerceCartMergingStrategy
public DefaultCommerceCartMergingStrategy()
-
-
Method Details
-
mergeCarts
public void mergeCarts(CartModel fromCart, CartModel toCart, List<CommerceCartModification> modifications) throws CommerceCartMergingException Description copied from interface:CommerceCartMergingStrategyMerge two carts and add modifications- Specified by:
mergeCartsin interfaceCommerceCartMergingStrategy- Parameters:
fromCart- - Cart from merging is donetoCart- - Cart to merge tomodifications- - List of modifications- Throws:
CommerceCartMergingException
-
validationBeforeMergeResult
-
validationBeforeMerge
protected void validationBeforeMerge(CartModel fromCart, CartModel toCart, List<CommerceCartModification> modifications, UserModel currentUser) throws CommerceCartMergingException - Throws:
CommerceCartMergingException
-
copyEntryGroups
-
reindexEntryGroups
protected Map<Integer,Integer> reindexEntryGroups(List<EntryGroup> roots, List<EntryGroup> refRoots) -
flatten
-
reindexEntries
-
mergeEntryWithCart
protected CommerceCartModification mergeEntryWithCart(AbstractOrderEntryModel entry, CartModel toCart) throws CommerceCartMergingException - Throws:
CommerceCartMergingException
-
updateEntryNumber
-
beforeCartMerge
-
afterCartMerge
-
getUserService
-
setUserService
-
getCommerceCartService
-
setCommerceCartService
-
getBaseSiteService
-
setBaseSiteService
-
getEntryMergeStrategy
-
setEntryMergeStrategy
-
getEntryGroupService
-
setEntryGroupService
-
getCommerceCartMergingMethodHooks
-
setCommerceCartMergingMethodHooks
public void setCommerceCartMergingMethodHooks(List<CommerceCartMergingMethodHook> commerceCartMergingMethodHooks) -
getConfigurationService
-
setConfigurationService
-