com.jgoodies.validation.extras
Class LimitedValidationResultModel

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

public final class LimitedValidationResultModel
extends DefaultValidationResultModel

An implementation of ValidationResultModel that wraps another ValidationResultModel to limit the number of reported ValidationMessages.

Note: This class is not yet part of the binary Validation library; it comes with the Validation distributions as an extra. The API is work in progress and may change without notice; this class may even be completely removed from future distributions. If you want to use this class, you may consider copying it into your code base.

Version:
$Revision: 1.17 $
Author:
Karsten Lentzsch
See Also:
ValidationResultModel, 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
LimitedValidationResultModel(ValidationResultModel model, int limit)
          Constructs a LimitedValidationResultModel on the given ValidationResultModel.
 
Method Summary
 
Methods inherited from class com.jgoodies.validation.util.DefaultValidationResultModel
getResult, setResult
 
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

LimitedValidationResultModel

public LimitedValidationResultModel(ValidationResultModel model,
                                    int limit)
Constructs a LimitedValidationResultModel on the given ValidationResultModel.

Parameters:
model - the underlying model that provides all validation messages
limit - the upper bound for the number of messages this model returns


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