org.apache.turbine.util.velocity

## Class VelocityActionEvent

- java.lang.Object
- - org.apache.turbine.modules.Assembler
  - - org.apache.turbine.modules.Action
    - - 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: VelocityActionEvent.java 1706425 2015-10-02 14:47:51Z tv $
  Author:
    Jon S. Stevens, Jason van Zyl, Henning P. Schmiedehausen, Peter Courcoux

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `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, DEFAULT_METHOD, 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

    Constructors
    Constructor and Description
    `VelocityActionEvent()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and 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`

    - ### Methods inherited from class org.apache.turbine.modules.Action

      `getPrefix, perform`

    - ### 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

    - #### 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.
      Overrides:
        `doPerform` in class `ActionEvent`
      Parameters:
        `pipelineData` - A Turbine RunData object.
      Throws:
        `Exception` - a generic exception.

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