1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.student.enrollment.courseoffering.dto; |
18 | |
|
19 | |
import java.util.ArrayList; |
20 | |
import java.util.Date; |
21 | |
import java.util.List; |
22 | |
|
23 | |
import javax.xml.bind.annotation.XmlAccessType; |
24 | |
import javax.xml.bind.annotation.XmlAccessorType; |
25 | |
import javax.xml.bind.annotation.XmlAnyElement; |
26 | |
import javax.xml.bind.annotation.XmlElement; |
27 | |
import javax.xml.bind.annotation.XmlType; |
28 | |
|
29 | |
import org.kuali.student.enrollment.courseoffering.infc.ActivityOffering; |
30 | |
import org.kuali.student.enrollment.courseoffering.infc.OfferingInstructor; |
31 | |
import org.kuali.student.r2.common.dto.IdEntityInfo; |
32 | |
|
33 | |
import org.w3c.dom.Element; |
34 | |
|
35 | |
|
36 | |
@XmlAccessorType(XmlAccessType.FIELD) |
37 | |
@XmlType(name = "ActivityOfferingInfo", propOrder = { |
38 | |
"id", "typeKey", "stateKey", "name", "descr", |
39 | |
"formatOfferingId", "formatOfferingName", |
40 | |
"activityId", "termId", "termCode", "activityCode", "scheduleId", |
41 | |
"isHonorsOffering", "gradingOptionKeys", "instructors", |
42 | |
"weeklyInclassContactHours", "weeklyOutofclassContactHours", |
43 | |
"weeklyTotalContactHours", "isEvaluated", |
44 | |
"maximumEnrollment", "minimumEnrollment","isMaxEnrollmentEstimate", |
45 | |
"finalExamStartTime", "finalExamEndTime", |
46 | |
"finalExamSpaceCode", "activityOfferingURL", |
47 | |
"courseOfferingId", "courseOfferingTitle", "courseOfferingCode", |
48 | |
"meta", "attributes", "_futureElements"}) |
49 | |
|
50 | |
public class ActivityOfferingInfo |
51 | |
extends IdEntityInfo |
52 | |
implements ActivityOffering { |
53 | |
|
54 | |
private static final long serialVersionUID = 1L; |
55 | |
|
56 | |
@XmlElement |
57 | |
private String formatOfferingId; |
58 | |
|
59 | |
@XmlElement |
60 | |
private String formatOfferingName; |
61 | |
|
62 | |
@XmlElement |
63 | |
private String activityId; |
64 | |
|
65 | |
@XmlElement |
66 | |
private String termId; |
67 | |
|
68 | |
@XmlElement |
69 | |
private String termCode; |
70 | |
|
71 | |
@XmlElement |
72 | |
private String activityCode; |
73 | |
|
74 | |
@XmlElement |
75 | |
private String scheduleId; |
76 | |
|
77 | |
@XmlElement |
78 | |
private Boolean isHonorsOffering; |
79 | |
|
80 | |
@XmlElement |
81 | |
private List<String> gradingOptionKeys; |
82 | |
|
83 | |
@XmlElement |
84 | |
private List<OfferingInstructorInfo> instructors; |
85 | |
|
86 | |
@XmlElement |
87 | |
private String weeklyInclassContactHours; |
88 | |
|
89 | |
@XmlElement |
90 | |
private String weeklyOutofclassContactHours; |
91 | |
|
92 | |
@XmlElement |
93 | |
private String weeklyTotalContactHours; |
94 | |
|
95 | |
@XmlElement |
96 | |
private Integer maximumEnrollment; |
97 | |
|
98 | |
@XmlElement |
99 | |
private Boolean isMaxEnrollmentEstimate; |
100 | |
|
101 | |
@XmlElement |
102 | |
private Integer minimumEnrollment; |
103 | |
|
104 | |
@XmlElement |
105 | |
private Date finalExamStartTime; |
106 | |
|
107 | |
@XmlElement |
108 | |
private Date finalExamEndTime; |
109 | |
|
110 | |
@XmlElement |
111 | |
private String finalExamSpaceCode; |
112 | |
|
113 | |
@XmlElement |
114 | |
private Boolean isEvaluated; |
115 | |
|
116 | |
@XmlElement |
117 | |
private String activityOfferingURL; |
118 | |
|
119 | |
@XmlElement |
120 | |
private String courseOfferingId; |
121 | |
|
122 | |
@XmlElement |
123 | |
private String courseOfferingTitle; |
124 | |
|
125 | |
@XmlElement |
126 | |
private String courseOfferingCode; |
127 | |
|
128 | |
@XmlAnyElement |
129 | |
private List<Element> _futureElements; |
130 | |
|
131 | |
|
132 | |
|
133 | |
|
134 | |
|
135 | 0 | public ActivityOfferingInfo() { |
136 | 0 | } |
137 | |
|
138 | |
|
139 | |
|
140 | |
|
141 | |
|
142 | |
|
143 | |
|
144 | |
public ActivityOfferingInfo(ActivityOffering offering) { |
145 | 0 | super(offering); |
146 | |
|
147 | 0 | if (offering == null) { |
148 | 0 | return; |
149 | |
} |
150 | |
|
151 | 0 | this.formatOfferingId = offering.getFormatOfferingId(); |
152 | 0 | this.activityId = offering.getActivityId(); |
153 | 0 | this.termId = offering.getTermId(); |
154 | 0 | this.scheduleId = offering.getScheduleId(); |
155 | 0 | this.activityCode = offering.getActivityCode(); |
156 | |
|
157 | 0 | this.isHonorsOffering = offering.getIsHonorsOffering(); |
158 | 0 | this.instructors = new ArrayList<OfferingInstructorInfo>(); |
159 | |
|
160 | 0 | if (offering.getGradingOptionKeys() != null) { |
161 | 0 | this.gradingOptionKeys = new ArrayList<String>(offering.getGradingOptionKeys()); |
162 | |
} |
163 | |
|
164 | 0 | for (OfferingInstructor instructor : offering.getInstructors()) { |
165 | 0 | this.instructors.add(new OfferingInstructorInfo(instructor)); |
166 | |
} |
167 | |
|
168 | 0 | this.weeklyInclassContactHours = offering.getWeeklyInclassContactHours(); |
169 | 0 | this.weeklyOutofclassContactHours = offering.getWeeklyOutofclassContactHours(); |
170 | 0 | this.weeklyTotalContactHours = offering.getWeeklyTotalContactHours(); |
171 | 0 | this.maximumEnrollment = offering.getMaximumEnrollment(); |
172 | |
|
173 | 0 | this.minimumEnrollment = offering.getMinimumEnrollment(); |
174 | |
|
175 | 0 | this.isMaxEnrollmentEstimate = offering.getIsMaxEnrollmentEstimate(); |
176 | |
|
177 | 0 | if (offering.getFinalExamStartTime() != null) { |
178 | 0 | this.finalExamStartTime = new Date(offering.getFinalExamStartTime().getTime()); |
179 | |
} |
180 | |
|
181 | 0 | if (offering.getFinalExamEndTime() != null) { |
182 | 0 | this.finalExamEndTime = new Date(offering.getFinalExamEndTime().getTime()); |
183 | |
} |
184 | |
|
185 | 0 | this.finalExamSpaceCode = offering.getFinalExamSpaceCode(); |
186 | 0 | this.isEvaluated = offering.getIsEvaluated(); |
187 | 0 | this.activityOfferingURL = offering.getActivityOfferingURL(); |
188 | 0 | } |
189 | |
|
190 | |
@Override |
191 | |
public String getFormatOfferingId() { |
192 | 0 | return formatOfferingId; |
193 | |
} |
194 | |
|
195 | |
public void setFormatOfferingId(String formatOfferingId) { |
196 | 0 | this.formatOfferingId = formatOfferingId; |
197 | 0 | } |
198 | |
|
199 | |
@Override |
200 | |
public String getFormatOfferingName() { |
201 | 0 | return formatOfferingName; |
202 | |
} |
203 | |
|
204 | |
public void setFormatOfferingName(String formatOfferingName) { |
205 | 0 | this.formatOfferingName = formatOfferingName; |
206 | 0 | } |
207 | |
|
208 | |
@Override |
209 | |
public String getActivityId() { |
210 | 0 | return activityId; |
211 | |
} |
212 | |
|
213 | |
public void setActivityId(String activityId) { |
214 | 0 | this.activityId = activityId; |
215 | 0 | } |
216 | |
|
217 | |
@Override |
218 | |
public String getTermId() { |
219 | 0 | return termId; |
220 | |
} |
221 | |
|
222 | |
public void setTermId(String termId) { |
223 | 0 | this.termId = termId; |
224 | 0 | } |
225 | |
|
226 | |
@Override |
227 | |
public String getTermCode() { |
228 | 0 | return termCode; |
229 | |
} |
230 | |
|
231 | |
public void setTermCode(String termCode) { |
232 | 0 | this.termCode = termCode; |
233 | 0 | } |
234 | |
|
235 | |
|
236 | |
@Override |
237 | |
public String getActivityCode() { |
238 | 0 | return activityCode; |
239 | |
} |
240 | |
|
241 | |
public void setActivityCode(String activityCode) { |
242 | 0 | this.activityCode = activityCode; |
243 | 0 | } |
244 | |
|
245 | |
@Override |
246 | |
public String getScheduleId() { |
247 | 0 | return scheduleId; |
248 | |
} |
249 | |
|
250 | |
public void setScheduleId(String scheduleId) { |
251 | 0 | this.scheduleId = scheduleId; |
252 | 0 | } |
253 | |
|
254 | |
@Override |
255 | |
public Boolean getIsHonorsOffering() { |
256 | 0 | return isHonorsOffering; |
257 | |
} |
258 | |
|
259 | |
public void setIsHonorsOffering(Boolean isHonorsOffering) { |
260 | 0 | this.isHonorsOffering = isHonorsOffering; |
261 | 0 | } |
262 | |
|
263 | |
@Override |
264 | |
public List<String> getGradingOptionKeys() { |
265 | 0 | if (gradingOptionKeys == null) { |
266 | 0 | gradingOptionKeys = new ArrayList<String>(); |
267 | |
} |
268 | |
|
269 | 0 | return gradingOptionKeys; |
270 | |
} |
271 | |
|
272 | |
public void setGradingOptionKeys(List<String> gradingOptionKeys) { |
273 | 0 | this.gradingOptionKeys = gradingOptionKeys; |
274 | 0 | } |
275 | |
|
276 | |
@Override |
277 | |
public List<OfferingInstructorInfo> getInstructors() { |
278 | 0 | if (instructors == null) { |
279 | 0 | instructors = new ArrayList<OfferingInstructorInfo>(); |
280 | |
} |
281 | |
|
282 | 0 | return instructors; |
283 | |
} |
284 | |
|
285 | |
public void setInstructors(List<OfferingInstructorInfo> instructors) { |
286 | 0 | this.instructors = instructors; |
287 | 0 | } |
288 | |
|
289 | |
@Override |
290 | |
public String getWeeklyInclassContactHours() { |
291 | 0 | return weeklyInclassContactHours; |
292 | |
} |
293 | |
|
294 | |
public void setWeeklyInclassContactHours(String weeklyInclassContactHours) { |
295 | 0 | this.weeklyInclassContactHours = weeklyInclassContactHours; |
296 | 0 | } |
297 | |
|
298 | |
@Override |
299 | |
public String getWeeklyOutofclassContactHours() { |
300 | 0 | return weeklyOutofclassContactHours; |
301 | |
} |
302 | |
|
303 | |
public void setWeeklyOutofclassContactHours(String weeklyOutofclassContactHours) { |
304 | 0 | this.weeklyOutofclassContactHours = weeklyOutofclassContactHours; |
305 | 0 | } |
306 | |
|
307 | |
@Override |
308 | |
public String getWeeklyTotalContactHours() { |
309 | 0 | return weeklyTotalContactHours; |
310 | |
} |
311 | |
|
312 | |
public void setWeeklyTotalContactHours(String weeklyTotalContactHours) { |
313 | 0 | this.weeklyTotalContactHours = weeklyTotalContactHours; |
314 | 0 | } |
315 | |
|
316 | |
@Override |
317 | |
public Integer getMaximumEnrollment() { |
318 | 0 | return maximumEnrollment; |
319 | |
} |
320 | |
|
321 | |
public void setMaximumEnrollment(Integer maximumEnrollment) { |
322 | 0 | this.maximumEnrollment = maximumEnrollment; |
323 | 0 | } |
324 | |
|
325 | |
@Override |
326 | |
public Integer getMinimumEnrollment() { |
327 | 0 | return minimumEnrollment; |
328 | |
} |
329 | |
|
330 | |
@Override |
331 | |
public Boolean getIsEvaluated() { |
332 | 0 | return this.isEvaluated; |
333 | |
} |
334 | |
|
335 | |
public void setMinimumEnrollment(Integer minimumEnrollment) { |
336 | 0 | this.minimumEnrollment = minimumEnrollment; |
337 | 0 | } |
338 | |
|
339 | |
@Override |
340 | |
public Date getFinalExamStartTime() { |
341 | 0 | return finalExamStartTime; |
342 | |
} |
343 | |
|
344 | |
public void setFinalExamStartTime(Date finalExamStartTime) { |
345 | 0 | this.finalExamStartTime = finalExamStartTime; |
346 | 0 | } |
347 | |
|
348 | |
@Override |
349 | |
public Date getFinalExamEndTime() { |
350 | 0 | return finalExamEndTime; |
351 | |
} |
352 | |
|
353 | |
public void setFinalExamEndTime(Date finalExamEndTime) { |
354 | 0 | this.finalExamEndTime = finalExamEndTime; |
355 | 0 | } |
356 | |
|
357 | |
@Override |
358 | |
public String getFinalExamSpaceCode() { |
359 | 0 | return finalExamSpaceCode; |
360 | |
} |
361 | |
|
362 | |
public void setFinalExamSpaceCode(String finalExamSpaceCode) { |
363 | 0 | this.finalExamSpaceCode = finalExamSpaceCode; |
364 | 0 | } |
365 | |
|
366 | |
public void setHonorsOffering(Boolean honorsOffering) { |
367 | 0 | isHonorsOffering = honorsOffering; |
368 | 0 | } |
369 | |
|
370 | |
public void setIsEvaluated(Boolean isEvaluated) { |
371 | 0 | this.isEvaluated = isEvaluated; |
372 | 0 | } |
373 | |
|
374 | |
@Override |
375 | |
public Boolean getIsMaxEnrollmentEstimate() { |
376 | 0 | return isMaxEnrollmentEstimate; |
377 | |
} |
378 | |
|
379 | |
public void setIsMaxEnrollmentEstimate(Boolean isMaxEnrollmentEstimate) { |
380 | 0 | this.isMaxEnrollmentEstimate = isMaxEnrollmentEstimate; |
381 | 0 | } |
382 | |
|
383 | |
@Override |
384 | |
public String getActivityOfferingURL() { |
385 | 0 | return activityOfferingURL; |
386 | |
} |
387 | |
|
388 | |
public void setActivityOfferingURL(String activityOfferingURL) { |
389 | 0 | this.activityOfferingURL = activityOfferingURL; |
390 | 0 | } |
391 | |
|
392 | |
@Override |
393 | |
public String getCourseOfferingId() { |
394 | 0 | return courseOfferingId; |
395 | |
} |
396 | |
|
397 | |
public void setCourseOfferingId(String courseOfferingId) { |
398 | 0 | this.courseOfferingId = courseOfferingId; |
399 | 0 | } |
400 | |
|
401 | |
|
402 | |
@Override |
403 | |
public String getCourseOfferingCode() { |
404 | 0 | return courseOfferingCode; |
405 | |
} |
406 | |
|
407 | |
public void setCourseOfferingCode(String courseOfferingCode) { |
408 | 0 | this.courseOfferingCode = courseOfferingCode; |
409 | 0 | } |
410 | |
|
411 | |
@Override |
412 | |
public String getCourseOfferingTitle() { |
413 | 0 | return courseOfferingTitle; |
414 | |
} |
415 | |
|
416 | |
public void setCourseOfferingTitle(String courseOfferingTitle) { |
417 | 0 | this.courseOfferingTitle = courseOfferingTitle; |
418 | 0 | } |
419 | |
|
420 | |
|
421 | |
} |