org.apache.jetspeed.modules.actions.controllers
Class VelocityControllerAction

java.lang.Object
  extended byorg.apache.turbine.modules.Assembler
      extended byorg.apache.turbine.modules.Action
          extended byorg.apache.turbine.modules.ActionEvent
              extended byorg.apache.turbine.util.velocity.VelocityActionEvent
                  extended byorg.apache.turbine.modules.actions.VelocityAction
                      extended byorg.apache.jetspeed.modules.actions.controllers.VelocityControllerAction
Direct Known Subclasses:
MultiColumnControllerAction, RowColumnControllerAction

public abstract class VelocityControllerAction
extends org.apache.turbine.modules.actions.VelocityAction

An abstract action class to build VelocityPortlet actions.

Don't call it from the URL, the Portlet and the Action are automatically associated through the registry PortletName

Author:
Raphaël Luta, Roberto Carrasco

Field Summary
 
Fields inherited from class org.apache.turbine.modules.ActionEvent
BUTTON, BUTTON_LENGTH, LENGTH, METHOD_NAME_LENGTH, METHOD_NAME_PREFIX
 
Constructor Summary
VelocityControllerAction()
           
 
Method Summary
protected  void buildCustomizeContext(PortletController controller, org.apache.velocity.context.Context context, org.apache.turbine.util.RunData rundata)
          Subclasses must override this method to provide default behavior for the portlet action
protected abstract  void buildNormalContext(PortletController controller, org.apache.velocity.context.Context context, org.apache.turbine.util.RunData rundata)
          Subclasses must override this method to provide default behavior for the portlet action
 void doCancel(org.apache.turbine.util.RunData data, org.apache.velocity.context.Context context)
          Switch out of customize mode
 void doPerform(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
           
protected  org.apache.velocity.context.Context getContext(org.apache.turbine.util.RunData data)
          Return the Context needed by Velocity.
protected  void perform(org.apache.turbine.util.RunData rundata)
          This overrides the default Action.perform() to execute the doEvent() method.
 void setTemplate(org.apache.turbine.util.RunData data, java.lang.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.modules.actions.VelocityAction
doPerform
 
Methods inherited from class org.apache.turbine.util.velocity.VelocityActionEvent
executeEvents
 
Methods inherited from class org.apache.turbine.modules.ActionEvent
executeEvents, formatString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VelocityControllerAction

public VelocityControllerAction()
Method Detail

perform

protected void perform(org.apache.turbine.util.RunData rundata)
                throws java.lang.Exception
This overrides the default Action.perform() to execute the doEvent() method. If that fails, then it will execute the doPerform() method instead.

Throws:
Exception, - a generic exception.
java.lang.Exception

setTemplate

public void setTemplate(org.apache.turbine.util.RunData data,
                        java.lang.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

protected org.apache.velocity.context.Context getContext(org.apache.turbine.util.RunData data)
Return the Context needed by Velocity.

Returns:
Context, a context for web pages.

doPerform

public void doPerform(org.apache.turbine.util.RunData rundata,
                      org.apache.velocity.context.Context context)

buildCustomizeContext

protected void buildCustomizeContext(PortletController controller,
                                     org.apache.velocity.context.Context context,
                                     org.apache.turbine.util.RunData rundata)
Subclasses must override this method to provide default behavior for the portlet action


buildNormalContext

protected abstract void buildNormalContext(PortletController controller,
                                           org.apache.velocity.context.Context context,
                                           org.apache.turbine.util.RunData rundata)
Subclasses must override this method to provide default behavior for the portlet action


doCancel

public void doCancel(org.apache.turbine.util.RunData data,
                     org.apache.velocity.context.Context context)
Switch out of customize mode



Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.