Package org.apache.torque.generator.template.velocity

# Klasse VelocityOutlet

java.lang.Object
org.apache.torque.generator.outlet.OutletImpl
org.apache.torque.generator.template.TemplateOutletImpl
org.apache.torque.generator.template.velocity.VelocityOutlet

Alle implementierten Schnittstellen:
  `Outlet`, `TemplateOutlet`

public class VelocityOutlet extends TemplateOutletImpl
A Outlet which uses a velocity template for generation.

- ## Feldübersicht

  Felder
  Modifizierer und Typ
  Feld
  Beschreibung
  `static final String`
  `NULL_KEY_CONTEXT_NAME`
  The key under which the null attribute of a source element is put into the context.
  `static final String`
  `STRING_UTILS_CONTEXT_NAME`
  The name under which the velocity StringUtils will be put into the context.
  `static final String`
  `TORQUE_GEN_CONTEXT_NAME`
  The name under which the Torque generator interface will be put into the context.

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `VelocityOutlet(QualifiedName name, ConfigurationProvider configurationProvider, String path, String encoding)`
  Constructs a new VelocityTemplateOutlet.

- ## Methodenübersicht

  Modifizierer und Typ
  Methode
  Beschreibung
  `OutletResult`
  `execute(ControllerState controllerState)`
  Executes the generation process; the result is returned.
  `boolean`
  `isOptionsInContext()`
  Returns whether all options which namespaces are visible to the name space of this outlet are put into the context.
  `boolean`
  `isSourceAttributesInContext()`
  Returns whether the attributes of the current source element are put into the context.
  `boolean`
  `isVariablesInContext()`
  Returns whether all variables which are visible to this outlet are put into the context.
  `void`
  `setOptionsInContext(boolean optionsInContext)`
  Tells the outlet to put all options which name space is visible to the namespace of this outlet into the context.
  `void`
  `setSourceAttributesInContext(boolean sourceAttributesInContext)`
  Tells the outlet to put the attributes of the current source element into the context or not.
  `void`
  `setVariablesInContext(boolean variablesInContext)`
  Tells the outlet to put all variables which are visible to this outlet into the context.

  ### Von Klasse geerbte Methoden org.apache.torque.generator.template.TemplateOutletImpl

  `getContent, getDetokenizedPath, getPath, load, toString`

  ### Von Klasse geerbte Methoden org.apache.torque.generator.outlet.OutletImpl

  `addMergepointMapping, afterExecute, beforeExecute, getInputClass, getInputElementName, getMergepointMapping, getMergepointMappings, getName, getVariable, mergepoint, setInputClass, setInputElementName, setMergepointMapping, setVariable, setVariable`

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

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

  ### Von Schnittstelle geerbte Methoden org.apache.torque.generator.outlet.Outlet

  `addMergepointMapping, afterExecute, beforeExecute, getInputClass, getInputElementName, getMergepointMapping, getMergepointMappings, getName, setInputClass, setInputElementName, setMergepointMapping`

- ## Felddetails

  - ### TORQUE_GEN_CONTEXT_NAME

    public static final String TORQUE_GEN_CONTEXT_NAME
    The name under which the Torque generator interface will be put into the context.
    Siehe auch:
      - Konstantenfeldwerte

  - ### STRING_UTILS_CONTEXT_NAME

    public static final String STRING_UTILS_CONTEXT_NAME
    The name under which the velocity StringUtils will be put into the context.
    Siehe auch:
      - Konstantenfeldwerte

  - ### NULL_KEY_CONTEXT_NAME

    public static final String NULL_KEY_CONTEXT_NAME
    The key under which the null attribute of a source element is put into the context.
    Siehe auch:
      - Konstantenfeldwerte

- ## Konstruktordetails

  - ### VelocityOutlet

    public VelocityOutlet(QualifiedName name, ConfigurationProvider configurationProvider, String path, String encoding) throws ConfigurationException
    Constructs a new VelocityTemplateOutlet.
    Parameter:
      `name` - the name of this outlet, not null.
      `configurationProvider` - the provider for reading the templates, not null.
      `path` - the path to the templates, not null. May contain tokens of the form ${....}, these are parsed.
      `encoding` - the encoding of the file, or null if the system's default encoding should be used.
    Löst aus:
      `NullPointerException` - if name, path or directories are null.
      `ConfigurationException` - if an error occurs while reading the template.

- ## Methodendetails

  - ### setOptionsInContext

    public void setOptionsInContext(boolean optionsInContext)
    Tells the outlet to put all options which name space is visible to the namespace of this outlet into the context. Only the variable names are used as keys in the context, the namespaces are stripped.
    Parameter:
      `optionsInContext` - whether to put the options into the context.

  - ### isOptionsInContext

    public boolean isOptionsInContext()
    Returns whether all options which namespaces are visible to the name space of this outlet are put into the context.
    Gibt zurück:
      whether the outlet puts the options into the context.

  - ### setVariablesInContext

    public void setVariablesInContext(boolean variablesInContext)
    Tells the outlet to put all variables which are visible to this outlet into the context. Only the variable names are used as keys in the context, the namespaces are stripped.
    Parameter:
      `variablesInContext` - whether to put the variables into the context.

  - ### isVariablesInContext

    public boolean isVariablesInContext()
    Returns whether all variables which are visible to this outlet are put into the context.
    Gibt zurück:
      whether the outlet puts the variables into the context.

  - ### setSourceAttributesInContext

    public void setSourceAttributesInContext(boolean sourceAttributesInContext)
    Tells the outlet to put the attributes of the current source element into the context or not.
    Parameter:
      `sourceAttributesInContext` - whether to put the source attributes into the context.

  - ### isSourceAttributesInContext

    public boolean isSourceAttributesInContext()
    Returns whether the attributes of the current source element are put into the context.
    Gibt zurück:
      whether the outlet puts the attributes of the current source element into the context.

  - ### execute

    public OutletResult execute(ControllerState controllerState) throws GeneratorException
    Executes the generation process; the result is returned.
    Angegeben von:
      `execute` in Schnittstelle `Outlet`
    Angegeben von:
      `execute` in Klasse `OutletImpl`
    Parameter:
      `controllerState` - the current controller state.
    Gibt zurück:
      the result of the generation, not null.
    Löst aus:
      `GeneratorException` - if generation fails.
    Siehe auch:
      - `Outlet.execute(ControllerState)`