|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.misc.LyResourceBundle
public abstract class LyResourceBundle
This class is used to manage the resources of an application. It is based on the resource bundle mechanism used in the Java language. The resources must be contained in properties files (such as strings_fr.properties). See the javadoc of ResourceBundle for more details on how to declare these files). Its attributes are :
This class must be inherited in order to manage a given type of resources (files, colors, strings...).
ResourceBundle
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static java.lang.String |
PACKAGE_DIR
|
static java.lang.String |
PROPERTIES_DIR
|
static boolean |
UPPER_CASE_KEYS_ONLY
|
Constructor Summary | |
---|---|
LyResourceBundle(LyEnvironment environment)
Constructor with a given environment. |
|
LyResourceBundle(LyEnvironment environment,
java.lang.String name)
Constructor with a given environment and name. |
Method Summary | |
---|---|
boolean |
checkKey(java.lang.String key,
boolean checkAll)
Check if the given key is found in this resource bundle. |
void |
clearCache()
Clears cache for this resource bundle. |
void |
free()
Clear all resources of this bundle. |
java.lang.String |
get(java.lang.String key)
Return the String corresponding to the key passed. |
java.util.Vector<java.lang.String> |
getKeyList(boolean addParent)
Gets the list of keys from extra resources, generic ResourceBundle and application ResourceBundle. |
java.util.Enumeration<java.lang.String> |
getKeys(boolean addParent)
Gets the list of keys from extra resources, generic ResourceBundle and application ResourceBundle. |
static java.util.ArrayList<LyEnvironment> |
getSonEnvironments(LyEnvironment parent)
Find the son environments from specified parent |
boolean |
hasKey(java.lang.String key)
Check if the given key is found in this resource bundle. |
void |
put(java.lang.String key,
java.lang.String value)
Adds a resource in this resource bundle. |
void |
remove(java.lang.String key)
Removes a resource from this resource bundle. |
static void |
removeBundles(LyEnvironment environment)
Free all resource bundles of the given environment. |
void |
saveTo(java.lang.String dir)
Save resource bundle. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
public static java.lang.String PROPERTIES_DIR
public static java.lang.String PACKAGE_DIR
public static boolean UPPER_CASE_KEYS_ONLY
Constructor Detail |
---|
public LyResourceBundle(LyEnvironment environment)
LyResourceBundle(environment, null, null)
environment
- The environment of the bundle.public LyResourceBundle(LyEnvironment environment, java.lang.String name)
LyResourceBundle(environment, name, null)
environment
- The environment of the bundle.name
- The name of the resource bundle.Method Detail |
---|
public static java.util.ArrayList<LyEnvironment> getSonEnvironments(LyEnvironment parent)
parent
- parent environment
public static void removeBundles(LyEnvironment environment)
environment
- the environment whose resource bundles must be freedpublic void free()
public void clearCache()
public java.lang.String get(java.lang.String key)
key
- The key to search
public boolean checkKey(java.lang.String key, boolean checkAll)
key
- the key to searchcheckAll
- if true, we check the existence in the application and in the AE properties. If false we only
look in the application
public boolean hasKey(java.lang.String key)
key
- the key to search
public void put(java.lang.String key, java.lang.String value)
key
- Key of the resource.value
- Value of this new resource.public void remove(java.lang.String key)
key
- Key of the removed resource.public java.util.Vector<java.lang.String> getKeyList(boolean addParent)
addParent
- Boolean indicating if parent keys are added or not in result.
public java.util.Enumeration<java.lang.String> getKeys(boolean addParent)
addParents
- Boolean indicating if parent keys are added or not in result.
public void saveTo(java.lang.String dir)
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |