com.sas.hls.work.workitem
Interface WorkItemService


public interface WorkItemService

The WorkItemService provides methods to access information about work items defined in the system.


Method Summary
 List<Task> getActiveTasksOfWorkItem(String workItemId)
          Get all active tasks for a work item.
 List<WorkItem> getAllWorkItemsByContext(ObjectIdentity context, boolean includeChildren)
          Get all work items at a specified context, and (optionally) below.
 List<RepositoryFile> getAttachmentsForWorkItem(String workItemId)
          Get all attachments associated with a work item.
 List<CompletedTask> getCompletedTasksForWorkItem(String workItemId)
          Get all completed tasks for a work item.
 FlowDetails getFlowForWorkItem(String workItemId)
          Get the work flow definition details for a work item.
 List<WorkItem> getMyWorkItemsByContext(ObjectIdentity context, boolean includeChildren)
          Get all work items that are owned by the current user at a specified context, and (optionally) below.
 

Method Detail

getAllWorkItemsByContext

List<WorkItem> getAllWorkItemsByContext(ObjectIdentity context,
                                        boolean includeChildren)
                                        throws ObjectNotFoundException
Get all work items at a specified context, and (optionally) below. Requires the current user to have read access to the context. The current user must have either the Manage Work Items privilege or the Administer Work Items privilege in order to see work items owned by others. If the user does not have either of these privileges, only work items which they own will be returned.

Parameters:
context - the ObjectIdentity representing the work item context.
includeChildren - the boolean value indicating if context children's work items should be retrieved.
Returns:
a list of WorkItem objects.
Throws:
ObjectNotFoundException - thrown if the specified context does not exist.

getMyWorkItemsByContext

List<WorkItem> getMyWorkItemsByContext(ObjectIdentity context,
                                       boolean includeChildren)
                                       throws ObjectNotFoundException
Get all work items that are owned by the current user at a specified context, and (optionally) below. Requires the current user to have read access to the context.

Parameters:
context - the ObjectIdentity representing the work item context.
includeChildren - the boolean value indicating if context children's work items should be retrieved.
Returns:
a list of WorkItem objects.
Throws:
ObjectNotFoundException - thrown if the specified context does not exist.

getFlowForWorkItem

FlowDetails getFlowForWorkItem(String workItemId)
                               throws WorkItemNotFoundException
Get the work flow definition details for a work item. Requires the current to have read access to the context and one of the following: work item ownership, Manage Work Item privilege, or Administer Work Item privilege.

Parameters:
workItemId - the identifier of the work item.
Returns:
a FlowDetails object containing information about the work flow definition.
Throws:
WorkItemNotFoundException - thrown if the work item does not exist.

getActiveTasksOfWorkItem

List<Task> getActiveTasksOfWorkItem(String workItemId)
                                    throws WorkItemNotFoundException
Get all active tasks for a work item. Requires the current to have read access to the context and one of the following: work item ownership, Manage Work Item privilege, or Administer Work Item privilege.

Parameters:
workItemId - the identifier of the work item.
Returns:
a list of Task objects.
Throws:
WorkItemNotFoundException - thrown if the work item does not exist.

getCompletedTasksForWorkItem

List<CompletedTask> getCompletedTasksForWorkItem(String workItemId)
                                                 throws WorkItemNotFoundException
Get all completed tasks for a work item. Requires the current to have read access to the context and one of the following: work item ownership, Manage Work Item privilege, or Administer Work Item privilege.

Parameters:
workItemId - the identifier of the work item.
Returns:
a list of CompletedTask objects.
Throws:
WorkItemNotFoundException - thrown if the work item does not exist.

getAttachmentsForWorkItem

List<RepositoryFile> getAttachmentsForWorkItem(String workItemId)
                                               throws WorkItemNotFoundException
Get all attachments associated with a work item. Requires the current user to have read access to the context and one of the following privileges: Create Work Item, Manage Work Items, or Administer Work Items.

Parameters:
workItemId - the identifier of the work item.
Returns:
a list of RepositoryFile objects representing the attachments.
Throws:
WorkItemNotFoundException - thrown if the work item does not exist.


Copyright (c) 2014, SAS Institute Inc., Cary, NC, USA