public class CommonVetoable extends Object implements VetoableDataEventListener
Modifier and Type | Field and Description |
---|---|
protected static String |
DUPLICATED_PROJECT_VIOLATION
Duplicated project violation key.
|
protected static String |
DUPLICATED_TASK_VIOLATION
Duplicated task violation key.
|
protected TimerDataManager |
manager
Data manager
|
protected static String |
MERGE_INVALID_TYPES_VIOLATION
Violation if try to merge task and project.
|
protected static String |
MOVE_INVALID_TYPES_VIOLATION
Violation if try to move project into task.
|
Constructor and Description |
---|
CommonVetoable(TimerDataManager manager)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
checkAddProject(TimerProject project)
Check add project.
|
void |
checkAddTask(TimerTask parent,
TimerTask task)
Check add task.
|
void |
checkChangeClosedState(TimerTask task)
Check change task state.
|
void |
checkDeleteProject(TimerProject project)
Check delete project.
|
void |
checkDeleteTask(TimerTask task)
Check delete task.
|
void |
checkMergeTasks(TimerTask destinationTask,
List<TimerTask> otherTasks)
Check merge task.
|
void |
checkModifyProject(TimerProject project)
Check modify project.
|
void |
checkModifyTask(TimerTask task)
Check modify task.
|
void |
checkMoveTask(TimerTask destination,
Collection<TimerTask> tasksToMove)
Check move task.
|
void |
checkSetAnnotation(TimerTask task,
Date date,
String value)
Check update task annotation.
|
void |
checkSetTaskTime(TimerTask task,
Date date,
Long value)
Check update task time.
|
protected boolean |
isSameTaskName(TimerTask task,
List<? extends TimerTask> tasks)
Test if task name is found is tasks list.
|
protected static final String DUPLICATED_PROJECT_VIOLATION
protected static final String DUPLICATED_TASK_VIOLATION
protected static final String MOVE_INVALID_TYPES_VIOLATION
protected static final String MERGE_INVALID_TYPES_VIOLATION
protected TimerDataManager manager
public CommonVetoable(TimerDataManager manager)
manager
- data managerprotected boolean isSameTaskName(TimerTask task, List<? extends TimerTask> tasks)
task
- task to checktasks
- tasks list to search intopublic void checkAddProject(TimerProject project)
VetoableDataEventListener
checkAddProject
in interface VetoableDataEventListener
project
- project to addpublic void checkAddTask(TimerTask parent, TimerTask task)
VetoableDataEventListener
checkAddTask
in interface VetoableDataEventListener
parent
- parent tasktask
- task to addpublic void checkChangeClosedState(TimerTask task)
VetoableDataEventListener
checkChangeClosedState
in interface VetoableDataEventListener
task
- taskpublic void checkDeleteProject(TimerProject project)
VetoableDataEventListener
checkDeleteProject
in interface VetoableDataEventListener
project
- deleted projectpublic void checkDeleteTask(TimerTask task)
VetoableDataEventListener
checkDeleteTask
in interface VetoableDataEventListener
task
- deleted taskpublic void checkModifyProject(TimerProject project)
VetoableDataEventListener
checkModifyProject
in interface VetoableDataEventListener
project
- modified projectpublic void checkModifyTask(TimerTask task)
VetoableDataEventListener
checkModifyTask
in interface VetoableDataEventListener
task
- modified taskpublic void checkMoveTask(TimerTask destination, Collection<TimerTask> tasksToMove)
VetoableDataEventListener
checkMoveTask
in interface VetoableDataEventListener
destination
- task to move totasksToMove
- tasks to movepublic void checkSetAnnotation(TimerTask task, Date date, String value)
VetoableDataEventListener
checkSetAnnotation
in interface VetoableDataEventListener
task
- task to updatedate
- day of changevalue
- new annotationpublic void checkSetTaskTime(TimerTask task, Date date, Long value)
VetoableDataEventListener
checkSetTaskTime
in interface VetoableDataEventListener
task
- task to updatedate
- day of changevalue
- new time in secondspublic void checkMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks)
VetoableDataEventListener
checkMergeTasks
in interface VetoableDataEventListener
destinationTask
- task result of mergeotherTasks
- other task to mergeCopyright © 2007–2013 CodeLutin. All rights reserved.