Class ValidationTemplate
java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.rules.ValidationTemplate
Template class that may be used to construct a validation rule.
- Since:
- 6.3
- Author:
- Jon van Leuven
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
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 Summary
Modifier and TypeMethodDescriptionvoid
addParameter
(String key, String paramValue) This method may be used to add a parameter value to the validator.void
addRuleGroup
(String name) This method may be used to specify the name of a rule group the rule should belong to.protected String
protected com.aquima.interactions.foundation.text.IMultilingualText
protected String[]
protected String
protected com.aquima.interactions.framework.validator.ValidatorType
getType()
protected boolean
void
setExpression
(String expression) This method may be used to specify the expression of the business validation.com.aquima.interactions.rule.ds.IValidationDS
This method returns an implementation of the IValidatorDS interface based on this template.Methods inherited from class com.aquima.interactions.test.templates.AbstractReportingTemplate
getInitializationReport
-
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
-
getType
protected com.aquima.interactions.framework.validator.ValidatorType getType() -
isWarning
protected boolean isWarning() -
getMessage
protected com.aquima.interactions.foundation.text.IMultilingualText getMessage() -
getExpression
-
setExpression
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
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
-
addRuleGroup
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
-
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.
-