Class B2ctelcoCommerceCartMergingStrategy
java.lang.Object
de.hybris.platform.commerceservices.order.impl.AbstractCommerceCartStrategy
de.hybris.platform.commerceservices.order.impl.DefaultCommerceCartMergingStrategy
de.hybris.platform.b2ctelcoservices.order.impl.B2ctelcoCommerceCartMergingStrategy
- All Implemented Interfaces:
TmaCartStrategy,de.hybris.platform.commerceservices.order.impl.CommerceCartMergingStrategy
public class B2ctelcoCommerceCartMergingStrategy
extends de.hybris.platform.commerceservices.order.impl.DefaultCommerceCartMergingStrategy
implements de.hybris.platform.commerceservices.order.impl.CommerceCartMergingStrategy, TmaCartStrategy
B2ctelcoCommerceCartMergingStrategy, an implementation of CommerceCartMergingStrategy to merge anonymous cart with
user cart.
- Since:
- 1911
-
Field Summary
Fields inherited from class de.hybris.platform.commerceservices.order.impl.AbstractCommerceCartStrategy
DEFAULT_FORCE_IN_STOCK_MAX_QUANTITY, forceInStockMaxQuantity -
Constructor Summary
ConstructorsConstructorDescriptionB2ctelcoCommerceCartMergingStrategy(TmaCustomerInventoryService customerInventoryService, TmaCommerceAddToCartStrategy commerceAddToCartStrategy, TmaUpdateCartStrategy tmaUpdateCartStrategy) -
Method Summary
Modifier and TypeMethodDescriptionprotected CommerceCartModificationaddEntryToCart(CartModel cart, AbstractOrderEntryModel entry, AbstractOrderEntryModel parentEntry) Adds the provided entry to the given cart.protected CommerceCartParametercreateCommerceCartParameter(CartModel cart, AbstractOrderEntryModel entry, AbstractOrderEntryModel parentEntry) Creates the new cart parameter used for adding the new entry to cart.protected TmaCommerceAddToCartStrategyprotected TmaCustomerInventoryServiceprotected TmaUpdateCartStrategyvoidmergeCarts(CartModel fromCart, CartModel toCart, List<CommerceCartModification> modifications) protected CommerceCartModificationmergeEntryWithCart(AbstractOrderEntryModel entry, CartModel toCart) processCartAction(List<CommerceCartParameter> commerceCartParameterList) Processes cart updates.protected voidrecalculateCart(CartModel toCart) protected voidvalidateFromCartEligibilityContext(CartModel fromCart) Methods inherited from class de.hybris.platform.commerceservices.order.impl.DefaultCommerceCartMergingStrategy
afterCartMerge, beforeCartMerge, copyEntryGroups, flatten, getBaseSiteService, getCommerceCartMergingMethodHooks, getCommerceCartService, getConfigurationService, getEntryGroupService, getEntryMergeStrategy, getUserService, reindexEntries, reindexEntryGroups, setBaseSiteService, setCommerceCartMergingMethodHooks, setCommerceCartService, setConfigurationService, setEntryGroupService, setEntryMergeStrategy, setUserService, updateEntryNumber, validationBeforeMerge, validationBeforeMergeResultMethods 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
-
B2ctelcoCommerceCartMergingStrategy
public B2ctelcoCommerceCartMergingStrategy(TmaCustomerInventoryService customerInventoryService, TmaCommerceAddToCartStrategy commerceAddToCartStrategy, TmaUpdateCartStrategy tmaUpdateCartStrategy)
-
-
Method Details
-
mergeCarts
public void mergeCarts(CartModel fromCart, CartModel toCart, List<CommerceCartModification> modifications) throws de.hybris.platform.commerceservices.order.CommerceCartMergingException - Specified by:
mergeCartsin interfacede.hybris.platform.commerceservices.order.impl.CommerceCartMergingStrategy- Overrides:
mergeCartsin classde.hybris.platform.commerceservices.order.impl.DefaultCommerceCartMergingStrategy- Throws:
de.hybris.platform.commerceservices.order.CommerceCartMergingException
-
processCartAction
public List<CommerceCartModification> processCartAction(List<CommerceCartParameter> commerceCartParameterList) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException Description copied from interface:TmaCartStrategyProcesses cart updates.- Specified by:
processCartActionin interfaceTmaCartStrategy- Parameters:
commerceCartParameterList- contains attributes used for cart updates- Returns:
- list
CommerceCartModification - Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException- in case of any error occurs during cart update
-
recalculateCart
-
validateFromCartEligibilityContext
protected void validateFromCartEligibilityContext(CartModel fromCart) throws de.hybris.platform.commerceservices.order.CommerceCartMergingException - Throws:
de.hybris.platform.commerceservices.order.CommerceCartMergingException
-
mergeEntryWithCart
protected CommerceCartModification mergeEntryWithCart(AbstractOrderEntryModel entry, CartModel toCart) throws de.hybris.platform.commerceservices.order.CommerceCartMergingException - Overrides:
mergeEntryWithCartin classde.hybris.platform.commerceservices.order.impl.DefaultCommerceCartMergingStrategy- Throws:
de.hybris.platform.commerceservices.order.CommerceCartMergingException
-
addEntryToCart
protected CommerceCartModification addEntryToCart(CartModel cart, AbstractOrderEntryModel entry, AbstractOrderEntryModel parentEntry) throws de.hybris.platform.commerceservices.order.CommerceCartMergingException Adds the provided entry to the given cart.- Parameters:
cart- The cartentry- The entry to be addedparentEntry- The parent of the entry- Returns:
- The modifications containing the root entry
- Throws:
de.hybris.platform.commerceservices.order.CommerceCartMergingException- If errors occur during add to cart
-
createCommerceCartParameter
protected CommerceCartParameter createCommerceCartParameter(CartModel cart, AbstractOrderEntryModel entry, AbstractOrderEntryModel parentEntry) Creates the new cart parameter used for adding the new entry to cart.- Parameters:
cart- Current cartentry- The entry to be addedparentEntry- The parent entry- Returns:
CommerceCartParameterfor the new entry
-
getCustomerInventoryService
-
getCommerceAddToCartStrategy
-
getTmaUpdateCartStrategy
-