Class ValidationMessage
java.lang.Object
com.aquima.interactions.rule.validation.ValidationMessage
- All Implemented Interfaces:
IValidationMessage
This class holds the message of a single validation action.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsConstructorDescriptionValidationMessage
(String name, boolean warning, IMultilingualText message) Constructs the validation message with the required parameters. -
Method Summary
Modifier and TypeMethodDescriptiongetText()
This method returns a text explaining the validation failure.This method returns the name of the validation rule that failed.boolean
isError()
This method returns a boolean indicating if the failure is considered an error.boolean
This method returns a boolean indicating if the failure is considered a warning.
-
Constructor Details
-
ValidationMessage
Constructs the validation message with the required parameters.- Parameters:
name
- The name of the validation rule that generated the message.warning
- Boolean indicating if the message should be treaded as warning instead of error.message
- The message explaining the cause of the validation failure.
-
-
Method Details
-
getValidationName
Description copied from interface:IValidationMessage
This method returns the name of the validation rule that failed.- Specified by:
getValidationName
in interfaceIValidationMessage
- Returns:
- the name of the validation rule that failed.
-
isWarning
public boolean isWarning()Description copied from interface:IValidationMessage
This method returns a boolean indicating if the failure is considered a warning.- Specified by:
isWarning
in interfaceIValidationMessage
- Returns:
- boolean indicating if the failure is considered a warning.
-
isError
public boolean isError()Description copied from interface:IValidationMessage
This method returns a boolean indicating if the failure is considered an error.- Specified by:
isError
in interfaceIValidationMessage
- Returns:
- boolean indicating if the failure is considered an error.
-
getText
Description copied from interface:IValidationMessage
This method returns a text explaining the validation failure.- Specified by:
getText
in interfaceIValidationMessage
- Returns:
- text explaining the validation failure.
-