Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.rendering.fm.i18n
Class ResourceComposite

java.lang.Object
  extended by java.util.ResourceBundle
      extended by 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
 
Constructor Summary
ResourceComposite()
           
ResourceComposite(ClassLoader cl)
           
 
Method Summary
 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).
 void setLocale(Locale locale)
          Set the locale to be used.
 
Methods inherited from class java.util.ResourceBundle
clearCache, clearCache, containsKey, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, keySet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceComposite

public ResourceComposite()

ResourceComposite

public ResourceComposite(ClassLoader cl)
Method Detail

setLocale

public void setLocale(Locale locale)
Set the locale to be used.

Parameters:
locale -

getKeys

public Enumeration<String> getKeys()
Specified by:
getKeys in class ResourceBundle

getString

public String getString(String key,
                        Locale locale)
Delegates getString using the resource bundle corresponding to the local (create one if it doesn't exist).

Parameters:
key -
locale -
Returns:

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.