Class TmaAutoPickPolicyActionResolver
java.lang.Object
de.hybris.platform.b2ctelcoservices.compatibility.impl.TmaAutoPickPolicyActionResolver
- All Implemented Interfaces:
TmaPolicyActionResolver
Service handling failed
TmaPolicyActionModel having TmaPoPolicyStatementModel statement and
TmaCompatibilityPolicyActionType.AUTOPICK action type.- Since:
- 6.7
-
Constructor Summary
ConstructorsConstructorDescriptionTmaAutoPickPolicyActionResolver(TmaAbstractOrderEntryService abstractOrderEntryService, TmaPoService poService) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddToCart(TmaPoPolicyStatementModel statementModel, CartEntryModel rootEntryModel, String policyCode) Adds the provided product offering to the cart with.protected voidaddToCart(TmaPoPolicyStatementModel statementModel, List<TmaBundledProductOfferingModel> parentBpos, AbstractOrderEntryModel entry) Adds the provided product offering with the given intermediate BPOs to the cart.protected CommerceCartParametercreateCommerceCartParameter(AbstractOrderModel orderModel, TmaProductOfferingModel productOffering, int quantity, AbstractOrderEntryModel parentEntry, boolean enableHooks) Creates the new cart parameter used for adding the new entry to cart.protected TmaAbstractOrderEntryServiceprotected de.hybris.platform.commerceservices.order.CommerceCartServiceprotected de.hybris.platform.order.EntryGroupServiceDeprecated.since 2102protected List<TmaBundledProductOfferingModel>getIntermediateParentsToBeAdded(TmaProductOfferingModel productOffering, AbstractOrderEntryModel rootEntry, List<AbstractOrderEntryModel> entriesInBundle) Returns the intermediate BPOs between the provided product offering and the product offering in the root entry which need to be added to cart.protected de.hybris.platform.servicelayer.i18n.L10NServiceprotected CommerceCartParametergetNewCartEntryGroupParameter(AbstractOrderModel orderModel, EntryGroup entryGroup, TmaPoPolicyStatementModel statementModel) Deprecated.protected TmaPoServiceDeprecated.since 2102protected TmaValidationMessagesStrategyvoidprocessPolicyActions(AbstractOrderModel orderModel, CartEntryModel rootEntryModel, List<TmaPolicyActionModel> policyActions) Handles a compatibility policy action based on its type.voidprocessPolicyActions(AbstractOrderModel orderModel, EntryGroup entryGroup, List<TmaPolicyActionModel> policyActions) Handles a compatibility policy action based on its type.voidsetCommerceCartService(de.hybris.platform.commerceservices.order.CommerceCartService commerceCartService) voidsetEntryGroupService(de.hybris.platform.order.EntryGroupService entryGroupService) Deprecated.since 2102voidsetL10NService(de.hybris.platform.servicelayer.i18n.L10NService l10NService) voidsetTmaEntryGroupService(TmaEntryGroupService tmaEntryGroupService) Deprecated.since 2102voidsetTmaValidationMessagesStrategy(TmaValidationMessagesStrategy tmaValidationMessagesStrategy)
-
Constructor Details
-
TmaAutoPickPolicyActionResolver
public TmaAutoPickPolicyActionResolver(TmaAbstractOrderEntryService abstractOrderEntryService, TmaPoService poService)
-
-
Method Details
-
processPolicyActions
public void processPolicyActions(AbstractOrderModel orderModel, EntryGroup entryGroup, List<TmaPolicyActionModel> policyActions) Description copied from interface:TmaPolicyActionResolverHandles a compatibility policy action based on its type.- Specified by:
processPolicyActionsin interfaceTmaPolicyActionResolver- Parameters:
orderModel- the current orderentryGroup- cart entry group considered invalidpolicyActions- failed policy actions
-
processPolicyActions
public void processPolicyActions(AbstractOrderModel orderModel, CartEntryModel rootEntryModel, List<TmaPolicyActionModel> policyActions) Description copied from interface:TmaPolicyActionResolverHandles a compatibility policy action based on its type.- Specified by:
processPolicyActionsin interfaceTmaPolicyActionResolver- Parameters:
orderModel- the current orderrootEntryModel- the parent entry representing the invalid grouppolicyActions- failed policy actions
-
addToCart
protected void addToCart(TmaPoPolicyStatementModel statementModel, CartEntryModel rootEntryModel, String policyCode) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException Adds the provided product offering to the cart with.- Parameters:
statementModel- The statement used for getting the product to be addedrootEntryModel- The root entrypolicyCode- The identifier of the policy- Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException
-
addToCart
protected void addToCart(TmaPoPolicyStatementModel statementModel, List<TmaBundledProductOfferingModel> parentBpos, AbstractOrderEntryModel entry) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException Adds the provided product offering with the given intermediate BPOs to the cart.- Parameters:
statementModel- The statement used for getting the product to be addedparentBpos- The intermediate products in the hierarchyentry- The entry to which the new hierarchy will be added- Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException- If errors occur during add to cart
-
getIntermediateParentsToBeAdded
protected List<TmaBundledProductOfferingModel> getIntermediateParentsToBeAdded(TmaProductOfferingModel productOffering, AbstractOrderEntryModel rootEntry, List<AbstractOrderEntryModel> entriesInBundle) Returns the intermediate BPOs between the provided product offering and the product offering in the root entry which need to be added to cart.- Parameters:
productOffering- The product offeringrootEntry- The root entryentriesInBundle- The entries part of the bundle- Returns:
- The intermediate BPOs which need to be added to the cart
-
getNewCartEntryGroupParameter
@Deprecated(since="2102") protected CommerceCartParameter getNewCartEntryGroupParameter(AbstractOrderModel orderModel, EntryGroup entryGroup, TmaPoPolicyStatementModel statementModel) Deprecated.Creates the new cart parameter used for adding the new entry to cart.- Parameters:
orderModel- current orderentryGroup- the entry group where the new entry is addedstatementModel- the statement used for getting the product to be added- Returns:
CommerceCartParameterfor the new entry
-
createCommerceCartParameter
protected CommerceCartParameter createCommerceCartParameter(AbstractOrderModel orderModel, TmaProductOfferingModel productOffering, int quantity, AbstractOrderEntryModel parentEntry, boolean enableHooks) Creates the new cart parameter used for adding the new entry to cart.- Parameters:
orderModel- Current orderproductOffering- The product offering to be addedquantity- The quantity to be addedparentEntry- The parent entryenableHooks- Flag indicating if hooks should be executed or not- Returns:
CommerceCartParameterfor the new entry
-
getCommerceCartService
protected de.hybris.platform.commerceservices.order.CommerceCartService getCommerceCartService() -
setCommerceCartService
public void setCommerceCartService(de.hybris.platform.commerceservices.order.CommerceCartService commerceCartService) -
getL10NService
protected de.hybris.platform.servicelayer.i18n.L10NService getL10NService() -
setL10NService
public void setL10NService(de.hybris.platform.servicelayer.i18n.L10NService l10NService) -
getEntryGroupService
@Deprecated(since="2102") protected de.hybris.platform.order.EntryGroupService getEntryGroupService()Deprecated.since 2102 -
setEntryGroupService
@Deprecated(since="2102") public void setEntryGroupService(de.hybris.platform.order.EntryGroupService entryGroupService) Deprecated.since 2102 -
getTmaValidationMessagesStrategy
-
setTmaValidationMessagesStrategy
public void setTmaValidationMessagesStrategy(TmaValidationMessagesStrategy tmaValidationMessagesStrategy) -
getTmaEntryGroupService
Deprecated.since 2102 -
setTmaEntryGroupService
@Deprecated(since="2102") public void setTmaEntryGroupService(TmaEntryGroupService tmaEntryGroupService) Deprecated.since 2102 -
getAbstractOrderEntryService
-
getPoService
-