Class RuleBuilder

    • Constructor Detail

      • RuleBuilder

        public RuleBuilder()
    • Method Detail

      • name

        public RuleBuilder name​(String name)
        Set rule name.
        Parameters:
        name - of the rule
        Returns:
        the builder instance
      • description

        public RuleBuilder description​(String description)
        Set rule description.
        Parameters:
        description - of the rule
        Returns:
        the builder instance
      • priority

        public RuleBuilder priority​(int priority)
        Set rule priority.
        Parameters:
        priority - of the rule
        Returns:
        the builder instance
      • when

        public RuleBuilder when​(Condition condition)
        Set rule condition.
        Parameters:
        condition - of the rule
        Returns:
        the builder instance
      • then

        public RuleBuilder then​(Action action)
        Add an action to the rule.
        Parameters:
        action - to add
        Returns:
        the builder instance
      • build

        public Rule build()
        Create a new Rule.
        Returns:
        a new rule instance