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.approval.web;
17
18 import java.math.BigDecimal;
19 import java.util.Date;
20 import java.util.List;
21 import java.util.Map;
22
23 import org.kuali.kpme.tklm.api.leave.block.LeaveBlockContract;
24 import org.kuali.rice.kew.api.note.Note;
25
26 /**
27 * <p>ApprovalLeaveSummaryRowContract interface</p>
28 *
29 */
30 public interface ApprovalLeaveSummaryRowContract {
31
32 /**
33 * Indicates if this record is ready to be approved.
34 *
35 * <p>
36 * Is this record ready to be approved?
37 * <p>
38 *
39 * @return true if a valid TK_APPROVER / TK_PROCESSOR can approve, false otherwise.
40 */
41 public boolean isApprovable();
42
43 /**
44 * The name associated with the ApprovalLeaveSummaryRow
45 *
46 * <p>
47 * name of an ApprovalLeaveSummaryRow
48 * <p>
49 *
50 * @return name for ApprovalLeaveSummaryRow
51 */
52 public String getName();
53
54 /**
55 * The principalId associated with the ApprovalLeaveSummaryRow
56 *
57 * <p>
58 * principalId of an ApprovalLeaveSummaryRow
59 * <p>
60 *
61 * @return principalId for ApprovalLeaveSummaryRow
62 */
63 public String getPrincipalId();
64
65 /**
66 * TODO: Make sure this comment is right
67 * The URL parameters associated with the ApprovalLeaveSummaryRow
68 *
69 * <p>
70 * Helper method to grab the URL parameters for setting target mode for a
71 * user/documentID leave summary.
72 * <p>
73 *
74 * @return parameter portion of a URL, usable to initiate target mode.
75 */
76 public String getUserTargetURLParams();
77
78 /**
79 * The list of LeaveBlock objects associated with the ApprovalLeaveSummaryRow
80 *
81 * <p>
82 * leaveBlockList of an ApprovalLeaveSummaryRow
83 * <p>
84 *
85 * @return leaveBlockList for ApprovalLeaveSummaryRow
86 */
87 public List<? extends LeaveBlockContract> getLeaveBlockList();
88
89 /**
90 * The documentId associated with the ApprovalLeaveSummaryRow
91 *
92 * <p>
93 * documentId of an ApprovalLeaveSummaryRow
94 * <p>
95 *
96 * @return documentId for ApprovalLeaveSummaryRow
97 */
98 public String getDocumentId();
99
100 /**
101 * The list of warnings associated with the ApprovalLeaveSummaryRow
102 *
103 * <p>
104 * warnings of an ApprovalLeaveSummaryRow
105 * <p>
106 *
107 * @return warnings for ApprovalLeaveSummaryRow
108 */
109 public List<String> getWarnings();
110
111 /**
112 * TODO: Put a better comment
113 * The selected associated with the ApprovalLeaveSummaryRow
114 *
115 * <p>
116 * selected of an ApprovalLeaveSummaryRow
117 * <p>
118 *
119 * @return selected for ApprovalLeaveSummaryRow
120 */
121 public String getSelected();
122
123 /**
124 * The list of notes associated with the ApprovalLeaveSummaryRow
125 *
126 * <p>
127 * notes of an ApprovalLeaveSummaryRow
128 * <p>
129 *
130 * @return notes for ApprovalLeaveSummaryRow
131 */
132 public List<Note> getNotes();
133
134 /**
135 * The lastApproveMessage associated with the ApprovalLeaveSummaryRow
136 *
137 * <p>
138 * lastApproveMessage of an ApprovalLeaveSummaryRow
139 * <p>
140 *
141 * @return lastApproveMessage for ApprovalLeaveSummaryRow
142 */
143 public String getLastApproveMessage();
144
145 /**
146 * The approvalStatus associated with the ApprovalLeaveSummaryRow
147 *
148 * <p>
149 * approvalStatus of an ApprovalLeaveSummaryRow
150 * <p>
151 *
152 * @return approvalStatus for ApprovalLeaveSummaryRow
153 */
154 public String getApprovalStatus();
155
156 /**
157 * The map of earn code leave hours associated with the ApprovalLeaveSummaryRow
158 *
159 * <p>
160 * earnCodeLeaveHours of an ApprovalLeaveSummaryRow
161 * <p>
162 *
163 * @return earnCodeLeaveHours for ApprovalLeaveSummaryRow
164 */
165 public Map<Date, Map<String, BigDecimal>> getEarnCodeLeaveHours();
166
167 /**
168 * TODO: Is this field needed?
169 * The moreThanOneCalendar flag of the ApprovalTimeSummaryRow
170 *
171 * <p>
172 * moreThanOneCalendar flag of an ApprovalTimeSummaryRow
173 * <p>
174 *
175 * @return moreThanOneCalendar flag for an ApprovalTimeSummaryRow
176 */
177 public Boolean getMoreThanOneCalendar();
178
179 /**
180 * TODO: Is this field needed?
181 * The exemptEmployee flag of the ApprovalTimeSummaryRow
182 *
183 * <p>
184 * exemptEmployee flag of an ApprovalTimeSummaryRow
185 * <p>
186 *
187 * @return moreThaexemptEmployeenOneCalendar flag for an ApprovalTimeSummaryRow
188 */
189 public Boolean getExemptEmployee();
190
191 /**
192 * The color associated with the ApprovalLeaveSummaryRow
193 *
194 * <p>
195 * color of an ApprovalLeaveSummaryRow
196 * <p>
197 *
198 * @return color for ApprovalLeaveSummaryRow
199 */
200 public String getColor();
201
202 /**
203 * The map of role names associated with the ApprovalLeaveSummaryRow
204 *
205 * <p>
206 * roleNames of an ApprovalLeaveSummaryRow
207 * <p>
208 *
209 * @return roleNames for ApprovalLeaveSummaryRow
210 */
211 public Map<String, String> getRoleNames();
212
213 /**
214 * The role name of the principalId associated with the ApprovalLeaveSummaryRow
215 *
216 * <p>
217 * role name of the principalId of an ApprovalLeaveSummaryRow
218 * <p>
219 *
220 * @return getRoleNames().get(HrContext.getPrincipalId()) for ApprovalLeaveSummaryRow
221 */
222 public String getRoleName();
223
224 }