Interface RuleValidation
- All Known Implementing Classes:
AttributeRuleValidator,CheckoutRuleValidator,CollectionRuleValidation,ReleaseTargetValidator
public interface RuleValidation
All the validation business rules will implement Rule Validation interface
for its execution included in the rules processing framework. A typical
validation business rules will fall under 2 primary categories:
Supported API: true
Extendable: true
- Simple validation: The rules check is done on the business object itself. Example could be checking for attribute validation or checking a life cycle state of the object prior to release.
- Structured validation: The rules may or may not be performed on the business objects but will include some validation checks on its associated objects like the children of the part or document. In this type of validation, typically more complex set of algorithm might be required to calculate the business validation rules and populate the validation result with appropriate flag.
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionClass[]getSupportedClasses(RuleValidationKey validationKey) Will return the array of classes that the validation rule will handle.booleanisConfigurationValid(RuleValidationKey validationKey) For a given rule configuration will check if the rule is valid to be executed before it gets persisted or prior to executing the rule.performValidation(RuleValidationKey validationKey, RuleValidationObject validationObject, RuleValidationCriteria criteria) Will validate the business object against the rule and add the result to the validation result set.voidprepareForValidation(RuleValidationKey validationKey, RuleValidationCriteria criteria) Allows for batch processing on a list of data objects before performValidation is called on each object.
-
Method Details
-
performValidation
RuleValidationResult performValidation(RuleValidationKey validationKey, RuleValidationObject validationObject, RuleValidationCriteria criteria) throws WTException Will validate the business object against the rule and add the result to the validation result set.
Supported API: true- Parameters:
validationKey-validationObject-criteria-- Returns:
- validation result
- Throws:
WTException
-
prepareForValidation
void prepareForValidation(RuleValidationKey validationKey, RuleValidationCriteria criteria) throws WTException Allows for batch processing on a list of data objects before performValidation is called on each object.
Supported API: true- Parameters:
validationKey-criteria-- Throws:
WTException
-
isConfigurationValid
For a given rule configuration will check if the rule is valid to be executed before it gets persisted or prior to executing the rule.
Supported API: true- Parameters:
validationKey-- Returns:
- true when the configuration is valid
- Throws:
WTException
-
getSupportedClasses
Will return the array of classes that the validation rule will handle.
Supported API: true- Parameters:
validationKey-- Returns:
- the array of classes
-