1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.lm.leavecalendar.web;
17
18 import org.apache.struts.action.ActionMapping;
19 import org.joda.time.DateTime;
20 import org.joda.time.format.DateTimeFormat;
21 import org.joda.time.format.DateTimeFormatter;
22 import org.kuali.hr.lm.balancetransfer.BalanceTransfer;
23 import org.kuali.hr.lm.leaveSummary.LeaveSummary;
24 import org.kuali.hr.lm.leavecalendar.LeaveCalendarDocument;
25 import org.kuali.hr.time.base.web.TkCommonCalendarForm;
26 import org.kuali.hr.time.calendar.CalendarEntries;
27 import org.kuali.hr.time.calendar.LeaveCalendar;
28
29 import javax.servlet.http.HttpServletRequest;
30 import java.math.BigDecimal;
31 import java.util.LinkedHashMap;
32 import java.util.List;
33 import java.util.Map;
34
35 @SuppressWarnings("serial")
36 public class LeaveCalendarForm extends TkCommonCalendarForm {
37
38 private static final DateTimeFormatter SDF_NO_TZ = DateTimeFormat.forPattern("EEE MMM d HH:mm:ss yyyy");
39
40 private String documentId;
41 private LeaveCalendar leaveCalendar;
42 private LeaveCalendarDocument leaveCalendarDocument;
43 CalendarEntries calendarEntry;
44 private String startDate;
45 private String endDate;
46 private String selectedEarnCode;
47 private Map<String, String> leaveCodeList = new LinkedHashMap<String, String>();
48 private BigDecimal leaveAmount;
49 private String description;
50 private String leaveBlockId;
51 private String prevDocumentId;
52 private String nextDocumentId;
53 private String prevCalEntryId;
54 private String nextCalEntryId;
55 private String calEntryId;
56
57 private Map<String,String> assignmentDescriptions;
58 private String selectedAssignment;
59 private String spanningWeeks;
60 private String leaveBlockString;
61 private boolean isDocEditable;
62 private String currentPayCalStartDate;
63 private String currentPayCalEndDate;
64 private DateTime currentPayCalStart;
65 private DateTime currentPayCalEnd;
66 private LeaveSummary leaveSummary;
67 private boolean leavePlanningCalendar;
68 private List<BalanceTransfer> forfeitures;
69
70 public DateTime getCurrentPayCalStart() {
71 return currentPayCalStart;
72 }
73
74 public void setCurrentPayCalStart(DateTime currentPayCalStart) {
75 this.currentPayCalStart = currentPayCalStart;
76 }
77
78 public DateTime getCurrentPayCalEnd() {
79 return currentPayCalEnd;
80 }
81
82 public void setCurrentPayCalEnd(DateTime currentPayCalEnd) {
83 this.currentPayCalEnd = currentPayCalEnd;
84 }
85
86 public String getCurrentPayCalStartDate() {
87 if(currentPayCalStart != null) {
88 return this.currentPayCalStart.toString(SDF_NO_TZ);
89 } else {
90 return null;
91 }
92 }
93
94 public void setCurrentPayCalStartDate(String currentPayCalStartDate) {
95 this.currentPayCalStartDate = currentPayCalStartDate;
96 }
97
98 public String getCurrentPayCalEndDate() {
99 if(currentPayCalEnd != null) {
100 return this.currentPayCalEnd.toString(SDF_NO_TZ);
101 } else {
102 return null;
103 }
104 }
105
106 public void setCurrentPayCalEndDate(String currentPayCalEndDate) {
107 this.currentPayCalEndDate = currentPayCalEndDate;
108 }
109
110 public boolean isDocEditable() {
111 return isDocEditable;
112 }
113
114 public void setDocEditable(boolean isDocEditable) {
115 this.isDocEditable = isDocEditable;
116 }
117
118 public boolean isLeavePlanningCalendar() {
119 return leavePlanningCalendar;
120 }
121
122 public void setLeavePlanningCalendar(boolean leavePlanningCalendar) {
123 this.leavePlanningCalendar = leavePlanningCalendar;
124 }
125
126 public String getLeaveBlockString() {
127 return leaveBlockString;
128 }
129
130 public void setLeaveBlockString(String leaveBlockString) {
131 this.leaveBlockString = leaveBlockString;
132 }
133
134 public String getSpanningWeeks() {
135 return spanningWeeks;
136 }
137
138 public void setSpanningWeeks(String spanningWeeks) {
139 this.spanningWeeks = spanningWeeks;
140 }
141
142 public String getSelectedAssignment() {
143 return selectedAssignment;
144 }
145
146 public void setSelectedAssignment(String selectedAssignment) {
147 this.selectedAssignment = selectedAssignment;
148 }
149
150 public Map<String, String> getAssignmentDescriptions() {
151 return assignmentDescriptions;
152 }
153
154 public void setAssignmentDescriptions(Map<String, String> assignmentDescriptions) {
155 this.assignmentDescriptions = assignmentDescriptions;
156 }
157
158 public String getPrevCalEntryId() {
159 return prevCalEntryId;
160 }
161
162 public void setPrevCalEntryId(String prevCalEntryId) {
163 this.prevCalEntryId = prevCalEntryId;
164 }
165
166 public String getNextCalEntryId() {
167 return nextCalEntryId;
168 }
169
170 public void setNextCalEntryId(String nextCalEntryId) {
171 this.nextCalEntryId = nextCalEntryId;
172 }
173
174 public String getCalEntryId() {
175 return calEntryId;
176 }
177
178 public void setCalEntryId(String calEntryId) {
179 this.calEntryId = calEntryId;
180 }
181
182 @Override
183 public void reset(ActionMapping mapping, HttpServletRequest request) {
184 super.reset(mapping, request);
185 }
186
187 public LeaveCalendar getLeaveCalendar() {
188 return leaveCalendar;
189 }
190
191 public void setLeaveCalendar(LeaveCalendar leaveCalendar) {
192 this.leaveCalendar = leaveCalendar;
193 }
194
195 public String getDocumentId() {
196 return documentId;
197 }
198
199 public void setDocumentId(String documentId) {
200 this.documentId = documentId;
201 }
202
203 public CalendarEntries getCalendarEntry() {
204 return calendarEntry;
205 }
206
207 public void setCalendarEntry(CalendarEntries calendarEntry) {
208 this.calendarEntry = calendarEntry;
209 }
210
211 public LeaveCalendarDocument getLeaveCalendarDocument() {
212 return leaveCalendarDocument;
213 }
214
215 public void setLeaveCalendarDocument(LeaveCalendarDocument leaveCalendarDocument) {
216 this.leaveCalendarDocument = leaveCalendarDocument;
217 }
218
219 public String getStartDate() {
220 return startDate;
221 }
222
223 public void setStartDate(String startDate) {
224 this.startDate = startDate;
225 }
226
227 public String getEndDate() {
228 return endDate;
229 }
230
231 public void setEndDate(String endDate) {
232 this.endDate = endDate;
233 }
234
235 public BigDecimal getLeaveAmount() {
236 return leaveAmount;
237 }
238
239 public void setLeaveAmount(BigDecimal leaveAmount) {
240 this.leaveAmount = leaveAmount;
241 }
242
243 public String getDescription() {
244 return description;
245 }
246
247 public void setDescription(String description) {
248 this.description = description;
249 }
250
251 public Map<String, String> getLeaveCodeList() {
252 return leaveCodeList;
253 }
254
255 public void setLeaveCodeList(Map<String, String> leaveCodeList) {
256 this.leaveCodeList = leaveCodeList;
257 }
258
259 public String getLeaveBlockId() {
260 return leaveBlockId;
261 }
262
263 public void setLeaveBlockId(String leaveBlockId) {
264 this.leaveBlockId = leaveBlockId;
265 }
266
267 public String getNextDocumentId() {
268 return nextDocumentId;
269 }
270
271 public void setNextDocumentId(String nextDocumentId) {
272 this.nextDocumentId = nextDocumentId;
273 }
274
275 public String getPrevDocumentId() {
276 return prevDocumentId;
277 }
278
279 public void setPrevDocumentId(String prevDocumentId) {
280 this.prevDocumentId = prevDocumentId;
281 }
282
283 public String getBeginPeriodDateTime() {
284 return leaveCalendar.getBeginDateTime().toString(SDF_NO_TZ);
285 }
286
287 public String getEndPeriodDateTime() {
288 return leaveCalendar.getEndDateTime().toString(SDF_NO_TZ);
289 }
290
291 public String getSelectedEarnCode() {
292 return selectedEarnCode;
293 }
294
295 public void setSelectedEarnCode(String selectedEarnCode) {
296 this.selectedEarnCode = selectedEarnCode;
297 }
298
299 public LeaveSummary getLeaveSummary() {
300 return leaveSummary;
301 }
302
303 public void setLeaveSummary(LeaveSummary leaveSummary) {
304 this.leaveSummary = leaveSummary;
305 }
306
307 public List<BalanceTransfer> getForfeitures() {
308 return forfeitures;
309 }
310
311 public void setForfeitures(List<BalanceTransfer> forfeitures) {
312 this.forfeitures = forfeitures;
313 }
314 }