Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.util.validator.common
Class CommonValidator

    java.lang.Object
      org.hyperic.util.validator.common.CommonValidator

    public class CommonValidator

extends java.lang.Object

Encapsulates most of specific jakarta commons validator logic and provides access to validation results.

NOTE: Very heavily commented so as to persuade others to use and extend. The commons validation logic is a little bulky and awkward so consider this as a good place to put any further wrapper methods.

Constructor Summary
`CommonValidator(java.util.ResourceBundle properties)` Simple constructor with property resourcebundle containing localized messages

Method Summary
`java.lang.String` | `getResourceName()`
`org.apache.commons.validator.ValidatorResources` | `getValidatorResources()` Simple getter for current Validator Resources.
`org.apache.commons.validator.ValidatorResults` | `getValidatorResults()`
`void` | `validate(java.lang.String validationMappingRes, java.lang.String formName, java.lang.Object beanInstance)` Perform all form-specific the validation.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CommonValidator

    public CommonValidator(java.util.ResourceBundle properties)

  Simple constructor with property resourcebundle containing localized messages

Method Detail

### getValidatorResults

    public org.apache.commons.validator.ValidatorResults getValidatorResults()

### getResourceName

    public java.lang.String getResourceName()

### getValidatorResources

    public org.apache.commons.validator.ValidatorResources getValidatorResources()

  Simple getter for current Validator Resources. null until validate is first run

### validate

    public void validate(java.lang.String validationMappingRes,
                         java.lang.String formName,
                         java.lang.Object beanInstance)
                  throws CommonValidatorException,
                         org.xml.sax.SAXException

  Perform all form-specific the validation. All form specific validation is performed and then finally a CommonValidatorException object will be thrown if (AND ONLY IF) validation errors were detected. The exception object will contain a collection of error Strings see .

  Parameters:
    `validationMappingRes` - A String containing the name of the mapping resource file.
    `formName` - A String containing the name of the form containing the validation action references.
    `beanInstance` - An instance of the bean to apply validation on.
  Throws:
    `CommonValidatorException` - - Exception containing collection of messages.
    `org.xml.sax.SAXException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.