1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.lum.lu.ui.krms.dto;
17
18 import org.kuali.rice.krms.api.repository.proposition.PropositionDefinitionContract;
19 import org.kuali.rice.krms.dto.PropositionEditor;
20 import org.kuali.student.core.krms.dto.KSPropositionEditor;
21 import org.kuali.student.r2.core.acal.dto.TermInfo;
22 import org.kuali.student.r2.lum.course.dto.CourseInfo;
23 import org.kuali.student.r2.core.organization.dto.OrgInfo;
24
25
26 import java.util.Map;
27
28
29
30
31 public class LUPropositionEditor extends KSPropositionEditor {
32
33 private static final long serialVersionUID = 1L;
34
35 private CourseInfo courseInfo;
36 private CluSetInformation cluSet;
37 private String multipleCourseType;
38
39 private String programType;
40 private String gradeScale;
41 private OrgInfo orgInfo;
42 private CluSetInformation progCluSet;
43 private String termCode;
44 private String termCode2;
45 private TermInfo termInfo;
46 private TermInfo termInfo2;
47
48 private static final String CLULIST_KEY = "kuali.term.parameter.type.course.nl.clu.list";
49 private static final String CLUSETLIST_KEY = "kuali.term.parameter.type.course.nl.cluset.list";
50
51 public LUPropositionEditor(){
52 super();
53 }
54
55 public LUPropositionEditor(PropositionDefinitionContract definition) {
56 super(definition);
57 }
58
59 public void clear(){
60 super.clear();
61 this.courseInfo = null;
62 this.cluSet = null;
63 this.multipleCourseType = null;
64 this.programType = null;
65 this.gradeScale = null;
66 this.orgInfo = null;
67 this.progCluSet = null;
68 this.termCode = null;
69 this.termCode2 = null;
70 this.termInfo = null;
71 this.termInfo2 = null;
72 }
73
74 public CourseInfo getCourseInfo() {
75 return courseInfo;
76 }
77
78 public void setCourseInfo(CourseInfo courseInfo) {
79 this.courseInfo = courseInfo;
80 }
81
82 public String getMultipleCourseType() {
83 return multipleCourseType;
84 }
85
86 public void setMultipleCourseType(String multipleCourseType) {
87 this.multipleCourseType = multipleCourseType;
88 }
89
90 public String getProgramType() {
91 return programType;
92 }
93
94 public void setProgramType(String programType) {
95 this.programType = programType;
96 }
97
98
99 public String getGradeScale() {
100 return gradeScale;
101 }
102
103 public void setGradeScale(String gradeScale) {
104 this.gradeScale = gradeScale;
105 }
106
107 public CluSetInformation getCluSet() {
108 return cluSet;
109 }
110
111 public void setCluSet(CluSetInformation cluSet) {
112 this.cluSet = cluSet;
113 }
114
115 public OrgInfo getOrgInfo() {
116 return orgInfo;
117 }
118
119 public void setOrgInfo(OrgInfo orgInfo) {
120 this.orgInfo = orgInfo;
121 }
122
123 public CluSetInformation getProgCluSet() {
124 return progCluSet;
125 }
126
127 public void setProgCluSet(CluSetInformation progCluSet) {
128 this.progCluSet = progCluSet;
129 }
130
131 public String getTermCode() {
132 return termCode;
133 }
134
135 public void setTermCode(String termCode) {
136 this.termCode = termCode;
137 }
138
139 public TermInfo getTermInfo(){
140 return termInfo;
141 }
142
143 public void setTermInfo(TermInfo termInfo){
144 this.termInfo = termInfo;
145 }
146
147 public TermInfo getTermInfo2() {
148 return termInfo2;
149 }
150
151 public void setTermInfo2(TermInfo termInfo2) {
152 this.termInfo2 = termInfo2;
153 }
154
155 public String getTermCode2() {
156 return termCode2;
157 }
158
159 public void setTermCode2(String termCode2) {
160 this.termCode2 = termCode2;
161 }
162
163 @Override
164 protected PropositionEditor createPropositionEditor(PropositionDefinitionContract definition){
165 return new LUPropositionEditor(definition);
166 }
167
168 @Override
169 public Map<String, String> getNlParameters() {
170 Map<String, String> nlParameters = super.getNlParameters();
171 if (this.getCluSet() != null){
172 nlParameters.put(CLULIST_KEY, this.getCluSet().getCluDelimitedString());
173 nlParameters.put(CLUSETLIST_KEY, this.getCluSet().getCluSetDelimitedString());
174 }
175 else if (this.getProgCluSet() != null) {
176 nlParameters.put(CLULIST_KEY, this.getProgCluSet().getCluDelimitedString());
177 nlParameters.put(CLUSETLIST_KEY, this.getProgCluSet().getCluSetDelimitedString());
178 }
179 return nlParameters;
180 }
181 }