Class VelocityAction
- java.lang.Object
-
- org.apache.turbine.modules.ActionEvent
-
- org.apache.turbine.util.velocity.VelocityActionEvent
-
- org.apache.turbine.modules.actions.VelocityAction
-
- Direct Known Subclasses:
LegacyVelocityAction
,VelocitySecureAction
public abstract class VelocityAction extends VelocityActionEvent
This class provides a convenience methods for Velocity Actions to use. Since this class is abstract, it should only be extended and not used directly.- Version:
- $Id$
- Author:
- Jon S. Stevens, Jason van Zyl, Peter Courcoux
-
-
Field Summary
-
Fields inherited from class org.apache.turbine.util.velocity.VelocityActionEvent
initialized, velocity
-
Fields inherited from class org.apache.turbine.modules.ActionEvent
bubbleUpException, BUTTON, BUTTON_LENGTH, DEFAULT_METHOD, LENGTH, log, METHOD_NAME_LENGTH, METHOD_NAME_PREFIX
-
Fields inherited from interface org.apache.turbine.modules.Action
CACHE_SIZE_DEFAULT, CACHE_SIZE_KEY, NAME, PREFIX
-
-
Constructor Summary
Constructors Constructor Description VelocityAction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
doPerform(PipelineData pipelineData, org.apache.velocity.context.Context context)
You SHOULD override this method and implement it in your action.void
initialize()
Initialize the module.void
perform(PipelineData pipelineData)
Sets up the context and then calls super.perform(); thus, subclasses don't have to worry about getting a context themselves!void
setTemplate(PipelineData pipelineData, String template)
This method is used when you want to short circuit an Action and change the template that will be executed next.-
Methods inherited from class org.apache.turbine.util.velocity.VelocityActionEvent
doPerform
-
Methods inherited from class org.apache.turbine.modules.ActionEvent
considerKey, executeEvents, formatString, getMethod
-
-
-
-
Constructor Detail
-
VelocityAction
public VelocityAction()
-
-
Method Detail
-
initialize
public void initialize() throws Exception
Initialize the module.- Specified by:
initialize
in classVelocityActionEvent
- Throws:
Exception
- a generic exception.
-
doPerform
public abstract void doPerform(PipelineData pipelineData, org.apache.velocity.context.Context context) throws Exception
You SHOULD override this method and implement it in your action.- Parameters:
pipelineData
- Turbine information.context
- Context for web pages.- Throws:
Exception
- a generic exception.
-
perform
public void perform(PipelineData pipelineData) throws Exception
Sets up the context and then calls super.perform(); thus, subclasses don't have to worry about getting a context themselves! If a subclass throws an exception then depending on whether action.event.bubbleexception is true, then it bubbles it farther up, or traps it there.- Parameters:
pipelineData
- Turbine information.- Throws:
Exception
- a generic exception.
-
setTemplate
public void setTemplate(PipelineData pipelineData, String template)
This method is used when you want to short circuit an Action and change the template that will be executed next.- Parameters:
pipelineData
- Turbine information.template
- The template that will be executed next.
-
-