Package de.xima.fc.form.common.models
Class XValidationResult
java.lang.Object
de.xima.fc.form.common.models.XValidationResult
- All Implemented Interfaces:
IXValidationResult
,Serializable
A simple POJO implementation of
IXValidationResult
.- Author:
- XIMA MEDIA GmbH
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new validation result representing a successful validation (no validation error).XValidationResult
(boolean valid) Creates a new validation result with an empty message.XValidationResult
(boolean valid, String message) Creates a new validation result with the given message. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getValid()
Deprecated.boolean
isValid()
void
setMessage
(String message) Deprecated.Do not modify this instance, use the appropriate constructor with the data you require.void
setValid
(boolean valid) Deprecated.Do not modify this instance, use the appropriate constructor with the data you require.
-
Constructor Details
-
XValidationResult
public XValidationResult()Creates a new validation result representing a successful validation (no validation error). -
XValidationResult
public XValidationResult(boolean valid) Creates a new validation result with an empty message.- Parameters:
valid
- Whether the submitted values were valid.
-
XValidationResult
Creates a new validation result with the given message.- Parameters:
valid
- Whether the submitted values were valid.message
- The error message to display in case the values are not valid.
-
-
Method Details
-
getMessage
- Specified by:
getMessage
in interfaceIXValidationResult
- Returns:
- In case
IXValidationResult.isValid()
returnsfalse
, the error message that should be displayed.
-
setMessage
Deprecated.Do not modify this instance, use the appropriate constructor with the data you require.- Parameters:
message
- the message
-
getValid
Deprecated.- Returns:
- Use
isValid()
.
-
isValid
public boolean isValid()- Specified by:
isValid
in interfaceIXValidationResult
- Returns:
- Whether the submitted values are valid.
-
setValid
Deprecated.Do not modify this instance, use the appropriate constructor with the data you require.- Parameters:
valid
- Whether the submitted values are valid.
-