Package org.apache.turbine.util.velocity
Class VelocityActionEvent
- java.lang.Object
-
- org.apache.turbine.modules.ActionEvent
-
- org.apache.turbine.util.velocity.VelocityActionEvent
-
- Direct Known Subclasses:
VelocityAction
public abstract class VelocityActionEvent extends ActionEvent
If you are using VelocitySite stuff, then your Action's should extend this class instead of extending the ActionEvent class. The difference between this class and the ActionEvent class is that this class will first attempt to execute one of your doMethod's with a constructor like this:doEvent(RunData data, Context context)
It gets the context from the TemplateInfo.getTemplateContext() method. If it can't find a method like that, then it will try to execute the method without the Context in it.
- Version:
- $Id$
- Author:
- Jon S. Stevens, Jason van Zyl, Henning P. Schmiedehausen, Peter Courcoux
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
initialized
Indicates whether or not this module has been initialized.protected VelocityService
velocity
Injected velocity service-
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 VelocityActionEvent()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
doPerform(PipelineData pipelineData)
This overrides the default Action.doPerform() to execute the doEvent() method.protected abstract void
initialize()
Provides a means of initializing the module.-
Methods inherited from class org.apache.turbine.modules.ActionEvent
considerKey, executeEvents, formatString, getMethod
-
-
-
-
Field Detail
-
velocity
protected VelocityService velocity
Injected velocity service
-
initialized
protected boolean initialized
Indicates whether or not this module has been initialized.
-
-
Constructor Detail
-
VelocityActionEvent
public VelocityActionEvent()
-
-
Method Detail
-
initialize
protected abstract void initialize() throws Exception
Provides a means of initializing the module.- Throws:
Exception
- a generic exception.
-
doPerform
public void doPerform(PipelineData pipelineData) throws Exception
This overrides the default Action.doPerform() to execute the doEvent() method. If that fails, then it will execute the doPerform() method instead.- Specified by:
doPerform
in interfaceAction
- Overrides:
doPerform
in classActionEvent
- Parameters:
pipelineData
- A Turbine RunData object.- Throws:
Exception
- a generic exception.
-
-