Class ValidationDelegateDS

java.lang.Object
com.aquima.interactions.foundation.report.ReportingDelegateDS
com.aquima.interactions.rule.ds.delegate.ValidationDelegateDS
All Implemented Interfaces:
IReportingDS, IRuleDS, IValidationDS
Direct Known Subclasses:
ValidationDS

public class ValidationDelegateDS extends ReportingDelegateDS implements IValidationDS
Delegate datasource for easy datasource extension. All method calls are delegated to the delegate datasource without adding any functionality.
Since:
8.0
Author:
Jon van Leuven
  • Constructor Details

    • ValidationDelegateDS

      public ValidationDelegateDS(IValidationDS datasource)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: IValidationDS
      This method returns the name of the validation rule. The name of a validation rule is mostly used to uniquely identify the result of a validation.
      Specified by:
      getName in interface IValidationDS
      Returns:
      the name of the validation rule.
    • getRuleGroupNames

      public String[] getRuleGroupNames()
      Description copied from interface: IRuleDS
      This method returns an array containing the names of the rule groups the rule belongs to. If the rule does not belong to a specific rule group, the returned value may either be null or an empty array. Rules that belong to a rule group will only be evaluated when one (or more) of the rule groups are active. Rule groups are sometimes referred to as rule clusters.
      Specified by:
      getRuleGroupNames in interface IRuleDS
      Returns:
      an array containing the names of the rule groups the rule belongs to.
    • isBusinessValidation

      public boolean isBusinessValidation()
      Description copied from interface: IValidationDS
      This method indicates if the validation is a business validation (expression), or if false a normal field (value) validation.
      Specified by:
      isBusinessValidation in interface IValidationDS
      Returns:
      Boolean indicating if this validation is a business validation.
    • getExpression

      public String getExpression()
      Description copied from interface: IValidationDS
      This method returns the expression string that should be used. The expression is only relevant for business validations.
      Specified by:
      getExpression in interface IValidationDS
      Returns:
      the expression string that should be used.
    • getTypeName

      public String getTypeName()
      Description copied from interface: IValidationDS
      This method returns the type of the validation. The ValidatorType class contains a list of standard supported validation types.
      Specified by:
      getTypeName in interface IValidationDS
      Returns:
      The type of the validation
    • getMessage

      public IMultilingualText getMessage()
      Description copied from interface: IValidationDS
      This method returns a text object containing an explanation that should be used when the validation fails.
      Specified by:
      getMessage in interface IValidationDS
      Returns:
      Text object containing an explanation about the validation failure.
    • getPriority

      public int getPriority()
      Description copied from interface: IValidationDS
      This method returns the priority of the validation. The priority is used to determine the order in which validations should be executed.
      Specified by:
      getPriority in interface IValidationDS
      Returns:
      the priority of the validation.
    • isWarning

      public boolean isWarning()
      Description copied from interface: IValidationDS
      This method returns a boolean indicating if the failed validation should be treated as warning instead of an error. When this method returns false (default), a failed validation will be treated as error.
      Specified by:
      isWarning in interface IValidationDS
      Returns:
      boolean indicating if the failed validation should be treated as warning
    • getTargetAttribute

      public String getTargetAttribute()
      Description copied from interface: IValidationDS
      This method returns the name of the attribute (including the entity name) for which the validation is defined.
      Specified by:
      getTargetAttribute in interface IValidationDS
      Returns:
      The name of the attribute for which the validation is defined.
    • iterateParameters

      public void iterateParameters(IValidationParameterVisitor visitor)
      Description copied from interface: IValidationDS
      Optional method that may be used to pass additional parameters to the validation.
      Specified by:
      iterateParameters in interface IValidationDS
      Parameters:
      visitor - the visitor which accepts the parameter information