|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.chorem.jtimer.data.CommonVetoable
public class CommonVetoable
Common jtimer vetoable politics. Check that: - a task name doesn't appears twice in the same level. - creation - modification - move
Field Summary | |
---|---|
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 projet |
Constructor Summary | |
---|---|
CommonVetoable(TimerDataManager manager)
Constructor. |
Method Summary | |
---|---|
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 task,
TimerTask taskToMoveTo)
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String DUPLICATED_PROJECT_VIOLATION
protected static final String DUPLICATED_TASK_VIOLATION
protected static final String MERGE_INVALID_TYPES_VIOLATION
protected TimerDataManager manager
Constructor Detail |
---|
public CommonVetoable(TimerDataManager manager)
manager
- data managerMethod Detail |
---|
protected boolean isSameTaskName(TimerTask task, List<? extends TimerTask> tasks)
task
- task to checktasks
- tasks list to search into
public void checkAddProject(TimerProject project)
checkAddProject
in interface VetoableDataEventListener
project
- project to addpublic void checkAddTask(TimerTask parent, TimerTask task)
checkAddTask
in interface VetoableDataEventListener
parent
- parent tasktask
- task to addpublic void checkChangeClosedState(TimerTask task)
checkChangeClosedState
in interface VetoableDataEventListener
task
- taskpublic void checkDeleteProject(TimerProject project)
checkDeleteProject
in interface VetoableDataEventListener
project
- deleted projectpublic void checkDeleteTask(TimerTask task)
checkDeleteTask
in interface VetoableDataEventListener
task
- deleted taskpublic void checkModifyProject(TimerProject project)
checkModifyProject
in interface VetoableDataEventListener
project
- modified projectpublic void checkModifyTask(TimerTask task)
checkModifyTask
in interface VetoableDataEventListener
task
- modified taskpublic void checkMoveTask(TimerTask task, TimerTask taskToMoveTo)
checkMoveTask
in interface VetoableDataEventListener
task
- task to movetaskToMoveTo
- task to move topublic void checkSetAnnotation(TimerTask task, Date date, String value)
checkSetAnnotation
in interface VetoableDataEventListener
task
- task to updatedate
- day of changevalue
- new annotationpublic void checkSetTaskTime(TimerTask task, Date date, Long value)
checkSetTaskTime
in interface VetoableDataEventListener
task
- task to updatedate
- day of changevalue
- new time in secondspublic void checkMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks)
checkMergeTasks
in interface VetoableDataEventListener
destinationTask
- task result of mergeotherTasks
- other task to merge
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |