Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.seam.core
Class Validators

    java.lang.Object
      org.jboss.seam.core.Validators

    @Name(value="org.jboss.seam.core.validators")
    @Intercept(value=NEVER)
    @Scope(value=APPLICATION)
    @Install(precedence=0)
    public class Validators

extends Object

Caches instances of Hibernate Validator ClassValidator

Author:
  Gavin King

Constructor Summary
`Validators()`

Method Summary
`protected org.hibernate.validator.ClassValidator` | `createValidator(Class modelClass, String name)` Create a new ClassValidator, or get it from the Component object for the default role of the class.
`
`<T> org.hibernate.validator.ClassValidator<T>`
` | `getValidator(Class<T> modelClass)` Get the cached ClassValidator instance.
`org.hibernate.validator.ClassValidator` | `getValidator(Class modelClass, String name)` Get the cached ClassValidator instance.
`static Validators` | `instance()`
`org.hibernate.validator.InvalidValue[]` | `validate(javax.faces.context.FacesContext context, String propertyExpression, Object value)` Validate that a value can be assigned to the property identified by a value expression.

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

Constructor Detail

### Validators

    public Validators()

Method Detail

### getValidator

    public org.hibernate.validator.ClassValidator getValidator(Class modelClass,
                                                               String name)

  Get the cached ClassValidator instance.

  Parameters:
    `modelClass` - the class to be validated
    `name` - the component name

### getValidator

    public <T> org.hibernate.validator.ClassValidator<T> getValidator(Class<T> modelClass)

  Get the cached ClassValidator instance.

  Parameters:
    `modelClass` - the class to be validated

### createValidator

    protected org.hibernate.validator.ClassValidator createValidator(Class modelClass,
                                                                     String name)

  Create a new ClassValidator, or get it from the Component object for the default role of the class.

  Parameters:
    `modelClass` - the class to be validated
    `name` - the component name

### validate

    public org.hibernate.validator.InvalidValue[] validate(javax.faces.context.FacesContext context,
                                                           String propertyExpression,
                                                           Object value)

  Validate that a value can be assigned to the property identified by a value expression.

  Parameters:
    `context` - the FacesContext
    `propertyExpression` - a value expression
    `value` - the value that is to be assigned
  Returns:
    the validation failures, as InvalidValues

### instance

    public static Validators instance()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD