Class TmaAutoPickPolicyActionResolver

java.lang.Object
de.hybris.platform.b2ctelcoservices.compatibility.impl.TmaAutoPickPolicyActionResolver
All Implemented Interfaces:
TmaPolicyActionResolver

public class TmaAutoPickPolicyActionResolver extends Object implements TmaPolicyActionResolver
Service handling failed TmaPolicyActionModel having TmaPoPolicyStatementModel statement and TmaCompatibilityPolicyActionType.AUTOPICK action type.
Since:
6.7
  • Constructor Details

  • Method Details

    • processPolicyActions

      public void processPolicyActions(AbstractOrderModel orderModel, EntryGroup entryGroup, List<TmaPolicyActionModel> policyActions)
      Description copied from interface: TmaPolicyActionResolver
      Handles a compatibility policy action based on its type.
      Specified by:
      processPolicyActions in interface TmaPolicyActionResolver
      Parameters:
      orderModel - the current order
      entryGroup - cart entry group considered invalid
      policyActions - failed policy actions
    • processPolicyActions

      public void processPolicyActions(AbstractOrderModel orderModel, CartEntryModel rootEntryModel, List<TmaPolicyActionModel> policyActions)
      Description copied from interface: TmaPolicyActionResolver
      Handles a compatibility policy action based on its type.
      Specified by:
      processPolicyActions in interface TmaPolicyActionResolver
      Parameters:
      orderModel - the current order
      rootEntryModel - the parent entry representing the invalid group
      policyActions - 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 added
      rootEntryModel - The root entry
      policyCode - 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 added
      parentBpos - The intermediate products in the hierarchy
      entry - 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 offering
      rootEntry - The root entry
      entriesInBundle - 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)
      Creates the new cart parameter used for adding the new entry to cart.
      Parameters:
      orderModel - current order
      entryGroup - the entry group where the new entry is added
      statementModel - the statement used for getting the product to be added
      Returns:
      CommerceCartParameter for 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 order
      productOffering - The product offering to be added
      quantity - The quantity to be added
      parentEntry - The parent entry
      enableHooks - Flag indicating if hooks should be executed or not
      Returns:
      CommerceCartParameter for 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

      protected TmaValidationMessagesStrategy getTmaValidationMessagesStrategy()
    • setTmaValidationMessagesStrategy

      public void setTmaValidationMessagesStrategy(TmaValidationMessagesStrategy tmaValidationMessagesStrategy)
    • getTmaEntryGroupService

      @Deprecated(since="2102") public TmaEntryGroupService getTmaEntryGroupService()
      Deprecated.
      since 2102
    • setTmaEntryGroupService

      @Deprecated(since="2102") public void setTmaEntryGroupService(TmaEntryGroupService tmaEntryGroupService)
      Deprecated.
      since 2102
    • getAbstractOrderEntryService

      protected TmaAbstractOrderEntryService getAbstractOrderEntryService()
    • getPoService

      protected TmaPoService getPoService()