Class Form

java.lang.Object
  |
  +--

All Implemented Interfaces:
java.io.Serializable
public class Form
extends java.lang.Object
implements java.io.Serializable

This contains a set of validation rules for a form/JavaBean. The information is contained in a list of Field objects.

Field Summary
protected  org.apache.commons.collections.FastHashMap hFields

          Map of Fields keyed on their property value.
protected  java.util.List lFields

          List of Fields.
protected  java.lang.String name

          The name/key the set of validation rules is stored under.
 
Constructor Summary
Form ()

           
 
Method Summary
 void addField ( Field  f)

          Add a Field to the Form.
 java.util.Map getFieldMap ()

          A Map of Fields is returned as an unmodifiable List.
 java.util.List getFields ()

          A List of Fields is returned as an unmodifiable List.
 java.lang.String getName ()

          Gets the name/key of the set of validation rules.
 void process (java.util.Map globalConstants, java.util.Map constants)

          Processes all of the Form's Fields.
 void setName (java.lang.String name)

          Sets the name/key of the set of validation rules.
 java.lang.String toString ()

          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

name

protected java.lang.String 
The name/key the set of validation rules is stored under.

lFields

protected java.util.List 
List of Fields. Used to maintain the order they were added in although individual Fields can be retrieved using Map of Fields.

hFields

protected org.apache.commons.collections.FastHashMap 
Map of Fields keyed on their property value.

Constructor Detail

Form

public ()

Method Detail

getName

public java.lang.String ()
Gets the name/key of the set of validation rules.

setName

public void (java.lang.String name)
Sets the name/key of the set of validation rules.

addField

public void ( f)
Add a Field to the Form.

getFields

public java.util.List ()
A List of Fields is returned as an unmodifiable List.

getFieldMap

public java.util.Map ()
A Map of Fields is returned as an unmodifiable List.

process

public void (java.util.Map globalConstants,
                    java.util.Map constants)
Processes all of the Form's Fields.

toString

public java.lang.String ()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object

Copyright (c) 2001-2002 - Apache Software Foundation