deegree 2.1 (2007/11/08 09:57 build-328-official)

org.deegree.model.csct.resources.css
Class Resources

java.lang.Object
  extended by java.util.ResourceBundle
      extended by org.deegree.model.csct.resources.ResourceBundle
          extended by org.deegree.model.csct.resources.css.Resources
Direct Known Subclasses:
Resources_en, Resources_fr

public class Resources
extends ResourceBundle

Base class for local-dependent resources. Instances of this class should never been created directly. Use the factory method getResources(java.util.Locale) or use static methods instead.

Version:
1.0
Author:
Martin Desruisseaux

Field Summary
 
Fields inherited from class org.deegree.model.csct.resources.ResourceBundle
values
 
Fields inherited from class java.util.ResourceBundle
parent
 
Constructor Summary
Resources()
          Construct a resource bundle using english language.
Resources(String filepath)
          Construct a resource bundle using the specified UTF8 file.
 
Method Summary
static String format(int key)
          Gets a string for the given key from this resource bundle or one of its parents.
static String format(int key, Object arg0)
          Gets a string for the given key are replace all occurence of "{0}" with values of arg0.
static String format(int key, Object arg0, Object arg1)
          Gets a string for the given key are replace all occurence of "{0}", "{1}", with values of arg0, arg1.
static String format(int key, Object arg0, Object arg1, Object arg2)
          Gets a string for the given key are replace all occurence of "{0}", "{1}", with values of arg0, arg1, etc.
protected  String getLoggerName()
          Returns the name of the logger to use, which is org.deegree.model.csct.css.
static Resources getResources(Locale locale)
          Returns resources in the given locale.
 
Methods inherited from class org.deegree.model.csct.resources.ResourceBundle
getKeys, getLabel, getMenuLabel, getString, getString, getString, getString, getString, getString, handleGetObject, list, toString
 
Methods inherited from class java.util.ResourceBundle
getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Resources

public Resources()
Construct a resource bundle using english language. This is the default when no resource are available in user language.


Resources

Resources(String filepath)
Construct a resource bundle using the specified UTF8 file.

Method Detail

getLoggerName

protected String getLoggerName()
Returns the name of the logger to use, which is org.deegree.model.csct.css.

Overrides:
getLoggerName in class ResourceBundle

getResources

public static Resources getResources(Locale locale)
                              throws MissingResourceException
Returns resources in the given locale.

Parameters:
locale - The locale, or null for the default locale.
Returns:
Resources in the given locale.
Throws:
MissingResourceException - if resources can't be found.

format

public static String format(int key)
                     throws MissingResourceException
Gets a string for the given key from this resource bundle or one of its parents.

Parameters:
key - The key for the desired string.
Returns:
The string for the given key.
Throws:
MissingResourceException - If no object for the given key can be found.

format

public static String format(int key,
                            Object arg0)
                     throws MissingResourceException
Gets a string for the given key are replace all occurence of "{0}" with values of arg0.

Parameters:
key - The key for the desired string.
arg0 - Value to substitute to "{0}".
Returns:
The formatted string for the given key.
Throws:
MissingResourceException - If no object for the given key can be found.

format

public static String format(int key,
                            Object arg0,
                            Object arg1)
                     throws MissingResourceException
Gets a string for the given key are replace all occurence of "{0}", "{1}", with values of arg0, arg1.

Parameters:
key - The key for the desired string.
arg0 - Value to substitute to "{0}".
arg1 - Value to substitute to "{1}".
Returns:
The formatted string for the given key.
Throws:
MissingResourceException - If no object for the given key can be found.

format

public static String format(int key,
                            Object arg0,
                            Object arg1,
                            Object arg2)
                     throws MissingResourceException
Gets a string for the given key are replace all occurence of "{0}", "{1}", with values of arg0, arg1, etc.

Parameters:
key - The key for the desired string.
arg0 - Value to substitute to "{0}".
arg1 - Value to substitute to "{1}".
arg2 - Value to substitute to "{2}".
Returns:
The formatted string for the given key.
Throws:
MissingResourceException - If no object for the given key can be found.

deegree 2.1 (2007/11/08 09:57 build-328-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net