org.apache.turbine.util.velocity
Class VelocityActionEvent

java.lang.Object
  extended by org.apache.turbine.modules.Assembler
      extended by org.apache.turbine.modules.Action
          extended by org.apache.turbine.modules.ActionEvent
              extended by 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: VelocityActionEvent.java 1073174 2011-02-21 22:18:45Z tv $
Author:
Jon S. Stevens, Jason van Zyl, Henning P. Schmiedehausen, Peter Courcoux

Field Summary
protected  boolean initialized
          Indicates whether or not this module has been initialized.
 
Fields inherited from class org.apache.turbine.modules.ActionEvent
bubbleUpException, BUTTON, BUTTON_LENGTH, LENGTH, log, METHOD_NAME_LENGTH, METHOD_NAME_PREFIX
 
Fields inherited from class org.apache.turbine.modules.Action
CACHE_SIZE_DEFAULT, CACHE_SIZE_KEY, NAME, PREFIX
 
Constructor Summary
VelocityActionEvent()
           
 
Method Summary
 void doPerform(PipelineData pipelineData)
          You need to implement this in your classes that extend this class.
abstract  void doPerform(RunData data)
          Deprecated. Use PipelineData version instead.
 void executeEvents(PipelineData pipelineData, org.apache.velocity.context.Context context)
          This method should be called to execute the event based system.
 void executeEvents(RunData data, org.apache.velocity.context.Context context)
          Deprecated. Use PipelineData version instead.
protected abstract  void initialize()
          Provides a means of initializing the module.
protected  void perform(PipelineData pipelineData)
          This overrides the default Action.perform() to execute the doEvent() method.
protected  void perform(RunData data)
          Deprecated. Use PipelineData version instead.
 
Methods inherited from class org.apache.turbine.modules.ActionEvent
considerKey, executeEvents, executeEvents, formatString
 
Methods inherited from class org.apache.turbine.modules.Action
getPrefix
 
Methods inherited from class org.apache.turbine.modules.Assembler
getRunData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initialized

protected boolean initialized
Indicates whether or not this module has been initialized.

Constructor Detail

VelocityActionEvent

public VelocityActionEvent()
Method Detail

doPerform

@Deprecated
public abstract void doPerform(RunData data)
                        throws Exception
Deprecated. Use PipelineData version instead.

You need to implement this in your classes that extend this class.

Specified by:
doPerform in class ActionEvent
Parameters:
data - A Turbine RunData object.
Throws:
Exception - a generic exception.

doPerform

public void doPerform(PipelineData pipelineData)
               throws Exception
You need to implement this in your classes that extend this class. Should revert to abstract once RunData is gone.

Overrides:
doPerform in class ActionEvent
Parameters:
data - Turbine information.
Throws:
Exception - a generic exception.

initialize

protected abstract void initialize()
                            throws Exception
Provides a means of initializing the module.

Throws:
Exception - a generic exception.

perform

@Deprecated
protected void perform(RunData data)
                throws Exception
Deprecated. Use PipelineData version instead.

This overrides the default Action.perform() to execute the doEvent() method. If that fails, then it will execute the doPerform() method instead.

Overrides:
perform in class ActionEvent
Parameters:
data - A Turbine RunData object.
Throws:
Exception - a generic exception.

perform

protected void perform(PipelineData pipelineData)
                throws Exception
This overrides the default Action.perform() to execute the doEvent() method. If that fails, then it will execute the doPerform() method instead.

Overrides:
perform in class ActionEvent
Parameters:
data - A Turbine RunData object.
Throws:
Exception - a generic exception.

executeEvents

@Deprecated
public void executeEvents(RunData data,
                                     org.apache.velocity.context.Context context)
                   throws Exception
Deprecated. Use PipelineData version instead.

This method should be called to execute the event based system.

Parameters:
data - A Turbine RunData object.
context - Velocity context information.
Throws:
Exception - a generic exception.

executeEvents

public void executeEvents(PipelineData pipelineData,
                          org.apache.velocity.context.Context context)
                   throws Exception
This method should be called to execute the event based system.

Parameters:
data - A Turbine RunData object.
context - Velocity context information.
Throws:
Exception - a generic exception.


Copyright © 2000-2011 The Apache Software Foundation. All Rights Reserved.