|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.blojsom.util.resources.ResourceBundleResourceManager
ResourceBundleResourceManager
Field Summary |
Constructor Summary | |
ResourceBundleResourceManager()
Default constructor; |
Method Summary | |
java.lang.String |
format(java.lang.String pattern,
java.lang.Object[] arguments)
Wrapper for MessageFormat.format(String, Object[]) |
java.lang.String |
getString(java.lang.String resourceID,
java.lang.String resource,
java.lang.String fallback)
Retrieve a string from a given resource bundle for the default locale. |
java.lang.String |
getString(java.lang.String resourceID,
java.lang.String resource,
java.lang.String fallback,
java.util.Locale locale)
Retrieve a string from a given resource bundle for the particular language and country locale. |
java.lang.String |
getString(java.lang.String resourceID,
java.lang.String resource,
java.lang.String fallback,
java.lang.String language)
Retrieve a string from a given resource bundle for the particular language and country locale. |
java.lang.String |
getString(java.lang.String resourceID,
java.lang.String resource,
java.lang.String fallback,
java.lang.String language,
java.lang.String country)
Retrieve a string from a given resource bundle for the particular language and country locale. |
void |
init(BlojsomConfiguration blojsomConfiguration)
Initialize the resource bundle manager. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ResourceBundleResourceManager()
Method Detail |
public void init(BlojsomConfiguration blojsomConfiguration) throws BlojsomException
blojsom-resource-manager-bundles
.
init
in interface ResourceManager
blojsomConfiguration
- Blojsom configuration information
BlojsomException
public java.lang.String getString(java.lang.String resourceID, java.lang.String resource, java.lang.String fallback)
getString
in interface ResourceManager
resourceID
- Resource ID to retrieve from the resource bundleresource
- Full-qualified resource bundle from which to retrieve the resource IDfallback
- Fallback string to use if the given resource ID cannot be found
resourceID
from resource bundle resource
or fallback
if the given resource ID cannot be foundpublic java.lang.String getString(java.lang.String resourceID, java.lang.String resource, java.lang.String fallback, java.lang.String language)
getString
in interface ResourceManager
resourceID
- Resource ID to retrieve from the resource bundleresource
- Full-qualified resource bundle from which to retrieve the resource IDfallback
- Fallback string to use if the given resource ID cannot be foundlanguage
- Language code
resourceID
from resource bundle resource
or fallback
if the given resource ID cannot be foundpublic java.lang.String getString(java.lang.String resourceID, java.lang.String resource, java.lang.String fallback, java.lang.String language, java.lang.String country)
getString
in interface ResourceManager
resourceID
- Resource ID to retrieve from the resource bundleresource
- Full-qualified resource bundle from which to retrieve the resource IDfallback
- Fallback string to use if the given resource ID cannot be foundlanguage
- Language codecountry
- Country code
resourceID
from resource bundle resource
or fallback
if the given resource ID cannot be foundpublic java.lang.String getString(java.lang.String resourceID, java.lang.String resource, java.lang.String fallback, java.util.Locale locale)
getString
in interface ResourceManager
resourceID
- Resource ID to retrieve from the resource bundleresource
- Full-qualified resource bundle from which to retrieve the resource IDfallback
- Fallback string to use if the given resource ID cannot be foundlocale
- Locale object to use when retrieving the resource bundle
resourceID
from resource bundle resource
or fallback
if the given resource ID cannot be foundpublic java.lang.String format(java.lang.String pattern, java.lang.Object[] arguments)
MessageFormat.format(String, Object[])
format
in interface ResourceManager
pattern
- Patternarguments
- Arguments to apply to pattern
MessageFormat.format(String, Object[])
has been applied or null
if there is an error applying the arguments to the pattern
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |