org.alfresco.web.bean.workflow
Class StartWorkflowWizard

java.lang.Object
  extended by org.alfresco.web.bean.dialog.BaseDialogBean
      extended by org.alfresco.web.bean.wizard.BaseWizardBean
          extended by org.alfresco.web.bean.workflow.StartWorkflowWizard
All Implemented Interfaces:
java.io.Serializable, IDialogBean, IWizardBean

public class StartWorkflowWizard
extends BaseWizardBean

Bean implementation for the Start Workflow Wizard.

See Also:
Serialized Form

Field Summary
protected  java.util.List availableWorkflows
           
protected  java.util.List invitationWorkflows
           
protected  boolean isItemBeingAdded
           
protected  java.lang.String[] itemsToAdd
           
protected  boolean nextButtonDisabled
           
protected  UIRichList packageItemsRichList
           
protected  java.util.List packageItemsToAdd
           
protected  java.lang.String previouslySelectedWorkflow
           
protected  java.util.List publishingWorkflows
           
protected  java.util.List resources
           
protected  java.lang.String selectedWorkflow
           
protected  Node startTaskNode
           
protected  java.util.List wcmWorkflows
           
 
Fields inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
browseBean, isFinished, navigator, parameters
 
Constructor Summary
StartWorkflowWizard()
           
 
Method Summary
 void addPackageItems(javax.faces.event.ActionEvent event)
          Adds items to the workflow package
 java.lang.String back()
          Called when the back button is pressed by the user
 void cancelAddPackageItems(javax.faces.event.ActionEvent event)
          Cancels the adding of an item to the workflow package
protected  java.lang.String finishImpl(javax.faces.context.FacesContext context, java.lang.String outcome)
          Performs the actual processing for the wizard.
 java.lang.String getContainerTitle()
          Returns the title to be used for the dialog
 boolean getHasStartableWorkflows()
          Determines whether there are any workflows to start
 org.alfresco.service.cmr.invitation.InvitationService getInvitationService()
           
protected  java.util.List getInvitationServiceWorkflowNames()
          Get the Names of the Invitation Service Workflows
 java.lang.String[] getItemsToAdd()
          Returns a String array of NodeRef's that are being added to the workflow package
 boolean getNextButtonDisabled()
          Determines whether the next button on the wizard should be disabled
 java.lang.String getPackageActionGroup()
          Returns the action group the current task uses for the workflow package
 java.lang.String getPackageItemActionGroup()
          Returns the action group the current task uses for each workflow package item
 UIRichList getPackageItemsRichList()
          Returns the rich list being used for the workflow package items
protected  java.util.List getPublishingWorkflowNames()
          Get the names of the publishing workflows
 java.util.List getResources()
          Returns a list of resources associated with this task i.e.
 java.lang.String getSelectedWorkflow()
          Returns the workflow selected by the user
 java.util.List getStartableWorkflows()
          Returns a list of workflows that can be started.
 java.lang.String getSummary()
           
 Node getTaskMetadataNode()
          Returns the Node representing the start task metadata required
protected  org.alfresco.service.cmr.repository.NodeService getUnprotectedNodeService()
           
protected  java.util.List getWCMWorkflowNames()
          Get the Names of the WCM workflows.
 java.lang.String getWorkflowDefinitionImageUrl()
          Returns the URL to the Workflow Definition Image of the current task
protected  java.util.Map getWorkflows()
           
protected  org.alfresco.service.cmr.workflow.WorkflowService getWorkflowService()
           
 void init(java.util.Map parameters)
          Initialises the dialog bean
 boolean isItemBeingAdded()
          Determines whether an item is currently being added to the workflow package
 java.lang.String next()
          Called when the next button is pressed by the user
 void prepareForAdd(javax.faces.event.ActionEvent event)
          Prepares the dialog to allow the user to add an item to the workflow package
 void removePackageItem(javax.faces.event.ActionEvent event)
          Removes an item from the workflow package
protected  void resetRichList()
          Resets the rich list
 void restored()
          Called when the dialog is restored after a nested dialog is closed
 void setInvitationService(org.alfresco.service.cmr.invitation.InvitationService invitationService)
           
 void setItemsToAdd(java.lang.String[] itemsToAdd)
          Sets the NodeRef's to add as items to the workflow package
 void setPackageItemsRichList(UIRichList richList)
          Sets the rich list being used for the workflow package items
 void setSelectedWorkflow(java.lang.String selectedWorkflow)
          Sets the selected workflow
 void setUnprotectedNodeService(org.alfresco.service.cmr.repository.NodeService unprotectedNodeService)
           
 void setWorkflowService(org.alfresco.service.cmr.workflow.WorkflowService workflowService)
          Sets the workflow service to use
 
Methods inherited from class org.alfresco.web.bean.wizard.BaseWizardBean
buildSummary, getBackButtonLabel, getDefaultCancelOutcome, getDefaultFinishOutcome, getFinishButtonLabel, getNextButtonLabel, getStepDescription, getStepTitle
 
Methods inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
cancel, doPostCommitProcessing, finish, formatErrorMessage, getActionsConfigId, getActionsContext, getAdditionalButtons, getCancelButtonLabel, getCheckOutCheckInService, getContainerDescription, getContainerSubTitle, getDictionaryService, getErrorMessageId, getErrorOutcome, getFileFolderService, getFinishButtonDisabled, getMoreActionsConfigId, getNamespaceService, getNodeService, getRuleService, getSearchService, getTransactionService, isFinished, setBrowseBean, setDictionaryService, setFileFolderService, setNamespaceService, setNavigator, setNodeService, setSearchService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.alfresco.web.bean.dialog.IDialogBean
cancel, finish, getActionsConfigId, getActionsContext, getAdditionalButtons, getCancelButtonLabel, getContainerDescription, getContainerSubTitle, getFinishButtonDisabled, getMoreActionsConfigId, isFinished
 

Field Detail

selectedWorkflow

protected java.lang.String selectedWorkflow

previouslySelectedWorkflow

protected java.lang.String previouslySelectedWorkflow

availableWorkflows

protected transient java.util.List availableWorkflows

wcmWorkflows

protected java.util.List wcmWorkflows

invitationWorkflows

protected java.util.List invitationWorkflows

publishingWorkflows

protected java.util.List publishingWorkflows

startTaskNode

protected Node startTaskNode

resources

protected java.util.List resources

packageItemsToAdd

protected java.util.List packageItemsToAdd

packageItemsRichList

protected UIRichList packageItemsRichList

itemsToAdd

protected java.lang.String[] itemsToAdd

isItemBeingAdded

protected boolean isItemBeingAdded

nextButtonDisabled

protected boolean nextButtonDisabled
Constructor Detail

StartWorkflowWizard

public StartWorkflowWizard()
Method Detail

setUnprotectedNodeService

public void setUnprotectedNodeService(org.alfresco.service.cmr.repository.NodeService unprotectedNodeService)

getUnprotectedNodeService

protected org.alfresco.service.cmr.repository.NodeService getUnprotectedNodeService()

getWorkflows

protected java.util.Map getWorkflows()

init

public void init(java.util.Map parameters)
Description copied from interface: IDialogBean
Initialises the dialog bean

Specified by:
init in interface IDialogBean
Overrides:
init in class BaseDialogBean
Parameters:
parameters - Map of parameters for the dialog

restored

public void restored()
Description copied from interface: IDialogBean
Called when the dialog is restored after a nested dialog is closed

Specified by:
restored in interface IDialogBean
Overrides:
restored in class BaseDialogBean

finishImpl

protected java.lang.String finishImpl(javax.faces.context.FacesContext context,
                                      java.lang.String outcome)
                               throws java.lang.Exception
Description copied from class: BaseDialogBean
Performs the actual processing for the wizard. NOTE: This method is called within the context of a transaction so no transaction handling is required

Specified by:
finishImpl in class BaseDialogBean
Parameters:
context - FacesContext
outcome - The default outcome
Returns:
The outcome
Throws:
java.lang.Exception

next

public java.lang.String next()
Description copied from interface: IWizardBean
Called when the next button is pressed by the user

Specified by:
next in interface IWizardBean
Overrides:
next in class BaseWizardBean
Returns:
Reserved for future use

back

public java.lang.String back()
Description copied from interface: IWizardBean
Called when the back button is pressed by the user

Specified by:
back in interface IWizardBean
Overrides:
back in class BaseWizardBean
Returns:
Reserved for future use

getNextButtonDisabled

public boolean getNextButtonDisabled()
Description copied from interface: IWizardBean
Determines whether the next button on the wizard should be disabled

Specified by:
getNextButtonDisabled in interface IWizardBean
Overrides:
getNextButtonDisabled in class BaseWizardBean
Returns:
true if the button should be disabled

getContainerTitle

public java.lang.String getContainerTitle()
Description copied from interface: IDialogBean
Returns the title to be used for the dialog

If this returns null the DialogManager will lookup the title via the dialog configuration

Specified by:
getContainerTitle in interface IDialogBean
Overrides:
getContainerTitle in class BaseDialogBean
Returns:
The title or null if the title is to be acquired via configuration

prepareForAdd

public void prepareForAdd(javax.faces.event.ActionEvent event)
Prepares the dialog to allow the user to add an item to the workflow package

Parameters:
event - The event

cancelAddPackageItems

public void cancelAddPackageItems(javax.faces.event.ActionEvent event)
Cancels the adding of an item to the workflow package

Parameters:
event - The event

addPackageItems

public void addPackageItems(javax.faces.event.ActionEvent event)
Adds items to the workflow package

Parameters:
event - The event

removePackageItem

public void removePackageItem(javax.faces.event.ActionEvent event)
Removes an item from the workflow package

Parameters:
event - The event containing a reference to the item to remove

getItemsToAdd

public java.lang.String[] getItemsToAdd()
Returns a String array of NodeRef's that are being added to the workflow package

Returns:
String array of NodeRef's

setItemsToAdd

public void setItemsToAdd(java.lang.String[] itemsToAdd)
Sets the NodeRef's to add as items to the workflow package

Parameters:
itemsToAdd - NodeRef's to add to the workflow package

isItemBeingAdded

public boolean isItemBeingAdded()
Determines whether an item is currently being added to the workflow package

Returns:
true if an item is being added

setPackageItemsRichList

public void setPackageItemsRichList(UIRichList richList)
Sets the rich list being used for the workflow package items

Parameters:
richList - The rich list instance

getPackageItemsRichList

public UIRichList getPackageItemsRichList()
Returns the rich list being used for the workflow package items

Returns:
The rich list instance

getSelectedWorkflow

public java.lang.String getSelectedWorkflow()
Returns the workflow selected by the user

Returns:
The selected workflow

setSelectedWorkflow

public void setSelectedWorkflow(java.lang.String selectedWorkflow)
Sets the selected workflow

Parameters:
selectedWorkflow - The workflow selected

getTaskMetadataNode

public Node getTaskMetadataNode()
Returns the Node representing the start task metadata required

Returns:
The Node for the start task

getPackageActionGroup

public java.lang.String getPackageActionGroup()
Returns the action group the current task uses for the workflow package

Returns:
action group id

getPackageItemActionGroup

public java.lang.String getPackageItemActionGroup()
Returns the action group the current task uses for each workflow package item

Returns:
action group id

getSummary

public java.lang.String getSummary()
Returns:
Returns the summary data for the wizard.

getHasStartableWorkflows

public boolean getHasStartableWorkflows()
Determines whether there are any workflows to start

Returns:
true if there are startable workflows

getStartableWorkflows

public java.util.List getStartableWorkflows()
Returns a list of workflows that can be started.

Returns:
List of SelectItem objects representing the workflows

getWorkflowDefinitionImageUrl

public java.lang.String getWorkflowDefinitionImageUrl()
Returns the URL to the Workflow Definition Image of the current task

Returns:
the url

getResources

public java.util.List getResources()
Returns a list of resources associated with this task i.e. the children of the workflow package

Returns:
The list of nodes

setWorkflowService

public void setWorkflowService(org.alfresco.service.cmr.workflow.WorkflowService workflowService)
Sets the workflow service to use

Parameters:
workflowService - WorkflowService instance

getWorkflowService

protected org.alfresco.service.cmr.workflow.WorkflowService getWorkflowService()

resetRichList

protected void resetRichList()
Resets the rich list


getWCMWorkflowNames

protected java.util.List getWCMWorkflowNames()
Get the Names of the WCM workflows.

Returns:
The names of the WCM workflows.

getInvitationServiceWorkflowNames

protected java.util.List getInvitationServiceWorkflowNames()
Get the Names of the Invitation Service Workflows

Returns:
The names of the Invitation Service workflows

getPublishingWorkflowNames

protected java.util.List getPublishingWorkflowNames()
Get the names of the publishing workflows

Returns:
The names of the publishing workflows

setInvitationService

public void setInvitationService(org.alfresco.service.cmr.invitation.InvitationService invitationService)

getInvitationService

public org.alfresco.service.cmr.invitation.InvitationService getInvitationService()


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.