Class B2ctelcoCommerceCloneSavedCartStrategy
java.lang.Object
de.hybris.platform.commerceservices.order.impl.AbstractCommerceCartStrategy
de.hybris.platform.commerceservices.order.impl.AbstractCommerceCloneSavedCartStrategy
de.hybris.platform.commerceservices.order.impl.DefaultCommerceCloneSavedCartStrategy
de.hybris.platform.b2ctelcoservices.order.impl.B2ctelcoCommerceCloneSavedCartStrategy
- All Implemented Interfaces:
TmaCartStrategy,de.hybris.platform.commerceservices.order.CommerceCloneSavedCartStrategy
public class B2ctelcoCommerceCloneSavedCartStrategy
extends de.hybris.platform.commerceservices.order.impl.DefaultCommerceCloneSavedCartStrategy
implements TmaCartStrategy
B2ctelcoCommerceCloneSavedCartStrategy, an extension of
DefaultCommerceCloneSavedCartStrategy to create clone
of cart provided by user.- Since:
- 1911
-
Field Summary
Fields inherited from class de.hybris.platform.commerceservices.order.impl.AbstractCommerceCartStrategy
DEFAULT_FORCE_IN_STOCK_MAX_QUANTITY, forceInStockMaxQuantity -
Constructor Summary
ConstructorsConstructorDescriptionB2ctelcoCommerceCloneSavedCartStrategy(de.hybris.platform.commerceservices.order.CommerceSaveCartStrategy commerceSaveCartStrategy, de.hybris.platform.commerceservices.order.CommerceCartService commerceCartService, de.hybris.platform.servicelayer.keygenerator.KeyGenerator keyGenerator) -
Method Summary
Modifier and TypeMethodDescriptioncloneSavedCart(CommerceSaveCartParameter parameter) de.hybris.platform.commerceservices.order.CommerceCartServiceprotected de.hybris.platform.commerceservices.order.CommerceSaveCartStrategyprotected de.hybris.platform.servicelayer.keygenerator.KeyGeneratorprotected Set<TmaCartValidationModel>prepareValidations(Set<TmaCartValidationModel> cartEntryValidations) Generates and sets a new id on each of the validations received.processCartAction(List<CommerceCartParameter> commerceCartParameterList) Clones the the given cart with given name and descriptionprotected voidProcesses validation messages, sets a new id on each of them so they won't clash with the original ones.Methods inherited from class de.hybris.platform.commerceservices.order.impl.AbstractCommerceCloneSavedCartStrategy
afterCloneSaveCart, beforeCloneSaveCart, getCommerceCloneSavedCartMethodHooks, getConfigurationService, setCommerceCloneSavedCartMethodHooks, setConfigurationServiceMethods 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
-
B2ctelcoCommerceCloneSavedCartStrategy
public B2ctelcoCommerceCloneSavedCartStrategy(de.hybris.platform.commerceservices.order.CommerceSaveCartStrategy commerceSaveCartStrategy, de.hybris.platform.commerceservices.order.CommerceCartService commerceCartService, de.hybris.platform.servicelayer.keygenerator.KeyGenerator keyGenerator)
-
-
Method Details
-
processCartAction
public List<CommerceCartModification> processCartAction(List<CommerceCartParameter> commerceCartParameterList) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException Clones the the given cart with given name and description- Specified by:
processCartActionin interfaceTmaCartStrategy- Parameters:
commerceCartParameterList- A list of parameter objects containing all the attributes needed for clone saved cart- Returns:
- List of
CommerceCartModification - Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException- the commerce cart modification exception
-
cloneSavedCart
public CommerceSaveCartResult cloneSavedCart(CommerceSaveCartParameter parameter) throws de.hybris.platform.commerceservices.order.CommerceSaveCartException - Specified by:
cloneSavedCartin interfacede.hybris.platform.commerceservices.order.CommerceCloneSavedCartStrategy- Overrides:
cloneSavedCartin classde.hybris.platform.commerceservices.order.impl.DefaultCommerceCloneSavedCartStrategy- Throws:
de.hybris.platform.commerceservices.order.CommerceSaveCartException
-
processValidationMessages
Processes validation messages, sets a new id on each of them so they won't clash with the original ones.- Parameters:
entries- cart entries
-
prepareValidations
protected Set<TmaCartValidationModel> prepareValidations(Set<TmaCartValidationModel> cartEntryValidations) Generates and sets a new id on each of the validations received.- Parameters:
cartEntryValidations- list of validations
-
getCommerceSaveCartStrategy
protected de.hybris.platform.commerceservices.order.CommerceSaveCartStrategy getCommerceSaveCartStrategy() -
getCommerceCartService
public de.hybris.platform.commerceservices.order.CommerceCartService getCommerceCartService() -
getKeyGenerator
protected de.hybris.platform.servicelayer.keygenerator.KeyGenerator getKeyGenerator()
-