Class ValidationResult
java.lang.Object
com.aquima.interactions.rule.validation.ValidationResult
- All Implemented Interfaces:
IValidationResult
This class holds the result of a validation action.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addMessage
(ValidationMessage message) This method returns the attribute that the validation was performed on.This method returns an array of validation messages.boolean
isValid()
This method returns the (global) result of the validation action.
-
Constructor Details
-
ValidationResult
-
-
Method Details
-
addMessage
-
getAttribute
Description copied from interface:IValidationResult
This method returns the attribute that the validation was performed on.- Specified by:
getAttribute
in interfaceIValidationResult
- Returns:
- A reference to the value that was validated.
-
isValid
public boolean isValid()Description copied from interface:IValidationResult
This method returns the (global) result of the validation action. When this method returns true, all validations that have been defined for the attribute did succeed. When the method returns false, one or more validations failed, and the getMessages method can be used to query for the details about the failed validations.- Specified by:
isValid
in interfaceIValidationResult
- Returns:
- boolean indicating if all the validations succeeded.
-
getMessages
Description copied from interface:IValidationResult
This method returns an array of validation messages. When all the validation did succeed (the isValid method returns true) this method will return an empty array.- Specified by:
getMessages
in interfaceIValidationResult
- Returns:
- array containing all the validation messages of the failed validations.
-