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

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

public class MapOptionsConfiguration
extends Object

An option configuration in which the options are provided inside a java map. $Id: MapOptionsConfiguration.java 1331190 2012-04-27 02:41:35Z tfischer $


Constructor Summary
MapOptionsConfiguration(Map<String,String> content)
          Constructor.
 
Method Summary
 Map<String,String> getOptionMap()
          Returns the options map.
 Collection<Option> getOptions(ConfigurationProvider configurationProvider)
          Returns the contained options.
protected  Collection<Option> toOptions(Map<? extends Object,? extends Object> optionsMap)
          Creates options from a Map and returns them.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapOptionsConfiguration

public MapOptionsConfiguration(Map<String,String> content)
Constructor.

Parameters:
content - the options to set.
Throws:
NullPointerException - if content is null.
Method Detail

getOptionMap

public Map<String,String> getOptionMap()
Returns the options map.

Returns:
the options map, not null.

getOptions

public Collection<Option> getOptions(ConfigurationProvider configurationProvider)
                              throws ConfigurationException
Returns the contained options.

Parameters:
configurationProvider - the configuration provider to access configuration files, not null.
Returns:
the options contained in this configuration, not null.
Throws:
ConfigurationException - if an error occurs while reading the options.

toString

public String toString()
Overrides:
toString in class Object

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.