Package com.xwiki.projectmanagement
Interface ProjectManagementClient
@Role
public interface ProjectManagementClient
The blueprint for a project management client. A client is responsible with providing the CRUD operations over the
work items of a specific project management platform.
- Since:
- 1.0
- Version:
- $Id$
-
Method Summary
Modifier and TypeMethodDescriptioncreateWorkItem(WorkItem workItem) Creates a work item.booleandeleteWorkItem(String workItemId) Deletes a work item.getWorkItem(String workItemId) Retrieve a work item identified by an id specific to the implemented project management platform.getWorkItems(int page, int pageSize, List<org.xwiki.livedata.LiveDataQuery.Filter> filters, List<org.xwiki.livedata.LiveDataQuery.SortEntry> sortEntries) Retrieve a list of work items based on a list of filters.updateWorkItem(WorkItem workItem) Updates an existing work item.
-
Method Details
-
getWorkItem
Retrieve a work item identified by an id specific to the implemented project management platform.- Parameters:
workItemId- the id of the work item that needs retrieval.- Returns:
- the work item that matches the passed id.
- Throws:
WorkItemNotFoundException- if the work item has not been found.
-
getWorkItems
PaginatedResult<WorkItem> getWorkItems(int page, int pageSize, List<org.xwiki.livedata.LiveDataQuery.Filter> filters, List<org.xwiki.livedata.LiveDataQuery.SortEntry> sortEntries) throws WorkItemRetrievalException Retrieve a list of work items based on a list of filters.- Parameters:
page- the number identifying the page that needs to be retrieved.pageSize- the maximum number of items that can be present in the returned result.filters- a list of filters that the returned items need to match.sortEntries- a list ofLiveDataQuery.SortEntryobjects that denote how the results should be sorted.- Returns:
- a paginated result containing the items matching the list of filters.
- Throws:
WorkItemRetrievalException- if there was any exception during the retrieval of the work item.
-
createWorkItem
Creates a work item.- Parameters:
workItem- the work item that needs to be created.- Returns:
- the created work item.
- Throws:
WorkItemCreationException- if there was an exception while creating the work item.
-
updateWorkItem
Updates an existing work item.- Parameters:
workItem- the new state of the work item that will be updated.- Returns:
- the updated work item.
- Throws:
WorkItemUpdatingException- if there was an exception while updating the work item, such as the work item not existing.
-
deleteWorkItem
Deletes a work item.- Parameters:
workItemId- the id of the work item that needs deletion.- Returns:
- true if the work item was deleted, false otherwise.
- Throws:
WorkItemDeletionException- if there was exception while deleting the work item, such as the item not existing.
-