Class TaskDisplayProvider

All Implemented Interfaces:
IPageFlowScopeAdapter, EventListener, HttpSessionBindingListener

public class TaskDisplayProvider extends BaseFacesSessionBean
Helper class which assist in displaying various task properties
  • Field Details

    • m_taskDefinition

      protected PortalItemModel m_taskDefinition
      Task Type (definition)
    • taskStatusItems

      protected SelectItem[] taskStatusItems
      Cached list of task statuses
    • taskStatusItemsWithBlank

      protected SelectItem[] taskStatusItemsWithBlank
      Cached list of task statuses and empty entry
    • taskPriorityItems

      protected SelectItem[] taskPriorityItems
      Cached list of task priorities
    • statusMap

      protected Map<String,String> statusMap
      Cached task statuses map
    • priorityMap

      protected Map<String,String> priorityMap
      Cached task priorities map
    • s_statusIconMap

      protected static Map<String,String> s_statusIconMap
      Cached task statuses icons map
    • taskInfoKey

      protected String taskInfoKey
    • SKIN_IMAGE_PREFIX

      protected static final String SKIN_IMAGE_PREFIX
      See Also:
    • taskMandatoryStatus

      protected List<SelectItem> taskMandatoryStatus
      Cached list of mandatory task status
    • mandatoryTaskStatusMap

      protected List<SelectItem> mandatoryTaskStatusMap
      Cached mandatory task map
  • Constructor Details

    • TaskDisplayProvider

      public TaskDisplayProvider()
  • Method Details

    • setTask

      public void setTask(ITask task)
      Sets current task info from task
    • setTaskInfo

      public void setTaskInfo(ITaskInfo taskInfo)
      Sets current task info
    • setTaskID

      public void setTaskID(String taskID)
      Sets current task ID
    • reset

      public void reset()
      Reset state to empty values
    • getTask

      public ITask getTask()
    • getTaskInfo

      public ITaskInfo getTaskInfo()
      Returns current task info
    • getTaskID

      public String getTaskID()
      Returns current task ID
    • getTaskIDNumber

      public int getTaskIDNumber()
      Returns task ID as number (for sorting in the table)
    • getCustomTaskID

      public String getCustomTaskID()
      Returns customTaskID property of task
    • getProcessInstanceID

      public String getProcessInstanceID()
      Returns processInstanceID property of task
    • getName

      public String getName()
      Returns taskName
    • getDescription

      public String getDescription()
      Returns taskDescription
    • getStatusDisplayName

      public String getStatusDisplayName()
      Returns Task status as a localized display string
    • getStatusIcon

      public String getStatusIcon()
      Returns relative path to the icon representing the current task status
    • getRunningIcon

      public String getRunningIcon()
      Returns relative path to the icon representing the current task running status
    • getPriorityDisplayName

      public String getPriorityDisplayName()
      Returns Task priority as a localized display string
    • getTaskTypeDisplayName

      public 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

      public String isAcceptedByCurrentUser()
      Determines if the current task accepted by the current user, as a true/false String
    • getDelegatedDisplayName

      public String getDelegatedDisplayName()
      Returns true if task is delegated
    • isDelegated

      public boolean isDelegated()
      Returns true if task is delegated
    • isCommentingEnabled

      public boolean isCommentingEnabled() throws Exception
      Returns true if commenting is enabled for the current task type
      Throws:
      Exception
    • isCollaborationEnabled

      public boolean isCollaborationEnabled() throws Exception
      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

      protected boolean isCurrentUserInUserIDArray(String[] userIdArray)
    • getCreatedDate

      public Date getCreatedDate()
      Returns task created datetime
    • getCreatedByDisplayName

      public String getCreatedByDisplayName()
      Returns the display string for task createdBy property
    • getLastModifiedDate

      public Date getLastModifiedDate()
      Returns task lastModifiedDate datetime
    • getLastAcceptedDate

      public Date getLastAcceptedDate()
      Returns task lastAcceptedDate
    • getLastModifiedDisplayName

      public String getLastModifiedDisplayName()
      Returns display name for task lastModifiedBy user
    • getLastAcceptedDisplayName

      public String getLastAcceptedDisplayName()
      Returns display name for task lastAcceptedBy user
    • getExirationDate

      public Date getExirationDate()
      Returns task expireDate
    • getAcceptedPrincipalsListProvider

      public ListTableContentProvider getAcceptedPrincipalsListProvider()
      Returns task accepted principals list as ListTableContentProvider (can be displayed in the table)
    • getAssignedPrincipalsListProvider

      public ListTableContentProvider getAssignedPrincipalsListProvider()
      Returns task assigned principals list as ListTableContentProvider (can be displayed in the table)
    • getPrincipalName

      protected String getPrincipalName(String principalID)
      Returns name of the principal by ID
    • getBoolDisplay

      protected String getBoolDisplay(boolean boolValue)
      Returns a boolean value as a localized true/false display string
    • getUnknownString

      protected String getUnknownString()
      Returns localized value for "unknown"
    • getErrorString

      protected String 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 class BaseFacesSessionBean
    • getStatusIconMap

      protected Map<String,String> getStatusIconMap()
      Returns task statuses icons urls map (status -> url)
    • getStatusMap

      public Map<String,String> getStatusMap()
      Returns map of task statuses and their names (status -> name)
    • getPriorityMap

      public Map<String,String> getPriorityMap()
      Returns map of task priorities and their names (priority -> name)
    • getMandatoryTaskStatusMap

      public List<SelectItem> getMandatoryTaskStatusMap()
    • getTaskTypeMap

      public static Map<String,String> getTaskTypeMap()
      Returns map of all availablel task types
    • mapToSelectItems

      protected static SelectItem[] mapToSelectItems(Map<?,?> sourceMap, boolean switchValues)
      Converts a map to an array of SelectItems
      Parameters:
      sourceMap - - the map to convert
      switchValues - - true switch the key/value values in the created SelectItem
      Returns:
      - an array of SelectItems
    • convertListToDisplayListProvider

      protected ListTableContentProvider convertListToDisplayListProvider(String[] principalIDs)
      Converts list of principal IDs into ListTableContentProvider for displaying in the table
      Parameters:
      principalIDs - list of principal IDs (names)
    • getTaskStatusItems

      public SelectItem[] getTaskStatusItems()
      Returns task statuses as list of SelectItem suitable for Dropdown controls
    • getTaskStatusItemsWithBlank

      public SelectItem[] getTaskStatusItemsWithBlank()
      Returns task statuses plus empty value as list of SelectItem suitable for Dropdown controls
    • getTaskPriorityItems

      public SelectItem[] getTaskPriorityItems()
      Returns task priorities as list of SelectItem suitable for Dropdown controls
    • getTaskMandatoryStatus

      public List<SelectItem> getTaskMandatoryStatus()
      Returns mandatory task status as list of SelectItem suitable for Dropdown controls
    • getTaskTypeItems

      public SelectItem[] getTaskTypeItems()
      Returns task types as list of SelectItem suitable for Dropdown controls
    • isActiveStatus

      public boolean isActiveStatus()
      Is the task considered "active" based on it's current status
    • getErrorCode

      public String getErrorCode()
      Returns task error code
    • getErrorMsg

      public String getErrorMsg()
      Returns task error message
    • getDelegationDisplayMap

      public Map<String,String> getDelegationDisplayMap()
      Returns task delegations map populated with user display names instead of UIDs
    • getDelegationListProvider

      public ListTableContentProvider getDelegationListProvider()
      Returns task delegation data as ListTableContentProvider for display in the table
    • createListProvider

      public static ListTableContentProvider createListProvider(Map<String,String> aMap)
      Helper method to create a ListTableContentProvider from a string map
    • createListProvider

      public static ListTableContentProvider createListProvider(String[] aString)
      Helper method to create a ListTableContentProvider from a string map
    • getPrincipalDisplayName

      public static String getPrincipalDisplayName(String principalID)
      Returns principal display name based on its ID
      Parameters:
      principalID - principal ID
      Returns:
      display name (full name)
    • translateIdListToDisplay

      public static List<String> translateIdListToDisplay(List<String> principalIdList)
      Returns list of principal display names from the list of principal IDs
      Parameters:
      principalIdList - list of principal IDs
      Returns:
      list of principal display names