Class VelocityNavigation
- java.lang.Object
-
- org.apache.turbine.modules.navigations.TemplateNavigation
-
- org.apache.turbine.modules.navigations.VelocityNavigation
-
- All Implemented Interfaces:
Assembler
,Navigation
- Direct Known Subclasses:
LegacyVelocityNavigation
public class VelocityNavigation extends TemplateNavigation
VelocityNavigation. This screen relies on the VelocityPage being set as the default page. The doBuildTemplate() assumes the user has put the template filename in the RunData parameter and set it to the value of the template file to execute. Specialized Navigations screens should extend this class and override the doBuildTemplate( data , context) method.- Version:
- $Id$
- Author:
- Dave Bryson, Henning P. Schmiedehausen, Peter Courcoux
-
-
Field Summary
-
Fields inherited from interface org.apache.turbine.modules.Navigation
CACHE_SIZE_DEFAULT, CACHE_SIZE_KEY, NAME, PREFIX
-
-
Constructor Summary
Constructors Constructor Description VelocityNavigation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
buildTemplate(PipelineData pipelineData)
This builds the Velocity template.protected void
doBuildTemplate(PipelineData pipelineData)
Needs to be implemented to make TemplateNavigation like us.protected void
doBuildTemplate(PipelineData pipelineData, org.apache.velocity.context.Context context)
Velocity Navigations extending this class should override this method to perform any particular business logic and add information to the context.-
Methods inherited from class org.apache.turbine.modules.navigations.TemplateNavigation
doBuild
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.turbine.modules.Navigation
build
-
-
-
-
Constructor Detail
-
VelocityNavigation
public VelocityNavigation()
-
-
Method Detail
-
doBuildTemplate
protected void doBuildTemplate(PipelineData pipelineData, org.apache.velocity.context.Context context) throws Exception
Velocity Navigations extending this class should override this method to perform any particular business logic and add information to the context.- Parameters:
pipelineData
- Turbine information.context
- Context for web pages.- Throws:
Exception
- a generic exception.
-
doBuildTemplate
protected void doBuildTemplate(PipelineData pipelineData) throws Exception
Needs to be implemented to make TemplateNavigation like us. The actual method that you should override is the one with the context in the parameter list.- Specified by:
doBuildTemplate
in classTemplateNavigation
- Parameters:
pipelineData
- Turbine information.- Throws:
Exception
- a generic exception.
-
buildTemplate
public String buildTemplate(PipelineData pipelineData) throws Exception
This builds the Velocity template.- Specified by:
buildTemplate
in classTemplateNavigation
- Parameters:
pipelineData
- Turbine information.- Returns:
- the content of the navigation module
- Throws:
Exception
- a generic exception.
-
-