com.jgoodies.validation.util
Class DefaultValidationResultModel

java.lang.Object
  extended by com.jgoodies.common.bean.AbstractBean
      extended by com.jgoodies.validation.util.AbstractValidationResultModel
          extended by com.jgoodies.validation.util.DefaultValidationResultModel
All Implemented Interfaces:
com.jgoodies.common.bean.ObservableBean, com.jgoodies.common.bean.ObservableBean2, ValidationResultModel, Serializable
Direct Known Subclasses:
LimitedValidationResultModel, ValidationResultModelContainer

public class DefaultValidationResultModel
extends AbstractValidationResultModel

A default implementation of the ValidationResultModel interface that holds a ValidationResult.

Version:
$Revision: 1.11 $
Author:
Karsten Lentzsch
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.jgoodies.common.bean.AbstractBean
changeSupport
 
Fields inherited from interface com.jgoodies.validation.ValidationResultModel
PROPERTY_ERRORS, PROPERTY_MESSAGES, PROPERTY_RESULT, PROPERTY_SEVERITY, PROPERTYNAME_ERRORS, PROPERTYNAME_MESSAGES, PROPERTYNAME_RESULT, PROPERTYNAME_SEVERITY
 
Constructor Summary
DefaultValidationResultModel()
          Constructs a DefaultValidationResultModel initialized with an empty validation result.
 
Method Summary
 ValidationResult getResult()
          Returns this model's validation result.
 void setResult(ValidationResult newResult)
          Sets a new validation result and notifies all registered listeners about changes of the result itself and the properties for severity, errors and messages.
 
Methods inherited from class com.jgoodies.validation.util.AbstractValidationResultModel
firePropertyChanges, getSeverity, hasErrors, hasMessages
 
Methods inherited from class com.jgoodies.common.bean.AbstractBean
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jgoodies.common.bean.ObservableBean2
addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener
 
Methods inherited from interface com.jgoodies.common.bean.ObservableBean
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

DefaultValidationResultModel

public DefaultValidationResultModel()
Constructs a DefaultValidationResultModel initialized with an empty validation result.

Method Detail

getResult

public final ValidationResult getResult()
Returns this model's validation result.

Returns:
the current validation result
See Also:
ValidationResultModel.setResult(ValidationResult)

setResult

public void setResult(ValidationResult newResult)
Sets a new validation result and notifies all registered listeners about changes of the result itself and the properties for severity, errors and messages. This method is typically invoked at the end of the #validate() method.

Parameters:
newResult - the validation result to be set
Throws:
NullPointerException - if newResult is null
See Also:
getResult(), ValidationResultModelContainer.setResult(ValidationResult)


Copyright © 2003-2011 JGoodies Karsten Lentzsch. All Rights Reserved.