public class CmsValidationResult extends java.lang.Object implements com.google.gwt.user.client.rpc.IsSerializable
Modifier and Type | Field and Description |
---|---|
static CmsValidationResult |
VALIDATION_OK
Convenience constant which contains a validation result for successful validations.
|
Modifier | Constructor and Description |
---|---|
protected |
CmsValidationResult()
Hidden default constructor.
|
|
CmsValidationResult(java.lang.String errorMessage)
Creates a new validation result which doesn't replace the current field value.
|
|
CmsValidationResult(java.lang.String errorMessage,
java.lang.String newValue)
Creates a new validation result which also replaces the current field value.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getErrorMessage()
Returns the error message, or null if the validation has succeeded.
|
java.lang.String |
getNewValue()
Returns the replacement for the field value.
|
boolean |
hasNewValue()
Returns true if the field value should be replaced.
|
boolean |
isOk()
Returns true if the validation has succeeded.
|
public static final CmsValidationResult VALIDATION_OK
public CmsValidationResult(java.lang.String errorMessage)
errorMessage
- the error message to display, or null if therepublic CmsValidationResult(java.lang.String errorMessage, java.lang.String newValue)
errorMessage
- the error message to display, or null if there was no errornewValue
- the replacement for the field valueprotected CmsValidationResult()
public java.lang.String getErrorMessage()
public java.lang.String getNewValue()
public boolean hasNewValue()
public boolean isOk()