g-Eclipse
Release 1.0.0

eu.geclipse.core.config
Interface IConfiguration

All Known Implementing Classes:
Configuration

public interface IConfiguration

This interface is used in the configurator framework in order to hold and provide configuration parameters. These parameters are keyed values of Strings or arrays of Strings.


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 storeToXML(IFileStore store)
          Save this configuration to the specified file store.
 

Method Detail

getKeys

java.util.Set<java.lang.String> getKeys()
Get the keys of all currently registered parameters.

Returns:
A Set of keys for all currently registered parameters.

getParameter

java.lang.String getParameter(java.lang.String key)
Get the parameter corresponding to the specified key. If no parameter with the specified key is found or if the parameter is a multi-string parameter null will be returned.

Parameters:
key - The key of the parameter to be returned.
Returns:
The single-string parameter or null if either the paremeter does not exist or if the specified key corresponds to a multi-string parameter.

getParameters

java.lang.String[] getParameters(java.lang.String key)
Get the parameter corresponding to the specified key. If no parameter with the specified key is found null will be returned. If the parameter corresponds to a single-string this string is wrapped into a one-element array before returning.

Parameters:
key - The key of the parameter to be returned.
Returns:
The multi-string parameter or null if no such parameter exists.

loadFromXML

void loadFromXML(IFileStore store)
                 throws ProblemException
Load the configuration from the specified file store.

Parameters:
store - The IFileStore from which to load the parameters.
Throws:
ProblemException - If the file store does not exists or an error occurs while reading the data from the file store.

storeToXML

void storeToXML(IFileStore store)
                throws ProblemException
Save this configuration to the specified file store.

Parameters:
store - The IFileStore to which to save the configuration.
Throws:
ProblemException - If an error occurs while saving the configuration.

g-Eclipse
Release 1.0.0