org.eclipse.higgins.registry
Class PropertiesConfiguration

java.lang.Object
  extended by org.eclipse.higgins.registry.PropertiesConfiguration
All Implemented Interfaces:
IConfiguration

public class PropertiesConfiguration
extends Object
implements IConfiguration

Load/save provider configuration from properties file.


Constructor Summary
PropertiesConfiguration(String providerId, String providerConfigFile)
           
 
Method Summary
 Object getProperty(String key)
          Searches for the configuration property with the specified key in this configuration.
 Object getProperty(String key, Object defaultValue)
          Searches for the configuration property with the specified key in this configuration.
 Iterator getPropertyNames()
          Provides set of configuration property names.
 void save()
           
 void setProperty(String key, Object property)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesConfiguration

public PropertiesConfiguration(String providerId,
                               String providerConfigFile)
                        throws RegistryConfigurationException
Throws:
RegistryConfigurationException
Method Detail

getPropertyNames

public Iterator getPropertyNames()
Description copied from interface: IConfiguration
Provides set of configuration property names.

Specified by:
getPropertyNames in interface IConfiguration
Returns:
an Iterable set of Strings

getProperty

public Object getProperty(String key)
Description copied from interface: IConfiguration
Searches for the configuration property with the specified key in this configuration. The method returns null if the property is not found.

Specified by:
getProperty in interface IConfiguration
Parameters:
key - the property key
Returns:
the value in this configuration with the specified key value

getProperty

public Object getProperty(String key,
                          Object defaultValue)
Description copied from interface: IConfiguration
Searches for the configuration property with the specified key in this configuration. The method returns defaultValue if the property is not found.

Specified by:
getProperty in interface IConfiguration
Parameters:
key - the property key
defaultValue - a default value
Returns:
the value in this configuration with the specified key value

setProperty

public void setProperty(String key,
                        Object property)
                 throws RegistryConfigurationException
Specified by:
setProperty in interface IConfiguration
Throws:
RegistryConfigurationException

save

public void save()
Specified by:
save in interface IConfiguration