public class VelocityTransformer extends Object implements org.apache.commons.collections.Transformer, Serializable
Map
or Context
or Object merged with the Template defined @ templatePath
, return the Content as String.
contextName
) in the Velocity script.
One can also refer to the springAppContext
by the variable name in the context springAppContext.
Constructor and Description |
---|
VelocityTransformer() |
Modifier and Type | Method and Description |
---|---|
void |
autoInitEngine() |
String |
getContextName()
If the input (context) is an Object then one can refer to this object in the Velocity context as the value of this variable.
|
org.apache.velocity.app.VelocityEngine |
getEngine()
The Core Velocity Engine
|
List |
getMacroLibraries()
macroLibraries is a list of template files containing macros to be used when merging
|
String |
getTemplatePath()
Template Path as per velocity conventions |
void |
setContextName(String contextName)
If the input (context) is an Object then one can refer to this object in the Velocity context as the value of this variable.
|
void |
setEngine(org.apache.velocity.app.VelocityEngine engine)
The Core Velocity Engine
|
void |
setMacroLibraries(List macroLibraries)
macroLibraries is a list of template files containing macros to be used when merging
|
void |
setTemplatePath(String templatePath)
Template Path as per velocity conventions |
Object |
transform(Object input) |
@PostConstruct public void autoInitEngine()
public Object transform(Object input)
transform
in interface org.apache.commons.collections.Transformer
public String getTemplatePath()
Template
Path as per velocity conventionspublic void setTemplatePath(String templatePath)
Template
Path as per velocity conventionspublic org.apache.velocity.app.VelocityEngine getEngine()
public void setEngine(org.apache.velocity.app.VelocityEngine engine)
public List getMacroLibraries()
public void setMacroLibraries(List macroLibraries)
public String getContextName()
public void setContextName(String contextName)
Copyright © 2018. All rights reserved.