View Javadoc

1   package org.kuali.student.enrollment.class1.timeslot.form;
2   
3   import org.kuali.rice.core.api.util.KeyValue;
4   import org.kuali.student.common.uif.form.KSUifForm;
5   import org.kuali.student.enrollment.class1.timeslot.dto.TimeSlotWrapper;
6   
7   import java.util.ArrayList;
8   import java.util.List;
9   
10  /**
11    * Form for Manage Time Slots.
12    */
13   public class TimeSlotForm extends KSUifForm {
14  
15       /*
16        * A list of Type Slot type KeyValues.
17        */
18       private List<KeyValue> timeSlotTypeKeyValues;
19  
20       //  Term type multi-select list selections.
21       private List<String> termTypeSelections;
22       private List<String> typeNameSelections;
23       private String typeNamesUI;
24  
25       private boolean timeSlotsLoaded = false;
26       private boolean enableAddButton = false;
27  
28       //  Storage for Time Slot search results.
29       private List<TimeSlotWrapper> timeSlotResults;
30  
31      //  Selected Time Slot for deletion.
32      private List<TimeSlotWrapper> selectedTimeSlots;
33      /*
34       These are the properties used at the Add/Edit popup.
35        */
36       private String editTermKey;
37       private String editDays;
38       private String editStartTime;
39       private String editStartTimeAmPm;
40       private String editEndTime;
41       private String editEndTimeAmPm;
42  
43       private String addTermKey;
44       private String addDays;
45       private String addStartTime;
46       private String addStartTimeAmPm;
47       private String addEndTime;
48       private String addEndTimeAmPm;
49  
50       private boolean editInProcess;
51  
52       public TimeSlotForm() {
53           termTypeSelections = new ArrayList<String>();
54           timeSlotResults = new ArrayList<TimeSlotWrapper>();
55           typeNameSelections = new ArrayList<String>();
56           selectedTimeSlots = new  ArrayList<TimeSlotWrapper>();
57       }
58  
59       public List<TimeSlotWrapper> getTimeSlotResults() {
60           return timeSlotResults;
61       }
62  
63       public void setTimeSlotResults(List<TimeSlotWrapper> timeSlotResults) {
64           this.timeSlotResults = timeSlotResults;
65       }
66  
67       public List<String> getTermTypeSelections() {
68           return termTypeSelections;
69       }
70  
71       public void setTermTypeSelections(List<String> termTypeSelections) {
72           this.termTypeSelections = termTypeSelections;
73       }
74  
75       public boolean isTimeSlotsLoaded() {
76           return timeSlotsLoaded;
77       }
78  
79       public void setTimeSlotsLoaded(boolean timeSlotsLoaded) {
80           this.timeSlotsLoaded = timeSlotsLoaded;
81       }
82  
83       public String getAddOrEditTermKey() {
84           if (isEditInProcess()){
85              return getEditTermKey();
86           } else {
87              return getAddTermKey();
88           }
89       }
90  
91       public String getAddOrEditDays() {
92           if (isEditInProcess()){
93              return getEditDays();
94            } else {
95              return getAddDays();
96            }
97       }
98  
99       public String getAddOrEditStartTime() {
100          if (isEditInProcess()){
101             return getEditStartTime();
102           } else {
103              return getAddStartTime();
104           }
105      }
106 
107      public String getAddOrEditStartTimeAmPm() {
108          if (isEditInProcess()){
109             return getEditStartTimeAmPm();
110           } else {
111             return getAddStartTimeAmPm();
112           }
113      }
114 
115      public String getAddOrEditEndTime() {
116          if (isEditInProcess()){
117             return getEditEndTime();
118           } else {
119             return getAddEndTime();
120           }
121      }
122 
123      public String getAddOrEditEndTimeAmPm() {
124          if (isEditInProcess()){
125             return getEditEndTimeAmPm();
126           } else {
127             return getAddEndTimeAmPm();
128           }
129      }
130 
131     public void setAddOrEditTermKey(String termKey) {
132          if (isEditInProcess()){
133             setEditTermKey(termKey);
134          } else {
135             setAddTermKey(termKey);
136          }
137      }
138 
139      public void setAddOrEditDays(String days) {
140          if (isEditInProcess()){
141             setEditDays(days);
142           } else {
143             setAddDays(days);
144           }
145      }
146 
147      public void setAddOrEditStartTime(String startTime) {
148          if (isEditInProcess()){
149             setEditStartTime(startTime);
150           } else {
151              setAddStartTime(startTime);
152           }
153      }
154 
155      public void setAddOrEditStartTimeAmPm(String startTimeAmPm) {
156          if (isEditInProcess()){
157             setEditStartTimeAmPm(startTimeAmPm);
158           } else {
159             setAddStartTimeAmPm(startTimeAmPm);
160           }
161      }
162 
163      public void setAddOrEditEndTime(String endTime) {
164          if (isEditInProcess()){
165             setEditEndTime(endTime);
166           } else {
167             setAddEndTime(endTime);
168           }
169      }
170 
171      public void setAddOrEditEndTimeAmPm(String endTimeAmPm) {
172          if (isEditInProcess()){
173             setEditEndTimeAmPm(endTimeAmPm);
174           } else {
175             setAddEndTimeAmPm(endTimeAmPm);
176           }
177      }
178 
179      public boolean isEnableAddButton() {
180          return enableAddButton;
181      }
182 
183      public void setEnableAddButton(boolean enableAddButton) {
184          this.enableAddButton = enableAddButton;
185      }
186 
187      public List<KeyValue> getTimeSlotTypeKeyValues() {
188          return timeSlotTypeKeyValues;
189      }
190 
191      public void setTimeSlotTypeKeyValues(List<KeyValue> timeslotKeyValues) {
192          this.timeSlotTypeKeyValues = timeslotKeyValues;
193      }
194 
195     public List<String> getTypeNameSelections() {
196         return typeNameSelections;
197     }
198 
199     public void setTypeNameSelections(List<String> typeNameSelections) {
200         this.typeNameSelections = typeNameSelections;
201     }
202 
203     public List<TimeSlotWrapper> getSelectedTimeSlots() {
204         return selectedTimeSlots;
205     }
206 
207     public void setSelectedTimeSlots(List<TimeSlotWrapper> selectedTimeSlots) {
208         this.selectedTimeSlots = selectedTimeSlots;
209     }
210 
211     public String getTypeNamesUI() {
212         return typeNamesUI;
213     }
214 
215     public void setTypeNamesUI(String typeNamesUI) {
216         this.typeNamesUI = typeNamesUI;
217     }
218 
219     public String getEditTermKey() {
220         return editTermKey;
221     }
222 
223     public void setEditTermKey(String editTermKey) {
224         this.editTermKey = editTermKey;
225     }
226 
227     public String getEditDays() {
228         return editDays;
229     }
230 
231     public void setEditDays(String editDays) {
232         this.editDays = editDays;
233     }
234 
235     public String getEditStartTime() {
236         return editStartTime;
237     }
238 
239     public void setEditStartTime(String editStartTime) {
240         this.editStartTime = editStartTime;
241     }
242 
243     public String getEditStartTimeAmPm() {
244         return editStartTimeAmPm;
245     }
246 
247     public void setEditStartTimeAmPm(String editStartTimeAmPm) {
248         this.editStartTimeAmPm = editStartTimeAmPm;
249     }
250 
251     public String getEditEndTime() {
252         return editEndTime;
253     }
254 
255     public void setEditEndTime(String editEndTime) {
256         this.editEndTime = editEndTime;
257     }
258 
259     public String getEditEndTimeAmPm() {
260         return editEndTimeAmPm;
261     }
262 
263     public void setEditEndTimeAmPm(String editEndTimeAmPm) {
264         this.editEndTimeAmPm = editEndTimeAmPm;
265     }
266 
267     public String getAddTermKey() {
268         return addTermKey;
269     }
270 
271     public void setAddTermKey(String addTermKey) {
272         this.addTermKey = addTermKey;
273     }
274 
275     public String getAddDays() {
276         return addDays;
277     }
278 
279     public void setAddDays(String addDays) {
280         this.addDays = addDays;
281     }
282 
283     public String getAddStartTime() {
284         return addStartTime;
285     }
286 
287     public void setAddStartTime(String addStartTime) {
288         this.addStartTime = addStartTime;
289     }
290 
291     public String getAddStartTimeAmPm() {
292         return addStartTimeAmPm;
293     }
294 
295     public void setAddStartTimeAmPm(String addStartTimeAmPm) {
296         this.addStartTimeAmPm = addStartTimeAmPm;
297     }
298 
299     public String getAddEndTime() {
300         return addEndTime;
301     }
302 
303     public void setAddEndTime(String addEndTime) {
304         this.addEndTime = addEndTime;
305     }
306 
307     public String getAddEndTimeAmPm() {
308         return addEndTimeAmPm;
309     }
310 
311     public void setAddEndTimeAmPm(String addEndTimeAmPm) {
312         this.addEndTimeAmPm = addEndTimeAmPm;
313     }
314 
315     public boolean isEditInProcess() {
316         return editInProcess;
317     }
318 
319     public void setEditInProcess(boolean editInProcess) {
320         this.editInProcess = editInProcess;
321     }
322 
323 }