Class VelocityLayout
- java.lang.Object
-
- org.apache.turbine.modules.layouts.VelocityLayout
-
- Direct Known Subclasses:
VelocityDirectLayout
,VelocityOnlyLayout
public abstract class VelocityLayout extends Object implements Layout
This Layout module allows Velocity templates to be used as layouts.- Author:
- Thomas Vandahl
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.logging.log4j.Logger
log
Loggingprotected static String
prefix
The prefix for lookup up layout pagesprotected VelocityService
velocityService
Injected service instance-
Fields inherited from interface org.apache.turbine.modules.Layout
CACHE_SIZE_DEFAULT, CACHE_SIZE_KEY, NAME, PREFIX
-
-
Constructor Summary
Constructors Constructor Description VelocityLayout()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
doBuild(PipelineData pipelineData)
Method called by LayoutLoader.protected abstract void
populateContext(PipelineData pipelineData, org.apache.velocity.context.Context context)
Populate Velocity contextprotected void
render(PipelineData pipelineData, org.apache.velocity.context.Context context, String templateName)
Render layout
-
-
-
Field Detail
-
log
protected final org.apache.logging.log4j.Logger log
Logging
-
prefix
protected static final String prefix
The prefix for lookup up layout pages- See Also:
- Constant Field Values
-
velocityService
protected VelocityService velocityService
Injected service instance
-
-
Constructor Detail
-
VelocityLayout
public VelocityLayout()
-
-
Method Detail
-
doBuild
public void doBuild(PipelineData pipelineData) throws Exception
Method called by LayoutLoader.
-
populateContext
protected abstract void populateContext(PipelineData pipelineData, org.apache.velocity.context.Context context) throws Exception
Populate Velocity context- Parameters:
pipelineData
- PipelineDatacontext
- the Velocity context- Throws:
Exception
- if evaluation fails
-
render
protected void render(PipelineData pipelineData, org.apache.velocity.context.Context context, String templateName) throws Exception
Render layout- Parameters:
pipelineData
- PipelineDatacontext
- the Velocity contexttemplateName
- relative path to Velocity template- Throws:
Exception
- if rendering fails
-
-