Class RuleDefinition

java.lang.Object
com.aquima.interactions.ds.RuleDefinition
All Implemented Interfaces:
Serializable

public class RuleDefinition extends Object implements Serializable
This class contains the definition of a single custom business rule. The rule factory is used to locate the actual implementation of the rule.
Since:
7.0
Author:
O. Kerpershoek
See Also:
  • Constructor Details

    • RuleDefinition

      public RuleDefinition(String name, String type, List<String> targetAttributes)
      Constructs the rule definition with the required arguments.
      Parameters:
      name - The (unique) name of the rule.
      type - The type name of the rule (see RuleType).
      targetAttributes - A list containing the (full) names of the attributes the rule is defined for.
    • RuleDefinition

      public RuleDefinition(String name, String type, List<String> targetAttributes, List<String> ruleGroupNames)
      Constructs the rule definition with the required arguments.
      Parameters:
      name - The (unique) name of the rule.
      type - The type name of the rule (see RuleType).
      targetAttributes - A list containing the (full) names of the attributes the rule is defined for.
      ruleGroupNames - List containing the names of the rule groups this rule belongs to.
    • RuleDefinition

      public RuleDefinition(String name, RuleType type, List<String> targetAttributes, List<String> ruleGroupNames)
      Constructs the rule definition with the required arguments.
      Parameters:
      name - The (unique) name of the rule.
      type - The type of the rule.
      targetAttributes - A list containing the (full) names of the attributes the rule is defined for.
      ruleGroupNames - List containing the names of the rule groups this rule belongs to.
  • Method Details

    • getName

      public String getName()
      This method returns the (unique) name of the rule.
      Returns:
      The (unique) name of the rule.
    • getRuleType

      public RuleType getRuleType()
      This method returns the type of the rule.
      Returns:
      The type of the rule.
    • getTargetAttributes

      public String[] getTargetAttributes()
      This method returns an array containing the (full) names of the attributes the rule is defined for.
      Returns:
      an array containing the (full) names of the attributes the rule is defined for.
    • getRuleGroupNames

      public String[] getRuleGroupNames()
      This method returns an array containing the names of the rule groups this rule belongs to.
      Returns:
      an array containing the names of the rule groups this rule belongs to.
    • getModuleNames

      public String[] getModuleNames()
      This method returns an array containing the names of the modules this rule is used by or null if the rule is used by all the modules.
      Returns:
      the names of the modules (can be null)
    • setModuleNames

      public void setModuleNames(String[] moduleNames)
      This method sets the names of the modules this rule is used by.
      Parameters:
      moduleNames - the names of the modules this rule is used by.