Class ResourceComposite
- java.lang.Object
-
- java.util.ResourceBundle
-
- org.nuxeo.ecm.platform.rendering.fm.i18n.ResourceComposite
-
public class ResourceComposite extends ResourceBundle
A resource bundle for Nuxeo Rendering that holds a map of locals, allows developers to change it from its api (setLocale) and that will delegate its method to the correct resource bundle according to the local chosen.- Author:
- Sun Seng David TAN
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.ResourceBundle
ResourceBundle.Control
-
-
Field Summary
-
Fields inherited from class java.util.ResourceBundle
parent
-
-
Constructor Summary
Constructors Constructor Description ResourceComposite()
ResourceComposite(ClassLoader cl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Enumeration<String>
getKeys()
String
getString(String key, Locale locale)
Delegates getString using the resource bundle corresponding to the local (create one if it doesn't exist).protected Object
handleGetObject(String key)
void
setLocale(Locale locale)
Set the locale to be used.-
Methods inherited from class java.util.ResourceBundle
clearCache, clearCache, containsKey, getBaseBundleName, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, handleKeySet, keySet, setParent
-
-
-
-
Constructor Detail
-
ResourceComposite
public ResourceComposite()
-
ResourceComposite
public ResourceComposite(ClassLoader cl)
-
-
Method Detail
-
setLocale
public void setLocale(Locale locale)
Set the locale to be used.
-
getKeys
public Enumeration<String> getKeys()
- Specified by:
getKeys
in classResourceBundle
-
handleGetObject
protected Object handleGetObject(String key)
- Specified by:
handleGetObject
in classResourceBundle
-
-