|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.axis2.jaxws.i18n.RB
public class RB
CURRENTLY NOT USED KEEPING FOR REFERENCE 9/19/2002
Wrapper class for resource bundles. Property files are used to store resource strings, which are the only types of resources available. Property files can inherit properties from other files so that a base property file can be used and a small number of properties can be over-ridden by another property file. For example you may create an english version of a resource file named "resource.properties". You then decide that the British English version of all of the properties except one are the same, so there is no need to redefine all of the properties in "resource_en_GB", just the one that is different.
The property file lookup searches for classes with various suffixes on the basis if the desired local and the current default local (as returned by Local.getDefault()). As property files are found the property values are merged so that inheritance is preserved.
The order of searching is:
The basename is the name of the property file without the ".properties" extension.
Properties will be cached for performance.
Property values stored in the property files can also contain dynamic variables. Any dynamic variable defined in PropertiesUtil.getVariableValue() can be used (such as {date}), as well as arguments in the form {0}, {1}, etc. Argument values are specified in the various overloaded getString() methods.
Field Summary | |
---|---|
static java.lang.String |
BASE_NAME
|
protected java.lang.String |
basePropertyFileName
|
static java.lang.String |
PROPERTY_EXT
|
protected java.util.Properties |
resourceProperties
|
Constructor Summary | |
---|---|
RB(java.lang.Object caller,
java.lang.String name)
Construct a new RB |
|
RB(java.lang.Object caller,
java.lang.String name,
java.util.Locale locale)
Construct a new RB |
|
RB(java.lang.String name)
Construct a new RB |
Method Summary | |
---|---|
static void |
clearCache()
Clears the internal cache. |
static java.lang.String |
getMessage(java.lang.Object caller,
java.lang.String basename,
java.util.Locale locale,
java.lang.String key,
java.lang.Object[] args)
|
java.util.Properties |
getProperties()
Get the underlying properties |
static java.lang.String |
getString(java.lang.Object caller,
java.util.Locale locale,
java.lang.String key)
Get a message from resource.properties from the package of the given object. |
static java.lang.String |
getString(java.lang.Object caller,
java.util.Locale locale,
java.lang.String key,
java.lang.Object arg0)
Get a message from resource.properties from the package of the given object. |
static java.lang.String |
getString(java.lang.Object caller,
java.util.Locale locale,
java.lang.String key,
java.lang.Object[] args)
Get a message from resource.properties from the package of the given object. |
static java.lang.String |
getString(java.lang.Object caller,
java.util.Locale locale,
java.lang.String key,
java.lang.Object arg0,
java.lang.Object arg1)
Get a message from resource.properties from the package of the given object. |
static java.lang.String |
getString(java.lang.Object caller,
java.util.Locale locale,
java.lang.String key,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2)
Get a message from resource.properties from the package of the given object. |
static java.lang.String |
getString(java.lang.Object caller,
java.util.Locale locale,
java.lang.String key,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Get a message from resource.properties from the package of the given object. |
static java.lang.String |
getString(java.lang.Object caller,
java.util.Locale locale,
java.lang.String key,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3,
java.lang.Object arg4)
Get a message from resource.properties from the package of the given object. |
static java.lang.String |
getString(java.lang.Object caller,
java.lang.String key)
Get a message from resource.properties from the package of the given object. |
static java.lang.String |
getString(java.lang.Object caller,
java.lang.String key,
java.lang.Object arg0)
Get a message from resource.properties from the package of the given object. |
static java.lang.String |
getString(java.lang.Object caller,
java.lang.String key,
java.lang.Object[] args)
Get a message from resource.properties from the package of the given object. |
static java.lang.String |
getString(java.lang.Object caller,
java.lang.String key,
java.lang.Object arg0,
java.lang.Object arg1)
Get a message from resource.properties from the package of the given object. |
static java.lang.String |
getString(java.lang.Object caller,
java.lang.String key,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2)
Get a message from resource.properties from the package of the given object. |
static java.lang.String |
getString(java.lang.Object caller,
java.lang.String key,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Get a message from resource.properties from the package of the given object. |
static java.lang.String |
getString(java.lang.Object caller,
java.lang.String key,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3,
java.lang.Object arg4)
Get a message from resource.properties from the package of the given object. |
java.lang.String |
getString(java.lang.String key)
Gets a string message from the resource bundle for the given key |
java.lang.String |
getString(java.lang.String key,
java.lang.Object arg0)
Gets a string message from the resource bundle for the given key. |
java.lang.String |
getString(java.lang.String key,
java.lang.Object[] array)
Gets a string message from the resource bundle for the given key. |
java.lang.String |
getString(java.lang.String key,
java.lang.Object arg0,
java.lang.Object arg1)
Gets a string message from the resource bundle for the given key. |
java.lang.String |
getString(java.lang.String key,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2)
Gets a string message from the resource bundle for the given key. |
protected java.util.Properties |
loadProperties(java.lang.String resname,
java.lang.ClassLoader loader)
|
protected void |
loadProperties(java.lang.String basename,
java.lang.ClassLoader loader,
java.util.Locale locale,
java.util.Locale defaultLocale)
|
protected java.util.Properties |
loadProperties(java.lang.String basename,
java.lang.ClassLoader loader,
java.util.Locale locale,
java.util.Properties props)
|
protected java.util.Properties |
merge(java.util.Properties p1,
java.util.Properties p2)
Merge two Properties objects |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String BASE_NAME
public static final java.lang.String PROPERTY_EXT
protected java.lang.String basePropertyFileName
protected java.util.Properties resourceProperties
Constructor Detail |
---|
public RB(java.lang.String name) throws java.util.MissingResourceException
name
- The name of the property file without the ".properties" extension
java.util.MissingResourceException
public RB(java.lang.Object caller, java.lang.String name) throws java.util.MissingResourceException
caller
- The calling object. This is used to get the package name to further construct
the basename as well as to get the proper ClassLoadername
- The name of the property file without the ".properties" extension
java.util.MissingResourceException
public RB(java.lang.Object caller, java.lang.String name, java.util.Locale locale) throws java.util.MissingResourceException
caller
- The calling object. This is used to get the package name to further construct
the basename as well as to get the proper ClassLoadername
- The name of the property file without the ".properties" extensionlocale
- The locale
java.util.MissingResourceException
Method Detail |
---|
public java.lang.String getString(java.lang.String key) throws java.util.MissingResourceException
key
- The resource key
java.util.MissingResourceException
public java.lang.String getString(java.lang.String key, java.lang.Object arg0) throws java.util.MissingResourceException
Gets a string message from the resource bundle for the given key. The message may contain variables that will be substituted with the given arguments. Variables have the format:
key
- The resource keyarg0
- The argument to place in variable {0}
java.util.MissingResourceException
public java.lang.String getString(java.lang.String key, java.lang.Object arg0, java.lang.Object arg1) throws java.util.MissingResourceException
Gets a string message from the resource bundle for the given key. The message may contain variables that will be substituted with the given arguments. Variables have the format:
key
- The resource keyarg0
- The argument to place in variable {0}arg1
- The argument to place in variable {1}
java.util.MissingResourceException
public java.lang.String getString(java.lang.String key, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2) throws java.util.MissingResourceException
Gets a string message from the resource bundle for the given key. The message may contain variables that will be substituted with the given arguments. Variables have the format:
key
- The resource keyarg0
- The argument to place in variable {0}arg1
- The argument to place in variable {1}arg2
- The argument to place in variable {1}
java.util.MissingResourceException
public java.lang.String getString(java.lang.String key, java.lang.Object[] array) throws java.util.MissingResourceException
Gets a string message from the resource bundle for the given key. The message may contain variables that will be substituted with the given arguments. Variables have the format:
key
- The resource keyarray
- An array of objects to place in corresponding variables
java.util.MissingResourceException
protected void loadProperties(java.lang.String basename, java.lang.ClassLoader loader, java.util.Locale locale, java.util.Locale defaultLocale) throws java.util.MissingResourceException
java.util.MissingResourceException
protected java.util.Properties loadProperties(java.lang.String basename, java.lang.ClassLoader loader, java.util.Locale locale, java.util.Properties props)
protected java.util.Properties loadProperties(java.lang.String resname, java.lang.ClassLoader loader)
protected java.util.Properties merge(java.util.Properties p1, java.util.Properties p2)
public java.util.Properties getProperties()
public static java.lang.String getString(java.lang.Object caller, java.lang.String key) throws java.util.MissingResourceException
caller
- The calling object, used to get the package name and class loaderkey
- The resource key
java.util.MissingResourceException
public static java.lang.String getString(java.lang.Object caller, java.lang.String key, java.lang.Object arg0) throws java.util.MissingResourceException
caller
- The calling object, used to get the package name and class loaderkey
- The resource keyarg0
- The argument to place in variable {0}
java.util.MissingResourceException
public static java.lang.String getString(java.lang.Object caller, java.lang.String key, java.lang.Object arg0, java.lang.Object arg1) throws java.util.MissingResourceException
caller
- The calling object, used to get the package name and class loaderkey
- The resource keyarg0
- The argument to place in variable {0}arg1
- The argument to place in variable {1}
java.util.MissingResourceException
public static java.lang.String getString(java.lang.Object caller, java.lang.String key, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2) throws java.util.MissingResourceException
caller
- The calling object, used to get the package name and class loaderkey
- The resource keyarg0
- The argument to place in variable {0}arg1
- The argument to place in variable {1}arg2
- The argument to place in variable {2}
java.util.MissingResourceException
public static java.lang.String getString(java.lang.Object caller, java.lang.String key, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3) throws java.util.MissingResourceException
caller
- The calling object, used to get the package name and class loaderkey
- The resource keyarg0
- The argument to place in variable {0}arg1
- The argument to place in variable {1}arg2
- The argument to place in variable {2}arg3
- The argument to place in variable {3}
java.util.MissingResourceException
public static java.lang.String getString(java.lang.Object caller, java.lang.String key, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4) throws java.util.MissingResourceException
caller
- The calling object, used to get the package name and class loaderkey
- The resource keyarg0
- The argument to place in variable {0}arg1
- The argument to place in variable {1}arg2
- The argument to place in variable {2}arg3
- The argument to place in variable {3}arg4
- The argument to place in variable {4}
java.util.MissingResourceException
public static java.lang.String getString(java.lang.Object caller, java.lang.String key, java.lang.Object[] args) throws java.util.MissingResourceException
caller
- The calling object, used to get the package name and class loaderkey
- The resource keyargs
- An array of objects to place in corresponding variables
java.util.MissingResourceException
public static java.lang.String getString(java.lang.Object caller, java.util.Locale locale, java.lang.String key) throws java.util.MissingResourceException
caller
- The calling object, used to get the package name and class loaderlocale
- The localekey
- The resource key
java.util.MissingResourceException
public static java.lang.String getString(java.lang.Object caller, java.util.Locale locale, java.lang.String key, java.lang.Object arg0) throws java.util.MissingResourceException
caller
- The calling object, used to get the package name and class loaderlocale
- The localekey
- The resource keyarg0
- The argument to place in variable {0}
java.util.MissingResourceException
public static java.lang.String getString(java.lang.Object caller, java.util.Locale locale, java.lang.String key, java.lang.Object arg0, java.lang.Object arg1) throws java.util.MissingResourceException
caller
- The calling object, used to get the package name and class loaderlocale
- The localekey
- The resource keyarg0
- The argument to place in variable {0}arg1
- The argument to place in variable {1}
java.util.MissingResourceException
public static java.lang.String getString(java.lang.Object caller, java.util.Locale locale, java.lang.String key, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2) throws java.util.MissingResourceException
caller
- The calling object, used to get the package name and class loaderlocale
- The localekey
- The resource keyarg0
- The argument to place in variable {0}arg1
- The argument to place in variable {1}arg2
- The argument to place in variable {2}
java.util.MissingResourceException
public static java.lang.String getString(java.lang.Object caller, java.util.Locale locale, java.lang.String key, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3) throws java.util.MissingResourceException
caller
- The calling object, used to get the package name and class loaderlocale
- The localekey
- The resource keyarg0
- The argument to place in variable {0}arg1
- The argument to place in variable {1}arg2
- The argument to place in variable {2}arg3
- The argument to place in variable {3}
java.util.MissingResourceException
public static java.lang.String getString(java.lang.Object caller, java.util.Locale locale, java.lang.String key, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4) throws java.util.MissingResourceException
caller
- The calling object, used to get the package name and class loaderlocale
- The localekey
- The resource keyarg0
- The argument to place in variable {0}arg1
- The argument to place in variable {1}arg2
- The argument to place in variable {2}arg3
- The argument to place in variable {3}
java.util.MissingResourceException
public static java.lang.String getString(java.lang.Object caller, java.util.Locale locale, java.lang.String key, java.lang.Object[] args) throws java.util.MissingResourceException
caller
- The calling object, used to get the package name and class loaderlocale
- The localekey
- The resource keyargs
- An array of objects to place in corresponding variables
java.util.MissingResourceException
public static java.lang.String getMessage(java.lang.Object caller, java.lang.String basename, java.util.Locale locale, java.lang.String key, java.lang.Object[] args) throws java.util.MissingResourceException
java.util.MissingResourceException
public static void clearCache()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |