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
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method returns the expression string that should be used.This method returns a text object containing an explanation that should be used when the validation fails.getName()
This method returns the name of the validation rule.int
This method returns the priority of the validation.String[]
This method returns an array containing the names of the rule groups the rule belongs to.This method returns the name of the attribute (including the entity name) for which the validation is defined.This method returns the type of the validation.boolean
This method indicates if the validation is a business validation (expression), or if false a normal field (value) validation.boolean
This method returns a boolean indicating if the failed validation should be treated as warning instead of an error.void
Optional method that may be used to pass additional parameters to the validation.Methods inherited from class com.aquima.interactions.foundation.report.ReportingDelegateDS
addMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aquima.interactions.foundation.report.IReportingDS
addMessage
-
Constructor Details
-
ValidationDelegateDS
-
-
Method Details
-
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 interfaceIValidationDS
- Returns:
- the name of the validation rule.
-
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 interfaceIRuleDS
- 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 interfaceIValidationDS
- Returns:
- Boolean indicating if this validation is a business validation.
-
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 interfaceIValidationDS
- Returns:
- the expression string that should be used.
-
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 interfaceIValidationDS
- Returns:
- The type of the validation
-
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 interfaceIValidationDS
- 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 interfaceIValidationDS
- 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 interfaceIValidationDS
- Returns:
- boolean indicating if the failed validation should be treated as warning
-
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 interfaceIValidationDS
- Returns:
- The name of the attribute for which the validation is defined.
-
iterateParameters
Description copied from interface:IValidationDS
Optional method that may be used to pass additional parameters to the validation.- Specified by:
iterateParameters
in interfaceIValidationDS
- Parameters:
visitor
- the visitor which accepts the parameter information
-