org.infoglue.cms.applications.mydesktoptool.actions
Class ViewMyDesktopToolStartPageAction

java.lang.Object
  extended by org.infoglue.cms.applications.common.actions.WebworkAbstractAction
      extended by org.infoglue.cms.applications.common.actions.InfoGlueAbstractAction
          extended by org.infoglue.cms.applications.mydesktoptool.actions.ViewMyDesktopToolStartPageAction
All Implemented Interfaces:
java.io.Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.ServletRequestAware, webwork.action.ServletResponseAware

public class ViewMyDesktopToolStartPageAction
extends InfoGlueAbstractAction

This class implements the action class for the startpage in the mydesktop tool.

Author:
Mattias Bogeblad, Jed Prentice
See Also:
Serialized Form

Field Summary
protected static java.lang.String INVALID_ACTION
           
 
Fields inherited from class org.infoglue.cms.applications.common.actions.InfoGlueAbstractAction
colorScheme
 
Fields inherited from interface webwork.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
ViewMyDesktopToolStartPageAction()
           
 
Method Summary
 java.lang.String doExecute()
          Populates the lists of workflow and workflow action VOs.
 java.lang.String doInvoke()
          Invokes an action in a workflow based on the values of the actionId and workflowId request parameters and redirects to the action's view if one has been defined.
 java.lang.String doStartWorkflow()
          Starts the workflow specified in the request parameter "workflowName" with the initial action identified by the request parameter "actionId" and redirects to the view page for the desired initial action.
 java.util.List getAvailableShortcutVOList()
           
 java.util.List getAvailableWorkflowVOList()
           
 java.util.List getWorkflowActionVOList()
           
 java.util.List getWorkflowActionVOList(StepFilter filter)
           
 java.util.List getWorkflowVOList()
           
 void setActionId(int actionId)
          Allows the action ID to be set via the request parameter "actionId"
 void setFinalReturnAddress(java.lang.String finalReturnAddress)
           
 void setWorkflowId(long workflowId)
          Allows the workflowID to be set via the request parameter "workflowId"
 void setWorkflowName(java.lang.String name)
          Allows the workflow name to be set via the request parameter "workflowName".
 
Methods inherited from class org.infoglue.cms.applications.common.actions.InfoGlueAbstractAction
beginTransaction, closeDatabase, closeTransaction, commitTransaction, encode, getAnonymousPrincipal, getCMSBaseUrl, getColorScheme, getComponentRendererAction, getComponentRendererUrl, getCurrentURL, getLanguageCode, getLocale, getLogger, getLogoutURL, getOriginalFullURL, getParameter, getPrincipalPropertyHashValues, getPrincipalPropertyValue, getPrincipalPropertyValue, getSessionTimeout, getSingleParameter, getThis, getToolId, getToolLocales, getURLBase, getUserName, hasAccessTo, hasAccessTo, rollbackTransaction, setColorScheme, setLanguageCode, setToolId
 
Methods inherited from class org.infoglue.cms.applications.common.actions.WebworkAbstractAction
doDefault, execute, getBrowserBean, getCurrentUrl, getError, getErrors, getHttpSession, getInfoGluePrincipal, getLocalizedString, getRequest, getResponse, getRoot, getSession, setCommand, setError, setServletRequest, setServletResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INVALID_ACTION

protected static final java.lang.String INVALID_ACTION
See Also:
Constant Field Values
Constructor Detail

ViewMyDesktopToolStartPageAction

public ViewMyDesktopToolStartPageAction()
Method Detail

getWorkflowVOList

public java.util.List getWorkflowVOList()

getAvailableWorkflowVOList

public java.util.List getAvailableWorkflowVOList()

getAvailableShortcutVOList

public java.util.List getAvailableShortcutVOList()

getWorkflowActionVOList

public java.util.List getWorkflowActionVOList()

getWorkflowActionVOList

public java.util.List getWorkflowActionVOList(StepFilter filter)

setWorkflowName

public void setWorkflowName(java.lang.String name)
Allows the workflow name to be set via the request parameter "workflowName".

Parameters:
name - the name of the desired workflow

setActionId

public void setActionId(int actionId)
Allows the action ID to be set via the request parameter "actionId"

Parameters:
actionId - the ID of the action to execute

setWorkflowId

public void setWorkflowId(long workflowId)
Allows the workflowID to be set via the request parameter "workflowId"

Parameters:
workflowId - the ID of the desired workflow

doExecute

public java.lang.String doExecute()
                           throws SystemException
Populates the lists of workflow and workflow action VOs.

Specified by:
doExecute in class WebworkAbstractAction
Returns:
Action.SUCCESS
Throws:
SystemException - if a workflow error occurs

doStartWorkflow

public java.lang.String doStartWorkflow()
                                 throws SystemException
Starts the workflow specified in the request parameter "workflowName" with the initial action identified by the request parameter "actionId" and redirects to the view page for the desired initial action. If no actionId is passed in the request, we assume that the ID of the initial action is zero.

Returns:
Action.NONE if the desired initial action has a view, otherwise the effect is the same as calling doExecute()
Throws:
SystemException
See Also:
doExecute()

doInvoke

public java.lang.String doInvoke()
                          throws SystemException
Invokes an action in a workflow based on the values of the actionId and workflowId request parameters and redirects to the action's view if one has been defined. If there is no action view, the user will be taken to ViewMyDesktopToolStartPage.action, i.e., the effect is the same as calling doExecute(). NOTE: Assumes there will be one current action with a view; we iterate over the available actions until we find one with a view, then redirect to that view. If there are other actions with different views, they will be ignored.

Returns:
NONE if there is an available action with a view and we redirect to the action's view page, otherwise performs the same operations as doExecute().
Throws:
SystemException - if an error occurs invoking the action or URL-encoding the action view
See Also:
doExecute()

setFinalReturnAddress

public void setFinalReturnAddress(java.lang.String finalReturnAddress)


Copyright © 2005 InfoGlue.org All Rights Reserved.