public class VelocityOutlet extends TemplateOutletImpl
| Modifier and Type | Field and Description | 
|---|---|
| static String | NULL_KEY_CONTEXT_NAMEThe key under which the null attribute of a source element is put
 into the context. | 
| static String | STRING_UTILS_CONTEXT_NAMEThe name under which the velocity StringUtils will be put
 into the context. | 
| static String | TORQUE_GEN_CONTEXT_NAMEThe name under which the Torque generator interface will be put
 into the context. | 
| Constructor and Description | 
|---|
| VelocityOutlet(QualifiedName name,
              ConfigurationProvider configurationProvider,
              String path,
              String encoding)Constructs a new VelocityTemplateOutlet. | 
| Modifier and Type | Method and Description | 
|---|---|
| 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. | 
getContent, getDetokenizedPath, getPath, load, toStringaddMergepointMapping, afterExecute, beforeExecute, getInputClass, getInputElementName, getMergepointMapping, getMergepointMappings, getName, getVariable, mergepoint, setInputClass, setInputElementName, setMergepointMapping, setVariable, setVariableclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddMergepointMapping, afterExecute, beforeExecute, getInputClass, getInputElementName, getMergepointMapping, getMergepointMappings, getName, setInputClass, setInputElementName, setMergepointMappingpublic static final String TORQUE_GEN_CONTEXT_NAME
public static final String STRING_UTILS_CONTEXT_NAME
public static final String NULL_KEY_CONTEXT_NAME
public VelocityOutlet(QualifiedName name, ConfigurationProvider configurationProvider, String path, String encoding) throws ConfigurationException
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.NullPointerException - if name, path or directories are null.ConfigurationException - if an error occurs while reading the
         template.public void setOptionsInContext(boolean optionsInContext)
optionsInContext - whether to put the options into the context.public boolean isOptionsInContext()
public void setVariablesInContext(boolean variablesInContext)
variablesInContext - whether to put the variables into the context.public boolean isVariablesInContext()
public void setSourceAttributesInContext(boolean sourceAttributesInContext)
sourceAttributesInContext - whether to put the source attributes
        into the context.public boolean isSourceAttributesInContext()
public OutletResult execute(ControllerState controllerState) throws GeneratorException
execute in interface Outletexecute in class OutletImplcontrollerState - the current controller state.GeneratorException - if generation fails.Outlet.execute(ControllerState)Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.