public abstract class AbstractValidationResultModel extends com.jgoodies.common.bean.AbstractBean implements ValidationResultModel
ValidationResultModel
interface. It provides a property
change support
behavior to add and remove methods
to convert boolean, double, float, int, and long to their
corresponding Object values.
Subclasses must implement getResult()
and
setResult(ValidationResult)
to get and set
the observable validation result. #getResult always returns a
non-null result, #setResult accepts only non-null results.
DefaultValidationResultModel
,
Serialized FormPROPERTY_ERRORS, PROPERTY_MESSAGES, PROPERTY_RESULT, PROPERTY_SEVERITY, PROPERTYNAME_ERRORS, PROPERTYNAME_MESSAGES, PROPERTYNAME_RESULT, PROPERTYNAME_SEVERITY
Constructor and Description |
---|
AbstractValidationResultModel() |
Modifier and Type | Method and Description |
---|---|
protected void |
firePropertyChanges(ValidationResult oldResult,
ValidationResult newResult)
Notifies all registered listeners about changes of the result itself
and the properties for severity, errors and messages.
|
Severity |
getSeverity()
Looks up and returns the severity of the validation result,
one of error, warning, or
null . |
boolean |
hasErrors()
Checks and answers whether the validation result has errors.
|
boolean |
hasMessages()
Checks and answers whether the validation result has messages.
|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPropertyChangeSupport, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResult, setResult
public final Severity getSeverity()
null
.getSeverity
in interface ValidationResultModel
ValidationResultModel.hasErrors()
,
ValidationResultModel.hasMessages()
public final boolean hasErrors()
hasErrors
in interface ValidationResultModel
ValidationResultModel.getSeverity()
,
ValidationResultModel.hasMessages()
public final boolean hasMessages()
hasMessages
in interface ValidationResultModel
ValidationResultModel.getSeverity()
,
ValidationResultModel.hasErrors()
protected final void firePropertyChanges(ValidationResult oldResult, ValidationResult newResult)
oldResult
- the old validation resultnewResult
- the new validation resultNullPointerException
- if the old or new result is null
ValidationResultModel.setResult(ValidationResult)
,
ValidationResultModelContainer.setResult(ValidationResult)
Copyright © 2003-2011 JGoodies Karsten Lentzsch. All Rights Reserved.