Spring Framework

org.springframework.validation.beanvalidation
Class MessageSourceResourceBundleLocator

java.lang.Object
  extended by org.springframework.validation.beanvalidation.MessageSourceResourceBundleLocator
All Implemented Interfaces:
org.hibernate.validator.resourceloading.ResourceBundleLocator

public class MessageSourceResourceBundleLocator
extends java.lang.Object
implements org.hibernate.validator.resourceloading.ResourceBundleLocator

Implementation of Hibernate Validator 4.1's ResourceBundleLocator interface, exposing a Spring MessageSource as localized MessageSourceResourceBundle.

Since:
3.0.4
Author:
Juergen Hoeller
See Also:
ResourceBundleLocator, MessageSource, MessageSourceResourceBundle

Constructor Summary
MessageSourceResourceBundleLocator(MessageSource messageSource)
          Build a MessageSourceResourceBundleLocator for the given MessageSource.
 
Method Summary
 java.util.ResourceBundle getResourceBundle(java.util.Locale locale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageSourceResourceBundleLocator

public MessageSourceResourceBundleLocator(MessageSource messageSource)
Build a MessageSourceResourceBundleLocator for the given MessageSource.

Parameters:
messageSource - the Spring MessageSource to wrap
Method Detail

getResourceBundle

public java.util.ResourceBundle getResourceBundle(java.util.Locale locale)
Specified by:
getResourceBundle in interface org.hibernate.validator.resourceloading.ResourceBundleLocator

Spring Framework