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 Detail

      • getWorkItem

        WorkItem getWorkItem​(String workItemId)
                      throws WorkItemNotFoundException
        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 of LiveDataQuery.SortEntry objects 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.
      • updateWorkItem

        WorkItem updateWorkItem​(WorkItem workItem)
                         throws WorkItemUpdatingException
        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

        boolean deleteWorkItem​(String workItemId)
                        throws WorkItemDeletionException
        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.