org.chwf.filter
Class GenericValidator

java.lang.Object
  |
  +--org.chwf.filter.Validator
        |
        +--org.chwf.filter.GenericValidator

public class GenericValidator
extends Validator

Generic validator. Performs basic validation using BeanFilter attributes.

Author:
Paul Strack

Constructor Summary
GenericValidator(java.lang.Class beanClass)
          Constructor.
 
Method Summary
 void validate(java.lang.Object object, java.lang.String property, java.lang.Object value)
          Validate property value.
 
Methods inherited from class org.chwf.filter.Validator
findValidator, findValidator, findValidator, getBeanClass, validate, validate, validate, validate, validate, validate, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericValidator

public GenericValidator(java.lang.Class beanClass)
                 throws InitializationException
Constructor.

Parameters:
beanClass - The bean class being validated.
Throws:
InitializationException - If the filter cannot be initialized.
Method Detail

validate

public void validate(java.lang.Object object,
                     java.lang.String property,
                     java.lang.Object value)
              throws PropertyNotFoundException,
                     ValidationException
Validate property value.

Overrides:
validate in class Validator
Parameters:
object - The object.
property - The property.
value - The value.
Throws:
PropertyNotFoundException - If property does not exist.
ValidationException - If invalid.


Copyright © 2002-2004, Paul Strack. All Rights Reserved.