|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.DefaultResourceBundleFactory
public class DefaultResourceBundleFactory
A default implementation of the ResourceBundleFactory, that creates resource bundles using the specified locale.
If not defined otherwise, this implementation usesLocale.getDefault()
as Locale.
Field Summary |
---|
Fields inherited from interface org.pentaho.reporting.engine.classic.core.ResourceBundleFactory |
---|
DEFAULT_RESOURCE_BUNDLE_CONFIG_KEY |
Constructor Summary | |
---|---|
DefaultResourceBundleFactory()
Creates a new DefaultResourceBundleFactory using the system's default locale as factory locale. |
|
DefaultResourceBundleFactory(Locale locale)
Creates a new DefaultResourceBundleFactory using the specified locale as factory locale. |
|
DefaultResourceBundleFactory(Locale locale,
TimeZone timeZone)
|
Method Summary | |
---|---|
Locale |
getLocale()
Returns the locale that will be used to create the resource bundle. |
ResourceBundle |
getResourceBundle(String key)
Creates a resource bundle named by the given key and using the factory's defined locale. |
TimeZone |
getTimeZone()
|
void |
setLocale(Locale locale)
Redefines the locale. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultResourceBundleFactory()
public DefaultResourceBundleFactory(Locale locale)
locale
- the Locale instance that should be used when creating ResourceBundles.
NullPointerException
- if the given Locale is null.public DefaultResourceBundleFactory(Locale locale, TimeZone timeZone)
Method Detail |
---|
public TimeZone getTimeZone()
getTimeZone
in interface ResourceBundleFactory
public Locale getLocale()
getLocale
in interface ResourceBundleFactory
public void setLocale(Locale locale)
locale
- the new locale (never null).
NullPointerException
- if the given locale is null.public ResourceBundle getResourceBundle(String key)
getResourceBundle
in interface ResourceBundleFactory
key
- the name of the resourcebundle, never null.
NullPointerException
- if key
is null
MissingResourceException
- if no resource bundle for the specified base name can be foundResourceBundle.getBundle(String,Locale)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |