org.jboss.portal.common.i18n
Class SimpleResourceBundleFactory

java.lang.Object
  extended by org.jboss.portal.common.i18n.SimpleResourceBundleFactory
All Implemented Interfaces:
ResourceBundleFactory

public class SimpleResourceBundleFactory
extends java.lang.Object
implements ResourceBundleFactory

An implementation that delegates bundle loading to ResourceBundle.getBundle(String,Locale,ClassLoader).

Version:
$Revision: 7228 $
Author:
Julien Viet

Constructor Summary
SimpleResourceBundleFactory(java.lang.String baseName, java.lang.ClassLoader classLoader)
           
 
Method Summary
 java.util.ResourceBundle getBundle(java.util.Locale locale)
          Returns a resource bundle for the specified locale, it may be an expensive operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleResourceBundleFactory

public SimpleResourceBundleFactory(java.lang.String baseName,
                                   java.lang.ClassLoader classLoader)
                            throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

getBundle

public java.util.ResourceBundle getBundle(java.util.Locale locale)
                                   throws java.lang.IllegalArgumentException
Description copied from interface: ResourceBundleFactory
Returns a resource bundle for the specified locale, it may be an expensive operation.

Specified by:
getBundle in interface ResourceBundleFactory
Parameters:
locale - the locale for the resource bundle
Returns:
a resource bundle for the locale or null if no such bundle can be obtained
Throws:
java.lang.IllegalArgumentException - if the locale is null