public interface ResourceBundleProvider
ResourceBundleProvider
service interface defines the API
for a service, which is capable of returned ResourceBundle
for
given any Locale
.
This interface defines the service API implemented by the existing
implementation. It is not intended to be implemented by application bundles.
Rather such bundles should get the ResourceBundleProvider
service from the service registry to access the data provided.
Modifier and Type | Field and Description |
---|---|
static String |
BUNDLE_REQ_ATTR
Request attribute to get the resource bundle.
|
Modifier and Type | Method and Description |
---|---|
Locale |
getDefaultLocale()
Returns the default
Locale assumed by this instance. |
ResourceBundle |
getResourceBundle(Locale locale)
Returns a
ResourceBundle for the given locale. |
ResourceBundle |
getResourceBundle(String baseName,
Locale locale)
Returns a
ResourceBundle for the given locale. |
static final String BUNDLE_REQ_ATTR
Locale getDefaultLocale()
Locale
assumed by this instance.ResourceBundle getResourceBundle(Locale locale)
ResourceBundle
for the given locale.locale
- The Locale
for which to return the resource
bundle. If this is null
the default locale as
returned by getDefaultLocale()
is assumed.ResourceBundle
for the given localeMissingResourceException
- If the service is not capable of
returning a ResourceBundle
ResourceBundle getResourceBundle(String baseName, Locale locale)
ResourceBundle
for the given locale.baseName
- The base name for the resource bundle. If this is
null
, the same resource bundle will be
returned as when calling the
getResourceBundle(Locale)
method.locale
- The Locale
for which to return the resource
bundle. If this is null
the default locale as
returned by getDefaultLocale()
is assumed.ResourceBundle
for the given localeMissingResourceException
- If the service is not capable of
returning a ResourceBundle
Copyright © 2015 The Apache Software Foundation. All rights reserved.