001/**
002 * Copyright 2004-2014 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.kpme.tklm.api.leave.approval;
017
018import org.joda.time.LocalDateTime;
019import org.kuali.kpme.tklm.api.leave.block.LeaveBlockContract;
020import org.kuali.rice.kew.api.note.Note;
021
022import java.math.BigDecimal;
023import java.util.List;
024import java.util.Map;
025
026/**
027 * <p>ApprovalLeaveSummaryRowContract interface</p>
028 *
029 */
030public interface ApprovalLeaveSummaryRowContract extends Comparable<ApprovalLeaveSummaryRowContract>{
031   
032        /**
033         * Indicates if this record is ready to be approved.
034         * 
035         * <p>
036         * Is this record ready to be approved?
037         * <p>
038         * 
039         * @return true if a valid TK_APPROVER / TK_PROCESSOR can approve, false otherwise.
040         */
041    public boolean isApprovable();
042
043        /**
044         * The name associated with the ApprovalLeaveSummaryRow
045         * 
046         * <p>
047         * name of an ApprovalLeaveSummaryRow
048         * <p>
049         * 
050         * @return name for ApprovalLeaveSummaryRow
051         */
052        public String getName();
053        
054        /**
055         * The principalId associated with the ApprovalLeaveSummaryRow
056         * 
057         * <p>
058         * principalId of an ApprovalLeaveSummaryRow
059         * <p>
060         * 
061         * @return principalId for ApprovalLeaveSummaryRow
062         */
063        public String getPrincipalId();
064        
065        /**
066         * TODO: Make sure this comment is right
067         * The URL parameters associated with the ApprovalLeaveSummaryRow
068         * 
069         * <p>
070         * Helper method to grab the URL parameters for setting target mode for a
071     * user/documentID leave summary.
072         * <p>
073         * 
074         * @return parameter portion of a URL, usable to initiate target mode.
075         */
076    public String getUserTargetURLParams();
077
078    /**
079         * The list of LeaveBlock objects associated with the ApprovalLeaveSummaryRow
080         * 
081         * <p>
082         * leaveBlockList of an ApprovalLeaveSummaryRow
083         * <p>
084         * 
085         * @return leaveBlockList for ApprovalLeaveSummaryRow
086         */
087        public List<? extends LeaveBlockContract> getLeaveBlockList();
088        
089        /**
090         * The documentId associated with the ApprovalLeaveSummaryRow
091         * 
092         * <p>
093         * documentId of an ApprovalLeaveSummaryRow
094         * <p>
095         * 
096         * @return documentId for ApprovalLeaveSummaryRow
097         */
098        public String getDocumentId();
099
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<LocalDateTime, 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     * Set color associated with the ApprovalLeaveSummaryRow
204     *
205     * <p>
206     * color of an ApprovalLeaveSummaryRow
207     * <p>
208     *
209     * @return color for ApprovalLeaveSummaryRow
210     */
211    public void setColor(String color);
212        
213        /**
214         * The map of role names associated with the ApprovalLeaveSummaryRow
215         * 
216         * <p>
217         * roleNames of an ApprovalLeaveSummaryRow
218         * <p>
219         * 
220         * @return roleNames for ApprovalLeaveSummaryRow
221         */
222    public Map<String, String> getRoleNames();
223    
224    /**
225         * The role name of the principalId associated with the ApprovalLeaveSummaryRow
226         * 
227         * <p>
228         * role name of the principalId of an ApprovalLeaveSummaryRow
229         * <p>
230         * 
231         * @return getRoleNames().get(HrContext.getPrincipalId()) for ApprovalLeaveSummaryRow
232         */
233    public String getRoleName();
234
235}