Top Description Inners Constructors Methods
com.sun.faces.util

public Class BeanValidation

extends Object
Class Inheritance
Static Imports
javax.faces.validator.BeanValidator.VALIDATOR_FACTORY_KEY, javax.validation.Validation.buildDefaultValidatorFactory

Various utility methods for use with the BeanValidation API in JSF.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Validator
public static ValidatorFactory
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BeanValidationback to summary
public BeanValidation()

Method Detail

getBeanValidatorback to summary
public static Validator getBeanValidator(FacesContext context)
getValidatorFactoryback to summary
public static ValidatorFactory getValidatorFactory(FacesContext context)
com.sun.faces.util back to summary

private Class BeanValidation.JsfAwareMessageInterpolator

extends Object
implements MessageInterpolator
Class Inheritance
  • java.lang.Object
  • com.sun.faces.util.BeanValidation.JsfAwareMessageInterpolator
All Implemented Interfaces
javax.validation.MessageInterpolator

Field Summary

Modifier and TypeField and Description
private final FacesContext
private final MessageInterpolator

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
interpolate(String
the message to interpolate
message
,
MessageInterpolator.Context
contextual information related to the interpolation
context
)

Implements javax.validation.MessageInterpolator.interpolate.

Interpolates the message template based on the constraint validation context.
public String
interpolate(String
the message to interpolate
message
,
MessageInterpolator.Context
contextual information related to the interpolation
context
,
Locale
the locale targeted for the message
locale
)

Implements javax.validation.MessageInterpolator.interpolate.

Interpolates the message template based on the constraint validation context.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
private final FacesContext context
delegateback to summary
private final MessageInterpolator delegate

Constructor Detail

JsfAwareMessageInterpolatorback to summary
public JsfAwareMessageInterpolator(FacesContext context, MessageInterpolator delegate)

Method Detail

interpolateback to summary
public String interpolate(String message, MessageInterpolator.Context context)

Implements javax.validation.MessageInterpolator.interpolate.

Doc from javax.validation.MessageInterpolator.interpolate.

Interpolates the message template based on the constraint validation context.

The locale is defaulted according to the MessageInterpolator implementation. See the implementation documentation for more detail.

Parameters
message:String

the message to interpolate

context:MessageInterpolator.Context

contextual information related to the interpolation

Returns:String

interpolated error message

Annotations
@Override
interpolateback to summary
public String interpolate(String message, MessageInterpolator.Context context, Locale locale)

Implements javax.validation.MessageInterpolator.interpolate.

Doc from javax.validation.MessageInterpolator.interpolate.

Interpolates the message template based on the constraint validation context. The Locale used is provided as a parameter.

Parameters
message:String

the message to interpolate

context:MessageInterpolator.Context

contextual information related to the interpolation

locale:Locale

the locale targeted for the message

Returns:String

interpolated error message

Annotations
@Override