public class TimerDataManager extends Object
Modifier and Type | Field and Description |
---|---|
protected Collection<DataEventListener> |
dataEventListeners
For change notification
|
protected List<TimerProject> |
projectList
Project list.
|
protected Collection<VetoableDataEventListener> |
vetoableDataEventListeners
For change notification
|
Constructor and Description |
---|
TimerDataManager()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAllProjects(Collection<TimerProject> projects)
Add many projects.
|
void |
addAnnotation(TimerTask task,
Date date,
String annotation)
Add annotation on task for specified calendar, and send event.
|
void |
addDataEventListener(DataEventListener listener)
Add listener.
|
void |
addProject(TimerProject project)
Add single project.
|
void |
addTask(TimerTask parent,
TimerTask task)
Add single task.
|
void |
addVetoableDataEventListener(VetoableDataEventListener listener)
Add vetoable listener.
|
void |
changeProjectCloseState(TimerProject project)
Close project.
|
void |
changeTaskCloseState(TimerTask task)
Close task.
|
void |
changeTaskTime(TimerTask task,
Date date,
long value)
Change time for the given date.
|
void |
deleteProject(TimerProject project)
Delete project.
|
void |
deleteTask(TimerTask task)
Delete task.
|
void |
editProject(TimerProject project,
String newProjectName)
Edit project.
|
void |
editTask(TimerTask task,
String newTaskName)
Edit task.
|
protected TimerTask |
findTask(Collection<? extends TimerTask> tasks,
String[] paths)
Find task in tasks collections.
|
List<TimerProject> |
getProjectsList()
Get projects list.
|
TimerTask |
getTaskForPath(String taskPath)
Return the corresponding task for path.
|
void |
mergeTasks(TimerTask destinationTask,
List<TimerTask> otherTasks)
Merge tasks.
|
protected void |
mergeTwoTasks(TimerTask destinationTask,
TimerTask otherTask)
Merge two task together.
|
void |
modifyAlert(TimerTask task)
Notify alert modification.
|
void |
moveTask(TimerTask destination,
Collection<TimerTask> tasksToMove)
Move task.
|
void |
removeDataEventListener(DataEventListener listener)
Remove listener.
|
void |
removeVetoableDataEventListener(VetoableDataEventListener listener)
Remove vetoable listener.
|
void |
startTask(TimerTask task)
Start task.
|
void |
stopTask(TimerTask task)
Stop task.
|
protected List<TimerProject> projectList
protected Collection<DataEventListener> dataEventListeners
protected Collection<VetoableDataEventListener> vetoableDataEventListeners
public void addDataEventListener(DataEventListener listener)
listener
- listenerpublic void removeDataEventListener(DataEventListener listener)
listener
- listenerpublic void addVetoableDataEventListener(VetoableDataEventListener listener)
listener
- listenerpublic void removeVetoableDataEventListener(VetoableDataEventListener listener)
listener
- listenerpublic void addProject(TimerProject project)
project
- a projectpublic void addTask(TimerTask parent, TimerTask task)
parent
- parent tasktask
- task to addpublic void addAllProjects(Collection<TimerProject> projects)
projects
- project collectionpublic List<TimerProject> getProjectsList()
public void changeTaskTime(TimerTask task, Date date, long value)
task
- the task to change timedate
- date to change timevalue
- new time in mspublic void startTask(TimerTask task)
task
- task to startpublic void stopTask(TimerTask task)
task
- task to stoppublic void deleteTask(TimerTask task)
task
- task to deletepublic void deleteProject(TimerProject project)
project
- project to deletepublic void changeProjectCloseState(TimerProject project)
project
- project to closepublic void changeTaskCloseState(TimerTask task)
task
- task to closepublic void editProject(TimerProject project, String newProjectName)
project
- project to editnewProjectName
- new project namepublic void editTask(TimerTask task, String newTaskName)
task
- task to editnewTaskName
- new task namepublic void moveTask(TimerTask destination, Collection<TimerTask> tasksToMove)
destination
- task to move totasksToMove
- tasks to movepublic void mergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks)
destinationTask
- task where task will be mergedotherTasks
- task to merge in first taskprotected void mergeTwoTasks(TimerTask destinationTask, TimerTask otherTask)
destinationTask
- task where task will be mergedotherTask
- task to merge in first taskpublic void addAnnotation(TimerTask task, Date date, String annotation)
task
- taskdate
- day of annotationannotation
- annotationpublic void modifyAlert(TimerTask task)
task
- task where alert has been modifiedpublic TimerTask getTaskForPath(String taskPath)
taskPath
- task path to findprotected TimerTask findTask(Collection<? extends TimerTask> tasks, String[] paths)
tasks
- task collectionpaths
- task path to findCopyright © 2007–2013 CodeLutin. All rights reserved.