org.apache.torque.generator.configuration.option
Class PropertiesOptionConfiguration

java.lang.Object
  extended by org.apache.torque.generator.configuration.option.FileOptionsConfiguration
      extended by org.apache.torque.generator.configuration.option.PropertiesOptionConfiguration
All Implemented Interfaces:
OptionsConfiguration

public class PropertiesOptionConfiguration
extends FileOptionsConfiguration

An option configuration which reads the options from a properties file. $Id: PropertiesOptionConfiguration.java 1331190 2012-04-27 02:41:35Z tfischer $


Constructor Summary
PropertiesOptionConfiguration()
           
 
Method Summary
 Collection<Option> getOptions(ConfigurationProvider configurationProvider)
          Reads the options from the property file given in the path and returns them.
protected  Collection<Option> toOptions(Map<? extends Object,? extends Object> optionsMap)
          Creates options from a Map and returns them.
 
Methods inherited from class org.apache.torque.generator.configuration.option.FileOptionsConfiguration
getPath, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertiesOptionConfiguration

public PropertiesOptionConfiguration()
Method Detail

getOptions

public Collection<Option> getOptions(ConfigurationProvider configurationProvider)
                              throws ConfigurationException
Reads the options from the property file given in the path and returns them.

Parameters:
configurationProvider - the provider to access configuration files, not null.
Returns:
the options contained in the file, not null.
Throws:
ConfigurationException - if the file cannot be accessed or parsed.

toOptions

protected Collection<Option> toOptions(Map<? extends Object,? extends Object> optionsMap)
Creates options from a Map and returns them.

Parameters:
optionsMap - the map containing the option qualified names as key and the option value as value. optionsMap and the keys therein must not be null.
Returns:
the options, not null.


Copyright © 2000-2012 The Apache Software Foundation. All Rights Reserved.