Package de.xima.fc.form.common.models
Class XValidationResult
- java.lang.Object
-
- de.xima.fc.form.common.models.XValidationResult
-
- All Implemented Interfaces:
IXValidationResult,Serializable
public class XValidationResult extends Object implements IXValidationResult
A simple POJO implementation ofIXValidationResult.- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XValidationResult()Creates 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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringgetMessage()booleangetValid()Deprecated.booleanisValid()voidsetMessage(String message)Deprecated.Do not modify this instance, use the appropriate constructor with the data you require.voidsetValid(boolean valid)Deprecated.Do not modify this instance, use the appropriate constructor with the data you require.
-
-
-
Constructor Detail
-
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
public XValidationResult(boolean valid, String message)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 Detail
-
getMessage
public String getMessage()
- Specified by:
getMessagein interfaceIXValidationResult- Returns:
- In case
IXValidationResult.isValid()returnsfalse, the error message that should be displayed.
-
setMessage
@Deprecated public void setMessage(String message)
Deprecated.Do not modify this instance, use the appropriate constructor with the data you require.- Parameters:
message- the message
-
getValid
@Deprecated public boolean getValid()
Deprecated.- Returns:
- Use
isValid().
-
isValid
public boolean isValid()
- Specified by:
isValidin interfaceIXValidationResult- Returns:
- Whether the submitted values are valid.
-
setValid
@Deprecated public void setValid(boolean valid)
Deprecated.Do not modify this instance, use the appropriate constructor with the data you require.- Parameters:
valid- Whether the submitted values are valid.
-
-