1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.student.enrollment.class2.courseoffering.form;
18
19 import org.kuali.rice.krad.web.form.UifFormBase;
20 import org.kuali.student.r2.core.acal.dto.TermInfo;
21
22
23
24
25
26
27 public class DiagnoseRolloverForm extends UifFormBase {
28
29 private String targetTermCode;
30 private String sourceTermCode;
31 private String courseOfferingCode;
32 private String displayedTargetTermCode;
33 private String targetTermStartDate;
34 private String targetTermEndDate;
35 private String targetLastRolloverDate;
36 private String displayedSourceTermCode;
37 private String sourceTermStartDate;
38 private String sourceTermEndDate;
39 private String statusField;
40 private String displayedCourseOfferingCode;
41 private String coCodeId;
42 private String courseOfferingTitle;
43 private String rolloverDuration;
44 private TermInfo sourceTerm;
45 private TermInfo targetTerm;
46 private boolean isRolloverButtonDisabled;
47 private boolean isDeleteCoButtonDisabled;
48 private boolean isGoTargetButtonDisabled;
49 private boolean isCourseOfferingInfoRendered;
50 private boolean isTargetTermInfoRendered;
51
52 public DiagnoseRolloverForm(){
53 sourceTermCode = "";
54 resetForm();
55 }
56
57 public String getRolloverDuration() {
58 return rolloverDuration;
59 }
60
61 public void setRolloverDuration(String rolloverDuration) {
62 this.rolloverDuration = rolloverDuration;
63 }
64
65 public String getCourseOfferingTitle() {
66 return courseOfferingTitle;
67 }
68
69 public void setCourseOfferingTitle(String courseOfferingTitle) {
70 this.courseOfferingTitle = courseOfferingTitle;
71 }
72
73 public String getDisplayedCourseOfferingCode() {
74 return displayedCourseOfferingCode;
75 }
76
77 public void setDisplayedCourseOfferingCode(String displayedCourseOfferingCode) {
78 this.displayedCourseOfferingCode = displayedCourseOfferingCode;
79 }
80
81 public String getCoCodeId() {
82 return coCodeId;
83 }
84
85 public void setCoCodeId(String coCodeId) {
86 this.coCodeId = coCodeId;
87 }
88
89 public void setIsDeleteCoButtonDisabled(boolean value) {
90 isDeleteCoButtonDisabled = value;
91 }
92
93 public boolean getIsDeleteCoButtonDisabled() {
94 return isDeleteCoButtonDisabled;
95 }
96
97 public void setIsTargetTermInfoRendered(boolean value) {
98 isTargetTermInfoRendered = value;
99 }
100
101 public boolean getIsTargetTermInfoRendered() {
102 return isTargetTermInfoRendered;
103 }
104
105 public void setIsCourseOfferingInfoRendered(boolean value) {
106 isCourseOfferingInfoRendered = value;
107 }
108
109 public boolean getIsCourseOfferingInfoRendered() {
110 return isCourseOfferingInfoRendered;
111 }
112
113 public boolean getIsRolloverButtonDisabled() {
114 return isRolloverButtonDisabled;
115 }
116
117 public void setIsRolloverButtonDisabled(boolean value) {
118 isRolloverButtonDisabled = value;
119 }
120
121 public boolean getIsGoTargetButtonDisabled() {
122 return isGoTargetButtonDisabled;
123 }
124
125 public void setIsGoTargetButtonDisabled(boolean value) {
126 isGoTargetButtonDisabled = value;
127 }
128
129 public String getTargetTermCode() {
130 return targetTermCode;
131 }
132
133 public void setTargetTermCode(String targetTermCode) {
134 this.targetTermCode = targetTermCode;
135 }
136
137 public String getSourceTermCode() {
138 return sourceTermCode;
139 }
140
141 public void setSourceTermCode(String sourceTermCode) {
142 this.sourceTermCode = sourceTermCode;
143 }
144
145 public String getCourseOfferingCode() {
146 return courseOfferingCode;
147 }
148
149 public void setCourseOfferingCode(String courseOfferingCode) {
150 this.courseOfferingCode = courseOfferingCode;
151 }
152
153 public String getDisplayedTargetTermCode() {
154 return displayedTargetTermCode;
155 }
156
157 public void setDisplayedTargetTermCode(String displayedTargetTermCode) {
158 this.displayedTargetTermCode = displayedTargetTermCode;
159 }
160
161 public String getTargetTermStartDate() {
162 return targetTermStartDate;
163 }
164
165 public void setTargetTermStartDate(String targetTermStartDate) {
166 this.targetTermStartDate = targetTermStartDate;
167 }
168
169 public String getTargetTermEndDate() {
170 return targetTermEndDate;
171 }
172
173 public void setTargetTermEndDate(String targetTermEndDate) {
174 this.targetTermEndDate = targetTermEndDate;
175 }
176
177 public String getTargetLastRolloverDate() {
178 return targetLastRolloverDate;
179 }
180
181 public void setTargetLastRolloverDate(String targetLastRolloverDate) {
182 this.targetLastRolloverDate = targetLastRolloverDate;
183 }
184
185 public String getDisplayedSourceTermCode() {
186 return displayedSourceTermCode;
187 }
188
189 public void setDisplayedSourceTermCode(String displayedSourceTermCode) {
190 this.displayedSourceTermCode = displayedSourceTermCode;
191 }
192
193 public String getSourceTermStartDate() {
194 return sourceTermStartDate;
195 }
196
197 public void setSourceTermStartDate(String sourceTermStartDate) {
198 this.sourceTermStartDate = sourceTermStartDate;
199 }
200
201 public String getSourceTermEndDate() {
202 return sourceTermEndDate;
203 }
204
205 public void setSourceTermEndDate(String sourceTermEndDate) {
206 this.sourceTermEndDate = sourceTermEndDate;
207 }
208
209 public String getStatusField() {
210 return statusField;
211 }
212
213 public void setStatusField(String statusField) {
214 this.statusField = statusField;
215 }
216
217 public TermInfo getSourceTerm() {
218 return sourceTerm;
219 }
220
221 public void setSourceTerm(TermInfo sourceTerm) {
222 this.sourceTerm = sourceTerm;
223 }
224
225 public TermInfo getTargetTerm() {
226 return targetTerm;
227 }
228
229 public void setTargetTerm(TermInfo targetTerm) {
230 this.targetTerm = targetTerm;
231 }
232
233 public void resetForm() {
234 targetTermCode = "";
235 courseOfferingCode = "";
236 displayedTargetTermCode = "";
237 targetTermStartDate = "";
238 targetTermEndDate = "";
239 targetLastRolloverDate = "";
240 displayedSourceTermCode = "";
241 sourceTermStartDate = "";
242 sourceTermEndDate = "";
243 statusField = "";
244 displayedCourseOfferingCode = "";
245 coCodeId = "";
246
247 isRolloverButtonDisabled = true;
248 isDeleteCoButtonDisabled = true;
249 isGoTargetButtonDisabled = true;
250 isCourseOfferingInfoRendered = false;
251 isTargetTermInfoRendered = false;
252 }
253
254 public void alertSourceCoValid(boolean value) {
255
256 if (value) {
257 isGoTargetButtonDisabled = false;
258 isCourseOfferingInfoRendered = true;
259 } else {
260 isGoTargetButtonDisabled = true;
261 isRolloverButtonDisabled = true;
262 isCourseOfferingInfoRendered = false;
263 }
264 }
265
266 public void alertTargetTermValid(boolean value) {
267
268 if (value) {
269 isRolloverButtonDisabled = false;
270 isTargetTermInfoRendered = true;
271 isDeleteCoButtonDisabled = false;
272 } else {
273 isRolloverButtonDisabled = true;
274 isTargetTermInfoRendered = false;
275 }
276 }
277
278 public void alertTargetTermHasCO() {
279 isRolloverButtonDisabled = true;
280 isDeleteCoButtonDisabled = false;
281 }
282 }