com.sdm.quasar.client.core.common.config
Class PropertyFileBeanConfigReader

java.lang.Object
  extended bycom.sdm.quasar.client.core.common.config.PropertyFileBeanConfigReader
All Implemented Interfaces:
ConfigReader

public class PropertyFileBeanConfigReader
extends java.lang.Object
implements ConfigReader

A ConfigReader that reads a java property file and interprets the key value pairs as pairs of configuration key classes and value classes. If a value class entry starts with a "!", this signals, that the according entry will be loaded initially after adding all entries of the file to the ConfigManager. All other entries are instantiated at the first access to their keys.

Version:
1.$Revision$
Author:
Thomas Wolf

Constructor Summary
PropertyFileBeanConfigReader(java.lang.String fileName)
          Creates a new PropertyFileBeanConfigReader.
PropertyFileBeanConfigReader(java.net.URL fileURL)
          Creates a new PropertyFileBeanConfigReader.
 
Method Summary
 void readConfigFile(ConfigManager configManager)
          Reads a configuration and adds configuration values to the configuration manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyFileBeanConfigReader

public PropertyFileBeanConfigReader(java.net.URL fileURL)
Creates a new PropertyFileBeanConfigReader.


PropertyFileBeanConfigReader

public PropertyFileBeanConfigReader(java.lang.String fileName)
                             throws java.io.IOException
Creates a new PropertyFileBeanConfigReader.

Parameters:
fileName - the file name of the properties file (not null)
Method Detail

readConfigFile

public void readConfigFile(ConfigManager configManager)
                    throws java.io.IOException
Description copied from interface: ConfigReader
Reads a configuration and adds configuration values to the configuration manager. If value should be added to the configuration using a specific key (or prefix) that key must be supplemented to the implementation of the reader.

Specified by:
readConfigFile in interface ConfigReader
Parameters:
configManager - the ConfigManager to which the configuration should be added
Throws:
java.io.IOException
See Also:
ConfigReader.readConfigFile(com.sdm.quasar.client.core.common.config.ConfigManager)