org.alfresco.web.app
Class ResourceBundleWrapper
java.lang.Object
java.util.ResourceBundle
org.alfresco.web.app.ResourceBundleWrapper
- All Implemented Interfaces:
- java.io.Serializable
public final class ResourceBundleWrapper
- extends java.util.ResourceBundle
- implements java.io.Serializable
Wrapper around Alfresco Resource Bundle objects. Used to catch and handle missing
resource exception to help identify missing I18N strings in client apps.
Also used to look for the requested string in a custom resource bundle.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.util.ResourceBundle |
java.util.ResourceBundle.Control |
Fields inherited from class java.util.ResourceBundle |
parent |
Method Summary |
static void |
addResourceBundle(java.lang.String name)
Adds a resource bundle to the collection of custom bundles available |
protected static java.lang.String |
determineCustomBundleName(java.lang.String bundleName)
Determines the name for the custom bundle to lookup based on the given
bundle name |
java.util.Enumeration |
getKeys()
|
static java.util.ResourceBundle |
getResourceBundle(java.lang.String name,
java.util.Locale locale)
Factory method to get a named wrapped resource bundle for a particular locale. |
protected java.lang.Object |
handleGetObject(java.lang.String key)
|
Methods inherited from class java.util.ResourceBundle |
clearCache, clearCache, containsKey, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, handleKeySet, keySet, setParent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BEAN_RESOURCE_MESSAGE_SERVICE
public static final java.lang.String BEAN_RESOURCE_MESSAGE_SERVICE
- See Also:
- Constant Field Values
PATH
public static final java.lang.String PATH
- See Also:
- Constant Field Values
getKeys
public java.util.Enumeration getKeys()
- Specified by:
getKeys
in class java.util.ResourceBundle
- See Also:
ResourceBundle.getKeys()
handleGetObject
protected java.lang.Object handleGetObject(java.lang.String key)
- Specified by:
handleGetObject
in class java.util.ResourceBundle
- See Also:
ResourceBundle.handleGetObject(java.lang.String)
getResourceBundle
public static java.util.ResourceBundle getResourceBundle(java.lang.String name,
java.util.Locale locale)
- Factory method to get a named wrapped resource bundle for a particular locale.
- Parameters:
servletContext
- ServletContextname
- Bundle namelocale
- Locale to retrieve bundle for
- Returns:
- Wrapped ResourceBundle instance for specified locale
addResourceBundle
public static void addResourceBundle(java.lang.String name)
- Adds a resource bundle to the collection of custom bundles available
- Parameters:
name
- the name of the resource bundle
determineCustomBundleName
protected static java.lang.String determineCustomBundleName(java.lang.String bundleName)
- Determines the name for the custom bundle to lookup based on the given
bundle name
- Parameters:
bundleName
- The standard bundle
- Returns:
- The name of the custom bundle (in the alfresco.extension package)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.