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.outlet
Interface Outlet

All Known Subinterfaces:
  TemplateOutlet

All Known Implementing Classes:
  CamelbackOutlet, ConstantNameOutlet, CopyOutlet, DebuggingOutletWrapper, JavadocOutlet, JavaFilenameOutlet, ModifySourcenameOutlet, NewlineOutlet, OptionOutlet, OutletImpl, OutletWithoutMergepoints, PackageToPathOutlet, StringInputOutlet, TemplateOutletImpl, VelocityOutlet, XmlOutlet

    public interface Outlet

Generates String output from the AST.

Method Summary
`void` | `addMergepointMapping(MergepointMapping mergepointMapping)` Adds an mergepoint mapping to the outlet.
`void` | `afterExecute(ControllerState controllerState)` Adjusts the state of the Controller after generation.
`void` | `beforeExecute(ControllerState controllerState)` Adjusts the state of the Controller before generation.
`OutletResult` | `execute(ControllerState controllerState)` Generates the output for this template into the Generated object.
`String` | `getInputElementName()` Returns the name of the input root element.
`MergepointMapping` | `getMergepointMapping(String name)` Returns the mergepoint mapping for the given mergepoint name.
`Map<String,MergepointMapping>` | `getMergepointMappings()` Returns the map of all mergepoint mappings, keyed by their name.
`QualifiedName` | `getName()` Returns the name of the outlet.
`void` | `setInputElementName(String inputName)` Sets the name of the input root element.
`MergepointMapping` | `setMergepointMapping(MergepointMapping mergepointMapping)` Sets an mergepoint mapping in the outlet.

Method Detail

### getName

    QualifiedName getName()

  Returns the name of the outlet. The namespace part of the name defines the default context of the outlet.

  Returns:
    the name of the outlet, not null.

### addMergepointMapping

    void addMergepointMapping(MergepointMapping mergepointMapping)
                              throws ConfigurationException

  Adds an mergepoint mapping to the outlet. No mergepoint mappings must exist with the given name.

  Parameters:
    `mergepointMapping` - the mergepointMapping to add, not null.
  Throws:
    `NullPointerException` - if mergepointMapping is null.
    `ConfigurationException` - if an mergepointMapping for the given name already exists.

### setMergepointMapping

    MergepointMapping setMergepointMapping(MergepointMapping mergepointMapping)

  Sets an mergepoint mapping in the outlet. If a mergepoint mapping with the given name already exists, it is replaced.

  Parameters:
    `mergepointMapping` - the mergepointMapping to add, not null.
  Returns:
    the replaced mergepoint mapping, not null.
  Throws:
    `NullPointerException` - if mergepointMapping is null.

### getMergepointMapping

    MergepointMapping getMergepointMapping(String name)

  Returns the mergepoint mapping for the given mergepoint name.

  Parameters:
    `name` - the name of the mergepoint mapping.
  Returns:
    the mergepoint mapping for the given name, or null if no mergepoint mapping exists for this name.

### getMergepointMappings

    Map<String,MergepointMapping> getMergepointMappings()

  Returns the map of all mergepoint mappings, keyed by their name.

  Returns:
    the map of mergepoint mappings, not null.

### setInputElementName

    void setInputElementName(String inputName)

  Sets the name of the input root element. If set, the outlet must check if the name of the input root element corresponds to the set element name and throw an exception if the names do not match.

  Parameters:
    `inputName` - the name of the root element of the source, or null to accept any input name.

### getInputElementName

    String getInputElementName()

  Returns the name of the input root element. If not null, the outlet checks if the name of the input root element corresponds to the set element name and throw an exception if the names do not match.

  Returns:
    inputName the name of the root element of the source, or if any input name is accepted.

### beforeExecute

    void beforeExecute(ControllerState controllerState)
                       throws GeneratorException

  Adjusts the state of the Controller before generation.

  Parameters:
    `controllerState` - the current controller state, not null.
  Throws:
    `GeneratorException` - if adjusting the controller state fails.

### afterExecute

    void afterExecute(ControllerState controllerState)
                      throws GeneratorException

  Adjusts the state of the Controller after generation.

  Parameters:
    `controllerState` - the current controller state, not null.
  Throws:
    `GeneratorException` - if adjusting the controller state fails.

### execute

    OutletResult execute(ControllerState controllerState)
                         throws GeneratorException

  Generates the output for this template into the Generated object.

  Parameters:
    `controllerState` - the current controller state, not null.
  Returns:
    the output of the Outlet.
  Throws:
    `GeneratorException` - if generation fails.

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.