org.hibernate.validator.messageinterpolation
Class ResourceBundleMessageInterpolator

java.lang.Object
  extended by org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator
All Implemented Interfaces:
MessageInterpolator

public class ResourceBundleMessageInterpolator
extends Object
implements MessageInterpolator

Resource bundle backed message interpolator.

Author:
Emmanuel Bernard, Hardy Ferentschik, Gunnar Morling

Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.validation.MessageInterpolator
MessageInterpolator.Context
 
Field Summary
static String DEFAULT_VALIDATION_MESSAGES
          The name of the default message bundle.
static String USER_VALIDATION_MESSAGES
          The name of the user-provided message bundle as defined in the specification.
 
Constructor Summary
ResourceBundleMessageInterpolator()
           
ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator)
           
ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator, boolean cacheMessages)
           
 
Method Summary
 String interpolate(String message, MessageInterpolator.Context context)
           
 String interpolate(String message, MessageInterpolator.Context context, Locale locale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_VALIDATION_MESSAGES

public static final String DEFAULT_VALIDATION_MESSAGES
The name of the default message bundle.

See Also:
Constant Field Values

USER_VALIDATION_MESSAGES

public static final String USER_VALIDATION_MESSAGES
The name of the user-provided message bundle as defined in the specification.

See Also:
Constant Field Values
Constructor Detail

ResourceBundleMessageInterpolator

public ResourceBundleMessageInterpolator()

ResourceBundleMessageInterpolator

public ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator)

ResourceBundleMessageInterpolator

public ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator,
                                         boolean cacheMessages)
Method Detail

interpolate

public String interpolate(String message,
                          MessageInterpolator.Context context)
Specified by:
interpolate in interface MessageInterpolator

interpolate

public String interpolate(String message,
                          MessageInterpolator.Context context,
                          Locale locale)
Specified by:
interpolate in interface MessageInterpolator


Copyright © 2007-2010 Red Hat Middleware, LLC. All Rights Reserved