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.el.ELResolver parent, java.util.Locale locale, java.util.Set<java.lang.String> profiles)`
`protected java.util.ResourceBundle` | `getCurrentResourceBundle(java.util.Locale locale)`
`static ObjectValidator` | `getInstance(javax.faces.context.FacesContext context)` Return BeanValidator object from a ServletContext attribute.
`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.
`protected abstract java.lang.String[]` | `validate(java.lang.Object base, java.lang.String property, java.lang.Object value, java.util.Locale locale, java.util.Set<java.lang.String> profiles)` Validate bean property 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(java.lang.Object base,
                                                   java.lang.String property,
                                                   java.lang.Object value,
                                                   java.util.Locale locale,
                                                   java.util.Set<java.lang.String> profiles)

  Validate bean property for a new value.

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

### getCurrentResourceBundle

    protected java.util.ResourceBundle getCurrentResourceBundle(java.util.Locale locale)

### createValidationResolver

    protected org.richfaces.validator.ObjectValidator.ValidationResolver createValidationResolver(javax.el.ELResolver parent,
                                                                                                  java.util.Locale locale,
                                                                                                  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.