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.sql.Timestamp;
20  import java.util.Collection;
21  import java.util.Date;
22  
23  
24  /**
25   * <p>LeaveBlockDisplayContract interface</p>
26   *
27   */
28  public interface LeaveBlockDisplayContract {
29  	
30  	/**
31  	 * The leave date associated with the LeaveBlockDisplay
32  	 * 
33  	 * <p>
34  	 * <p>
35  	 * 
36  	 * @return leaveBlock.getLeaveDate()
37  	 */	
38  	public Date getLeaveDate();
39  	
40  	/**
41  	 * The document id associated with the LeaveBlockDisplay
42  	 * 
43  	 * <p>
44  	 * <p>
45  	 * 
46  	 * @return leaveBlock.getDocumentId()
47  	 */	
48  	public String getDocumentId();
49  	
50  	/**
51  	 * The calendar id associated with the LeaveBlockDisplay
52  	 * 
53  	 * <p>
54  	 * <p>
55  	 * 
56  	 * @return leaveBlock.getCalendarId()
57  	 */	
58  	public String getCalendarId();
59  	
60  	/**
61  	 * The earn code associated with the LeaveBlockDisplay
62  	 * 
63  	 * <p>
64  	 * <p>
65  	 * 
66  	 * @return leaveBlock.getEarnCode()
67  	 */	
68  	public String getEarnCode();
69  	
70  	/**
71  	 * The description associated with the LeaveBlockDisplay
72  	 * 
73  	 * <p>
74  	 * If leaveBlock.getDescription() is null, call private retrieveDescriptionAccordingToLeaveType method
75  	 * <p>
76  	 * 
77  	 * @return leaveBlock.getDescription() if not null
78  	 */	
79  	public String getDescription();
80  	
81  	/**
82  	 * The request status associated with the LeaveBlockDisplay
83  	 * 
84  	 * <p>
85  	 * If leaveBlock.getRequestStatus() is not null, it returns HrConstants.REQUEST_STATUS_STRINGS for the status
86  	 * <p>
87  	 * 
88  	 * @return HrConstants.REQUEST_STATUS_STRINGS for the leave block's request status
89  	 */	
90  	public String getRequestStatus();
91  	
92  	/**
93  	 * The document status associated with the LeaveBlockDisplay
94  	 * 
95  	 * <p>
96  	 * If leaveBlock.getDocumentId() is not null, it gets leave calendar document header based on the document id and
97  	 * returns KewApiConstants.DOCUMENT_STATUSES for the header's document status
98  	 * <p>
99  	 * 
100 	 * @return KewApiConstants.DOCUMENT_STATUSES of the header document
101 	 */	
102 	public String getDocumentStatus();
103 	
104 	/**
105 	 * The leave amount associated with the LeaveBlockDisplay
106 	 * 
107 	 * <p>
108 	 * <p>
109 	 * 
110 	 * @return leaveBlock.getLeaveAmount()
111 	 */	
112 	public BigDecimal getLeaveAmount();
113 	
114 	/**
115 	 * The time stamp associated with the LeaveBlockDisplay
116 	 * 
117 	 * <p>
118 	 * <p>
119 	 * 
120 	 * @return leaveBlock.getTimestamp()
121 	 */	
122 	public Timestamp getTimestamp();
123 	
124 	/**
125 	 * The assignment title associated with the LeaveBlockDisplay
126 	 * 
127 	 * <p>
128 	 * <p>
129 	 * 
130 	 * @return leaveBlock.getAssignmentTitle()
131 	 */	
132 	public String getAssignmentTitle();
133 	
134 	/**
135 	 * The accrual category associated with the LeaveBlockDisplay
136 	 * 
137 	 * <p>
138 	 * <p>
139 	 * 
140 	 * @return leaveBlock.getAccrualCategory()
141 	 */	
142 	public String getAccrualCategory();
143 	
144 	/**
145 	 * The accrual balances associated with the LeaveBlockDisplay
146 	 * 
147 	 * <p>
148 	 * <p>
149 	 * 
150 	 * @return accrualBalances.values();
151 	 */	
152 	public Collection<BigDecimal> getAccrualBalances();
153 
154 	/**
155 	 * The accrual balance associated with the LeaveBlockDisplay
156 	 * 
157 	 * <p>
158 	 * <p>
159 	 * 
160 	 * @param String to retrieve accrual balance from the accrual balances collection
161 	 * @return accrualBalances.get(accrualCategory)
162 	 */	
163 	public BigDecimal getAccrualBalance(String accrualCategory);
164 
165 }