1
2
3
4
5
6
7
8
9
10
11 package org.kuali.student.r2.lum.program.dto;
12
13 import java.io.Serializable;
14 import java.util.ArrayList;
15 import java.util.List;
16
17 import javax.xml.bind.annotation.XmlAccessType;
18 import javax.xml.bind.annotation.XmlAccessorType;
19 import javax.xml.bind.annotation.XmlElement;
20 import javax.xml.bind.annotation.XmlType;
21
22 import org.kuali.student.r1.core.statement.dto.StatementTreeViewInfo;
23 import org.kuali.student.r2.common.dto.IdNamelessEntityInfo;
24 import org.kuali.student.r2.common.dto.RichTextInfo;
25 import org.kuali.student.r2.lum.course.dto.LoDisplayInfo;
26 import org.kuali.student.r2.lum.program.infc.ProgramRequirement;
27
28
29
30
31
32
33 @XmlType(name = "ProgramRequirementInfo", propOrder = {"id",
34 "typeKey",
35 "stateKey",
36 "descr",
37 "shortTitle",
38 "longTitle",
39 "learningObjectives",
40 "statement",
41 "minCredits",
42 "maxCredits",
43 "meta",
44 "attributes" })
45
46 @XmlAccessorType(XmlAccessType.FIELD)
47 public class ProgramRequirementInfo extends IdNamelessEntityInfo implements ProgramRequirement, Serializable {
48
49 private static final long serialVersionUID = 1L;
50 @XmlElement
51 private RichTextInfo descr;
52 @XmlElement
53 private String shortTitle;
54 @XmlElement
55 private String longTitle;
56 @XmlElement
57 private List<LoDisplayInfo> learningObjectives;
58 @XmlElement
59 private StatementTreeViewInfo statement;
60 @XmlElement
61 private Integer minCredits;
62 @XmlElement
63 private Integer maxCredits;
64
65
66
67
68
69
70 public ProgramRequirementInfo() {
71 }
72
73 public ProgramRequirementInfo(ProgramRequirement programRequirement) {
74 super(programRequirement);
75 if (programRequirement != null) {
76 if (programRequirement.getDescr() != null) {
77 this.descr = new RichTextInfo (programRequirement.getDescr());
78 }
79 this.shortTitle = programRequirement.getShortTitle();
80 this.longTitle = programRequirement.getLongTitle();
81 this.statement = programRequirement.getStatement();
82 this.minCredits = programRequirement.getMinCredits();
83 this.maxCredits = programRequirement.getMaxCredits();
84 List<LoDisplayInfo> los = new ArrayList<LoDisplayInfo>();
85 if (programRequirement.getLearningObjectives() != null) {
86 for (LoDisplayInfo loDisplay : programRequirement.getLearningObjectives()) {
87 los.add(new LoDisplayInfo(loDisplay));
88 }
89 }
90 }
91 }
92
93 @Override
94 public RichTextInfo getDescr() {
95 return descr;
96 }
97
98 public void setDescr(RichTextInfo descr) {
99 this.descr = descr;
100 }
101
102 @Override
103 public String getShortTitle() {
104 return shortTitle;
105 }
106
107 public void setShortTitle(String shortTitle) {
108 this.shortTitle = shortTitle;
109 }
110
111 @Override
112 public String getLongTitle() {
113 return longTitle;
114 }
115
116 public void setLongTitle(String longTitle) {
117 this.longTitle = longTitle;
118 }
119
120 @Override
121 public List<LoDisplayInfo> getLearningObjectives() {
122 if (null == learningObjectives) {
123 learningObjectives = new ArrayList<LoDisplayInfo>(0);
124 }
125 return learningObjectives;
126 }
127
128 public void setLearningObjectives(List<LoDisplayInfo> learningObjectives) {
129 this.learningObjectives = learningObjectives;
130 }
131
132 @Override
133 public StatementTreeViewInfo getStatement() {
134 return statement;
135 }
136
137 public void setStatement(StatementTreeViewInfo statement) {
138 this.statement = statement;
139 }
140
141 @Override
142 public Integer getMinCredits() {
143 return minCredits;
144 }
145
146 public void setMinCredits(Integer minCredits) {
147 this.minCredits = minCredits;
148 }
149
150 @Override
151 public Integer getMaxCredits() {
152 return maxCredits;
153 }
154
155 public void setMaxCredits(Integer maxCredits) {
156 this.maxCredits = maxCredits;
157 }
158
159
160
161 }