Class DSLRule<U,V>

All Implemented Interfaces:
Rule

public abstract class DSLRule<U,V> extends JavaRule
DSLRule which returns an executable Action if one or more Conditions are met.
  • Field Details

  • Constructor Details

    • DSLRule

      public DSLRule(JavaRuleConfig config, Set<? extends Condition<U,V>> conditionSet)
      Creates a new instance of DSLRule.
      Parameters:
      config - java rule configuration
      conditionSet - DSL rule condition set
  • Method Details

    • applyInternal

      protected void applyInternal(RuleContext<?> ctx)
      Applies a rule context across a Condition set. If a match is found, stores a lazy execution in DSL_RULE_INPUT. The realized lazy execution result will be stored in DSL_RULE_OUTPUT.
      Specified by:
      applyInternal in class BaseRule
      Parameters:
      ctx - rule context
    • applyInternal

      protected <T> T applyInternal(RuleContext<?> ctx, Class<T> outputType)
      Unused as we store the result in the RuleContext itself.
      Specified by:
      applyInternal in class BaseRule
      Type Parameters:
      T - type of rule output
      Parameters:
      ctx - rule context
      outputType - type of rule output
      Returns:
      rule result
    • getConditionSet

      public Set<? extends Condition<U,V>> getConditionSet()
      Returns the conditionSet.
      Returns:
      conditionSet