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.richfaces.validator
Class ObjectValidator

    java.lang.Object
      org.richfaces.validator.ObjectValidator

Direct Known Subclasses:
  BeanValidator, HibernateValidator, NullValidator

    public abstract class ObjectValidator

extends java.lang.Object

Nested Class Summary
`protected static class` | `ObjectValidator.BasePropertyPair`
`protected static class` | `ObjectValidator.ValidatorKey` Class for identify validator instance by locale

Field Summary
`protected static java.lang.String` | `INPUT_PARAMETERS_IS_NOT_CORRECT`
`static java.lang.String` | `VALIDATOR_PARAM`

Constructor Summary
`ObjectValidator()`

Method Summary
`protected java.util.Locale` | `calculateLocale(javax.faces.context.FacesContext context)`
`protected static ObjectValidator` | `createInstance()` Create BeanValidator instance.
`protected org.richfaces.validator.ObjectValidator.ValidationResolver` | `createValidationResolver(javax.faces.context.FacesContext context, javax.el.ELResolver parent, java.util.Set<java.lang.String> profiles)`
`static ObjectValidator` | `getInstance(javax.faces.context.FacesContext context)` Return BeanValidator object from a ServletContext attribute.
`protected java.util.ResourceBundle` | `getResourceBundle(javax.faces.context.FacesContext facesContext, java.lang.String name)`
`protected abstract java.lang.String[]` | `validate(javax.faces.context.FacesContext facesContext, java.lang.Object base, java.lang.String property, java.lang.Object value, java.util.Set<java.lang.String> profiles)` Validate bean property for a new value.
`java.lang.String[]` | `validate(javax.faces.context.FacesContext context, javax.el.ValueExpression target, java.lang.Object value, java.util.Set<java.lang.String> profiles)` Perform Validation for a new value.
`abstract java.lang.String[]` | `validateGraph(javax.faces.context.FacesContext context, java.lang.Object value, java.util.Set<java.lang.String> profiles)`

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

Field Detail

### INPUT_PARAMETERS_IS_NOT_CORRECT

    protected static final java.lang.String INPUT_PARAMETERS_IS_NOT_CORRECT

See Also:
  Constant Field Values

### VALIDATOR_PARAM

    public static final java.lang.String VALIDATOR_PARAM

Constructor Detail

### ObjectValidator

    public ObjectValidator()

Method Detail

### createInstance

    protected static ObjectValidator createInstance()

  Create BeanValidator instance. For a Junit tests only.

  Returns:

### getInstance

    public static ObjectValidator getInstance(javax.faces.context.FacesContext context)

  Return BeanValidator object from a ServletContext attribute. Create new instance if none is defined.

  Parameters:
    `context` -
  Returns:

### validateGraph

    public abstract java.lang.String[] validateGraph(javax.faces.context.FacesContext context,
                                                     java.lang.Object value,
                                                     java.util.Set<java.lang.String> profiles)

### validate

    public java.lang.String[] validate(javax.faces.context.FacesContext context,
                                       javax.el.ValueExpression target,
                                       java.lang.Object value,
                                       java.util.Set<java.lang.String> profiles)

  Perform Validation for a new value.

  Parameters:
    `context` - current faces context.
    `target` - `ValueExpression` for a value assignment.
    `value` - new value for validation
    `profiles` - TODO
  Returns:
    null if no validation errors. Array of the validation messages otherwise.
  Throws:
    `javax.faces.FacesException` - if locale or context not properly initialized

### calculateLocale

    protected java.util.Locale calculateLocale(javax.faces.context.FacesContext context)

### validate

    protected abstract java.lang.String[] validate(javax.faces.context.FacesContext facesContext,
                                                   java.lang.Object base,
                                                   java.lang.String property,
                                                   java.lang.Object value,
                                                   java.util.Set<java.lang.String> profiles)

  Validate bean property for a new value.

  Parameters:
    `facesContext` - TODO
    `base` - - bean
    `property` - - bean property name.
    `value` - new value.
    `profiles` - TODO
  Returns:
    null for a valid value, array of the validation messages othervise.

### getResourceBundle

    protected java.util.ResourceBundle getResourceBundle(javax.faces.context.FacesContext facesContext,
                                                         java.lang.String name)

### createValidationResolver

    protected org.richfaces.validator.ObjectValidator.ValidationResolver createValidationResolver(javax.faces.context.FacesContext context,
                                                                                                  javax.el.ELResolver parent,
                                                                                                  java.util.Set<java.lang.String> profiles)

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

Copyright © 2009. All Rights Reserved.