Interface TaskManager


@Role @Unstable public interface TaskManager
This class provides access to different methods that will ease the handling of tasks.
Since:
3.0
Version:
$Id$
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deleteTasksByOwner(org.xwiki.model.reference.DocumentReference documentReference)
    Delete the tasks that have a certain page as an owner.
    getTask(int id)
     
    getTask(org.xwiki.model.reference.DocumentReference reference)
     
    getTask(org.xwiki.model.reference.EntityReference reference)
     
  • Method Details

    • getTask

      Task getTask(org.xwiki.model.reference.DocumentReference reference) throws TaskException
      Parameters:
      reference - the reference of a page that contains a Task Object.
      Returns:
      the Task Model of the object inside the page.
      Throws:
      TaskException - if the page does not have a task.
    • getTask

      Task getTask(org.xwiki.model.reference.EntityReference reference) throws TaskException
      Parameters:
      reference - the reference of a page that contains a Task Object.
      Returns:
      the Task Model of the object inside the page.
      Throws:
      TaskException - if the page does not have a task.
      Since:
      3.3
    • getTask

      Task getTask(int id) throws TaskException
      Parameters:
      id - the ID of the task.
      Returns:
      the Task Model of the object inside the page that has the same ID as the one specified.
      Throws:
      TaskException - if there is no task with the given id.
    • deleteTasksByOwner

      void deleteTasksByOwner(org.xwiki.model.reference.DocumentReference documentReference) throws TaskException
      Delete the tasks that have a certain page as an owner.
      Parameters:
      documentReference - the value by which we want to remove a task.
      Throws:
      TaskException - when there was an error in retrieving or deleting certain task documents.