- java.lang.Object
-
- com.semanticcms.core.model.Node
-
- com.semanticcms.core.model.Element
-
- com.pragmatickm.task.model.Task
-
-
Constructor Summary
Constructors Constructor Description Task()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAssignedTo(User who, DayDuration after)
void
addCustomLog(String name)
void
addDoBefore(ElementRef doBefore)
void
addPriority(Priority priority, DayDuration after)
Task
freeze()
List<TaskAssignment>
getAssignedTo()
Gets the users the task is assigned to or a single-element list of "Unassigned" if unassigned.TaskAssignment
getAssignedTo(User who)
Checks if this task is assigned to the given user.String
getCost()
Set<String>
getCustomLogs()
protected String
getDefaultIdPrefix()
Set<ElementRef>
getDoBefores()
Gets all the doBefores for this task.String
getLabel()
UnmodifiableCalendar
getOn()
String
getPay()
List<TaskPriority>
getPriorities()
Gets the priorities of the task.Priority
getPriority(Calendar from, long now)
Gets the effective priority, which is the priority with the time best matching the given "now" time.Recurring
getRecurring()
String
getRecurringDisplay()
boolean
getRelative()
TaskLog
getTaskLog()
PageRef
getXmlFile()
Priority
getZeroDayPriority()
Gets the priority that will be used on the zero day.void
setCost(String cost)
void
setLabel(String label)
void
setOn(Calendar on)
void
setPay(String pay)
void
setRecurring(Recurring recurring)
void
setRelative(boolean relative)
void
setXmlFile(PageRef xmlFile)
-
Methods inherited from class com.semanticcms.core.model.Element
addChildElement, equals, generateIdPrefix, getElementIdTemplate, getElementRef, getId, getPage, getParentElement, hashCode, isHidden, isValidId, setId
-
Methods inherited from class com.semanticcms.core.model.Node
addPageLink, appendLabel, checkNotFrozen, findChildElement, findChildElement, findTopLevelElements, getBody, getChildElements, getPageLinks, getProperty, requireChildElement, requireChildElement, setBody, setProperty, toString
-
-
-
-
Method Detail
-
freeze
public Task freeze() throws IllegalStateException
-
setLabel
public void setLabel(String label)
-
getDefaultIdPrefix
protected String getDefaultIdPrefix()
- Specified by:
getDefaultIdPrefix
in classElement
-
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)
-
addCustomLog
public void addCustomLog(String name)
-
getXmlFile
public PageRef getXmlFile()
-
setXmlFile
public void setXmlFile(PageRef xmlFile)
-
getTaskLog
public TaskLog getTaskLog()
-
-