Class RuleEvaluatorImpl

  • All Implemented Interfaces:
    RuleEvaluator

    public class RuleEvaluatorImpl
    extends java.lang.Object
    implements RuleEvaluator
    The Rule Evaluator evaluates the operation and returns details of the commands to implement those operations.

    It is configured with a list of scenarios which act as factories for scenario instances.

    • Constructor Detail

      • RuleEvaluatorImpl

        public RuleEvaluatorImpl()
    • Method Detail

      • init

        public void init()
      • evaluate

        public Command evaluate​(EvaluatorContext context,
                                Operation operation)
        Evaluate the scenarios against the current operation
        Specified by:
        evaluate in interface RuleEvaluator
        Parameters:
        operation - the operation to be evaluated
        context - - the context to evaluate the operation
        Returns:
        the command to execute that operation
      • setScenarios

        public void setScenarios​(java.util.List<Scenario> scenarios)
      • getScenarios

        public java.util.List<Scenario> getScenarios()
      • createContext

        public EvaluatorContext createContext​(java.util.Map<java.lang.String,​java.lang.Object> sessionState)
        Description copied from interface: RuleEvaluator
        Create a new evaluator context. Typically for a particular folder. An evaluator context groups operations together.
        Specified by:
        createContext in interface RuleEvaluator
        Returns:
        the new context.