Class DefaultRuleTemplate

java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.rules.DefaultRuleTemplate

public class DefaultRuleTemplate extends AbstractReportingTemplate
Template class that can be used to create a data source for a default rule.
Since:
6.0
Author:
Jon van Leuven
  • Constructor Details

    • DefaultRuleTemplate

      public DefaultRuleTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, String attributeName, String expression)
      Constructs the template with an attribute and an expression.
      Parameters:
      report - the report to add errors and warnings during initialization.
      attributeName - The attribute for which the default is defined.
      expression - The expression that should be used to determine the default value.
    • DefaultRuleTemplate

      public DefaultRuleTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, String attributeName, com.aquima.interactions.foundation.IValue attrValue)
      Constructs the template with an attribute and a value.
      Parameters:
      report - the report to add errors and warnings during initialization.
      attributeName - The attribute for which the default is defined.
      attrValue - The value that should be used as default.
    • DefaultRuleTemplate

      public DefaultRuleTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, String attributeName, DecisionTableTemplate defRule)
      Constructs the template with an attribute and a decision table.
      Parameters:
      report - the report to add errors and warnings during initialization.
      attributeName - The attribute for which the default is defined.
      defRule - The value that should be used as default.
  • Method Details

    • getValue

      protected com.aquima.interactions.foundation.IValue getValue()
    • getExpression

      protected String getExpression()
    • getAttributeName

      protected String getAttributeName()
    • getTable

      protected DecisionTableTemplate getTable()
    • getType

      protected com.aquima.interactions.rule.DefaultRuleType getType()
    • addRuleGroup

      public void addRuleGroup(String name)
      This method may be used to specify the name of a rule group the rule should belong to.
      Parameters:
      name - The name of the group that this rule should be part of.
    • getRuleGroupNames

      protected String[] getRuleGroupNames()
    • toDataSource

      public com.aquima.interactions.rule.ds.IDefaultRuleDS toDataSource()
      This method converts the template to a data source.
      Returns:
      Data source based on the template.
    • getJustification

      public JustificationTemplate getJustification()
    • setJustification

      public void setJustification(String assetId)