org.apache.torque.generator.template.groovy
Class GroovyOutlet

java.lang.Object
  extended by org.apache.torque.generator.outlet.OutletImpl
      extended by org.apache.torque.generator.template.TemplateOutletImpl
          extended by org.apache.torque.generator.template.groovy.GroovyOutlet
All Implemented Interfaces:
Outlet, TemplateOutlet

public class GroovyOutlet
extends TemplateOutletImpl

A Outlet which uses a groovy script for generation.


Field Summary
static String TORQUE_GEN_CONTEXT_NAME
          The name under which the Torque generator interface will be put into the context.
 
Constructor Summary
GroovyOutlet(QualifiedName name, ConfigurationProvider configurationProvider, String path)
          Constructs a new GroovyOutlet.
 
Method Summary
 OutletResult execute(ControllerState controllerState)
          Executes the generation process; the result is returned.
 
Methods inherited from class org.apache.torque.generator.template.TemplateOutletImpl
getContent, load, toString
 
Methods inherited from class org.apache.torque.generator.outlet.OutletImpl
addMergepointMapping, afterExecute, beforeExecute, getInputElementName, getMergepointMapping, getMergepointMappings, getName, getVariable, mergepoint, setInputElementName, setMergepointMapping, setVariable, setVariable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.torque.generator.outlet.Outlet
addMergepointMapping, afterExecute, beforeExecute, getInputElementName, getMergepointMapping, getMergepointMappings, getName, setInputElementName, setMergepointMapping
 

Field Detail

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.

See Also:
Constant Field Values
Constructor Detail

GroovyOutlet

public GroovyOutlet(QualifiedName name,
                    ConfigurationProvider configurationProvider,
                    String path)
             throws ConfigurationException
Constructs a new GroovyOutlet.

Parameters:
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.
Throws:
NullPointerException - if name, path or directories are null.
ConfigurationException - if an error occurs while reading the template.
Method Detail

execute

public OutletResult execute(ControllerState controllerState)
                     throws GeneratorException
Executes the generation process; the result is returned.

Specified by:
execute in interface Outlet
Specified by:
execute in class OutletImpl
Parameters:
controllerState - the current controller state.
Returns:
the result of the generation, not null.
Throws:
GeneratorException
See Also:
Outlet.execute(ControllerState)


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