Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.torque.generator.configuration
Class Configuration

    java.lang.Object
      org.apache.torque.generator.configuration.Configuration

    public class Configuration

extends Object

The configuration class keeps the complete configuration needed for the generation process. It is supplied with UnitDescriptors describing the available units of generation, and can then read the configuration. After the configuration is read, no new units of generation can be added.

Constructor Summary
`Configuration()`

Method Summary
`void` | `addUnit(UnitDescriptor unitDescriptor)` Adds a unit of generation to the configuration.
`void` | `addUnits(List<UnitDescriptor> unitDescriptors)` Adds several units of generation to the configuration.
`ConfigurationHandlers` | `getConfigurationHandlers()` Returns the available configuration handlers.
`List<UnitConfiguration>` | `getUnitConfigurations()` Returns the list of UnitConfigurations.
`void` | `read()` Reads the configuration.
`void` | `setConfigurationHandlers(ConfigurationHandlers configurationHandlers)` Sets the available configuration handlers.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Configuration

    public Configuration()

Method Detail

### addUnit

    public void addUnit(UnitDescriptor unitDescriptor)

  Adds a unit of generation to the configuration.

  Parameters:
    `unitDescriptor` - Describes the unit of generation to add, not null.
  Throws:
    `NullPointerException` - if unitDescriptor is null.
    `IllegalStateException` - if the configuration has already been read.

### addUnits

    public void addUnits(List<UnitDescriptor> unitDescriptors)

  Adds several units of generation to the configuration.

  Parameters:
    `unitDescriptors` - Describes the units of generation to add, not null.
  Throws:
    `NullPointerException` - if unitDescriptors is null or the list contains a null entry.
    `IllegalStateException` - if the configuration has already been read.

### read

    public void read()
              throws ConfigurationException

  Reads the configuration.

  Throws:
    `ConfigurationException` - if an error occurs during reading the configuration.

### getUnitConfigurations

    public List<UnitConfiguration> getUnitConfigurations()

  Returns the list of UnitConfigurations.

  Returns:
    the list of unit configurations, never null.
  Throws:
    `IllegalStateException` - if the configuration was not yet read.

### getConfigurationHandlers

    public ConfigurationHandlers getConfigurationHandlers()

  Returns the available configuration handlers.

  Returns:
    the available configuration handlers, not null.

### setConfigurationHandlers

    public void setConfigurationHandlers(ConfigurationHandlers configurationHandlers)

  Sets the available configuration handlers.

  Parameters:
    `configurationHandlers` - the available configuration handlers, not null.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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