public interface ValidationResultModel
extends com.jgoodies.common.bean.ObservableBean2
ValidationResult
and provides bound
read-only properties for the result, severity, error and messages state.DefaultValidationResultModel
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_ERRORS
The name of the bound property that indicates whether there are errors.
|
static String |
PROPERTY_MESSAGES
The name of the bound property that indicates whether there are messages.
|
static String |
PROPERTY_RESULT
The name of the bound property for the validation result.
|
static String |
PROPERTY_SEVERITY
The name of the bound property for the validation result severity.
|
static String |
PROPERTYNAME_ERRORS
Deprecated.
Replaced by
PROPERTY_ERRORS |
static String |
PROPERTYNAME_MESSAGES
Deprecated.
Replaced by
PROPERTY_MESSAGES |
static String |
PROPERTYNAME_RESULT
Deprecated.
Replaced by
PROPERTY_RESULT |
static String |
PROPERTYNAME_SEVERITY
Deprecated.
Replaced by
PROPERTY_SEVERITY |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
getResult()
Returns this model's validation result which must be non-null.
|
Severity |
getSeverity()
Looks up and returns the Severity of this model's validation result,
one of
Severity.ERROR , Severity.WARNING ,
or Severity.OK . |
boolean |
hasErrors()
Checks and answers whether this model's validation result has errors.
|
boolean |
hasMessages()
Checks and answers whether this model's validation result has messages.
|
void |
setResult(ValidationResult newResult)
Sets a new non-null validation result and notifies all registered
listeners, if the result changed.
|
static final String PROPERTY_RESULT
getResult()
,
Constant Field Values@Deprecated static final String PROPERTYNAME_RESULT
PROPERTY_RESULT
getResult()
,
Constant Field Valuesstatic final String PROPERTY_SEVERITY
getSeverity()
,
Constant Field Values@Deprecated static final String PROPERTYNAME_SEVERITY
PROPERTY_SEVERITY
getSeverity()
,
Constant Field Valuesstatic final String PROPERTY_ERRORS
hasErrors()
,
Constant Field Values@Deprecated static final String PROPERTYNAME_ERRORS
PROPERTY_ERRORS
hasErrors()
,
Constant Field Valuesstatic final String PROPERTY_MESSAGES
hasMessages()
,
Constant Field Values@Deprecated static final String PROPERTYNAME_MESSAGES
PROPERTY_MESSAGES
hasMessages()
,
Constant Field ValuesValidationResult getResult()
setResult(ValidationResult)
void setResult(ValidationResult newResult)
#validate()
method.Implementors shall throw a NullPointerException if the new result is null.
newResult
- the validation result to be setgetResult()
Severity getSeverity()
Severity.ERROR
, Severity.WARNING
,
or Severity.OK
.hasErrors()
,
hasMessages()
boolean hasErrors()
getSeverity()
,
hasMessages()
boolean hasMessages()
getSeverity()
,
hasErrors()
Copyright © 2003-2011 JGoodies Karsten Lentzsch. All Rights Reserved.