Class ValidationTemplate

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

public class ValidationTemplate extends AbstractReportingTemplate
Template class that may be used to construct a validation rule.
Since:
6.3
Author:
Jon van Leuven
  • Constructor Details

    • ValidationTemplate

      protected ValidationTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, String targetAttribute, com.aquima.interactions.framework.validator.ValidatorType type, com.aquima.interactions.foundation.text.IMultilingualText message, boolean isWarning)
  • Method Details

    • getTargetAttribute

      protected String getTargetAttribute()
    • getType

      protected com.aquima.interactions.framework.validator.ValidatorType getType()
    • isWarning

      protected boolean isWarning()
    • getMessage

      protected com.aquima.interactions.foundation.text.IMultilingualText getMessage()
    • getExpression

      protected String getExpression()
    • setExpression

      public void setExpression(String expression)
      This method may be used to specify the expression of the business validation.
      Parameters:
      expression - The expression that should be used in the validation rule.
    • addParameter

      public void addParameter(String key, String paramValue)
      This method may be used to add a parameter value to the validator.
      Parameters:
      key - The name of the parameter.
      paramValue - The valud of the parameter.
    • getParameters

      protected Map<String,String> getParameters()
    • 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.IValidationDS toDatasource()
      This method returns an implementation of the IValidatorDS interface based on this template.
      Returns:
      an implementation of the IValidatorDS interface based on this template.