org.apache.jetspeed.modules.actions.portlets
Class GenericMVCAction

java.lang.Object
  extended byorg.apache.turbine.modules.Assembler
      extended byorg.apache.turbine.modules.Action
          extended byorg.apache.turbine.modules.ActionEvent
              extended byorg.apache.jetspeed.modules.actions.portlets.PortletActionEvent
                  extended byorg.apache.jetspeed.modules.actions.portlets.PortletAction
                      extended byorg.apache.jetspeed.modules.actions.portlets.GenericMVCAction
Direct Known Subclasses:
JspPortletAction, LogfileViewerAction, PsmlManagerAction, RegistryBrowseAction, SearchAction, SecureGenericMVCAction, VelocityPortletAction

public class GenericMVCAction
extends PortletAction

Provides standard portal and MVC related action functionality. Developers extend this class for thier own actions and provide implementations of the build*Context methods apropos to thier portlet needs.

Version:
$Id: GenericMVCAction.java,v 1.8 2003/02/11 23:09:17 tkuebler Exp $
Author:
tkuebler

Field Summary
protected static JetspeedLogger logger
          Static initialization of the logger for this class
 
Fields inherited from class org.apache.turbine.modules.ActionEvent
BUTTON, BUTTON_LENGTH, LENGTH, METHOD_NAME_LENGTH, METHOD_NAME_PREFIX
 
Constructor Summary
GenericMVCAction()
          Creates a new instance of GenericMVCAction
 
Method Summary
protected  void buildConfigureContext(Portlet portlet, org.apache.velocity.context.Context context, org.apache.turbine.util.RunData rundata)
          Subclasses should override this method if they wish to provide their own customization behavior.
protected  void buildMaximizedContext(Portlet portlet, org.apache.velocity.context.Context context, org.apache.turbine.util.RunData rundata)
          Subclasses should override this method if they wish to build specific content when maximized.
protected  void buildNormalContext(Portlet portlet, 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 checkAdministrativeAction(org.apache.turbine.util.RunData data)
          Throws an exception if user attempts to perform unathorized action.
 void doPerform(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
          You SHOULD override this method and implement it in your action.
 java.lang.String getAttribute(java.lang.String attrName, org.apache.velocity.context.Context context)
          Convenience method for retreiving this action's PortletInstance attribute.
 java.lang.String getAttribute(java.lang.String attrName, java.lang.String defaultValue, org.apache.velocity.context.Context context)
          Convenience method for retreiving this action's PortletInstance attribute.
 PortletInstance getPortletInstance(org.apache.velocity.context.Context context)
          Convenience method for retreiving this action's PortletInstance
protected  void perform(org.apache.turbine.util.RunData rundata)
          This overrides the default Action.perform() to execute the doEvent() method.
 void setAttribute(java.lang.String attrName, java.lang.String value, org.apache.velocity.context.Context context)
          Convenience method for setting this action's PortletInstance attribute.
 
Methods inherited from class org.apache.jetspeed.modules.actions.portlets.PortletAction
doPerform, getContext, getPortlet, getTemplate, resetTemplate, setTemplate, setTemplate
 
Methods inherited from class org.apache.jetspeed.modules.actions.portlets.PortletActionEvent
executeEvents, fireEvent
 
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
 

Field Detail

logger

protected static final JetspeedLogger logger
Static initialization of the logger for this class

Constructor Detail

GenericMVCAction

public GenericMVCAction()
Creates a new instance of GenericMVCAction

Method Detail

perform

protected void perform(org.apache.turbine.util.RunData rundata)
                throws java.lang.Exception
Description copied from class: PortletActionEvent
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 PortletActionEvent
Parameters:
rundata - A Turbine RunData object.
Throws:
java.lang.Exception

doPerform

public void doPerform(org.apache.turbine.util.RunData rundata,
                      org.apache.velocity.context.Context context)
               throws java.lang.Exception
Description copied from class: PortletAction
You SHOULD override this method and implement it in your action.

Specified by:
doPerform in class PortletAction
Parameters:
rundata - Turbine information.
context - Context for web pages.
Throws:
java.lang.Exception

buildMaximizedContext

protected void buildMaximizedContext(Portlet portlet,
                                     org.apache.velocity.context.Context context,
                                     org.apache.turbine.util.RunData rundata)
                              throws java.lang.Exception
Subclasses should override this method if they wish to build specific content when maximized. Default behavior is to do the same as normal content.

Specified by:
buildMaximizedContext in class PortletAction
Throws:
java.lang.Exception

buildConfigureContext

protected void buildConfigureContext(Portlet portlet,
                                     org.apache.velocity.context.Context context,
                                     org.apache.turbine.util.RunData rundata)
                              throws java.lang.Exception
Subclasses should override this method if they wish to provide their own customization behavior. Default is to use Portal base customizer action

Specified by:
buildConfigureContext in class PortletAction
Throws:
java.lang.Exception

buildNormalContext

protected void buildNormalContext(Portlet portlet,
                                  org.apache.velocity.context.Context context,
                                  org.apache.turbine.util.RunData rundata)
                           throws java.lang.Exception
Subclasses must override this method to provide default behavior for the portlet action

Specified by:
buildNormalContext in class PortletAction
Throws:
java.lang.Exception

getPortletInstance

public PortletInstance getPortletInstance(org.apache.velocity.context.Context context)
Convenience method for retreiving this action's PortletInstance

Returns:
Portlet the Portlet for this action

getAttribute

public java.lang.String getAttribute(java.lang.String attrName,
                                     org.apache.velocity.context.Context context)
Convenience method for retreiving this action's PortletInstance attribute.

Returns:
String portlet attribute

getAttribute

public java.lang.String getAttribute(java.lang.String attrName,
                                     java.lang.String defaultValue,
                                     org.apache.velocity.context.Context context)
Convenience method for retreiving this action's PortletInstance attribute.

Returns:
String portlet attribute

setAttribute

public void setAttribute(java.lang.String attrName,
                         java.lang.String value,
                         org.apache.velocity.context.Context context)
                  throws PortalPersistenceException
Convenience method for setting this action's PortletInstance attribute.

Throws:
PortalPersistenceException

checkAdministrativeAction

public void checkAdministrativeAction(org.apache.turbine.util.RunData data)
                               throws java.lang.SecurityException
Throws an exception if user attempts to perform unathorized action.

Parameters:
data -
Throws:
java.lang.SecurityException


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