View Javadoc

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