All Implemented Interfaces:
Freezable<Node>

public class Task extends Element
  • Constructor Details

    • Task

      public Task()
  • Method Details

    • freeze

      public Task freeze() throws IllegalStateException
      Specified by:
      freeze in interface Freezable<Node>
      Overrides:
      freeze in class Node
      Throws:
      IllegalStateException - if the task has been setup in an inconsistent state
    • getLabel

      public String getLabel()
      Specified by:
      getLabel in class Node
    • setLabel

      public void setLabel(String label)
    • getDefaultIdPrefix

      protected String getDefaultIdPrefix()
      Specified by:
      getDefaultIdPrefix in class Element
    • getOn

      public UnmodifiableCalendar getOn()
    • setOn

      public void setOn(Calendar on)
    • getRecurring

      public Recurring getRecurring()
    • setRecurring

      public void setRecurring(Recurring recurring)
    • getRecurringDisplay

      public String getRecurringDisplay()
    • getRelative

      public boolean getRelative()
    • setRelative

      public void setRelative(boolean relative)
    • getAssignedTo

      public List<TaskAssignment> getAssignedTo()
      Gets the users the task is assigned to or a single-element list of "Unassigned" if unassigned.
    • getAssignedTo

      public TaskAssignment getAssignedTo(User who)
      Checks if this task is assigned to the given user.
      Returns:
      The assignment or null if not assigned to the given person.
    • addAssignedTo

      public void addAssignedTo(User who, DayDuration after)
    • getPay

      public String getPay()
    • setPay

      public void setPay(String pay)
    • getCost

      public String getCost()
    • setCost

      public void setCost(String cost)
    • getPriorities

      public List<TaskPriority> getPriorities()
      Gets the priorities of the task.
    • addPriority

      public void addPriority(Priority priority, DayDuration after)
    • getPriority

      public Priority getPriority(Calendar from, long now)
      Gets the effective priority, which is the priority with the time best matching the given "now" time.
      Parameters:
      from - the date the priority is being determined from.
      now - the current system timestamp
    • getZeroDayPriority

      public Priority getZeroDayPriority()
      Gets the priority that will be used on the zero day.
    • getDoBefores

      public Set<ElementRef> getDoBefores()
      Gets all the doBefores for this task. It is up to the caller to look-up the referenced elements.
    • addDoBefore

      public void addDoBefore(ElementRef doBefore)
    • getCustomLogs

      public Set<String> getCustomLogs()
    • addCustomLog

      public void addCustomLog(String name)
    • getXmlFile

      public PageRef getXmlFile()
    • setXmlFile

      public void setXmlFile(PageRef xmlFile)
    • getTaskLog

      public TaskLog getTaskLog()