A Validator that delegates validation of the bean property to the Bean Validation API.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private transient Class | |
| public static final String | DISABLE_DEFAULT_BEAN_VALIDATOR_PARAM_NAME
If this param is defined, and
calling |
| public static final String | EMPTY_VALIDATION_GROUPS_PATTERN
The regular expression pattern that identifies an empty list of validation groups. |
| public static final String | ENABLE_VALIDATE_WHOLE_BEAN_PARAM_NAME
If this param is set, and calling
toLowerCase().equals("true") on a
String representation of its value returns |
| private boolean | |
| private static final Logger | |
| public static final String | MESSAGE_ID
The message identifier of the |
| private boolean | |
| public static final String | VALIDATION_GROUPS_DELIMITER
The delimiter that is used to separate the list of fully-qualified group names as strings. |
| private String | |
| public static final String | VALIDATOR_FACTORY_KEY
The name of the servlet context attribute which holds the object used by JSF to obtain Validator instances. |
| public static final String | VALIDATOR_ID
The standard validator id for this validator, as defined by the JSF specification. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | clearInitialState()
Implements javax. Reset the PartialStateHolder to a non-delta tracking state. |
| private static Validator | |
| public String | Returns: the value of thevalidatinGroups attribute.Return the validation groups passed to the Validation API when checking constraints. |
| private static ValidatorFactory | |
| public boolean | initialStateMarked()
Implements javax. Return |
| private boolean | |
| public boolean | isTransient()
Implements javax. If true, the Object implementing this interface must not participate in state saving or restoring. |
| public void | markInitialState()
Implements javax. The runtime must ensure that the
|
| private Class | |
| private void | recordValidationResult(FacesContext context, UIComponent component, Object wholeBean, String propertyName, Object propertyValue)
|
| public void | restoreState(FacesContext
the Faces context. context, Object the state. state)Implements javax. Perform any processing required to restore the state from the entries in the state Object. |
| public Object | saveState(FacesContext
the Faces context. context)Implements javax. Gets the state of the instance as a
|
| public void | setTransient(boolean
boolean pass transientValue)true if this
Object will not
participate in state saving or restoring, otherwise pass
false.Implements javax. Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring. |
| public void | setValidationGroups(String
comma-separated list of validation groups
(string with only spaces and commas treated as null) validationGroups)A comma-separated list of validation groups which are used to filter which validations get checked by this validator. |
| public void | validate(FacesContext
FacesContext for the request we are processing context, UIComponent UIComponent we are checking for correctness component, Object the value to validate value)Implements javax. Verify that the value is valid according to the Bean Validation constraints. |
| cachedValidationGroups | back to summary |
|---|---|
| private transient Class<?>[] cachedValidationGroups | |
| DISABLE_DEFAULT_BEAN_VALIDATOR_PARAM_NAME | back to summary |
|---|---|
| public static final String DISABLE_DEFAULT_BEAN_VALIDATOR_PARAM_NAME If this param is defined, and
calling | |
| EMPTY_VALIDATION_GROUPS_PATTERN | back to summary |
|---|---|
| public static final String EMPTY_VALIDATION_GROUPS_PATTERN The regular expression pattern that identifies an empty list of validation groups. | |
| ENABLE_VALIDATE_WHOLE_BEAN_PARAM_NAME | back to summary |
|---|---|
| public static final String ENABLE_VALIDATE_WHOLE_BEAN_PARAM_NAME If this param is set, and calling
toLowerCase().equals("true") on a
String representation of its value returns
| |
| initialState | back to summary |
|---|---|
| private boolean initialState | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| MESSAGE_ID | back to summary |
|---|---|
| public static final String MESSAGE_ID The message identifier of the
The message format string provided by the default implementation should be a the placeholder {0}, thus fully delegating the message handling to Bean Validation. A developer can override this message format string to make it conform to other JSF validator messages (i.e., by including the component label) | |
| transientValue | back to summary |
|---|---|
| private boolean transientValue | |
| VALIDATION_GROUPS_DELIMITER | back to summary |
|---|---|
| public static final String VALIDATION_GROUPS_DELIMITER The delimiter that is used to separate the list of fully-qualified group names as strings. | |
| validationGroups | back to summary |
|---|---|
| private String validationGroups | |
| VALIDATOR_FACTORY_KEY | back to summary |
|---|---|
| public static final String VALIDATOR_FACTORY_KEY The name of the servlet context attribute which holds the object used by JSF to obtain Validator instances. If the servlet context attribute is missing or contains a null value, JSF is free to use this servlet context attribute to store the ValidatorFactory bootstrapped by this validator. | |
| VALIDATOR_ID | back to summary |
|---|---|
| public static final String VALIDATOR_ID The standard validator id for this validator, as defined by the JSF specification. | |
| BeanValidator | back to summary |
|---|---|
| public BeanValidator() | |
| clearInitialState | back to summary |
|---|---|
| public void clearInitialState() Implements javax. Doc from javax. Reset the PartialStateHolder to a non-delta tracking state.
| |
| getBeanValidator | back to summary |
|---|---|
| private static Validator getBeanValidator(FacesContext context) | |
| getValidationGroups | back to summary |
|---|---|
| public String getValidationGroups() Return the validation groups passed
to the Validation API when checking constraints. If the
validationGroupsArray attribute is omitted or empty, the validation
groups will be inherited from the branch defaults, or if there
are no branch defaults, the
| |
| getValidatorFactory | back to summary |
|---|---|
| private static ValidatorFactory getValidatorFactory(FacesContext context) | |
| initialStateMarked | back to summary |
|---|---|
| public boolean initialStateMarked() Implements javax. Doc from javax. Return
| |
| isResolvable | back to summary |
|---|---|
| private boolean isResolvable(ValueReference valueReference, ValueExpression valueExpression) | |
| isTransient | back to summary |
|---|---|
| public boolean isTransient() Implements javax. Doc from javax. If true, the Object implementing this interface must not participate in state saving or restoring.
| |
| markInitialState | back to summary |
|---|---|
| public void markInitialState() Implements javax. Doc from javax. The runtime must ensure that the
| |
| parseValidationGroups | back to summary |
|---|---|
| private Class | |
| recordValidationResult | back to summary |
|---|---|
| private void recordValidationResult(FacesContext context, UIComponent component, Object wholeBean, String propertyName, Object propertyValue) | |
| restoreState | back to summary |
|---|---|
| public void restoreState(FacesContext context, Object state) Implements javax. Doc from javax. Perform any processing required to restore the state from the entries in the state Object. If the class that implements this interface has references to
instances that also implement StateHolder (such as a
If the
| |
| saveState | back to summary |
|---|---|
| public Object saveState(FacesContext context) Implements javax. Doc from javax. Gets the state of the instance as a
If the class that implements this interface has references to
instances that implement StateHolder (such as a
This method must not alter the state of the implementing object. In other words, after executing this code:
The return from this method must be
| |
| setTransient | back to summary |
|---|---|
| public void setTransient(boolean transientValue) Implements javax. Doc from javax. Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring.
| |
| setValidationGroups | back to summary |
|---|---|
| public void setValidationGroups(String validationGroups) A comma-separated list of validation
groups which are used to filter which validations get checked by
this validator. If the validationGroupsArray attribute is omitted or
is empty, the validation groups will be inherited from the branch
defaults or, if there are no branch defaults, the
| |
| validate | back to summary |
|---|---|
| public void validate(FacesContext context, UIComponent component, Object value) Implements javax. Verify that the value is valid according to the Bean Validation constraints. Obtain a Let validationGroupsArray be a Let valueExpression be the return from calling If no If Obtain the Decorate the Obtain the Obtain a Call If the returned If the returned
| |
| Modifier and Type | Field and Description |
|---|---|
| private FacesContext | |
| private MessageInterpolator |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | interpolate(String
the message to interpolate message, MessageInterpolator.contextual information related to the interpolation contextImplements javax. |
| public String | interpolate(String
the message to interpolate message, MessageInterpolator.contextual information related to the interpolation context,the locale targeted for the message locale)Implements javax. |
| context | back to summary |
|---|---|
| private FacesContext context | |
| delegate | back to summary |
|---|---|
| private MessageInterpolator delegate | |
| JsfAwareMessageInterpolator | back to summary |
|---|---|
| public JsfAwareMessageInterpolator(FacesContext context, MessageInterpolator delegate) | |
| interpolate | back to summary |
|---|---|
| public String interpolate(String message, MessageInterpolator. Implements javax. Doc from javax. Interpolates the message template based on the constraint validation context.
The locale is defaulted according to the
| |
| interpolate | back to summary |
|---|---|
| public String interpolate(String message, MessageInterpolator. Implements javax. Doc from javax. Interpolates the message template based on the constraint validation context.
The | |