|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.common.msgs.DAIResourceBundle
Manages the OGSA-DAI message bundle and allows to register other message
bundles at runtime. The entries from any registered message bundle will be
aggregated into a java.util.Properties
object. For a given
key, a value will be obtained by searching through the OGSA-DAI message
bundle first and then, if a match could not be found, searching in any other
registered message bundles.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
|
private static DAILogger |
LOG
DAILogger object for logging in this class. |
private static java.lang.String |
MAIN_MESSAGE_BUNDLE
name of the main OGSA-DAI message properties file |
private java.util.PropertyResourceBundle |
mMainBundle
main OGSA-DAI message bundle |
private java.util.Properties |
mProperties
aggregated message bundle |
Constructor Summary | |
DAIResourceBundle()
Constructs a new resource bundle and loads the OGSA-DAI messages and any internationalization packages. |
Method Summary | |
java.lang.String |
getString(java.lang.String key)
Searches for the property with the specified key in the message bundle. |
void |
registerResourceBundle(java.lang.String baseName,
java.util.Locale locale)
Tries to obtain a property resource bundle from a resource base name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static DAILogger LOG
private static final java.lang.String MAIN_MESSAGE_BUNDLE
private java.util.PropertyResourceBundle mMainBundle
private java.util.Properties mProperties
Constructor Detail |
public DAIResourceBundle()
java.util.MissingResourceException
- if the main message bundle cannot be foundMethod Detail |
public void registerResourceBundle(java.lang.String baseName, java.util.Locale locale)
mProperties
member variable.
baseName
- base name of the resource properties bundlelocale
- the current locale
java.lang.IllegalArgumentException
- if the baseName is null
java.util.MissingResourceException
- if a resource with the specified base name cannot be foundpublic java.lang.String getString(java.lang.String key)
key
- a property key
null
if no value could be found
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |