|
|||||||||
| Home >> All >> org >> apache >> axis >> [ i18n overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.axis.i18n
Class ProjectResourceBundle

java.lang.Objectjava.util.ResourceBundle
org.apache.axis.i18n.ProjectResourceBundle
- public class ProjectResourceBundle
- extends java.util.ResourceBundle
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 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.
| Nested Class Summary | |
private static class |
ProjectResourceBundle.Context
|
| Nested classes inherited from class java.util.ResourceBundle |
|
| Field Summary | |
private static java.util.Hashtable |
bundleCache
|
private static java.util.Locale |
defaultLocale
|
protected static org.apache.commons.logging.Log |
log
|
private java.util.ResourceBundle |
resourceBundle
|
private java.lang.String |
resourceName
|
| Fields inherited from class java.util.ResourceBundle |
parent |
| Constructor Summary | |
private |
ProjectResourceBundle(java.lang.String name,
java.util.ResourceBundle bundle)
Construct a new ProjectResourceBundle |
| Method Summary | |
static void |
clearCache()
Clears the internal cache |
private static ProjectResourceBundle |
getBundle(ProjectResourceBundle.Context context,
java.lang.String packageName)
get bundle... |
static ProjectResourceBundle |
getBundle(java.lang.String projectName,
java.lang.Class caller,
java.lang.String resourceName,
java.util.Locale locale)
Construct a new ProjectResourceBundle |
static ProjectResourceBundle |
getBundle(java.lang.String projectName,
java.lang.Class caller,
java.lang.String resourceName,
java.util.Locale locale,
java.util.ResourceBundle extendsBundle)
Construct a new ProjectResourceBundle |
static ProjectResourceBundle |
getBundle(java.lang.String projectName,
java.lang.String packageName,
java.lang.String resourceName)
Construct a new ProjectResourceBundle |
static ProjectResourceBundle |
getBundle(java.lang.String projectName,
java.lang.String packageName,
java.lang.String resourceName,
java.util.Locale locale,
java.lang.ClassLoader loader)
Construct a new ProjectResourceBundle |
static ProjectResourceBundle |
getBundle(java.lang.String projectName,
java.lang.String packageName,
java.lang.String resourceName,
java.util.Locale locale,
java.lang.ClassLoader loader,
java.util.ResourceBundle extendsBundle)
Construct a new ProjectResourceBundle |
java.util.Enumeration |
getKeys()
This method should return all keys for which a resource exists; you should include the enumeration of any parent's keys, after filtering out duplicates. |
private static java.lang.String |
getPackage(java.lang.String name)
|
java.lang.String |
getResourceName()
|
protected java.lang.Object |
handleGetObject(java.lang.String key)
Override this method to provide the resource for a keys. |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
| 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 |
| Field Detail |
log
protected static org.apache.commons.logging.Log log
bundleCache
private static final java.util.Hashtable bundleCache
defaultLocale
private static final java.util.Locale defaultLocale
resourceBundle
private final java.util.ResourceBundle resourceBundle
resourceName
private final java.lang.String resourceName
| Constructor Detail |
ProjectResourceBundle
private ProjectResourceBundle(java.lang.String name, java.util.ResourceBundle bundle) throws java.util.MissingResourceException
- Construct a new ProjectResourceBundle
| Method Detail |
handleGetObject
protected java.lang.Object handleGetObject(java.lang.String key) throws java.util.MissingResourceException
- Description copied from class:
java.util.ResourceBundle - Override this method to provide the resource for a keys. This gets
called by
getObject. If you don't have a resource for the given key, you should return null instead throwing a MissingResourceException. You don't have to ask the parent, getObject() already does this; nor should you throw a MissingResourceException.
getKeys
public java.util.Enumeration getKeys()
- Description copied from class:
java.util.ResourceBundle - This method should return all keys for which a resource exists; you
should include the enumeration of any parent's keys, after filtering out
duplicates.
getBundle
public static ProjectResourceBundle getBundle(java.lang.String projectName, java.lang.String packageName, java.lang.String resourceName) throws java.util.MissingResourceException
- Construct a new ProjectResourceBundle
getBundle
public static ProjectResourceBundle getBundle(java.lang.String projectName, java.lang.Class caller, java.lang.String resourceName, java.util.Locale locale) throws java.util.MissingResourceException
- Construct a new ProjectResourceBundle
getBundle
public static ProjectResourceBundle getBundle(java.lang.String projectName, java.lang.String packageName, java.lang.String resourceName, java.util.Locale locale, java.lang.ClassLoader loader) throws java.util.MissingResourceException
- Construct a new ProjectResourceBundle
getBundle
public static ProjectResourceBundle getBundle(java.lang.String projectName, java.lang.Class caller, java.lang.String resourceName, java.util.Locale locale, java.util.ResourceBundle extendsBundle) throws java.util.MissingResourceException
- Construct a new ProjectResourceBundle
getBundle
public static ProjectResourceBundle getBundle(java.lang.String projectName, java.lang.String packageName, java.lang.String resourceName, java.util.Locale locale, java.lang.ClassLoader loader, java.util.ResourceBundle extendsBundle) throws java.util.MissingResourceException
- Construct a new ProjectResourceBundle
getBundle
private static ProjectResourceBundle getBundle(ProjectResourceBundle.Context context, java.lang.String packageName) throws java.util.MissingResourceException
- get bundle...
- check cache
- try up hierarchy
- if at top of hierarchy, use (link to) context.getParentBundle()
getPackage
private static final java.lang.String getPackage(java.lang.String name)
getResourceName
public java.lang.String getResourceName()
clearCache
public static void clearCache()
- Clears the internal cache
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
|
|||||||||
| Home >> All >> org >> apache >> axis >> [ i18n overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC