|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.PingOO.DLAI.lib.util.ResourceManager
Manages the access to localized datas and resource bundles.
| Field Summary | |
static java.lang.String |
DEFAULT_MODULE
Defines the key of the default ResourceBundle. |
static java.lang.String |
EMPTY_LOCALIZED
Defines the String to return in case of the resource bundle cannot find the resource. |
private static java.util.Hashtable |
RESOURCE_TABLE
Contains all ResourceBundles used within the program. |
| Constructor Summary | |
private |
ResourceManager()
Hides the constructor from the outside. |
| Method Summary | |
static java.lang.String |
getString(java.lang.String identifier)
Gets a localized resource from a resource file. |
static java.lang.String |
getString(java.lang.String module,
java.lang.String identifier)
Gets a localized resource from a resource file. |
(package private) static void |
initialize()
Initializes the ResourceBundle container. |
private static void |
loadBundle(java.lang.String module)
Loads a bundle from a special set. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final java.lang.String DEFAULT_MODULE
public static final java.lang.String EMPTY_LOCALIZED
private static java.util.Hashtable RESOURCE_TABLE
| Constructor Detail |
private ResourceManager()
| Method Detail |
static final void initialize()
public static final java.lang.String getString(java.lang.String identifier)
identifier - What's identies the data to retrieve from the resource file.(empty) if the resource can not be found.
public static final java.lang.String getString(java.lang.String module,
java.lang.String identifier)
myAppli then :
MyAppli.properties contains the resources in the default language (usually international english).
MyAppli_fr.properties contains the resources for all french based languages.
MyAppli_fr_FR.properties contains the resources for the metropolitan french language.
For convinience and performance, programs can also directly try to retrieve a resource from the shared file by using ResourceManager.DEFAULT_MODULE instead of their own module name.
module - The appli's own module name.identifier - What's identies the data to retrieve from the resource file.(empty) if the resource can not be found.private static void loadBundle(java.lang.String module)
module - The set to be loaded.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||