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

public Class BeanValidation

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

Various utility methods for use with the Jakarta Bean Validation API in Jakarta Faces.

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.FacesAwareMessageInterpolator

extends Object
implements MessageInterpolator
Class Inheritance
  • java.lang.Object
  • com.sun.faces.util.BeanValidation.FacesAwareMessageInterpolator
All Implemented Interfaces
jakarta.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 jakarta.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 jakarta.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

FacesAwareMessageInterpolatorback to summary
public FacesAwareMessageInterpolator(FacesContext context, MessageInterpolator delegate)

Method Detail

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

Implements jakarta.validation.MessageInterpolator.interpolate.

Doc from jakarta.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 jakarta.validation.MessageInterpolator.interpolate.

Doc from jakarta.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