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:
org.apache.torque.generator.outlet.Outlet, org.apache.torque.generator.template.TemplateOutlet

public class GroovyOutlet
extends org.apache.torque.generator.template.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(org.apache.torque.generator.qname.QualifiedName name, org.apache.torque.generator.configuration.ConfigurationProvider configurationProvider, String path)
          Constructs a new GroovyOutlet.
 
Method Summary
 org.apache.torque.generator.outlet.OutletResult execute(org.apache.torque.generator.control.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(org.apache.torque.generator.qname.QualifiedName name,
                    org.apache.torque.generator.configuration.ConfigurationProvider configurationProvider,
                    String path)
             throws org.apache.torque.generator.configuration.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.
org.apache.torque.generator.configuration.ConfigurationException - if an error occurs while reading the template.
Method Detail

execute

public org.apache.torque.generator.outlet.OutletResult execute(org.apache.torque.generator.control.ControllerState controllerState)
                                                        throws org.apache.torque.generator.GeneratorException
Executes the generation process; the result is returned.

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


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