Class DefaultRuleActionService

java.lang.Object
de.hybris.platform.ruleengineservices.action.impl.DefaultRuleActionService
All Implemented Interfaces:
RuleActionService
Direct Known Subclasses:
DefaultPromotionRuleActionService

public class DefaultRuleActionService extends Object implements RuleActionService
Default implementation of RuleActionService
  • Constructor Details

    • DefaultRuleActionService

      public DefaultRuleActionService()
  • Method Details

    • applyAllActions

      public List<ItemModel> applyAllActions(RuleEngineResultRAO ruleEngineResultRAO)
      Takes a RuleEngineResultRAO as argument and gets list of its Actions, then for each Action applies corresponding RuleActionStrategy specified by its strategy field.
      Specified by:
      applyAllActions in interface RuleActionService
      Parameters:
      ruleEngineResultRAO - contains Actions
      Returns:
      list of ItemModel (or it subclasses) as a result of the Actions application.
    • isActionApplicable

      protected boolean isActionApplicable(AbstractRuleActionRAO action, Set<AbstractRuleActionRAO> actions)
    • getRuleActionStrategy

      protected RuleActionStrategy getRuleActionStrategy(String strategyKey)
      returns the RuleActionStrategy defined in the actionStrategiesMapping attribute of this service by looking up it's hey.
      Parameters:
      strategyKey - the key of the RuleActionStrategy to look up
      Returns:
      the found bean id
      Throws:
      IllegalArgumentException - if the requested strategy cannot be found
      IllegalStateException - if this method is called but no strategies are configured
    • getActionStrategiesMapping

      public Map<String,RuleActionStrategy> getActionStrategiesMapping()
    • setActionStrategiesMapping

      public void setActionStrategiesMapping(Map<String,RuleActionStrategy> actionStrategiesMapping)