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.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.enrollment.courseoffering.infc.RegistrationGroupTemplate;
29 import org.kuali.student.enrollment.courseoffering.infc.ActivityOfferingTemplate;
30 import org.kuali.student.r2.common.dto.IdEntityInfo;
31
32 import org.w3c.dom.Element;
33
34
35
36
37 @XmlAccessorType(XmlAccessType.FIELD)
38 @XmlType(name = "RegistrationGroupTemplateInfo", propOrder = {
39 "id", "typeKey", "stateKey", "name", "descr",
40 "formatOfferingId", "activityOfferingTemplates",
41 "meta", "attributes", "_futureElements"})
42
43 public class RegistrationGroupTemplateInfo
44 extends IdEntityInfo
45 implements RegistrationGroupTemplate {
46
47 private static final long serialVersionUID = 1L;
48
49 @XmlElement
50 private String formatOfferingId;
51
52 @XmlElement
53 private List<ActivityOfferingTemplateInfo> activityOfferingTemplates;
54
55 @XmlAnyElement
56 private List<Element> _futureElements;
57
58
59
60
61
62 public RegistrationGroupTemplateInfo() {
63 }
64
65
66
67
68
69
70
71 public RegistrationGroupTemplateInfo(RegistrationGroupTemplate template) {
72 super(template);
73
74 if (template == null) {
75 return;
76 }
77
78 this.formatOfferingId = template.getFormatOfferingId();
79 if (template.getActivityOfferingTemplates() != null) {
80 this.activityOfferingTemplates = new ArrayList<ActivityOfferingTemplateInfo>(template.getActivityOfferingTemplates().size());
81 for (ActivityOfferingTemplate aotemplate : template.getActivityOfferingTemplates()) {
82 this.activityOfferingTemplates.add(new ActivityOfferingTemplateInfo(aotemplate));
83 }
84 }
85 }
86
87 @Override
88 public String getFormatOfferingId() {
89 return formatOfferingId;
90 }
91
92 public void setFormatOfferingId(String formatOfferingId) {
93 this.formatOfferingId = formatOfferingId;
94 }
95
96 @Override
97 public List<ActivityOfferingTemplateInfo> getActivityOfferingTemplates() {
98 if (activityOfferingTemplates == null) {
99 activityOfferingTemplates = new ArrayList<ActivityOfferingTemplateInfo>();
100 }
101
102 return activityOfferingTemplates;
103 }
104
105 public void setActivityOfferingTemplates(List<ActivityOfferingTemplateInfo> activityOfferingTemplates) {
106 this.activityOfferingTemplates = activityOfferingTemplates;
107 }
108 }