|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.chorem.jtimer.entities.TimerTask
public class TimerTask
Represents a task. This task is cloneable using SerializationUtils (commons-lang).
SerializationUtils
,
Serialized FormField Summary | |
---|---|
protected List<TimerAlert> |
alerts
Task alerts. |
protected SortedMap<Date,Long> |
allDaysAndTimes
Map calendar of day -> time. |
protected SortedMap<Date,String> |
allDaysAnnotations
Map date -> annotation text. |
protected boolean |
closed
Closed task. |
protected Date |
creationDate
Creation date. |
protected String |
name
Task name. |
protected int |
number
Task number. |
protected TimerTask |
parent
Parent Task. |
protected List<TimerTask> |
subTasks
Sub tasks. |
Constructor Summary | |
---|---|
TimerTask()
Constructor. |
|
TimerTask(String name)
Constructor with name. |
Method Summary | |
---|---|
void |
addAlert(TimerAlert alert)
Add alert. |
void |
addAnnotation(Date date,
String note)
Add annotation. |
boolean |
addTask(TimerTask t)
Add task's subtask. |
TimerTask |
clone()
Clone task. |
int |
compareTo(TimerTask o)
|
boolean |
equals(Object o)
|
List<TimerAlert> |
getAlerts()
Get alert list. |
SortedMap<Date,Long> |
getAllDaysAndTimes()
Return all data. |
SortedMap<Date,String> |
getAllDaysAnnotations()
Return all annotation, sorted on date. |
Date |
getCreationDate()
Get task creation date. |
String |
getName()
Get task name. |
int |
getNumber()
Get task number. |
TimerTask |
getParent()
Get parent. |
List<TimerTask> |
getSubTasks()
Get task's subtasks. |
long |
getTime(Date date)
Get time at date. |
boolean |
isClosed()
Get closed task state. |
void |
setAlert(List<TimerAlert> alerts)
Set alert. |
void |
setClosed(boolean closed)
Set closed. |
void |
setCreationDate(Date creationDate)
Set task creation date. |
void |
setName(String name)
Set task name. |
void |
setNumber(int number)
Set task number. |
protected void |
setParent(TimerTask parent)
Set parent. |
void |
setTime(Date date,
Long seconds)
Add time. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int number
protected String name
protected Date creationDate
protected boolean closed
protected TimerTask parent
protected SortedMap<Date,Long> allDaysAndTimes
protected SortedMap<Date,String> allDaysAnnotations
protected List<TimerTask> subTasks
protected List<TimerAlert> alerts
Constructor Detail |
---|
public TimerTask()
public TimerTask(String name)
name
- task nameMethod Detail |
---|
public int getNumber()
public void setNumber(int number)
number
- the number to setpublic String getName()
public void setName(String name)
name
- the name to setpublic Date getCreationDate()
public void setCreationDate(Date creationDate)
creationDate
- creation datepublic boolean isClosed()
public void setClosed(boolean closed)
closed
- closedpublic TimerTask getParent()
protected void setParent(TimerTask parent)
parent
- the parent to setpublic List<TimerTask> getSubTasks()
public boolean addTask(TimerTask t)
t
- the task to add
public void setTime(Date date, Long seconds)
date
- dateseconds
- secondspublic long getTime(Date date)
date
- date
public SortedMap<Date,Long> getAllDaysAndTimes()
public void addAnnotation(Date date, String note)
date
- datenote
- note textpublic SortedMap<Date,String> getAllDaysAnnotations()
public void addAlert(TimerAlert alert)
alert
- public List<TimerAlert> getAlerts()
public void setAlert(List<TimerAlert> alerts)
alerts
- new alerts listpublic String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public TimerTask clone()
clone
in class Object
public int compareTo(TimerTask o)
compareTo
in interface Comparable<TimerTask>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |