Class Task


  • @Unstable
    public class Task
    extends Object
    The model of a Task.
    Since:
    3.0
    Version:
    $Id$
    • Constructor Detail

      • Task

        public Task()
        Default constructor.
      • Task

        public Task​(org.xwiki.model.reference.DocumentReference documentReference)
        Parameters:
        documentReference - the reference to this Task.
    • Method Detail

      • getOwner

        public org.xwiki.model.reference.DocumentReference getOwner()
        Returns:
        the reference of the document where this task resides.
      • setOwner

        public void setOwner​(org.xwiki.model.reference.DocumentReference owner)
        Parameters:
        owner - the reference of the document that contains this task.
      • getReference

        public org.xwiki.model.reference.DocumentReference getReference()
        Returns:
        a unique identifier for the task within the document.
      • setReference

        public void setReference​(org.xwiki.model.reference.DocumentReference reference)
        Parameters:
        reference - the Id of the task. Grouping the tasks by the document reference, their Ids have to be unique.
      • getStatus

        public String getStatus()
        Returns:
        whether the task has been completed or not.
      • setStatus

        public void setStatus​(String status)
        Parameters:
        status - the current state of the task - true: the task is completed; false: the task is not done.
      • getReporter

        public org.xwiki.model.reference.DocumentReference getReporter()
        Returns:
        the reference to the user that created this task.
      • setReporter

        public void setReporter​(org.xwiki.model.reference.DocumentReference reporter)
        Parameters:
        reporter - the reference to the user that created this task.
      • getAssignee

        public org.xwiki.model.reference.DocumentReference getAssignee()
        Returns:
        a list of references to the users that are assigned to this task.
      • setAssignee

        public void setAssignee​(org.xwiki.model.reference.DocumentReference assignee)
        Parameters:
        assignee - a list of references to the users that are assigned to this task.
      • getCreateDate

        public Date getCreateDate()
        Returns:
        the timestamp for the creation of the task.
      • setCreateDate

        public void setCreateDate​(Date createDate)
        Parameters:
        createDate - the moment the task was created.
      • getStartDate

        public Date getStartDate()
        Returns:
        the timestamp for the start of the task.
      • setStartDate

        public void setStartDate​(Date startDate)
        Parameters:
        startDate - the moment the task was started.
      • getDueDate

        public Date getDueDate()
        Returns:
        the deadline of the task.
      • setDuedate

        public void setDuedate​(Date duedate)
        Parameters:
        duedate - the deadline of the task.
      • getCompleteDate

        public Date getCompleteDate()
        Returns:
        the date when the task was marked as completed.
      • setCompleteDate

        public void setCompleteDate​(Date completeDate)
        Parameters:
        completeDate - the date when the task was completed.
      • getName

        public String getName()
        Returns:
        the name/title given to this task.
      • setName

        public void setName​(String name)
        Parameters:
        name - the name/title given to this task.
      • getNumber

        public int getNumber()
        Returns:
        the unique number identifying this Task on the current wiki.
      • setNumber

        public void setNumber​(int number)
        Parameters:
        number - the number that uniquely identifies the task.
      • getProgress

        public int getProgress()
        Returns:
        the progress that was made to a specific task. Value from 0 to 100.
      • setProgress

        public void setProgress​(int progress)
        Parameters:
        progress - see getProgress().
      • getSeverity

        public String getSeverity()
        Returns:
        the severity of the task.
      • setSeverity

        public void setSeverity​(String severity)
        Parameters:
        severity - the severity of the task (Low,Medium,High).
      • getProject

        public String getProject()
        Returns:
        the project the task is a part of.
      • setProject

        public void setProject​(String project)
        Parameters:
        project - the project the task is a part of.