1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.kuali.student.r2.lum.clu.dto;
16
17 import java.io.Serializable;
18 import java.util.ArrayList;
19 import java.util.Date;
20 import java.util.List;
21
22 import javax.xml.bind.annotation.XmlAccessType;
23 import javax.xml.bind.annotation.XmlAccessorType;
24 import javax.xml.bind.annotation.XmlAnyElement;
25 import javax.xml.bind.annotation.XmlElement;
26 import javax.xml.bind.annotation.XmlType;
27
28 import org.kuali.student.r2.common.dto.AmountInfo;
29 import org.kuali.student.r2.common.dto.IdNamelessEntityInfo;
30 import org.kuali.student.r2.common.dto.RichTextInfo;
31 import org.kuali.student.r2.common.dto.TimeAmountInfo;
32 import org.kuali.student.r2.core.versionmanagement.dto.VersionInfo;
33 import org.kuali.student.r2.lum.clu.infc.Accreditation;
34 import org.kuali.student.r2.lum.clu.infc.AdminOrg;
35 import org.kuali.student.r2.lum.clu.infc.Clu;
36 import org.kuali.student.r2.lum.clu.infc.CluIdentifier;
37 import org.kuali.student.r2.lum.clu.infc.CluInstructor;
38 import org.kuali.student.r2.lum.clu.infc.LuCode;
39
40 @XmlAccessorType(XmlAccessType.FIELD)
41 @XmlType(name = "CluInfo", propOrder = {"id",
42 "typeKey",
43 "stateKey",
44 "descr",
45 "officialIdentifier",
46 "alternateIdentifiers",
47 "studySubjectArea",
48 "campusLocations",
49 "accreditations",
50 "adminOrgs",
51 "primaryInstructor",
52 "instructors",
53 "expectedFirstAtp",
54 "lastAtp",
55 "lastAdmitAtp",
56 "intensity",
57 "stdDuration",
58 "canCreateLui",
59 "referenceURL",
60 "luCodes",
61 "nextReviewPeriod",
62 "isEnrollable",
63 "offeredAtpTypes",
64 "isHasEarlyDropDeadline",
65 "defaultEnrollmentEstimate",
66 "defaultMaximumEnrollment",
67 "isHazardousForDisabledStudents",
68 "feeInfo",
69 "accountingInfo",
70 "version",
71 "effectiveDate",
72 "expirationDate",
73 "meta",
74 "attributes", "_futureElements" })
75 public class CluInfo extends IdNamelessEntityInfo implements Serializable, Clu {
76
77 private static final long serialVersionUID = 1L;
78 @XmlElement
79 private RichTextInfo descr;
80 @XmlElement
81 private CluIdentifierInfo officialIdentifier;
82 @XmlElement
83 private List<CluIdentifierInfo> alternateIdentifiers;
84 @XmlElement
85 private String studySubjectArea;
86 @XmlElement
87 private List<String> campusLocations;
88 @XmlElement
89 private List<AccreditationInfo> accreditations;
90 @XmlElement
91 private List<AdminOrgInfo> adminOrgs;
92 @XmlElement
93 private CluInstructorInfo primaryInstructor;
94 @XmlElement
95 private List<CluInstructorInfo> instructors;
96 @XmlElement
97 private String expectedFirstAtp;
98 @XmlElement
99 private String lastAtp;
100 @XmlElement
101 private String lastAdmitAtp;
102 @XmlElement
103 private AmountInfo intensity;
104 @XmlElement
105 private TimeAmountInfo stdDuration;
106 @XmlElement
107 private Boolean canCreateLui;
108 @XmlElement
109 private String referenceURL;
110 @XmlElement
111 private List<LuCodeInfo> luCodes;
112 @XmlElement
113 private String nextReviewPeriod;
114 @XmlElement
115 private Boolean isEnrollable;
116 @XmlElement
117 private List<String> offeredAtpTypes;
118 @XmlElement
119 private Boolean isHasEarlyDropDeadline;
120 @XmlElement
121 private int defaultEnrollmentEstimate;
122 @XmlElement
123 private int defaultMaximumEnrollment;
124 @XmlElement
125 private Boolean isHazardousForDisabledStudents;
126 @XmlElement
127 private CluFeeInfo feeInfo;
128 @XmlElement
129 private CluAccountingInfo accountingInfo;
130 @XmlElement
131 private VersionInfo version;
132 @XmlElement
133 private Date effectiveDate;
134 @XmlElement
135 private Date expirationDate;
136 @XmlAnyElement
137 private List<Object> _futureElements;
138
139 public CluInfo() {
140 }
141
142 public CluInfo(Clu clu) {
143 super(clu);
144 if (null != clu) {
145 if (clu.getDescr() != null) {
146 this.descr = new RichTextInfo (clu.getDescr());
147 }
148 this.officialIdentifier = (null != clu.getOfficialIdentifier()) ? new CluIdentifierInfo(clu.getOfficialIdentifier()) : null;
149 this.alternateIdentifiers = new ArrayList<CluIdentifierInfo>();
150 for (CluIdentifier cluIdentifier : clu.getAlternateIdentifiers()) {
151 this.alternateIdentifiers.add(new CluIdentifierInfo(cluIdentifier));
152 }
153 this.studySubjectArea = clu.getStudySubjectArea();
154 this.campusLocations = (null != clu.getCampusLocations()) ? new ArrayList<String>(clu.getCampusLocations()) : null;
155 this.accreditations = new ArrayList<AccreditationInfo>();
156 for (Accreditation accreditation : clu.getAccreditations()) {
157 this.accreditations.add(new AccreditationInfo(accreditation));
158 }
159 this.adminOrgs = new ArrayList<AdminOrgInfo>();
160 for (AdminOrg adminOrg : clu.getAdminOrgs()) {
161 this.adminOrgs.add(new AdminOrgInfo(adminOrg));
162 }
163 this.primaryInstructor = (null != clu.getPrimaryInstructor()) ? new CluInstructorInfo(clu.getPrimaryInstructor()) : null;
164 this.instructors = new ArrayList<CluInstructorInfo>();
165 for (CluInstructor cluInstructor : clu.getInstructors()) {
166 this.instructors.add(new CluInstructorInfo(cluInstructor));
167 }
168 this.expectedFirstAtp = clu.getExpectedFirstAtp();
169 this.lastAtp = clu.getLastAtp();
170 this.lastAdmitAtp = clu.getLastAdmitAtp();
171 this.intensity = (null != clu.getIntensity()) ? new AmountInfo(clu.getIntensity()) : null;
172 this.stdDuration = (null != clu.getStdDuration()) ? new TimeAmountInfo(clu.getStdDuration()) : null;
173 this.canCreateLui = clu.getCanCreateLui();
174 this.referenceURL = clu.getReferenceURL();
175 this.luCodes = new ArrayList<LuCodeInfo>();
176 for (LuCode luCode : clu.getLuCodes()) {
177 this.luCodes.add(new LuCodeInfo(luCode));
178 }
179 this.nextReviewPeriod = clu.getNextReviewPeriod();
180 this.isEnrollable = clu.getIsEnrollable();
181 this.offeredAtpTypes = (null != clu.getOfferedAtpTypes()) ? new ArrayList<String>(clu.getOfferedAtpTypes()) : null;
182 this.isHasEarlyDropDeadline = clu.getIsHasEarlyDropDeadline();
183 this.defaultEnrollmentEstimate = clu.getDefaultEnrollmentEstimate();
184 this.defaultMaximumEnrollment = clu.getDefaultMaximumEnrollment();
185 this.isHazardousForDisabledStudents = clu.getIsHazardousForDisabledStudents();
186 this.feeInfo = (null != clu.getFeeInfo()) ? new CluFeeInfo(clu.getFeeInfo()) : null;
187 this.accountingInfo = (null != clu.getAccountingInfo()) ? new CluAccountingInfo(clu.getAccountingInfo()) : null;
188 this.version = (null != clu.getVersion()) ? new VersionInfo(clu.getVersion()) : null;
189 this.effectiveDate = (null != clu.getEffectiveDate()) ? new Date(clu.getEffectiveDate().getTime()) : null;
190 this.expirationDate = (null != clu.getExpirationDate()) ? new Date(clu.getExpirationDate().getTime()) : null;
191 }
192 }
193
194 @Override
195 public RichTextInfo getDescr() {
196 return descr;
197 }
198
199 public void setDescr(RichTextInfo descr) {
200 this.descr = descr;
201 }
202
203 @Override
204 public CluIdentifierInfo getOfficialIdentifier() {
205 return officialIdentifier;
206 }
207
208 public void setOfficialIdentifier(CluIdentifierInfo officialIdentifier) {
209 this.officialIdentifier = officialIdentifier;
210 }
211
212 @Override
213 public List<CluIdentifierInfo> getAlternateIdentifiers() {
214 if (alternateIdentifiers == null) {
215 alternateIdentifiers = new ArrayList<CluIdentifierInfo>();
216 }
217 return alternateIdentifiers;
218 }
219
220 public void setAlternateIdentifiers(List<CluIdentifierInfo> alternateIdentifiers) {
221 this.alternateIdentifiers = alternateIdentifiers;
222 }
223
224 @Override
225 public String getStudySubjectArea() {
226 return studySubjectArea;
227 }
228
229 public void setStudySubjectArea(String studySubjectArea) {
230 this.studySubjectArea = studySubjectArea;
231 }
232
233 @Override
234 public List<AccreditationInfo> getAccreditations() {
235 if (accreditations == null) {
236 accreditations = new ArrayList<AccreditationInfo>();
237 }
238 return accreditations;
239 }
240
241 public void setAccreditations(List<AccreditationInfo> accreditations) {
242 this.accreditations = accreditations;
243 }
244
245 @Override
246 public List<String> getCampusLocations() {
247 if (campusLocations == null) {
248 campusLocations = new ArrayList<String>();
249 }
250 return campusLocations;
251 }
252
253 public void setCampusLocations(List<String> campusLocations) {
254 this.campusLocations = campusLocations;
255 }
256
257 @Override
258 public List<AdminOrgInfo> getAdminOrgs() {
259 if (adminOrgs == null) {
260 adminOrgs = new ArrayList<AdminOrgInfo>();
261 }
262 return adminOrgs;
263 }
264
265 public void setAdminOrgs(List<AdminOrgInfo> adminOrgs) {
266 this.adminOrgs = adminOrgs;
267 }
268
269 @Override
270 public CluInstructorInfo getPrimaryInstructor() {
271 return primaryInstructor;
272 }
273
274 public void setPrimaryInstructor(CluInstructorInfo primaryInstructor) {
275 this.primaryInstructor = primaryInstructor;
276 }
277
278 @Override
279 public List<CluInstructorInfo> getInstructors() {
280 if (instructors == null) {
281 instructors = new ArrayList<CluInstructorInfo>();
282 }
283 return instructors;
284 }
285
286 public void setInstructors(List<CluInstructorInfo> instructors) {
287 this.instructors = instructors;
288 }
289
290 @Override
291 public AmountInfo getIntensity() {
292 return intensity;
293 }
294
295 public void setIntensity(AmountInfo intensity) {
296 this.intensity = intensity;
297 }
298
299 @Override
300 public TimeAmountInfo getStdDuration() {
301 return stdDuration;
302 }
303
304 public void setStdDuration(TimeAmountInfo stdDuration) {
305 this.stdDuration = stdDuration;
306 }
307
308 @Override
309 public Boolean getCanCreateLui() {
310 return canCreateLui;
311 }
312
313 public void setCanCreateLui(Boolean canCreateLui) {
314 this.canCreateLui = canCreateLui;
315 }
316
317 @Override
318 public String getReferenceURL() {
319 return referenceURL;
320 }
321
322 public void setReferenceURL(String referenceURL) {
323 this.referenceURL = referenceURL;
324 }
325
326 @Override
327 public List<LuCodeInfo> getLuCodes() {
328 if (luCodes == null) {
329 luCodes = new ArrayList<LuCodeInfo>();
330 }
331 return luCodes;
332 }
333
334 public void setLuCodes(List<LuCodeInfo> luCodes) {
335 this.luCodes = luCodes;
336 }
337
338 @Override
339 public String getNextReviewPeriod() {
340 return nextReviewPeriod;
341 }
342
343 public void setNextReviewPeriod(String nextReviewPeriod) {
344 this.nextReviewPeriod = nextReviewPeriod;
345 }
346
347 @Override
348 public Boolean getIsEnrollable() {
349 return isEnrollable;
350 }
351
352 public void setIsEnrollable(Boolean isEnrollable) {
353 this.isEnrollable = isEnrollable;
354 }
355
356 @Override
357 public List<String> getOfferedAtpTypes() {
358 if (offeredAtpTypes == null) {
359 offeredAtpTypes = new ArrayList<String>();
360 }
361 return offeredAtpTypes;
362 }
363
364 public void setOfferedAtpTypes(List<String> offeredAtpTypes) {
365 this.offeredAtpTypes = offeredAtpTypes;
366 }
367
368 @Override
369 public Boolean getIsHasEarlyDropDeadline() {
370 return isHasEarlyDropDeadline;
371 }
372
373 public void setIsHasEarlyDropDeadline(Boolean hasEarlyDropDeadline) {
374 this.isHasEarlyDropDeadline = hasEarlyDropDeadline;
375 }
376
377 @Override
378 public int getDefaultEnrollmentEstimate() {
379 return defaultEnrollmentEstimate;
380 }
381
382 public void setDefaultEnrollmentEstimate(int defaultEnrollmentEstimate) {
383 this.defaultEnrollmentEstimate = defaultEnrollmentEstimate;
384 }
385
386 @Override
387 public int getDefaultMaximumEnrollment() {
388 return defaultMaximumEnrollment;
389 }
390
391 public void setDefaultMaximumEnrollment(int defaultMaximumEnrollment) {
392 this.defaultMaximumEnrollment = defaultMaximumEnrollment;
393 }
394
395 @Override
396 public Boolean getIsHazardousForDisabledStudents() {
397 return isHazardousForDisabledStudents;
398 }
399
400 public void setIsHazardousForDisabledStudents(Boolean isHazardousForDisabledStudents) {
401 this.isHazardousForDisabledStudents = isHazardousForDisabledStudents;
402 }
403
404 @Override
405 public CluFeeInfo getFeeInfo() {
406 return feeInfo;
407 }
408
409 public void setFeeInfo(CluFeeInfo feeInfo) {
410 this.feeInfo = feeInfo;
411 }
412
413 @Override
414 public CluAccountingInfo getAccountingInfo() {
415 return accountingInfo;
416 }
417
418 public void setAccountingInfo(CluAccountingInfo accountingInfo) {
419 this.accountingInfo = accountingInfo;
420 }
421
422 @Override
423 public VersionInfo getVersion() {
424 return version;
425 }
426
427 public void setVersion(VersionInfo version) {
428 this.version = version;
429 }
430
431 @Override
432 public String getExpectedFirstAtp() {
433 return expectedFirstAtp;
434 }
435
436 public void setExpectedFirstAtp(String expectedFirstAtp) {
437 this.expectedFirstAtp = expectedFirstAtp;
438 }
439
440 @Override
441 public String getLastAtp() {
442 return lastAtp;
443 }
444
445 public void setLastAtp(String lastAtp) {
446 this.lastAtp = lastAtp;
447 }
448
449 @Override
450 public String getLastAdmitAtp() {
451 return lastAdmitAtp;
452 }
453
454 public void setLastAdmitAtp(String lastAdmitAtp) {
455 this.lastAdmitAtp = lastAdmitAtp;
456 }
457
458 @Override
459 public Date getEffectiveDate() {
460 return effectiveDate;
461 }
462
463 public void setEffectiveDate(Date effectiveDate) {
464 this.effectiveDate = effectiveDate;
465 }
466
467 @Override
468 public Date getExpirationDate() {
469 return expirationDate;
470 }
471
472 public void setExpirationDate(Date expirationDate) {
473 this.expirationDate = expirationDate;
474 }
475
476 @Override
477 public String toString() {
478 return "CluInfo[id=" + this.getId() + ", type=" + this.getTypeKey() + "]";
479 }
480
481 }