com.townleyenterprises.validator
Interface FieldSetValidator

All Superinterfaces:
java.io.Serializable

public interface FieldSetValidator
extends java.io.Serializable

This interface defines a mechanism for the validation of an arbitrary set of fields on a form. This is mostly used for an atomic validation operation on more than one field in the form. The main uses of this would be things like making sure that there was a state selected if the country was USA, Australia or Canada or making sure that the sum of the net and the tax was the total of an order form.

Since:
3.0
Version:
$Id: FieldSetValidator.java,v 1.2 2004/07/29 18:36:38 atownley Exp $
Author:
Andrew S. Townley

Method Summary
 java.lang.String[] getFieldNames()
          This method is used to retrieve the names of the fields to be validated by this validator.
 void validate(java.util.Map values)
          This method validates the given map of field names and values according to the implementation-defined validation rules.
 void validate(java.util.Map values, java.util.Locale locale)
          This method validates the given map of field names and values according to the implementation-defined validation rules and the specified locale.
 

Method Detail

validate

public void validate(java.util.Map values)
              throws FieldSetValidationException
This method validates the given map of field names and values according to the implementation-defined validation rules.

Parameters:
values - the Map of values validated by this validator
Throws:
FieldSetValidationException - if the validation fails

validate

public void validate(java.util.Map values,
                     java.util.Locale locale)
              throws FieldSetValidationException
This method validates the given map of field names and values according to the implementation-defined validation rules and the specified locale.

Parameters:
values - the Map of values validated by this validator
locale - the locale to be used other than the default
Throws:
FieldSetValidationException - if the validation fails

getFieldNames

public java.lang.String[] getFieldNames()
This method is used to retrieve the names of the fields to be validated by this validator.

Returns:
the field names as a string array


Copyright © 2002-2004, Andrew S. Townley and Townley Enterprises. All Rights Reserved.
This project is hosted on http://te-code.sourceforge.net.