Nuxeo Enterprise Platform 5.4

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 java.util.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
java.util.ResourceBundle.Control
 
Constructor Summary
ResourceComposite()
           
ResourceComposite(java.lang.ClassLoader cl)
           
 
Method Summary
 java.util.Enumeration<java.lang.String> getKeys()
           
 java.lang.String getString(java.lang.String key, java.util.Locale locale)
          Delegates getString using the resource bundle corresponding to the local (create one if it doesn't exist).
 void setLocale(java.util.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(java.lang.ClassLoader cl)
Method Detail

setLocale

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

Parameters:
locale -

getKeys

public java.util.Enumeration<java.lang.String> getKeys()
Specified by:
getKeys in class java.util.ResourceBundle

getString

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

Parameters:
key -
locale -
Returns:

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.