01: package com.technoetic.xplanner.domain.repository;
02:
03: import java.util.Collection;
04: import java.util.Date;
05:
06: /*
07: * A repository that can be used to access collections of tasks
08: * based on certain criteria.
09: *
10: * @author James Beard
11: */
12: public interface TaskRepository extends ObjectRepository {
13:
14: /*
15: * Returns a collection of tasks in current iterations where personId
16: * is the acceptor.
17: *
18: * @param personId the id of the acceptor
19: * @return the collection of tasks
20: */
21: public Collection getCurrentTasksForPerson(int personId);
22:
23: /*
24: * Returns a collection of tasks in current iterations where personId
25: * is the acceptor, and the task has been started.
26: *
27: * @param personId the id of the acceptor
28: * @return the collection of tasks
29: */
30: public Collection getCurrentActiveTasksForPerson(int personId);
31:
32: /*
33: * Filters a collection of tasks for those in current iterations
34: * that have been started.
35: *
36: * Can be used to further filter a cached Collection of all the tasks for
37: * a particular person.
38: *
39: * @param tasks the collection of tasks
40: * @return the filtered collection of tasks
41: */
42: public Collection getCurrentActiveTasks(Collection tasks);
43:
44: /*
45: * Returns a collection of tasks in current iterations where personId
46: * is the acceptor, and the task hasn't been started yet.
47: *
48: * @param personId the id of the acceptor
49: * @return the collection of tasks
50: */
51: public Collection getCurrentPendingTasksForPerson(int personId);
52:
53: /*
54: * Filters a collection of tasks for those in current iterations
55: * that haven't been started yet.
56: *
57: * Can be used to further filter a cached Collection of all the tasks for
58: * a particular person.
59: *
60: * @param tasks the collection of tasks
61: * @return the filtered collection of tasks
62: */
63: public Collection getCurrentPendingTasks(Collection tasks);
64:
65: /*
66: * Returns a collection of tasks in current iterations where personId
67: * is the acceptor, and the task has already been completed.
68: *
69: * @param personId the id of the acceptor
70: * @return the collection of tasks
71: */
72: public Collection getCurrentCompletedTasksForPerson(int personId);
73:
74: /*
75: * Filters a collection of tasks for those in current iterations
76: * that have already been completed.
77: *
78: * Can be used to further filter a cached Collection of all the tasks for
79: * a particular person.
80: *
81: * @param tasks the collection of tasks
82: * @return the filtered collection of tasks
83: */
84: public Collection getCurrentCompletedTasks(Collection tasks);
85:
86: /*
87: * Returns a collection of tasks in future iterations where personId
88: * is the acceptor, and the task has not been completed.
89: *
90: * @param personId the id of the acceptor
91: * @return the collection of tasks
92: */
93: public Collection getFutureTasksForPerson(int personId);
94:
95: public Collection getTaskAcceptorsEmailNotification(Date date);
96:
97: public Collection getProjectLeadsEmailNotification(Date date);
98:
99: }
|