Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.turbine.modules.actions
Class VelocityAction

    java.lang.Object
      org.apache.turbine.modules.Assembler
          org.apache.turbine.modules.Action
              org.apache.turbine.modules.ActionEvent
                  org.apache.turbine.util.velocity.VelocityActionEvent
                      org.apache.turbine.modules.actions.VelocityAction

Direct Known Subclasses:
  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: VelocityAction.java 1066529 2011-02-02 17:01:46Z ludwig $
Author:
  Jon S. Stevens, Jason van Zyl, Peter Courcoux

Field Summary

Fields inherited from class org.apache.turbine.util.velocity.VelocityActionEvent
`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
`VelocityAction()`

Method Summary
`void` | `doPerform(PipelineData pipelineData)` You SHOULD NOT override this method and implement it in your action.
`void` | `doPerform(PipelineData pipelineData, org.apache.velocity.context.Context context)` You SHOULD override this method and implement it in your action.
`void` | `doPerform(RunData data)` Deprecated. Use PipelineData version instead.
`abstract void` | `doPerform(RunData data, org.apache.velocity.context.Context context)` Deprecated. Use PipelineData version instead.
`protected org.apache.velocity.context.Context` | `getContext(PipelineData pipelineData)` Return the Context needed by Velocity.
`protected org.apache.velocity.context.Context` | `getContext(RunData data)` Deprecated. Use PipelineData version instead.
`void` | `initialize()` Initialize the module.
`protected 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!
`protected void` | `perform(RunData data)` Deprecated. Use PipelineData version instead.
`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.
`void` | `setTemplate(RunData data, String template)` Deprecated. Use PipelineData version instead.

Methods inherited from class org.apache.turbine.util.velocity.VelocityActionEvent
`executeEvents, executeEvents`

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`

Constructor Detail

### VelocityAction

    public VelocityAction()

Method Detail

### doPerform

    @Deprecated
    public void doPerform(RunData data)
                   throws Exception

  Deprecated. Use PipelineData version instead.

  You SHOULD NOT override this method and implement it in your action.

  Specified by:
    `doPerform` in class `VelocityActionEvent`
  Parameters:
    `data` - Turbine information.
  Throws:
    `Exception` - a generic exception.

### doPerform

    public void doPerform(PipelineData pipelineData)
                   throws Exception

  You SHOULD NOT override this method and implement it in your action.

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

### initialize

    public void initialize()
                    throws Exception

  Initialize the module.

  Specified by:
    `initialize` in class `VelocityActionEvent`
  Throws:
    `Exception` - a generic exception.

### doPerform

    @Deprecated
    public abstract void doPerform(RunData data,
                                              org.apache.velocity.context.Context context)
                            throws Exception

  Deprecated. Use PipelineData version instead.

  You SHOULD override this method and implement it in your action.

  Parameters:
    `data` - Turbine information.
    `context` - Context for web pages.
  Throws:
    `Exception` - a generic exception.

### doPerform

    public void doPerform(PipelineData pipelineData,
                          org.apache.velocity.context.Context context)
                   throws Exception

  You SHOULD override this method and implement it in your action. This should become abstract when the RunData version is removed. For compatibility reasons this method will default to using the RunData method unles it is overidden, which it should be.

  Parameters:
    `data` - Turbine information.
    `context` - Context for web pages.
  Throws:
    `Exception` - a generic exception.

### perform

    @Deprecated
    protected void perform(RunData data)
                    throws Exception

  Deprecated. Use PipelineData version instead.

  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.

  Overrides:
    `perform` in class `VelocityActionEvent`
  Parameters:
    `data` - Turbine information.
  Throws:
    `Exception` - a generic exception.

### perform

    protected 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.

  Overrides:
    `perform` in class `VelocityActionEvent`
  Parameters:
    `data` - Turbine information.
  Throws:
    `Exception` - a generic exception.

### setTemplate

    @Deprecated
    public void setTemplate(RunData data,
                                       String template)

  Deprecated. Use PipelineData version instead.

  This method is used when you want to short circuit an Action and change the template that will be executed next.

  Parameters:
    `data` - Turbine information.
    `template` - The template that will be executed next.

### 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:
    `data` - Turbine information.
    `template` - The template that will be executed next.

### getContext

    @Deprecated
    protected org.apache.velocity.context.Context getContext(RunData data)

  Deprecated. Use PipelineData version instead.

  Return the Context needed by Velocity.

  Parameters:
    `data` - Turbine information.
  Returns:
    Context, a context for web pages.

### getContext

    protected org.apache.velocity.context.Context getContext(PipelineData pipelineData)

  Return the Context needed by Velocity.

  Parameters:
    `data` - Turbine information.
  Returns:
    Context, a context for web pages.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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