public class VelocityContentTransformer extends Object implements org.apache.commons.collections.Transformer, Serializable
AbstractAttribute.getValue()
or AbstractAttribute
), which is assumed to be a velocity script.
The context is provided via context
and in addition to provided context, it Merges springAppContext
as variable name springAppContext into context
.
springAppContext
by the variable name in the context springAppContext.
Constructor and Description |
---|
VelocityContentTransformer() |
Modifier and Type | Method and Description |
---|---|
void |
autoInitEngine() |
protected org.apache.velocity.context.Context |
createtContext(Object input)
Support default variables:
$currentPage
$currentFacet
$dynamicContext
$springAppContext
$input
|
Map |
getContext()
Any specific services or beans we want to inject into the
Context |
org.apache.velocity.app.VelocityEngine |
getEngine()
The Core Velocity Engine
|
String |
getLogTag()
A log tag to report issues in the log file as this as the handle
|
org.springframework.context.ApplicationContext |
getSpringAppContext() |
void |
setContext(Map context)
Any specific services or beans we want to inject into the
Context |
void |
setEngine(org.apache.velocity.app.VelocityEngine engine)
The Core Velocity Engine
|
void |
setLogTag(String logTag)
A log tag to report issues in the log file as this as the handle
|
void |
setSpringAppContext(org.springframework.context.ApplicationContext springAppContext) |
Object |
transform(Object input) |
@PostConstruct public void autoInitEngine()
protected org.apache.velocity.context.Context createtContext(Object input)
public Object transform(Object input)
transform
in interface org.apache.commons.collections.Transformer
public Map getContext()
Context
public void setContext(Map context)
Context
public org.apache.velocity.app.VelocityEngine getEngine()
public void setEngine(org.apache.velocity.app.VelocityEngine engine)
public String getLogTag()
Object.getClass()
.Class.getSimpleName()
public void setLogTag(String logTag)
Object.getClass()
.Class.getSimpleName()
public org.springframework.context.ApplicationContext getSpringAppContext()
public void setSpringAppContext(org.springframework.context.ApplicationContext springAppContext)
Copyright © 2018. All rights reserved.