public interface ValidationResult extends Serializable
ValidationResult instances are created using the factory methods
ok() and error(String), denoting success and failure
respectively.
| Modifier and Type | Interface and Description |
|---|---|
static class |
ValidationResult.SimpleValidationResult |
| Modifier and Type | Method and Description |
|---|---|
static ValidationResult |
error(String errorMessage)
Creates the validation result which represent an error with the given
errorMessage. |
String |
getErrorMessage()
Returns the result message.
|
boolean |
isError()
Checks if the result denotes an error.
|
static ValidationResult |
ok()
Returns a successful result.
|
String getErrorMessage()
Throws an IllegalStateException if the result represents success.
IllegalStateException - if the result represents successboolean isError()
true if the result denotes an error,
false otherwisestatic ValidationResult ok()
static ValidationResult error(String errorMessage)
errorMessage.errorMessage - error message, not nullerrorMessageNullPointerException - if errorMessage is nullCopyright © 2017 Vaadin Ltd. All rights reserved.