net.sf.validatedattrib.attribute
Class AbstractValidatedAttribute

java.lang.Object
  extended by net.sf.validatedattrib.attribute.AbstractValidatedAttribute
Direct Known Subclasses:
ValidatedDouble

public abstract class AbstractValidatedAttribute
extends Object

Base Class for validated attributes.

Author:
Philip May

Field Summary
private  List constraintList
          List of Constraint.
private static Log LOG
           
 
Constructor Summary
AbstractValidatedAttribute()
           
 
Method Summary
protected  void addConstraint(Constraint constraint)
          Adds a constraint to this Validated Attribute.
protected  void validate(Object newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final Log LOG

constraintList

private List constraintList
List of Constraint.

Constructor Detail

AbstractValidatedAttribute

public AbstractValidatedAttribute()
Method Detail

addConstraint

protected void addConstraint(Constraint constraint)
Adds a constraint to this Validated Attribute.

Parameters:
constraint - a constraint
Throws:
IllegalArgumentException - when constraint == null

validate

protected void validate(Object newValue)
                 throws ValidationException
Throws:
ValidationException


Copyright © 2006 Philip May. All Rights Reserved.