|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objecttoolbox.web.validation.FieldValidator
public class FieldValidator
Validator implementation that makes use of Field implementations to perform validations.
This implementation obtains the validation configuration from an XML configuration document.
| Constructor Summary | |
|---|---|
FieldValidator()
Default constructor |
|
| Method Summary | |
|---|---|
java.util.List |
getFields(java.lang.String form)
Return the List of Field instances supported by this Validator for the given "form" grouping. |
java.util.ResourceBundle |
getResource(java.util.Locale locale)
Return the ResourceBundle used to obtain validation messages. |
void |
init(java.lang.String name,
XMLProperties xmlProps)
Initialises the validator by initialising all the forms configured in the given XML configuration. |
java.util.Map |
validate(java.lang.String form,
javax.servlet.ServletRequest request)
Validate the given request and return a Map containing the validated values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FieldValidator()
| Method Detail |
|---|
public void init(java.lang.String name,
XMLProperties xmlProps)
throws ValidationException
init in interface Validatorname - String containing the name of this validator.xmlProps - XML configuration properties.
ValidationException - if this validator cannot be initialised.
public java.util.ResourceBundle getResource(java.util.Locale locale)
throws ValidationException
getResource in interface Validatorlocale - Locale to use.
ValidationExceptionpublic java.util.List getFields(java.lang.String form)
getFields in interface Validatorform - String containing form grouping name.
public java.util.Map validate(java.lang.String form,
javax.servlet.ServletRequest request)
throws ValidationException
validate in interface Validatorform - String containing the name of the form to validate
against.request - ServletRequest containing data to be validated.
ValidationException - if the request could not be validated.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||