Package org.apache.torque.generator.control

# Klasse Controller

java.lang.Object
org.apache.torque.generator.control.Controller

public class Controller extends Object
Reads the configuration and generates the output accordingly.

- ## Feldübersicht

  Felder
  Modifizierer und Typ
  Feld
  Beschreibung
  `static final String`
  `LAST_SOURCE_CHANGE_CACHE_FILE`
  The file in the work directory where last source changes are stored.
  `static final String`
  `NO_CHECKSUM_CONTENT`
  The content of checksum files if no checksum can be computed.

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `Controller()`

- ## Methodenübersicht

  Modifizierer und Typ
  Methode
  Beschreibung
  `protected void`
  `checkLogging()`
  Initializes the Logging.
  `protected void`
  `createOutputFilename(Output output, ControllerState controllerState)`
  Creates the output file name and sets it in the output.
  `protected void`
  `processGenerationUnit(ControllerState controllerState, UnitConfiguration unitConfiguration)`
  Processes a unit of generation.
  `void`
  `run(List<UnitDescriptor> unitDescriptors)`
  Executes the controller action.
  `Object`
  `transformSource(Object sourceRoot, List<SourceTransformerDefinition> transformerDefinitions, ControllerState controllerState)`
  Applies all transformer definitions to the current source.

  ### Von Klasse geerbte Methoden java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Felddetails

  - ### LAST_SOURCE_CHANGE_CACHE_FILE

    public static final String LAST_SOURCE_CHANGE_CACHE_FILE
    The file in the work directory where last source changes are stored.
    Siehe auch:
      - Konstantenfeldwerte

  - ### NO_CHECKSUM_CONTENT

    public static final String NO_CHECKSUM_CONTENT
    The content of checksum files if no checksum can be computed.
    Siehe auch:
      - Konstantenfeldwerte

- ## Konstruktordetails

  - ### Controller

    public Controller()

- ## Methodendetails

  - ### run

    public void run(List<UnitDescriptor> unitDescriptors) throws GeneratorException
    Executes the controller action.
    Parameter:
      `unitDescriptors` - the units of generation to execute.
    Löst aus:
      `ControllerException` - if a ControllerException occurs during processing.
      `ConfigurationException` - if a ConfigurationException occurs during processing.
      `GeneratorException` - if a OutletException occurs during processing.

  - ### checkLogging

    protected void checkLogging()
    Initializes the Logging.

  - ### processGenerationUnit

    protected void processGenerationUnit(ControllerState controllerState, UnitConfiguration unitConfiguration) throws GeneratorException
    Processes a unit of generation.
    Parameter:
      `controllerState` - the controller state, not null.
      `unitConfiguration` - the configuration of the generation unit to process, not null.
    Löst aus:
      `GeneratorException` - if a generation error occurs.

  - ### createOutputFilename

    protected void createOutputFilename(Output output, ControllerState controllerState) throws GeneratorException
    Creates the output file name and sets it in the output. The filename is calculated either by the filenameConfigurator in `output` or is given explicitly (in the latter case nothing needs to be done).
    Parameter:
      `output` - The output to process, not null.
      `controllerState` - the controller state, not null.
    Löst aus:
      `ConfigurationException` - if an incorrect configuration is encountered, e.g. if neither filename nor filenameOutlet is set in output.
      `GeneratorException` - if an error occurs during generation of the output filename.

  - ### transformSource

    public Object transformSource(Object sourceRoot, List<SourceTransformerDefinition> transformerDefinitions, ControllerState controllerState) throws SourceTransformerException, SourceException
    Applies all transformer definitions to the current source.
    Parameter:
      `sourceRoot` - the root element of the source to transform, not null.
      `transformerDefinitions` - the transformer definitions to apply, not null.
      `controllerState` - the current controller state, not null.
    Gibt zurück:
      the transformed root element, not null.
    Löst aus:
      `SourceTransformerException` - if error in transform
      `SourceException` - if source not found