org.fosstrak.llrp.adaptor.config
Class ConfigurationLoader

java.lang.Object
  extended by org.fosstrak.llrp.adaptor.config.ConfigurationLoader

public class ConfigurationLoader
extends java.lang.Object

The ConfigurationLoader acts as a gateway to the configuration file. it tries to mask away the structure of the configuration file by providing prototypes for the adaptors and their readers. it provides reading and writing of configuration files.

Author:
sawielan

Constructor Summary
ConfigurationLoader()
          creates a configuration loader.
 
Method Summary
 java.util.List<AdaptorConfiguration> getConfiguration(java.lang.String propertiesFile)
          reads a configuration file and delivers the content in a prototype-form.
 void writeConfiguration(java.util.List<AdaptorConfiguration> configurations, java.lang.String propertiesFile)
          writes the configuration given by a list of prototypes to the configuration file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationLoader

public ConfigurationLoader()
creates a configuration loader.

Method Detail

getConfiguration

public java.util.List<AdaptorConfiguration> getConfiguration(java.lang.String propertiesFile)
                                                      throws LLRPRuntimeException
reads a configuration file and delivers the content in a prototype-form.

Parameters:
propertiesFile - the properties file to read.
Returns:
the prototypes holding the configuration.
Throws:
LLRPRuntimeException - whenever the configuration file could not be read.

writeConfiguration

public void writeConfiguration(java.util.List<AdaptorConfiguration> configurations,
                               java.lang.String propertiesFile)
                        throws LLRPRuntimeException
writes the configuration given by a list of prototypes to the configuration file.

Parameters:
configurations - the prototypes to be written to the config-file.
propertiesFile - the properties file where to store.
Throws:
LLRPRuntimeException - whenever the file could not be written.


Copyright © 2009. All Rights Reserved.