1 /**
2 * Copyright 2004-2014 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.kpme.tklm.api.leave.block;
17
18 import java.math.BigDecimal;
19 import java.util.Date;
20 import java.util.List;
21
22 import org.joda.time.DateTime;
23 import org.joda.time.LocalDate;
24 import org.kuali.kpme.core.api.accrualcategory.AccrualCategoryContract;
25 import org.kuali.kpme.core.api.accrualcategory.rule.AccrualCategoryRuleContract;
26 import org.kuali.kpme.core.api.block.CalendarBlockContract;
27 import org.kuali.kpme.core.api.mo.UserModified;
28 import org.kuali.rice.core.api.mo.common.GloballyUnique;
29
30
31 /**
32 * <p>LeaveBlockContract interface</p>
33 *
34 */
35 public interface LeaveBlockContract extends CalendarBlockContract, UserModified {
36
37 /**
38 * The AccrualCategoryRuleId associated with the LeaveBlock
39 *
40 * <p>
41 * It gets AccrualCategoryRule based on the AccrualCategory and PrincipalHRAttributes.
42 * <p>
43 *
44 * @return lmAccrualCategoryRuleId if AccrualCategoryRule is not null
45 */
46 public String getAccrualCategoryRuleId();
47
48 /**
49 * The AccrualCategory name associated with the LeaveBlock
50 *
51 * <p>
52 * It gets AccrualCategory based on the principal id and leave local date.
53 * <p>
54 *
55 * @return accrualCategory for LeaveBlock
56 */
57 public String getAccrualCategory();
58
59 /**
60 * The accrualGenerated flag to indicate if the accrual is generated or not
61 *
62 * <p>
63 * accrualGenerated of a LeaveBlock
64 * <p>
65 *
66 * @return Y if accrual is generated, N if not
67 */
68 public Boolean isAccrualGenerated();
69
70 /**
71 * TODO: Put a better comment
72 * The submit flag of the LeaveBlock
73 *
74 * <p>
75 * submit of a LeaveBlock
76 * <p>
77 *
78 * @return Y if submitted, N if not
79 */
80 public boolean isSubmit();
81
82 /**
83 * TODO: What is this used for? Different from lmLeaveBlockId??
84 * The blockId associated with the LeaveBlock
85 *
86 * <p>
87 * blockId of a LeaveBlock
88 * <p>
89 *
90 * @return blockId for LeaveBlock
91 */
92 public Long getBlockId();
93
94 /**
95 * The description associated with the LeaveBlock
96 *
97 * <p>
98 * description of a LeaveBlock
99 * <p>
100 *
101 * @return description for LeaveBlock
102 */
103 public String getDescription();
104
105 /**
106 * The leave date (Date) associated with the LeaveBlock
107 *
108 * <p>
109 * leaveDate of a LeaveBlock
110 * <p>
111 *
112 * @return leaveDate for LeaveBlock
113 */
114 public DateTime getLeaveDateTime();
115
116 /**
117 * The leave date (LocalDate) associated with the LeaveBlock
118 *
119 * <p>
120 * leaveDate of a LeaveBlock
121 * <p>
122 *
123 * @return leaveDate in LocalDate for LeaveBlock
124 */
125 public LocalDate getLeaveLocalDate();
126
127 /**
128 * The scheduleTimeOffId associated with the LeaveBlock
129 *
130 * <p>
131 * scheduleTimeOffId of a LeaveBlock
132 * <p>
133 *
134 * @return scheduleTimeOffId for LeaveBlock
135 */
136 public String getScheduleTimeOffId();
137
138 /**
139 * The requestStatus associated with the LeaveBlock
140 *
141 * <p>
142 * requestStatus of a LeaveBlock
143 * <p>
144 *
145 * @return requestStatus for LeaveBlock
146 */
147 public String getRequestStatus();
148
149 /**
150 * The value of requestStatus associated with the LeaveBlock
151 *
152 * <p>
153 * value of requestStatus of a LeaveBlock
154 * <p>
155 *
156 * @return value for requestStatus in REQUEST_STATUS_STRINGS map if found, "usage" if not found
157 */
158 public String getRequestStatusString();
159
160 /**
161 * The reason associated with the LeaveBlock
162 *
163 * <p>
164 * reason of a LeaveBlock
165 * <p>
166 *
167 * @return reason for LeaveBlock
168 */
169 public String getReason();
170
171 /**
172 * The assignment title associated with the LeaveBlock
173 *
174 * <p>
175 * If the work area associated with the LeaveBlock is not null, it gets its description and its task.
176 * If the task is not null and not the default task, it gets the task description.
177 * <p>
178 *
179 * @return "work area description - task description" for LeaveBlock
180 */
181 public String getAssignmentTitle();
182
183 /**
184 * The calendar id associated with the LeaveBlock
185 *
186 * <p>
187 * calendarId of a LeaveBlock
188 * <p>
189 *
190 * @return calendarId for LeaveBlock
191 */
192 public String getCalendarId();
193
194 /**
195 * The description of the earn code associated with the LeaveBlock
196 *
197 * <p>
198 * earnCodeObj.getDescription() of a LeaveBlock
199 * <p>
200 *
201 * @return earnCodeObj.getDescription() for LeaveBlock
202 */
203 public String getEarnCodeDescription();
204
205 /**
206 * The type of leave block associated with the LeaveBlock
207 *
208 * <p>
209 * leaveBlockType of a LeaveBlock
210 * <p>
211 *
212 * @return leaveBlockType for LeaveBlock
213 */
214 public String getLeaveBlockType();
215
216 /**
217 * Indicates if the principal has a permission to edit a leave block
218 *
219 * <p>
220 * <p>
221 *
222 * @return Y if the principal has a permission to edit a leave block, N if not
223 */
224 //public boolean isEditable();
225
226 /**
227 * Indicates if the principal has a permission to delete the leave block
228 *
229 * <p>
230 * <p>
231 *
232 * @return Y if the principal has a permission to delete the leave block, N if not
233 */
234 //public boolean isDeletable();
235
236 /**
237 * The assignment key associated with the LeaveBlock
238 *
239 * <p>
240 * The key is consisted of job number, work area number, and task number
241 * <p>
242 *
243 * @return assignmentKey for LeaveBlock
244 */
245 public String getAssignmentKey();
246
247 /**
248 * The document status associated with the LeaveBlock
249 *
250 * <p>
251 * documentStatus of a LeaveBlock
252 * <p>
253 *
254 * @return documentStatus for LeaveBlock
255 */
256 public String getDocumentStatus();
257
258 /**
259 * The document id of the leave request associated with the LeaveBlock
260 *
261 * <p>
262 * leaveRequestDocumentId of a LeaveBlock
263 * <p>
264 *
265 * @return leaveRequestDocumentId for LeaveBlock
266 */
267 public String getLeaveRequestDocumentId();
268
269 /**
270 * TODO: Put a better comment
271 * The planning description associated with the LeaveBlock
272 *
273 * <p>
274 * planningDescription of a LeaveBlock
275 * <p>
276 *
277 * @return planningDescription for LeaveBlock
278 */
279 public String getPlanningDescription();
280
281 /**
282 * TODO: Put a better comment
283 * The transactional document id associated with the LeaveBlock
284 *
285 * <p>
286 * transactionalDocId of a LeaveBlock
287 * <p>
288 *
289 * @return transactionalDocId for LeaveBlock
290 */
291 public String getTransactionalDocId();
292
293 /**
294 * The begin timestamp (DateTime) associated with the LeaveBlock
295 *
296 * <p>
297 * beginTimestamp of a LeaveBlock
298 * <p>
299 *
300 * @return beginTimestamp for LeaveBlock
301 */
302 public DateTime getBeginDateTime();
303
304 /**
305 * The end timestamp (DateTime) associated with the LeaveBlock
306 *
307 * <p>
308 * endTimestamp of a LeaveBlock
309 * <p>
310 *
311 * @return endTimestamp for LeaveBlock
312 */
313 public DateTime getEndDateTime();
314
315 /**
316 * The primary key of a LeaveBlock entry saved in a database
317 *
318 * <p>
319 * lmLeaveBlockId of a LeaveBlock
320 * <p>
321 *
322 * @return lmLeaveBlockId for LeaveBlock
323 */
324 public String getLmLeaveBlockId();
325
326 /**
327 * The leave amount associated with the LeaveBlock
328 *
329 * <p>
330 * leaveAmount of a LeaveBlock
331 * <p>
332 *
333 * @return leaveAmount for LeaveBlock
334 */
335 public BigDecimal getLeaveAmount();
336
337 /**
338 * The workArea number associated with the LeaveBlock
339 *
340 * <p>
341 * workArea of a LeaveBlock
342 * <p>
343 *
344 * @return workArea for LeaveBlock
345 */
346 public Long getWorkArea();
347
348 /**
349 * The job number associated with the LeaveBlock
350 *
351 * <p>
352 * jobNumber of a LeaveBlock
353 * <p>
354 *
355 * @return jobNumber for LeaveBlock
356 */
357 public Long getJobNumber();
358
359 /**
360 * The task number associated with the LeaveBlock
361 *
362 * <p>
363 * task of a LeaveBlock
364 * <p>
365 *
366 * @return task for LeaveBlock
367 */
368 public Long getTask();
369
370 /**
371 * The EarnCode name associated with the LeaveBlock
372 *
373 * <p>
374 * earnCode of a LeaveBlock
375 * <p>
376 *
377 * @return earnCode for LeaveBlock
378 */
379 public String getEarnCode();
380
381 /**
382 * The AccrualCategoryRule associated with the LeaveBlock
383 *
384 * <p>
385 * accrualCategroyRule of a LeaveBlock
386 * <p>
387 *
388 * @return accrualCategroyRule for LeaveBlock
389 */
390 public AccrualCategoryRuleContract getAccrualCategoryRule();
391
392 public AccrualCategoryContract getAccrualCategoryObj();
393
394 public DateTime getCreateTime();
395
396 public String getAffectPay();
397 }