Class Form
java.lang.Object
org.apache.commons.validator.Form
- All Implemented Interfaces:
Serializable
This contains a set of validation rules for a form/JavaBean. The information
is contained in a list of Field objects. Instances of this class
are configured with a <form> xml element.
The use of FastHashMap is deprecated and will be replaced in a future release.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.commons.collections.FastHashMapDeprecated.Subclasses should use getFieldMap() instead.protected StringThe name/key of the form which this form extends from.List ofFields.protected StringThe name/key the set of validation rules is stored under. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd aFieldto theForm.booleancontainsField(String fieldName) Returns true if this Form contains a Field with the given name.Gets the name/key of the parent set of validation rules.Returns the Field with the given name or null if this Form has no such field.Returns a Map of String field keys to Field objects.AListofFields is returned as an unmodifiableList.getName()Gets the name/key of the set of validation rules.booleanGets extends flag.booleanWhether or not the thisFormwas processed for replacing variables in strings with their values.protected voidMerges the given form into this one.protected voidProcesses all of theForm'sFields.voidsetExtends(String inherit) Sets the name/key of the parent set of validation rules.voidSets the name/key of the set of validation rules.toString()Returns a string representation of the object.
-
Field Details
-
name
-
lFields
-
hFields
Deprecated.Subclasses should use getFieldMap() instead.Map ofFields keyed on their property value. -
inherit
-
-
Constructor Details
-
Form
public Form()Constructs a new instance.
-
-
Method Details
-
addField
-
containsField
Returns true if this Form contains a Field with the given name.- Parameters:
fieldName- The field name- Returns:
- True if this form contains the field by the given name
- Since:
- 1.1
-
getExtends
Gets the name/key of the parent set of validation rules.- Returns:
- The extends value
- Since:
- 1.2.0
-
getField
-
getFieldMap
Returns a Map of String field keys to Field objects.- Returns:
- The fieldMap value
- Since:
- 1.2.0
-
getFields
-
getName
-
isExtending
-
isProcessed
Whether or not the thisFormwas processed for replacing variables in strings with their values.- Returns:
- The processed value
- Since:
- 1.2.0
-
merge
-
process
-
setExtends
Sets the name/key of the parent set of validation rules.- Parameters:
inherit- The new extends value- Since:
- 1.2.0
-
setName
-
toString
-