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 Constructor Description DefaultCommerceCartMergingStrategy()
-
Method Summary
-
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
-
-
-
-
Method Detail
-
mergeCarts
public void mergeCarts(CartModel fromCart, CartModel toCart, java.util.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
protected void validationBeforeMergeResult(CartModel fromCart)
-
validationBeforeMerge
protected void validationBeforeMerge(CartModel fromCart, CartModel toCart, java.util.List<CommerceCartModification> modifications, UserModel currentUser) throws CommerceCartMergingException
- Throws:
CommerceCartMergingException
-
reindexEntryGroups
protected java.util.Map<java.lang.Integer,java.lang.Integer> reindexEntryGroups(java.util.List<EntryGroup> roots, java.util.List<EntryGroup> refRoots)
-
flatten
protected java.util.List<EntryGroup> flatten(java.util.List<EntryGroup> roots)
-
reindexEntries
protected void reindexEntries(java.util.List<AbstractOrderEntryModel> entries, java.util.Map<java.lang.Integer,java.lang.Integer> indexMap)
-
mergeEntryWithCart
protected CommerceCartModification mergeEntryWithCart(AbstractOrderEntryModel entry, CartModel toCart) throws CommerceCartMergingException
- Throws:
CommerceCartMergingException
-
updateEntryNumber
protected void updateEntryNumber(AbstractOrderEntryModel entry, CartModel toCart)
-
getUserService
public UserService getUserService()
-
setUserService
public void setUserService(UserService userService)
-
getCommerceCartService
public CommerceCartService getCommerceCartService()
-
setCommerceCartService
public void setCommerceCartService(CommerceCartService commerceCartService)
-
getBaseSiteService
public BaseSiteService getBaseSiteService()
-
setBaseSiteService
public void setBaseSiteService(BaseSiteService baseSiteService)
-
getEntryMergeStrategy
protected EntryMergeStrategy getEntryMergeStrategy()
-
setEntryMergeStrategy
public void setEntryMergeStrategy(EntryMergeStrategy entryMergeStrategy)
-
getEntryGroupService
protected EntryGroupService getEntryGroupService()
-
setEntryGroupService
public void setEntryGroupService(EntryGroupService entryGroupService)
-
getCommerceCartMergingMethodHooks
public java.util.List<CommerceCartMergingMethodHook> getCommerceCartMergingMethodHooks()
-
setCommerceCartMergingMethodHooks
public void setCommerceCartMergingMethodHooks(java.util.List<CommerceCartMergingMethodHook> commerceCartMergingMethodHooks)
-
getConfigurationService
public ConfigurationService getConfigurationService()
-
setConfigurationService
public void setConfigurationService(ConfigurationService configurationService)
-
-