Class DefaultRuleActionService

    • Constructor Detail

      • DefaultRuleActionService

        public DefaultRuleActionService()
    • Method Detail

      • applyAllActions

        public java.util.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.
      • getRuleActionStrategy

        protected RuleActionStrategy getRuleActionStrategy​(java.lang.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:
        java.lang.IllegalArgumentException - if the requested strategy cannot be found
        java.lang.IllegalStateException - if this method is called but no strategies are configured
      • getActionStrategiesMapping

        public java.util.Map<java.lang.String,​RuleActionStrategy> getActionStrategiesMapping()
      • setActionStrategiesMapping

        public void setActionStrategiesMapping​(java.util.Map<java.lang.String,​RuleActionStrategy> actionStrategiesMapping)