Class TaskDisplayProvider
java.lang.Object
com.webmethods.caf.faces.bean.BaseFacesBean
com.webmethods.caf.faces.bean.BaseFacesSessionBean
com.webmethods.caf.faces.data.task.TaskDisplayProvider
- All Implemented Interfaces:
IPageFlowScopeAdapter
,EventListener
,HttpSessionBindingListener
Helper class which assist in displaying various task properties
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PortalItemModel
Task Type (definition)protected List<SelectItem>
Cached mandatory task mapCached task priorities mapCached task statuses icons mapprotected static final String
Cached task statuses mapprotected String
protected List<SelectItem>
Cached list of mandatory task statusprotected SelectItem[]
Cached list of task prioritiesprotected SelectItem[]
Cached list of task statusesprotected SelectItem[]
Cached list of task statuses and empty entryFields inherited from class com.webmethods.caf.faces.bean.BaseFacesSessionBean
fExpireWithPageFlow
Fields inherited from class com.webmethods.caf.faces.bean.BaseFacesBean
DATA_BINDING_CLIENTS, EMPTY_RESOURCES, OUTCOME_ERROR, OUTCOME_OK, resourcesProviders
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ListTableContentProvider
convertListToDisplayListProvider
(String[] principalIDs) Converts list of principal IDs into ListTableContentProvider for displaying in the tablestatic ListTableContentProvider
createListProvider
(String[] aString) Helper method to create a ListTableContentProvider from a string mapstatic ListTableContentProvider
createListProvider
(Map<String, String> aMap) Helper method to create a ListTableContentProvider from a string mapReturns task accepted principals list as ListTableContentProvider (can be displayed in the table)Returns task assigned principals list as ListTableContentProvider (can be displayed in the table)protected String
getBoolDisplay
(boolean boolValue) Returns a boolean value as a localized true/false display stringReturns the display string for task createdBy propertyReturns task created datetimeReturns customTaskID property of taskReturns true if task is delegatedReturns task delegations map populated with user display names instead of UIDsReturns task delegation data as ListTableContentProvider for display in the tableReturns taskDescriptionReturns task error codeReturns task error messageprotected String
Returns localized value for "error"Returns task expireDateReturns task lastAcceptedDateReturns display name for task lastAcceptedBy userReturns task lastModifiedDate datetimeReturns display name for task lastModifiedBy usergetName()
Returns taskNamestatic String
getPrincipalDisplayName
(String principalID) Returns principal display name based on its IDprotected String
getPrincipalName
(String principalID) Returns name of the principal by IDReturns Task priority as a localized display stringReturns map of task priorities and their names (priority -> name)Returns processInstanceID property of taskReturns relative path to the icon representing the current task running statusReturns Task status as a localized display stringReturns relative path to the icon representing the current task statusReturns task statuses icons urls map (status -> url)Returns map of task statuses and their names (status -> name)getTask()
Returns current task IDint
Returns task ID as number (for sorting in the table)Returns current task infoReturns mandatory task status as list ofSelectItem
suitable for Dropdown controlsReturns task priorities as list ofSelectItem
suitable for Dropdown controlsReturns task statuses as list ofSelectItem
suitable for Dropdown controlsReturns task statuses plus empty value as list ofSelectItem
suitable for Dropdown controlsReturns display name for task typeReturns task types as list ofSelectItem
suitable for Dropdown controlsReturns map of all availablel task typesprotected String
Returns localized value for "unknown"Determines if the current task accepted by the current user, as a true/false Stringboolean
Is the task considered "active" based on it's current statusboolean
Determines if current user is allowed to open BPM Process Details pageboolean
Returns true if collaboration is enabled for current task typeboolean
Returns true if commenting is enabled for the current task typeprotected boolean
isCurrentUserInUserIDArray
(String[] userIdArray) boolean
Returns true if task is delegatedboolean
Returns true if the task is delegated from the current userboolean
Returns true if the task is delegated to the current userprotected static SelectItem[]
mapToSelectItems
(Map<?, ?> sourceMap, boolean switchValues) Converts a map to an array of SelectItemsprotected void
release()
Override this method to release any resources associated with this session.void
reset()
Reset state to empty valuesvoid
Sets current task info from taskvoid
Sets current task IDvoid
setTaskInfo
(ITaskInfo taskInfo) Sets current task infotranslateIdListToDisplay
(List<String> principalIdList) Returns list of principal display names from the list of principal IDsMethods inherited from class com.webmethods.caf.faces.bean.BaseFacesSessionBean
getExpireWithPageFlow, setExpireWithPageFlow, valueBound, valueUnbound
Methods inherited from class com.webmethods.caf.faces.bean.BaseFacesBean
createMethodBinding, createMethodExpression, createValueBinding, createValueExpression, createValueExpression, error, error, error, error, error, getBean, getFacesContext, getLocale, getResourceInputStream, getResources, getResourcesProvider, getRootCause, getStackTrace, getTreeAttribute, isUserInRole, log, log, log, putTreeAttribute, resetDataBindingClients, resolveDataBinding, resolveDataBinding, resolveExpression, setValue
-
Field Details
-
m_taskDefinition
Task Type (definition) -
taskStatusItems
Cached list of task statuses -
taskStatusItemsWithBlank
Cached list of task statuses and empty entry -
taskPriorityItems
Cached list of task priorities -
statusMap
Cached task statuses map -
priorityMap
Cached task priorities map -
s_statusIconMap
Cached task statuses icons map -
taskInfoKey
-
SKIN_IMAGE_PREFIX
- See Also:
-
taskMandatoryStatus
Cached list of mandatory task status -
mandatoryTaskStatusMap
Cached mandatory task map
-
-
Constructor Details
-
TaskDisplayProvider
public TaskDisplayProvider()
-
-
Method Details
-
setTask
Sets current task info from task -
setTaskInfo
Sets current task info -
setTaskID
Sets current task ID -
reset
public void reset()Reset state to empty values -
getTask
-
getTaskInfo
Returns current task info -
getTaskID
Returns current task ID -
getTaskIDNumber
public int getTaskIDNumber()Returns task ID as number (for sorting in the table) -
getCustomTaskID
Returns customTaskID property of task -
getProcessInstanceID
Returns processInstanceID property of task -
getName
Returns taskName -
getDescription
Returns taskDescription -
getStatusDisplayName
Returns Task status as a localized display string -
getStatusIcon
Returns relative path to the icon representing the current task status -
getRunningIcon
Returns relative path to the icon representing the current task running status -
getPriorityDisplayName
Returns Task priority as a localized display string -
getTaskTypeDisplayName
Returns display name for task type -
isCanOpenProcessInstance
public boolean isCanOpenProcessInstance()Determines if current user is allowed to open BPM Process Details page -
isAcceptedByCurrentUser
Determines if the current task accepted by the current user, as a true/false String -
getDelegatedDisplayName
Returns true if task is delegated -
isDelegated
public boolean isDelegated()Returns true if task is delegated -
isCommentingEnabled
Returns true if commenting is enabled for the current task type- Throws:
Exception
-
isCollaborationEnabled
Returns true if collaboration is enabled for current task type- Throws:
Exception
-
isDelegatedToCurrentUser
public boolean isDelegatedToCurrentUser()Returns true if the task is delegated to the current user -
isDelegatedFromCurrentUser
public boolean isDelegatedFromCurrentUser()Returns true if the task is delegated from the current user -
isCurrentUserInUserIDArray
-
getCreatedDate
Returns task created datetime -
getCreatedByDisplayName
Returns the display string for task createdBy property -
getLastModifiedDate
Returns task lastModifiedDate datetime -
getLastAcceptedDate
Returns task lastAcceptedDate -
getLastModifiedDisplayName
Returns display name for task lastModifiedBy user -
getLastAcceptedDisplayName
Returns display name for task lastAcceptedBy user -
getExirationDate
Returns task expireDate -
getAcceptedPrincipalsListProvider
Returns task accepted principals list as ListTableContentProvider (can be displayed in the table) -
getAssignedPrincipalsListProvider
Returns task assigned principals list as ListTableContentProvider (can be displayed in the table) -
getPrincipalName
Returns name of the principal by ID -
getBoolDisplay
Returns a boolean value as a localized true/false display string -
getUnknownString
Returns localized value for "unknown" -
getErrorString
Returns localized value for "error" -
release
protected void release()Override this method to release any resources associated with this session. Please note, the FacesContext is not valid for this function- Specified by:
release
in classBaseFacesSessionBean
-
getStatusIconMap
Returns task statuses icons urls map (status -> url) -
getStatusMap
Returns map of task statuses and their names (status -> name) -
getPriorityMap
Returns map of task priorities and their names (priority -> name) -
getMandatoryTaskStatusMap
-
getTaskTypeMap
Returns map of all availablel task types -
mapToSelectItems
Converts a map to an array of SelectItems- Parameters:
sourceMap
- - the map to convertswitchValues
- - true switch the key/value values in the created SelectItem- Returns:
- - an array of SelectItems
-
convertListToDisplayListProvider
Converts list of principal IDs into ListTableContentProvider for displaying in the table- Parameters:
principalIDs
- list of principal IDs (names)
-
getTaskStatusItems
Returns task statuses as list ofSelectItem
suitable for Dropdown controls -
getTaskStatusItemsWithBlank
Returns task statuses plus empty value as list ofSelectItem
suitable for Dropdown controls -
getTaskPriorityItems
Returns task priorities as list ofSelectItem
suitable for Dropdown controls -
getTaskMandatoryStatus
Returns mandatory task status as list ofSelectItem
suitable for Dropdown controls -
getTaskTypeItems
Returns task types as list ofSelectItem
suitable for Dropdown controls -
isActiveStatus
public boolean isActiveStatus()Is the task considered "active" based on it's current status -
getErrorCode
Returns task error code -
getErrorMsg
Returns task error message -
getDelegationDisplayMap
Returns task delegations map populated with user display names instead of UIDs -
getDelegationListProvider
Returns task delegation data as ListTableContentProvider for display in the table -
createListProvider
Helper method to create a ListTableContentProvider from a string map -
createListProvider
Helper method to create a ListTableContentProvider from a string map -
getPrincipalDisplayName
Returns principal display name based on its ID- Parameters:
principalID
- principal ID- Returns:
- display name (full name)
-
translateIdListToDisplay
Returns list of principal display names from the list of principal IDs- Parameters:
principalIdList
- list of principal IDs- Returns:
- list of principal display names
-