|
g-Eclipse Release 1.0.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.geclipse.core.config.Configuration
public class Configuration
Concrete implementation of the IConfiguration interface.
Configuration parameters are stored using a hashtable. This implementation
provides a standard way of loading and saving a specific configuration from
and to XML files.
| Constructor Summary | |
|---|---|
Configuration()
Standard constructor for an empty configuration. |
|
Configuration(IConfiguration configuration)
Copy constructor. |
|
| Method Summary | |
|---|---|
java.util.Set<java.lang.String> |
getKeys()
Get the keys of all currently registered parameters. |
java.lang.String |
getParameter(java.lang.String key)
Get the parameter corresponding to the specified key. |
java.lang.String[] |
getParameters(java.lang.String key)
Get the parameter corresponding to the specified key. |
void |
loadFromXML(IFileStore store)
Load the configuration from the specified file store. |
void |
setParameter(java.lang.String key,
java.lang.String value)
Sets a single-value parameter. |
void |
setParameters(java.lang.String key,
java.lang.String[] value)
Sets a multi-value parameter. |
void |
storeToXML(IFileStore store)
Save this configuration to the specified file store. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Configuration()
public Configuration(IConfiguration configuration)
configuration - The configuration to be copied.| Method Detail |
|---|
public void setParameter(java.lang.String key,
java.lang.String value)
key - The parameter's key.value - The parameter's value.
public void setParameters(java.lang.String key,
java.lang.String[] value)
key - The parameter's key.value - The parameter's value.public java.util.Set<java.lang.String> getKeys()
IConfiguration
getKeys in interface IConfigurationSet of keys for all currently registered parameters.public java.lang.String getParameter(java.lang.String key)
IConfigurationnull will be returned.
getParameter in interface IConfigurationkey - The key of the parameter to be returned.
null if either the
paremeter does not exist or if the specified key corresponds to a
multi-string parameter.public java.lang.String[] getParameters(java.lang.String key)
IConfigurationnull will be returned. If the
parameter corresponds to a single-string this string is wrapped into a
one-element array before returning.
getParameters in interface IConfigurationkey - The key of the parameter to be returned.
null if no such
parameter exists.
public void loadFromXML(IFileStore store)
throws ProblemException
IConfiguration
loadFromXML in interface IConfigurationstore - The IFileStore from which to load the parameters.
ProblemException - If the file store does not exists or an error
occurs while reading the data from the file store.
public void storeToXML(IFileStore store)
throws ProblemException
IConfiguration
storeToXML in interface IConfigurationstore - The IFileStore to which to save the configuration.
ProblemException - If an error occurs while saving the configuration.
|
g-Eclipse Release 1.0.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||