org.alfresco.web.bean.workflow
Class ManageTaskDialog

java.lang.Object
  extended by org.alfresco.web.bean.dialog.BaseDialogBean
      extended by org.alfresco.web.bean.workflow.ManageTaskDialog
All Implemented Interfaces:
java.io.Serializable, IDialogBean
Direct Known Subclasses:
ManageChangeRequestTaskDialog, ManageReviewTaskDialog, ViewCompletedTaskDialog

public class ManageTaskDialog
extends BaseDialogBean

Bean implementation for the "Manage Task" dialog.

See Also:
Serialized Form

Nested Class Summary
protected  class ManageTaskDialog.TaskCompleteResolver
          Property resolver to determine if the given node has been flagged as complete
 
Field Summary
protected static java.lang.String CLIENT_ID_PREFIX
           
protected  ManageTaskDialog.TaskCompleteResolver completeResolver
           
protected static java.lang.String ID_PREFIX
           
protected  boolean isItemBeingAdded
           
protected  java.lang.String[] itemsToAdd
           
protected  UIRichList packageItemsRichList
           
protected  java.util.List packageItemsToAdd
           
protected  java.util.List packageItemsToRemove
           
protected  java.util.List resources
           
protected  Node taskNode
           
protected  org.alfresco.service.cmr.repository.NodeRef workflowPackage
           
 
Fields inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
browseBean, isFinished, navigator, parameters
 
Constructor Summary
ManageTaskDialog()
           
 
Method Summary
protected  void addAVMNode(AVMNode node)
           
 void addPackageItems(javax.faces.event.ActionEvent event)
          Adds an item to the workflow package
 void cancelAddPackageItems(javax.faces.event.ActionEvent event)
          Cancels the adding of an item to the workflow package
protected  void createAndAddNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
           
protected  java.lang.String finishImpl(javax.faces.context.FacesContext context, java.lang.String outcome)
          Performs the actual processing for the wizard.
 java.util.List getAdditionalButtons()
          Returns a list of additional buttons to display in the dialog.
protected  org.alfresco.service.cmr.avm.AVMService getAvmService()
           
protected  org.alfresco.service.cmr.avmsync.AVMSyncService getAvmSyncService()
           
 java.lang.String getContainerDescription()
          Returns the description to be used for the dialog
 java.lang.String getContainerTitle()
          Returns the title to be used for the dialog
 boolean getFinishButtonDisabled()
          Determines whether the finish button on the dialog should be disabled
 java.lang.String getFinishButtonLabel()
          Returns the label to use for the finish button
 java.lang.String[] getItemsToAdd()
          Returns a String array of NodeRef's that are being added to the workflow package
 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
 java.util.List getResources()
          Returns a list of resources associated with this task i.e.
 Node getTaskNode()
          Returns the Node representing the task
protected  org.alfresco.wcm.webproject.WebProjectService getWebProjectService()
           
 java.lang.String getWorkflowDefinitionImageUrl()
          Returns the URL to the Workflow Definition Image of the current task
 org.alfresco.service.cmr.workflow.WorkflowInstance getWorkflowInstance()
          Returns the WorkflowInstance that the current task belongs to
protected  org.alfresco.service.cmr.workflow.WorkflowService getWorkflowService()
           
protected  org.alfresco.service.cmr.workflow.WorkflowTask getWorkflowTask()
           
protected  org.alfresco.service.cmr.workflow.WorkflowTransition[] getWorkflowTransitions()
           
 void init(java.util.Map parameters)
          Initialises the dialog bean
 boolean isItemBeingAdded()
          Determines whether an item is currently being added to the workflow package
 boolean isPooledTask()
          Returns whether this is a pooled task
 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
 void restored()
          Called when the dialog is restored after a nested dialog is closed
 java.lang.String returnOwnership()
           
 void setAvmService(org.alfresco.service.cmr.avm.AVMService avmService)
          Sets the avm service to use
 void setAvmSyncService(org.alfresco.service.cmr.avmsync.AVMSyncService avmSyncService)
          Sets the avm sync service to use
 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 setWebProjectService(org.alfresco.wcm.webproject.WebProjectService wpService)
           
 void setWorkflowService(org.alfresco.service.cmr.workflow.WorkflowService workflowService)
          Sets the workflow service to use
 java.lang.String takeOwnership()
           
 void togglePackageItemComplete(javax.faces.event.ActionEvent event)
          Toggles the complete flag for a workflow package item
 java.lang.String transition()
           
protected  void updateResources()
           
 
Methods inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
cancel, doPostCommitProcessing, finish, formatErrorMessage, getActionsConfigId, getActionsContext, getCancelButtonLabel, getCheckOutCheckInService, getContainerSubTitle, getDefaultCancelOutcome, getDefaultFinishOutcome, getDictionaryService, getErrorMessageId, getErrorOutcome, getFileFolderService, 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
 

Field Detail

taskNode

protected Node taskNode

workflowPackage

protected org.alfresco.service.cmr.repository.NodeRef workflowPackage

resources

protected java.util.List resources

completeResolver

protected ManageTaskDialog.TaskCompleteResolver completeResolver

packageItemsRichList

protected UIRichList packageItemsRichList

packageItemsToAdd

protected java.util.List packageItemsToAdd

packageItemsToRemove

protected java.util.List packageItemsToRemove

itemsToAdd

protected java.lang.String[] itemsToAdd

isItemBeingAdded

protected boolean isItemBeingAdded

ID_PREFIX

protected static final java.lang.String ID_PREFIX
See Also:
Constant Field Values

CLIENT_ID_PREFIX

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

ManageTaskDialog

public ManageTaskDialog()
Method Detail

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

getAdditionalButtons

public java.util.List getAdditionalButtons()
Description copied from interface: IDialogBean
Returns a list of additional buttons to display in the dialog.

Specified by:
getAdditionalButtons in interface IDialogBean
Overrides:
getAdditionalButtons in class BaseDialogBean
Returns:
List of button configurations, null if there are no buttons

getFinishButtonLabel

public java.lang.String getFinishButtonLabel()
Description copied from interface: IDialogBean
Returns the label to use for the finish button

Specified by:
getFinishButtonLabel in interface IDialogBean
Overrides:
getFinishButtonLabel in class BaseDialogBean
Returns:
The finish button label

getFinishButtonDisabled

public boolean getFinishButtonDisabled()
Description copied from interface: IDialogBean
Determines whether the finish button on the dialog should be disabled

Specified by:
getFinishButtonDisabled in interface IDialogBean
Overrides:
getFinishButtonDisabled in class BaseDialogBean
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

getContainerDescription

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

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

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

takeOwnership

public java.lang.String takeOwnership()

returnOwnership

public java.lang.String returnOwnership()

transition

public java.lang.String transition()

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 an item 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

togglePackageItemComplete

public void togglePackageItemComplete(javax.faces.event.ActionEvent event)
Toggles the complete flag for a workflow package item

Parameters:
event - The event containing a reference to the item to toggle the status for

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

getTaskNode

public Node getTaskNode()
Returns the Node representing the task

Returns:
The node

isPooledTask

public boolean isPooledTask()
Returns whether this is a pooled task

Returns:
true => pooled

getWorkflowInstance

public org.alfresco.service.cmr.workflow.WorkflowInstance getWorkflowInstance()
Returns the WorkflowInstance that the current task belongs to

Returns:
The workflow instance

getWorkflowDefinitionImageUrl

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

Returns:
the url

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

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()

setAvmService

public void setAvmService(org.alfresco.service.cmr.avm.AVMService avmService)
Sets the avm service to use

Parameters:
avmService - AvmService instance

getAvmService

protected org.alfresco.service.cmr.avm.AVMService getAvmService()

setAvmSyncService

public void setAvmSyncService(org.alfresco.service.cmr.avmsync.AVMSyncService avmSyncService)
Sets the avm sync service to use

Parameters:
avmSyncService - AvmSycService instance

getAvmSyncService

protected org.alfresco.service.cmr.avmsync.AVMSyncService getAvmSyncService()

setWebProjectService

public void setWebProjectService(org.alfresco.wcm.webproject.WebProjectService wpService)
Parameters:
wpService - The WebProjectService to set.

getWebProjectService

protected org.alfresco.wcm.webproject.WebProjectService getWebProjectService()

getWorkflowTask

protected org.alfresco.service.cmr.workflow.WorkflowTask getWorkflowTask()

getWorkflowTransitions

protected org.alfresco.service.cmr.workflow.WorkflowTransition[] getWorkflowTransitions()

addAVMNode

protected void addAVMNode(AVMNode node)

createAndAddNode

protected void createAndAddNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)

updateResources

protected void updateResources()


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