org.norther.tammi.core.rt.util
Class DefaultValueValidator

java.lang.Object
  extended by org.norther.tammi.core.rt.util.DefaultValueValidator
All Implemented Interfaces:
Serializable, EventListener, ValidationListener

public class DefaultValueValidator
extends Object
implements ValidationListener, Serializable

Validates missing mandatory values by replacing them with default values.

Version:
$Id: DefaultValueValidator.java,v 1.2 2009/09/28 15:08:43 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Constructor Summary
DefaultValueValidator()
          Constructs a new validator.
 
Method Summary
 void valuesValidated(ValidatedValuesEvent event)
          Validates the attribute values in the event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultValueValidator

public DefaultValueValidator()
Constructs a new validator.

Method Detail

valuesValidated

public void valuesValidated(ValidatedValuesEvent event)
                     throws AttributeNotFoundException,
                            InvalidAttributeValueException
Description copied from interface: ValidationListener
Validates the attribute values in the event. This method is called after validation of individual attribute values and before actually setting the values providing a possibility for the validator to cross-check the values and make final changes to them.

Note that it is also allowed to add new values to the attribute map of the event e.g. for dependent read-only attributes.

The method may throw InvalidAttributeValuesException specifying the names of the invalid attributes as the first argument with any validation specific exception as the wrapped exception argument. Other exceptions indicate all writable attributes.

Specified by:
valuesValidated in interface ValidationListener
Parameters:
event - the validated values event.
Throws:
AttributeNotFoundException - for missing attributes.
InvalidAttributeValueException - if the values are not valid.


Copyright © 2004 The Norther Organization. All rights reserved.