1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.core.assignment.service;
17
18 import java.util.*;
19
20 import org.joda.time.LocalDate;
21 import org.kuali.kpme.core.assignment.Assignment;
22 import org.kuali.kpme.core.assignment.AssignmentDescriptionKey;
23 import org.kuali.kpme.core.calendar.entry.CalendarEntry;
24 import org.springframework.cache.annotation.Cacheable;
25
26 public interface AssignmentService {
27
28
29
30
31
32
33 @Cacheable(value= Assignment.CACHE_NAME, key="'principalId=' + #p0 + '|' + 'asOfDate=' + #p1")
34 public List<Assignment> getAssignments(String principalId, LocalDate asOfDate);
35
36
37
38
39
40
41 @Cacheable(value= Assignment.CACHE_NAME, key="'tkAssignmentId=' + #p0")
42 public Assignment getAssignment(String tkAssignmentId);
43
44
45
46
47
48 public AssignmentDescriptionKey getAssignmentDescriptionKey(String assignmentDesc);
49
50
51
52
53
54 public Map<String,String> getAssignmentDescriptions(Assignment assignment);
55
56
57
58
59
60
61 @Cacheable(value= Assignment.CACHE_NAME, key="'workArea=' + #p0 + '|' + 'asOfDate=' + #p1")
62 public List<Assignment> getActiveAssignmentsForWorkArea(Long workArea, LocalDate asOfDate);
63
64 @Cacheable(value= Assignment.CACHE_NAME, key="'{getPrincipalIdsInActiveAssigmentsForWorkArea}' + 'workArea=' + #p0 + '|' + 'asOfDate=' + #p1")
65 public List<String> getPrincipalIdsInActiveAssignmentsForWorkArea(Long workArea, LocalDate asOfDate);
66
67 @Cacheable(value= Assignment.CACHE_NAME, key="'{getPrincipalIdsInActiveAssigmentsForWorkAreas}' + 'workAreas=' + T(org.kuali.rice.core.api.cache.CacheKeyUtils).key(#p0) + '|' + 'asOfDate=' + #p1")
68 public List<String> getPrincipalIdsInActiveAssignmentsForWorkAreas(List<Long> workAreas, LocalDate asOfDate);
69
70
71
72
73
74
75
76
77 @Cacheable(value= Assignment.CACHE_NAME, key="'asOfDate=' + #p0")
78 public List<Assignment> getActiveAssignments(LocalDate asOfDate);
79
80
81
82
83
84
85
86 public Assignment getAssignmentForTargetPrincipal(AssignmentDescriptionKey key, LocalDate asOfDate);
87
88
89
90
91
92
93
94
95
96 public Assignment getAssignment(String principalId, AssignmentDescriptionKey key, LocalDate asOfDate);
97
98
99
100
101
102
103
104 @Cacheable(value= Assignment.CACHE_NAME, key="'{getAssignmentsByPayEntry}' + 'principalId=' + #p0 + '|' + 'payCalendarEntry=' + #p1.getHrCalendarEntryId()")
105 public List<Assignment> getAssignmentsByPayEntry(String principalId, CalendarEntry payCalendarEntry);
106
107
108
109
110
111
112 @Cacheable(value= Assignment.CACHE_NAME, key="'{getAssignmentsByCalEntryForTimeCalendar}' + 'principalId=' + #p0 + '|' + 'payCalendarEntry=' + #p1.getHrCalendarEntryId()")
113 public List<Assignment> getAssignmentsByCalEntryForTimeCalendar(String principalId, CalendarEntry calendarEntry);
114
115
116
117
118
119
120 @Cacheable(value= Assignment.CACHE_NAME, key="'{getAssignmentsByCalEntryForLeaveCalendar}' + 'principalId=' + #p0 + '|' + 'payCalendarEntry=' + #p1.getHrCalendarEntryId()")
121 public List<Assignment> getAssignmentsByCalEntryForLeaveCalendar(String principalId, CalendarEntry calendarEntry);
122
123
124
125
126
127
128
129
130
131 @Cacheable(value= Assignment.CACHE_NAME, key="'principalId=' + #p0 + '|' + 'jobNumber=' + #p1 + '|' + 'asOfDate=' + #p2")
132 public List<Assignment> getActiveAssignmentsForJob(String principalId, Long jobNumber, LocalDate asOfDate);
133
134 List<Assignment> searchAssignments(String userPrincipalId, LocalDate fromEffdt, LocalDate toEffdt, String principalId, String jobNumber,
135 String dept, String workArea, String active, String showHistory);
136
137
138
139
140
141
142
143 public Map<String, String> getAssignmentDescriptionsForAssignments(List<Assignment> assignments);
144
145 public Assignment getAssignment(List<Assignment> assignments, String assignmentKey, LocalDate beginDate);
146
147 public Assignment getMaxTimestampAssignment(String principalId);
148
149
150
151
152
153
154
155
156 public List<Assignment> filterAssignments(List<Assignment> assignments, String flsaStatus, boolean chkForLeaveEligible);
157
158
159
160
161
162
163
164
165
166 public List<String> getPrincipalIds(List<String> workAreaList, LocalDate effdt, LocalDate startDate, LocalDate endDate);
167
168 public List<Assignment> getAssignments(List<String> workAreaList, LocalDate effdt, LocalDate startDate, LocalDate endDate);
169
170 public String getAssignmentDescription(String principalId, Long jobNumber, Long workArea, Long task, LocalDate asOfDate);
171
172 @Cacheable(value= Assignment.CACHE_NAME, key="'principalId=' + #p0 + '|' + 'beginDate=' + #p1 + '|' + 'endDate=' + #p2")
173 public Map<LocalDate, List<Assignment>> getAssignmentHistoryBetweenDays(String principalId, LocalDate beginDate, LocalDate endDate);
174
175 public List<Assignment> filterAssignmentListForUser(String userPrincipalId, List<Assignment> assignments);
176
177 public List<Assignment> getRecentAssignments(String principalId);
178
179 public List<Assignment> getRecentAssignments(String principalId, LocalDate startDate, LocalDate endDate);
180 }