1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.student.enrollment.class2.courseoffering.dto;
18
19 import org.apache.commons.lang.StringUtils;
20 import org.kuali.student.enrollment.class2.scheduleofclasses.sort.ComparatorModel;
21 import org.kuali.student.enrollment.courseoffering.dto.ActivityOfferingClusterInfo;
22 import org.kuali.student.enrollment.courseoffering.dto.FormatOfferingInfo;
23 import org.kuali.student.enrollment.courseoffering.dto.RegistrationGroupInfo;
24 import org.kuali.student.r2.common.util.constants.LuiServiceConstants;
25
26 import java.io.Serializable;
27 import java.util.ArrayList;
28 import java.util.List;
29
30
31
32
33
34
35 public class RegistrationGroupWrapper implements Serializable, ComparatorModel {
36
37 private ActivityOfferingClusterInfo aoCluster;
38 private FormatOfferingInfo formatOfferingInfo;
39
40 private RegistrationGroupInfo rgInfo;
41 private String aoActivityCodeText;
42 private String aoStateNameText;
43 private String stateKey;
44 private String aoTypeNameText;
45 private String aoInstructorText;
46 private String aoMaxEnrText;
47 private String rgMaxEnrText;
48 private String aoClusterName;
49 private String aoEditLink;
50 private String startTimeDisplay = "";
51 private String endTimeDisplay = "";
52 private String daysDisplayName = "";
53 private String buildingName = "";
54 private String buildingCode = "";
55 private String roomName = "";
56 private String requisite;
57 private String commonRequisite;
58
59 private List<String> startTime = new ArrayList<String>();
60 private List<String> endTime = new ArrayList<String>();
61 private List<String> weekDays = new ArrayList<String>();
62
63 private List<String> bldgNameList = new ArrayList<String>();
64 private List<String> bldgCodeList = new ArrayList<String>();
65
66 public RegistrationGroupWrapper() {
67 rgInfo = new RegistrationGroupInfo();
68 }
69
70 public RegistrationGroupWrapper(RegistrationGroupInfo info) {
71 rgInfo = info;
72 }
73
74 public ActivityOfferingClusterInfo getAoCluster() {
75 return aoCluster;
76 }
77
78 public void setAoCluster(ActivityOfferingClusterInfo aoCluster) {
79 this.aoCluster = aoCluster;
80 }
81
82 public FormatOfferingInfo getFormatOfferingInfo() {
83 return formatOfferingInfo;
84 }
85
86 public void setFormatOfferingInfo(FormatOfferingInfo formatOfferingInfo) {
87 this.formatOfferingInfo = formatOfferingInfo;
88 }
89
90 public RegistrationGroupInfo getRgInfo() {
91 return rgInfo;
92 }
93
94 public void setRgInfo(RegistrationGroupInfo rgInfo) {
95 this.rgInfo = rgInfo;
96 }
97
98 public String getAoActivityCodeText() {
99 return aoActivityCodeText;
100 }
101
102 public void setAoActivityCodeText(String aoActivityCodeText) {
103 this.aoActivityCodeText = aoActivityCodeText;
104 }
105
106 public String getAoStateNameText() {
107 return aoStateNameText;
108 }
109
110 public void setAoStateNameText(String aoStateNameText) {
111 this.aoStateNameText = aoStateNameText;
112 }
113
114 public String getStateKey() {
115 return stateKey;
116 }
117
118 public void setStateKey(String key, String stateKey) {
119
120 if(key.equalsIgnoreCase(LuiServiceConstants.REGISTRATION_GROUP_INVALID_STATE_KEY)){
121 this.stateKey = "<span class=\"uif-invalid-state\">" + stateKey + "</span>";
122 }else{
123 this.stateKey = stateKey;
124 }
125 }
126
127 public String getAoTypeNameText() {
128 return aoTypeNameText;
129 }
130
131 public void setAoTypeNameText(String aoTypeNameText) {
132 this.aoTypeNameText = aoTypeNameText;
133 }
134
135 public String getAoInstructorText() {
136 return aoInstructorText;
137 }
138
139 public void setAoInstructorText(String aoInstructorText) {
140 this.aoInstructorText = aoInstructorText;
141 }
142
143 public String getAoMaxEnrText() {
144 return aoMaxEnrText;
145 }
146
147 public void setAoMaxEnrText(String aoMaxEnrText) {
148 this.aoMaxEnrText = aoMaxEnrText;
149 }
150
151 public String getStartTimeDisplay() {
152 return startTimeDisplay;
153 }
154
155 public void setStartTimeDisplay(String startTimeDisplay) {
156 setStartTimeDisplay(startTimeDisplay, false);
157 }
158
159 public void setStartTimeDisplay(String startTimeDisplay,boolean appendForDisplay){
160 setStartTimeDisplay(startTimeDisplay, false, null);
161 }
162
163 public void setStartTimeDisplay(String startTimeDisplay,boolean appendForDisplay, String dlTypeClass) {
164 String cssClass = "";
165 if(!StringUtils.isEmpty(dlTypeClass)){
166 cssClass = "class=\"" + dlTypeClass + "\"";
167 }
168 if(StringUtils.isEmpty(this.startTimeDisplay)){
169 appendForDisplay = false;
170 }
171 if (appendForDisplay){
172 this.startTimeDisplay = this.startTimeDisplay + "<br><span " + cssClass + " >" + startTimeDisplay + "</span>";
173 }else{
174 this.startTimeDisplay = "<span " + cssClass + " >" + startTimeDisplay + "</span>";
175 }
176 }
177
178 public String getEndTimeDisplay() {
179 return endTimeDisplay;
180 }
181
182 public void setEndTimeDisplay(String endTimeDisplay) {
183 setEndTimeDisplay(endTimeDisplay, false);
184 }
185
186 public void setEndTimeDisplay(String endTimeDisplay,boolean appendForDisplay) {
187 setEndTimeDisplay(endTimeDisplay, false, null);
188 }
189
190 public void setEndTimeDisplay(String endTimeDisplay,boolean appendForDisplay, String dlTypeClass) {
191 String cssClass = "";
192 if(!StringUtils.isEmpty(dlTypeClass)){
193 cssClass = "class=\"" + dlTypeClass + "\"";
194 }
195 if(StringUtils.isEmpty(this.endTimeDisplay)){
196 appendForDisplay = false;
197 }
198 if (appendForDisplay){
199 this.endTimeDisplay = this.endTimeDisplay + "<br><span " + cssClass + " >" + endTimeDisplay + "</span>";
200 }else{
201 this.endTimeDisplay = "<span " + cssClass + " >" + endTimeDisplay + "</span>";
202 }
203 }
204
205 public String getDaysDisplayName() {
206 return daysDisplayName;
207 }
208
209 public void setDaysDisplayName(String daysDisplayName) {
210 setDaysDisplayName(daysDisplayName, false);
211 }
212
213 public void setDaysDisplayName(String daysDisplayName,boolean appendForDisplay) {
214 setDaysDisplayName(daysDisplayName, false, null);
215 }
216
217 public void setDaysDisplayName(String daysDisplayName,boolean appendForDisplay, String dlTypeClass) {
218 String cssClass = "";
219 if(!StringUtils.isEmpty(dlTypeClass)){
220 cssClass = "class=\"" + dlTypeClass + "\"";
221 }
222 if(StringUtils.isEmpty(this.daysDisplayName)){
223 appendForDisplay = false;
224 }
225 if (appendForDisplay){
226 this.daysDisplayName = this.daysDisplayName + "<br><span " + cssClass + " >" + daysDisplayName + "</span>";
227 }else{
228 this.daysDisplayName = "<span " + cssClass + " >" + daysDisplayName + "</span>";
229 }
230 }
231
232 public List<String> getStartTime() {
233 return startTime;
234 }
235
236 public void setStartTime(List<String> startTime) {
237 this.startTime = startTime;
238 }
239
240 public List<String> getEndTime() {
241 return endTime;
242 }
243
244 public void setEndTime(List<String> endTime) {
245 this.endTime = endTime;
246 }
247
248 public List<String> getWeekDays() {
249 return weekDays;
250 }
251
252 public void setWeekDays(List<String> weekDays) {
253 this.weekDays = weekDays;
254 }
255
256 public String getBuildingName() {
257 return buildingName;
258 }
259
260 public void setBuildingName(String buildingName) {
261 setBuildingName(buildingName, false);
262 }
263
264 public void setBuildingName(String buildingName,boolean appendForDisplay) {
265 setBuildingName(buildingName, false, null);
266 }
267
268 public void setBuildingName(String buildingName,boolean appendForDisplay, String dlTypeClass) {
269 String cssClass = "";
270 if(!StringUtils.isEmpty(dlTypeClass)){
271 cssClass = "class=\"" + dlTypeClass + "\"";
272 }
273 if(StringUtils.isEmpty(this.buildingName)){
274 appendForDisplay = false;
275 }
276 if (appendForDisplay){
277 this.buildingName = this.buildingName + "<br><span " + cssClass + " >" + buildingName + "</span>";
278 }else{
279 this.buildingName = "<span " + cssClass + " >" + buildingName + "</span>";
280 }
281 }
282
283 public String getBuildingCode() {
284 return buildingCode;
285 }
286
287 public void setBuildingCode(String buildingCode) {
288 setBuildingCode(buildingCode, false);
289 }
290
291 public void setBuildingCode(String buildingCode,boolean appendForDisplay) {
292 setBuildingCode(buildingCode, false, null);
293 }
294
295 public void setBuildingCode(String buildingCode,boolean appendForDisplay, String dlTypeClass) {
296 String cssClass = "";
297 if(!StringUtils.isEmpty(dlTypeClass)){
298 cssClass = "class=\"" + dlTypeClass + "\"";
299 }
300 if(StringUtils.isEmpty(this.buildingCode)){
301 appendForDisplay = false;
302 }
303 if (appendForDisplay){
304 this.buildingCode = this.buildingCode + "<br><span " + cssClass + " >" + buildingCode + "</span>";
305 }else{
306 this.buildingCode = buildingCode;
307 }
308 }
309
310 public void setBuildingCodeWithTooltip(String buildingCode, String buildingName, String dlTypeClass) {
311 String cssClass = "";
312 boolean appendForDisplay = true;
313 if(!StringUtils.isEmpty(dlTypeClass)){
314 cssClass = "class=\"" + dlTypeClass + "\"";
315 }
316 if(StringUtils.isEmpty(this.buildingCode)){
317 appendForDisplay = false;
318 } else {
319 appendForDisplay = true;
320 }
321 String underlineCssClass = "<span style=\"border-bottom: 1px dotted;\">";
322
323
324
325
326
327
328
329
330 String BldgCodeMark = "<span " + cssClass + "title='" + buildingName + "'>" + underlineCssClass + buildingCode + "</span> </span>";
331 if (appendForDisplay){
332 this.buildingCode = this.buildingCode + "<br>" + BldgCodeMark;
333 }else{
334 this.buildingCode = BldgCodeMark;
335 }
336
337 }
338
339 public void setBuildingCodeWithTooltip(String buildingCode, String buildingName) {
340 String underlineCssClass = "<span style=\"border-bottom: 1px dotted;\">";
341
342 String BldgCodeMark = "<span title='" + buildingName + "'>" + underlineCssClass + buildingCode + "</span> </span>";
343
344 this.buildingCode = BldgCodeMark;
345 }
346
347 public List<String> getBldgNameList() {
348 return bldgNameList;
349 }
350
351 public void setBldgNameList(List<String> bldgNameList) {
352 this.bldgNameList = bldgNameList;
353 }
354
355 public List<String> getBldgCodeList() {
356 return bldgCodeList;
357 }
358
359 public void setBldgCodeList(List<String> bldgCodeList) {
360 this.bldgCodeList = bldgCodeList;
361 }
362
363 public String getRoomName() {
364 return roomName;
365 }
366
367 public void setRoomName(String roomName) {
368 setRoomName(roomName, false);
369 }
370
371 public void setRoomName(String roomName,boolean appendForDisplay) {
372 setRoomName(roomName, false, null);
373 }
374
375 public void setRoomName(String roomName,boolean appendForDisplay, String dlTypeClass) {
376 String cssClass = "";
377 if(!StringUtils.isEmpty(dlTypeClass)){
378 cssClass = "class=\"" + dlTypeClass + "\"";
379 }
380 if(StringUtils.isEmpty(this.roomName)){
381 appendForDisplay = false;
382 }
383 if (appendForDisplay){
384 this.roomName = this.roomName + "<br><span " + cssClass + " >" + roomName + "</span>";
385 }else{
386 this.roomName = "<span " + cssClass + " >" + roomName + "</span>";
387 }
388 }
389
390 public String getRgMaxEnrText() {
391 return rgMaxEnrText;
392 }
393
394 public void setRgMaxEnrText(String rgMaxEnrText) {
395 this.rgMaxEnrText = rgMaxEnrText;
396 }
397
398 public String getAoClusterName() {
399 return aoClusterName;
400 }
401
402 public void setAoClusterName(String aoClusterName) {
403 this.aoClusterName = aoClusterName;
404 }
405
406 public String getAoEditLink() {
407 return aoEditLink;
408 }
409
410 public void setAoEditLink(String aoEditLink) {
411 this.aoEditLink = aoEditLink;
412 }
413
414 public String getRequisite() {
415 return requisite;
416 }
417
418 public void setRequisite(String requisite) {
419 this.requisite = requisite;
420 }
421
422 public String getCommonRequisite() {
423 return commonRequisite;
424 }
425
426 public void setCommonRequisite(String commonRequisite) {
427 this.commonRequisite = commonRequisite;
428 }
429 }