org.springframework.binding.validation
Interface ValidationResultsModel

All Superinterfaces:
PropertyChangePublisher, ValidationResults
All Known Implementing Classes:
DefaultValidationResultsModel

public interface ValidationResultsModel
extends ValidationResults, PropertyChangePublisher

Adds the propertyChange and parent-child aspect to the ValidationResults interface. Listeners can be registered on validation changes of a specific property or on all changes. Additionally a validationResultsModel has to be aware of its parent-child relationships to forward these changes in its ValidationResults.

Author:
Oliver Hutchison

Field Summary
static String HAS_ERRORS_PROPERTY
          The name of the bound property hasErrors.
static String HAS_INFO_PROPERTY
          The name of the bound property hasInfos.
static String HAS_WARNINGS_PROPERTY
          The name of the bound property hasWarnings.
 
Method Summary
 void add(ValidationResultsModel validationResultsModel)
          Add a validationResultsModel as a child to this one.
 void addValidationListener(String propertyName, ValidationListener listener)
          Adds a listener that will be notified when there is any change to the set validation messages for the specified property.
 void addValidationListener(ValidationListener listener)
          Adds a listener that will be notified when there is any change to the set of validation messages.
 void remove(ValidationResultsModel validationResultsModel)
          Remove the given validationResultsModel from the list of children.
 void removeValidationListener(String propertyName, ValidationListener listener)
          Removes the provided validation listener.
 void removeValidationListener(ValidationListener listener)
          Removes the provided validation listener.
 
Methods inherited from interface org.springframework.binding.validation.ValidationResults
getHasErrors, getHasInfo, getHasWarnings, getMessageCount, getMessageCount, getMessageCount, getMessages, getMessages, getMessages
 
Methods inherited from interface org.springframework.binding.value.PropertyChangePublisher
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Field Detail

HAS_ERRORS_PROPERTY

static final String HAS_ERRORS_PROPERTY
The name of the bound property hasErrors.

See Also:
Constant Field Values

HAS_WARNINGS_PROPERTY

static final String HAS_WARNINGS_PROPERTY
The name of the bound property hasWarnings.

See Also:
Constant Field Values

HAS_INFO_PROPERTY

static final String HAS_INFO_PROPERTY
The name of the bound property hasInfos.

See Also:
Constant Field Values
Method Detail

addValidationListener

void addValidationListener(ValidationListener listener)
Adds a listener that will be notified when there is any change to the set of validation messages.


removeValidationListener

void removeValidationListener(ValidationListener listener)
Removes the provided validation listener.


addValidationListener

void addValidationListener(String propertyName,
                           ValidationListener listener)
Adds a listener that will be notified when there is any change to the set validation messages for the specified property.


removeValidationListener

void removeValidationListener(String propertyName,
                              ValidationListener listener)
Removes the provided validation listener.


add

void add(ValidationResultsModel validationResultsModel)
Add a validationResultsModel as a child to this one. Results originating from child models have to be taken into account by the parent.

Parameters:
validationResultsModel -

remove

void remove(ValidationResultsModel validationResultsModel)
Remove the given validationResultsModel from the list of children.

Parameters:
validationResultsModel -


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.