org.formproc.validation
Class ValidatorGroup

java.lang.Object
  |
  +--org.formproc.validation.Validator
        |
        +--org.formproc.validation.ValidatorGroup
All Implemented Interfaces:
java.lang.Cloneable

public class ValidatorGroup
extends Validator

A Validator which contains a list of child validators to be executed in order.

Author:
Anthony Eden

Field Summary
 
Fields inherited from class org.formproc.validation.Validator
formManager, messageProvider, properties
 
Constructor Summary
ValidatorGroup()
          Construct a new ValidatorGroup.
 
Method Summary
 void configureInternal(com.anthonyeden.lib.config.Configuration configuration)
          Configure the validator.
 java.util.List getValidators()
          Get the List of validators in the group.
 ValidationResult validate(FormElement[] formElements, FormData[] formData, java.util.Locale locale)
          Validate the given FormData.
 
Methods inherited from class org.formproc.validation.Validator
clone, configure, getErrorMessage, getErrorMessage, setFormManager, setProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidatorGroup

public ValidatorGroup()
Construct a new ValidatorGroup.

Method Detail

getValidators

public java.util.List getValidators()
Get the List of validators in the group.

Returns:
A List of FormValidator objects

configureInternal

public void configureInternal(com.anthonyeden.lib.config.Configuration configuration)
                       throws java.lang.Exception
Configure the validator.

Overrides:
configureInternal in class Validator
Parameters:
configuration - The Configuration object
Throws:
java.lang.Exception

validate

public ValidationResult validate(FormElement[] formElements,
                                 FormData[] formData,
                                 java.util.Locale locale)
                          throws java.lang.Exception
Validate the given FormData.

Specified by:
validate in class Validator
Parameters:
formData - The FormData
formElements - An array of FormElement objects
locale - The Locale
Returns:
The validation result
Throws:
java.lang.Exception


Copyright (c) 2001-2003 Anthony Eden. All Rights Reserved.