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", |
40 | |
"activityId", "termId", "activityCode", "scheduleId", |
41 | |
"isHonorsOffering", "gradingOptionKeys", "instructors", |
42 | |
"weeklyInclassContactHours", "weeklyOutofclassContactHours", |
43 | |
"weeklyTotalContactHours", "isEvaluated", |
44 | |
"maximumEnrollment", "minimumEnrollment","isMaxEnrollmentEstimate", |
45 | |
"finalExamStartTime", "finalExamEndTime", |
46 | |
"finalExamSpaceCode", |
47 | |
"meta", "attributes", "_futureElements"}) |
48 | |
|
49 | |
public class ActivityOfferingInfo |
50 | |
extends IdEntityInfo |
51 | |
implements ActivityOffering { |
52 | |
|
53 | |
private static final long serialVersionUID = 1L; |
54 | |
|
55 | |
@XmlElement |
56 | |
private String formatOfferingId; |
57 | |
|
58 | |
@XmlElement |
59 | |
private String activityId; |
60 | |
|
61 | |
@XmlElement |
62 | |
private String termId; |
63 | |
|
64 | |
@XmlElement |
65 | |
private String activityCode; |
66 | |
|
67 | |
@XmlElement |
68 | |
private String scheduleId; |
69 | |
|
70 | |
@XmlElement |
71 | |
private Boolean isHonorsOffering; |
72 | |
|
73 | |
@XmlElement |
74 | |
private List<String> gradingOptionKeys; |
75 | |
|
76 | |
@XmlElement |
77 | |
private List<OfferingInstructorInfo> instructors; |
78 | |
|
79 | |
@XmlElement |
80 | |
private String weeklyInclassContactHours; |
81 | |
|
82 | |
@XmlElement |
83 | |
private String weeklyOutofclassContactHours; |
84 | |
|
85 | |
@XmlElement |
86 | |
private String weeklyTotalContactHours; |
87 | |
|
88 | |
@XmlElement |
89 | |
private Integer maximumEnrollment; |
90 | |
|
91 | |
@XmlElement |
92 | |
private Boolean isMaxEnrollmentEstimate; |
93 | |
|
94 | |
@XmlElement |
95 | |
private Integer minimumEnrollment; |
96 | |
|
97 | |
@XmlElement |
98 | |
private Date finalExamStartTime; |
99 | |
|
100 | |
@XmlElement |
101 | |
private Date finalExamEndTime; |
102 | |
|
103 | |
@XmlElement |
104 | |
private String finalExamSpaceCode; |
105 | |
|
106 | |
@XmlElement |
107 | |
private Boolean isEvaluated; |
108 | |
|
109 | |
|
110 | |
@XmlAnyElement |
111 | |
private List<Element> _futureElements; |
112 | |
|
113 | |
|
114 | |
|
115 | |
|
116 | |
|
117 | 0 | public ActivityOfferingInfo() { |
118 | 0 | } |
119 | |
|
120 | |
|
121 | |
|
122 | |
|
123 | |
|
124 | |
|
125 | |
|
126 | |
public ActivityOfferingInfo(ActivityOffering offering) { |
127 | 0 | super(offering); |
128 | |
|
129 | 0 | if (offering == null) { |
130 | 0 | return; |
131 | |
} |
132 | |
|
133 | 0 | this.formatOfferingId = offering.getFormatOfferingId(); |
134 | 0 | this.activityId = offering.getActivityId(); |
135 | 0 | this.termId = offering.getTermId(); |
136 | 0 | this.scheduleId = offering.getScheduleId(); |
137 | 0 | this.activityCode = offering.getActivityCode(); |
138 | |
|
139 | 0 | this.isHonorsOffering = offering.getIsHonorsOffering(); |
140 | 0 | this.instructors = new ArrayList<OfferingInstructorInfo>(); |
141 | |
|
142 | 0 | if (offering.getGradingOptionKeys() != null) { |
143 | 0 | this.gradingOptionKeys = new ArrayList<String>(offering.getGradingOptionKeys()); |
144 | |
} |
145 | |
|
146 | 0 | for (OfferingInstructor instructor : offering.getInstructors()) { |
147 | 0 | this.instructors.add(new OfferingInstructorInfo(instructor)); |
148 | |
} |
149 | |
|
150 | 0 | this.weeklyInclassContactHours = offering.getWeeklyInclassContactHours(); |
151 | 0 | this.weeklyOutofclassContactHours = offering.getWeeklyOutofclassContactHours(); |
152 | 0 | this.weeklyTotalContactHours = offering.getWeeklyTotalContactHours(); |
153 | 0 | this.maximumEnrollment = offering.getMaximumEnrollment(); |
154 | |
|
155 | 0 | this.minimumEnrollment = offering.getMinimumEnrollment(); |
156 | |
|
157 | 0 | this.isMaxEnrollmentEstimate = offering.getIsMaxEnrollmentEstimate(); |
158 | |
|
159 | 0 | if (offering.getFinalExamStartTime() != null) { |
160 | 0 | this.finalExamStartTime = new Date(offering.getFinalExamStartTime().getTime()); |
161 | |
} |
162 | |
|
163 | 0 | if (offering.getFinalExamEndTime() != null) { |
164 | 0 | this.finalExamEndTime = new Date(offering.getFinalExamEndTime().getTime()); |
165 | |
} |
166 | |
|
167 | 0 | this.finalExamSpaceCode = offering.getFinalExamSpaceCode(); |
168 | 0 | this.isEvaluated = offering.getIsEvaluated(); |
169 | 0 | } |
170 | |
|
171 | |
@Override |
172 | |
public String getFormatOfferingId() { |
173 | 0 | return formatOfferingId; |
174 | |
} |
175 | |
|
176 | |
public void setFormatOfferingId(String formatOfferingId) { |
177 | 0 | this.formatOfferingId = formatOfferingId; |
178 | 0 | } |
179 | |
|
180 | |
|
181 | |
@Override |
182 | |
public String getActivityId() { |
183 | 0 | return activityId; |
184 | |
} |
185 | |
|
186 | |
public void setActivityId(String activityId) { |
187 | 0 | this.activityId = activityId; |
188 | 0 | } |
189 | |
|
190 | |
@Override |
191 | |
public String getTermId() { |
192 | 0 | return termId; |
193 | |
} |
194 | |
|
195 | |
public void setTermId(String termId) { |
196 | 0 | this.termId = termId; |
197 | 0 | } |
198 | |
|
199 | |
@Override |
200 | |
public String getActivityCode() { |
201 | 0 | return activityCode; |
202 | |
} |
203 | |
|
204 | |
public void setActivityCode(String activityCode) { |
205 | 0 | this.activityCode = activityCode; |
206 | 0 | } |
207 | |
|
208 | |
@Override |
209 | |
public String getScheduleId() { |
210 | 0 | return scheduleId; |
211 | |
} |
212 | |
|
213 | |
public void setScheduleId(String scheduleId) { |
214 | 0 | this.scheduleId = scheduleId; |
215 | 0 | } |
216 | |
|
217 | |
@Override |
218 | |
public Boolean getIsHonorsOffering() { |
219 | 0 | return isHonorsOffering; |
220 | |
} |
221 | |
|
222 | |
public void setIsHonorsOffering(Boolean isHonorsOffering) { |
223 | 0 | this.isHonorsOffering = isHonorsOffering; |
224 | 0 | } |
225 | |
|
226 | |
@Override |
227 | |
public List<String> getGradingOptionKeys() { |
228 | 0 | if (gradingOptionKeys == null) { |
229 | 0 | gradingOptionKeys = new ArrayList<String>(); |
230 | |
} |
231 | |
|
232 | 0 | return gradingOptionKeys; |
233 | |
} |
234 | |
|
235 | |
public void setGradingOptionKeys(List<String> gradingOptionKeys) { |
236 | 0 | this.gradingOptionKeys = gradingOptionKeys; |
237 | 0 | } |
238 | |
|
239 | |
@Override |
240 | |
public List<OfferingInstructorInfo> getInstructors() { |
241 | 0 | if (instructors == null) { |
242 | 0 | instructors = new ArrayList<OfferingInstructorInfo>(); |
243 | |
} |
244 | |
|
245 | 0 | return instructors; |
246 | |
} |
247 | |
|
248 | |
public void setInstructors(List<OfferingInstructorInfo> instructors) { |
249 | 0 | this.instructors = instructors; |
250 | 0 | } |
251 | |
|
252 | |
@Override |
253 | |
public String getWeeklyInclassContactHours() { |
254 | 0 | return weeklyInclassContactHours; |
255 | |
} |
256 | |
|
257 | |
public void setWeeklyInclassContactHours(String weeklyInclassContactHours) { |
258 | 0 | this.weeklyInclassContactHours = weeklyInclassContactHours; |
259 | 0 | } |
260 | |
|
261 | |
@Override |
262 | |
public String getWeeklyOutofclassContactHours() { |
263 | 0 | return weeklyOutofclassContactHours; |
264 | |
} |
265 | |
|
266 | |
public void setWeeklyOutofclassContactHours(String weeklyOutofclassContactHours) { |
267 | 0 | this.weeklyOutofclassContactHours = weeklyOutofclassContactHours; |
268 | 0 | } |
269 | |
|
270 | |
@Override |
271 | |
public String getWeeklyTotalContactHours() { |
272 | 0 | return weeklyTotalContactHours; |
273 | |
} |
274 | |
|
275 | |
public void setWeeklyTotalContactHours(String weeklyTotalContactHours) { |
276 | 0 | this.weeklyTotalContactHours = weeklyTotalContactHours; |
277 | 0 | } |
278 | |
|
279 | |
@Override |
280 | |
public Integer getMaximumEnrollment() { |
281 | 0 | return maximumEnrollment; |
282 | |
} |
283 | |
|
284 | |
public void setMaximumEnrollment(Integer maximumEnrollment) { |
285 | 0 | this.maximumEnrollment = maximumEnrollment; |
286 | 0 | } |
287 | |
|
288 | |
@Override |
289 | |
public Integer getMinimumEnrollment() { |
290 | 0 | return minimumEnrollment; |
291 | |
} |
292 | |
|
293 | |
@Override |
294 | |
public Boolean getIsEvaluated() { |
295 | 0 | return this.isEvaluated; |
296 | |
} |
297 | |
|
298 | |
public void setMinimumEnrollment(Integer minimumEnrollment) { |
299 | 0 | this.minimumEnrollment = minimumEnrollment; |
300 | 0 | } |
301 | |
|
302 | |
@Override |
303 | |
public Date getFinalExamStartTime() { |
304 | 0 | return finalExamStartTime; |
305 | |
} |
306 | |
|
307 | |
public void setFinalExamStartTime(Date finalExamStartTime) { |
308 | 0 | this.finalExamStartTime = finalExamStartTime; |
309 | 0 | } |
310 | |
|
311 | |
@Override |
312 | |
public Date getFinalExamEndTime() { |
313 | 0 | return finalExamEndTime; |
314 | |
} |
315 | |
|
316 | |
public void setFinalExamEndTime(Date finalExamEndTime) { |
317 | 0 | this.finalExamEndTime = finalExamEndTime; |
318 | 0 | } |
319 | |
|
320 | |
@Override |
321 | |
public String getFinalExamSpaceCode() { |
322 | 0 | return finalExamSpaceCode; |
323 | |
} |
324 | |
|
325 | |
public void setFinalExamSpaceCode(String finalExamSpaceCode) { |
326 | 0 | this.finalExamSpaceCode = finalExamSpaceCode; |
327 | 0 | } |
328 | |
|
329 | |
public void setHonorsOffering(Boolean honorsOffering) { |
330 | 0 | isHonorsOffering = honorsOffering; |
331 | 0 | } |
332 | |
|
333 | |
public void setIsEvaluated(Boolean isEvaluated) { |
334 | 0 | this.isEvaluated = isEvaluated; |
335 | 0 | } |
336 | |
|
337 | |
|
338 | |
@Override |
339 | |
public Boolean getIsMaxEnrollmentEstimate(){ |
340 | 0 | return this.isMaxEnrollmentEstimate ; |
341 | |
} |
342 | |
|
343 | |
|
344 | |
public void setIsMaxEnrollmentEstimate(Boolean isMaxEnrollmentEstimate){ |
345 | 0 | this.isMaxEnrollmentEstimate = isMaxEnrollmentEstimate; |
346 | 0 | } |
347 | |
|
348 | |
} |