|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.oberon.client.Configuration
public class Configuration
Manage configuration files
Constructor Summary | |
---|---|
Configuration(Application app,
java.lang.String filename)
Define new configuration for the current application |
|
Configuration(java.lang.String filename)
Define new generic configuration |
|
Configuration(java.lang.String section,
java.util.ResourceBundle bundle)
Define new generic configuration and retrieve properties from a Resource-Bundle file |
Method Summary | |
---|---|
void |
configObject(Configurable object)
Configure a Configurable object with properties stored into the related section (named with the same configurable object name). |
java.util.Vector<java.lang.String> |
getObjects(java.lang.String type)
Returns a Vector of configurable object names of a specific type. |
java.util.Vector<java.lang.String> |
getProperties(java.lang.String section)
Return a Vector of property names for a specific section or configurable object. |
java.lang.String |
getValue(java.lang.String section,
java.lang.String key)
Returns the value of the property identified by section and name or null if no property exists. |
void |
save(java.util.LinkedHashMap<java.lang.String,java.util.Vector<java.lang.String>> sectionProperties)
Update the configuration file |
void |
save(java.util.Vector<Configurable> configurables)
Update the configuration file |
void |
setValue(java.lang.String section,
java.lang.String key,
java.lang.String value)
Set new configuration property for a specific section |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Configuration(Application app, java.lang.String filename)
app
- the Applicationfilename
- configuration file namepublic Configuration(java.lang.String filename)
filename
- configuration file namepublic Configuration(java.lang.String section, java.util.ResourceBundle bundle)
section
- the section name or the configurable object name to loadbundle
- the resource bundle file (for example "oberon.properties")ResourceBundle.getBundle(String, java.util.Locale)
Method Detail |
---|
public void setValue(java.lang.String section, java.lang.String key, java.lang.String value)
section
- the section where the property is storedkey
- the name of the property to set.value
- the value to set for the property.public java.lang.String getValue(java.lang.String section, java.lang.String key)
section
- the section where the property is storedkey
- the name of the property to retrieve.public java.util.Vector<java.lang.String> getProperties(java.lang.String section)
section
- the section (or the configurable object name) where the properties are storedpublic java.util.Vector<java.lang.String> getObjects(java.lang.String type)
type
- the configurable object type
Configurable objects are identifies with sections where, at least, it is defined the "type" property.public void configObject(Configurable object)
public void save(java.util.Vector<Configurable> configurables)
configurables
- Vector of Configurable
objectspublic void save(java.util.LinkedHashMap<java.lang.String,java.util.Vector<java.lang.String>> sectionProperties)
sectionProperties
- Hashtable where section names (keys) are associated with a Vector of formatted properties ("prop.name=prop.value")
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |