1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.labs.registration.form;
17
18 import org.kuali.rice.krad.web.form.UifFormBase;
19
20 import java.io.Serializable;
21 import java.util.ArrayList;
22 import java.util.Date;
23 import java.util.List;
24
25
26
27
28
29
30 public class LabsAdminRegistrationForm extends UifFormBase implements Serializable {
31 private String studentId;
32 private String studentName;
33 private String program;
34 private String standing;
35 private String credits;
36 private String major;
37 private String department;
38
39 private String termName = "Fall 2012";
40 private String termId = "11111";
41
42 private LabsAdminRegistrationCourse pendingDropCourse;
43
44 private int editRegisteredIndex;
45 private int editWaitlistedIndex;
46
47 private LabsAdminRegistrationCourse tempRegCourseEdit;
48 private LabsAdminRegistrationCourse tempWaitlistCourseEdit;
49
50 private List<LabsAdminRegistrationCourse> registeredCourses = new ArrayList<LabsAdminRegistrationCourse>();
51 private List<LabsAdminRegistrationCourse> waitlistedCourses = new ArrayList<LabsAdminRegistrationCourse>();
52 private List<LabsAdminRegistrationCourse> pendingCourses = new ArrayList<LabsAdminRegistrationCourse>();
53 private List<LabsAdminRegistrationIssue> registrationIssues = new ArrayList<LabsAdminRegistrationIssue>();
54
55 private List<LabsAdminRegistrationCourse> coursesInProcess = new ArrayList<LabsAdminRegistrationCourse>();
56
57 public LabsAdminRegistrationForm(){
58 editRegisteredIndex = -1;
59 editWaitlistedIndex = -1;
60
61 Date regDate = new Date();
62
63 LabsAdminRegistrationCourse course1 =
64 new LabsAdminRegistrationCourse("CHEM 237", "1001", "The Chemistry of Stuff", 3, "reg", regDate);
65 List<LabsAdminRegistrationActivity> activities1 = new ArrayList<LabsAdminRegistrationActivity>();
66 activities1.add(new LabsAdminRegistrationActivity("Lec", "MWF 01:00pm - 02:30pm", "Steve Capriani", "PTX 2391"));
67 activities1.add(new LabsAdminRegistrationActivity("Lab", "MWF 02:30pm - 03:30pm", "Steve Capriani", "PTX 2391"));
68 course1.setActivities(activities1);
69 course1.setSubterm(true);
70
71 registeredCourses.add(course1);
72
73 LabsAdminRegistrationCourse course2 =
74 new LabsAdminRegistrationCourse("ENGL 233", "1001", "The World of Shakespeare", 3, "audit", regDate);
75 course2.setEffectiveDate(new Date(regDate.getTime() - 86400000));
76 List<LabsAdminRegistrationActivity> activities2 = new ArrayList<LabsAdminRegistrationActivity>();
77 activities2.add(new LabsAdminRegistrationActivity("Lec", "MWF 01:00pm - 02:30pm", "Someone", "PTX 1111"));
78 course2.setActivities(activities2);
79
80 registeredCourses.add(course2);
81
82 LabsAdminRegistrationCourse course3 =
83 new LabsAdminRegistrationCourse("ENGL 640", "1001", "Light and Motion", 3, "pf", regDate);
84 List<LabsAdminRegistrationActivity> activities3 = new ArrayList<LabsAdminRegistrationActivity>();
85 activities3.add(new LabsAdminRegistrationActivity("Lec", "MWF 01:00pm - 02:30pm", "Someone", "PTX 1200"));
86 course3.setActivities(activities3);
87
88 registeredCourses.add(course3);
89
90 LabsAdminRegistrationCourse course4 =
91 new LabsAdminRegistrationCourse("CHEM 237", "1001", "The Chemistry of Stuff", 3, "reg", new Date());
92 List<LabsAdminRegistrationActivity> activities4 = new ArrayList<LabsAdminRegistrationActivity>();
93 activities4.add(new LabsAdminRegistrationActivity("Lec", "MWF 04:00pm - 05:30pm", "Steve Capriani", "PTX 2391"));
94 activities4.add(new LabsAdminRegistrationActivity("Lab", "MWF 05:30pm - 06:30pm", "Steve Capriani", "PTX 2391"));
95 course4.setActivities(activities4);
96
97 waitlistedCourses.add(course4);
98
99 pendingCourses.add(new LabsAdminRegistrationCourse());
100 }
101
102 public String getStudentId() {
103 return studentId;
104 }
105
106 public void setStudentId(String studentId) {
107 this.studentId = studentId;
108 }
109
110 public String getStudentName() {
111 return studentName;
112 }
113
114 public void setStudentName(String studentName) {
115 this.studentName = studentName;
116 }
117
118 public String getProgram() {
119 return program;
120 }
121
122 public void setProgram(String program) {
123 this.program = program;
124 }
125
126 public String getStanding() {
127 return standing;
128 }
129
130 public void setStanding(String standing) {
131 this.standing = standing;
132 }
133
134 public String getCredits() {
135 return credits;
136 }
137
138 public void setCredits(String credits) {
139 this.credits = credits;
140 }
141
142 public String getMajor() {
143 return major;
144 }
145
146 public void setMajor(String major) {
147 this.major = major;
148 }
149
150 public String getDepartment() {
151 return department;
152 }
153
154 public void setDepartment(String department) {
155 this.department = department;
156 }
157
158 public String getTermName() {
159 return termName;
160 }
161
162 public void setTermName(String termName) {
163 this.termName = termName;
164 }
165
166 public String getTermId() {
167 return termId;
168 }
169
170 public void setTermId(String termId) {
171 this.termId = termId;
172 }
173
174 public List<LabsAdminRegistrationCourse> getRegisteredCourses() {
175 return registeredCourses;
176 }
177
178 public void setRegisteredCourses(List<LabsAdminRegistrationCourse> registeredCourses) {
179 this.registeredCourses = registeredCourses;
180 }
181
182 public List<LabsAdminRegistrationCourse> getWaitlistedCourses() {
183 return waitlistedCourses;
184 }
185
186 public void setWaitlistedCourses(List<LabsAdminRegistrationCourse> waitlistedCourses) {
187 this.waitlistedCourses = waitlistedCourses;
188 }
189
190 public int getRegisteredCredits() {
191 int credits = 0;
192 for (LabsAdminRegistrationCourse course: registeredCourses) {
193 credits += course.getCredits();
194 }
195
196 return credits;
197 }
198
199 public int getWaitlistedCredits() {
200 int credits = 0;
201 for (LabsAdminRegistrationCourse course: waitlistedCourses) {
202 credits += course.getCredits();
203 }
204
205 return credits;
206 }
207
208 public List<LabsAdminRegistrationCourse> getPendingCourses() {
209 return pendingCourses;
210 }
211
212 public void setPendingCourses(List<LabsAdminRegistrationCourse> pendingCourses) {
213 this.pendingCourses = pendingCourses;
214 }
215
216 public List<LabsAdminRegistrationIssue> getRegistrationIssues() {
217 return registrationIssues;
218 }
219
220 public void setRegistrationIssues(List<LabsAdminRegistrationIssue> registrationIssues) {
221 this.registrationIssues = registrationIssues;
222 }
223
224 public List<LabsAdminRegistrationCourse> getCoursesInProcess() {
225 return coursesInProcess;
226 }
227
228 public void setCoursesInProcess(List<LabsAdminRegistrationCourse> coursesInProcess) {
229 this.coursesInProcess = coursesInProcess;
230 }
231
232 public LabsAdminRegistrationCourse getPendingDropCourse() {
233 return pendingDropCourse;
234 }
235
236 public void setPendingDropCourse(LabsAdminRegistrationCourse pendingDropCourse) {
237 this.pendingDropCourse = pendingDropCourse;
238 }
239
240 public int getEditRegisteredIndex() {
241 return editRegisteredIndex;
242 }
243
244 public void setEditRegisteredIndex(int editRegisteredIndex) {
245 this.editRegisteredIndex = editRegisteredIndex;
246 }
247
248 public int getEditWaitlistedIndex() {
249 return editWaitlistedIndex;
250 }
251
252 public void setEditWaitlistedIndex(int editWaitlistedIndex) {
253 this.editWaitlistedIndex = editWaitlistedIndex;
254 }
255
256 public LabsAdminRegistrationCourse getTempRegCourseEdit() {
257 return tempRegCourseEdit;
258 }
259
260 public void setTempRegCourseEdit(LabsAdminRegistrationCourse tempRegCourseEdit) {
261 this.tempRegCourseEdit = tempRegCourseEdit;
262 }
263
264 public LabsAdminRegistrationCourse getTempWaitlistCourseEdit() {
265 return tempWaitlistCourseEdit;
266 }
267
268 public void setTempWaitlistCourseEdit(LabsAdminRegistrationCourse tempWaitlistCourseEdit) {
269 this.tempWaitlistCourseEdit = tempWaitlistCourseEdit;
270 }
271 }