1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.student.enrollment.class2.courseoffering.service.impl;
18
19 import org.apache.log4j.Logger;
20 import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader;
21 import org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl;
22 import org.kuali.student.r2.core.acal.service.AcademicCalendarService;
23 import org.kuali.student.enrollment.class2.courseoffering.refdata.CluFixer;
24 import org.kuali.student.enrollment.class2.courseoffering.service.TestServiceCallViewHelperService;
25 import org.kuali.student.enrollment.courseoffering.service.CourseOfferingService;
26 import org.kuali.student.enrollment.courseofferingset.service.CourseOfferingSetService;
27 import org.kuali.student.r2.common.constants.CommonServiceConstants;
28 import org.kuali.student.r2.common.dto.ContextInfo;
29 import org.kuali.student.r2.core.constants.AcademicCalendarServiceConstants;
30 import org.kuali.student.r2.common.util.constants.CourseOfferingServiceConstants;
31 import org.kuali.student.r2.common.util.constants.CourseOfferingSetServiceConstants;
32 import org.kuali.student.r2.core.constants.PopulationServiceConstants;
33 import org.kuali.student.r2.core.population.service.PopulationService;
34 import org.kuali.student.r2.lum.course.service.CourseService;
35 import org.kuali.student.r2.lum.lrc.service.LRCService;
36 import org.kuali.student.r2.lum.util.constants.LrcServiceConstants;
37
38 import javax.xml.namespace.QName;
39 import java.util.List;
40
41
42
43
44
45
46
47 public class TestServiceCallViewHelperServiceImpl extends ViewHelperServiceImpl implements TestServiceCallViewHelperService {
48 private AcademicCalendarService acalService = null;
49 private CourseOfferingService coService = null;
50 private CourseOfferingSetService socService = null;
51 private CourseService courseService = null;
52 private PopulationService populationService = null;
53 private LRCService lrcService = null;
54 private CluFixer cluFixer;
55 private ContextInfo contextInfo = new ContextInfo();
56 private static final Logger LOG = Logger.getLogger(TestServiceCallViewHelperServiceImpl.class);
57
58 @Override
59 public List<String> getSocIdsByTerm(String termId) throws Exception {
60 _initServices();
61 List<String> socIds = socService.getSocIdsByTerm(termId, contextInfo);
62 return socIds;
63 }
64
65 String[] seatpoolIds = { "0201b1ab-342c-4e3e-8ecb-9f2664840a6f",
66 "02ba300c-fd90-4992-92fd-741bd6f0a2a9",
67 "03deab32-5d50-420b-b8b1-b8d6988a39e6",
68 "071906da-9948-46d5-84ab-09b3686f37da",
69 "098280e8-6439-4cd4-8fc2-6c230b44dd19",
70 "0b701ef2-3b62-4f3c-b946-c0168ac974b9",
71 "0be56ad6-4073-4a28-9df8-8cab20f046ef",
72 "0d31995b-49b3-44a2-af37-48dcc6d38a61",
73 "0ff07b2d-fca4-4280-83b9-b61f75a54b5e",
74 "17e5cd80-7660-4179-82f7-6431489badb1",
75 "1c4ae57d-f65b-44fc-b03a-7d66207e1e16",
76 "1df0d3c2-44f6-4faf-ac35-30be0c4ead9c",
77 "1f6367e6-da7a-448d-beb6-e10cbbdd9437",
78 "2125b83f-269a-49cc-9bcb-3130407c13c4",
79 "219eba01-5f42-48b8-aecf-2e84fb631d07",
80 "244ce4af-8efe-447c-a3bb-43029fe08678",
81 "279c1d21-1296-470f-9d1e-62ef02568701",
82 "27c10ec7-067d-4537-9f35-d508d3590b7d",
83 "288c4b3f-ca52-43bf-9a2a-cccf591806e5",
84 "2ccf4a39-c4ec-41dc-819e-a6769f94bc63",
85 "2f2aa7d9-03ba-468b-b912-99f42e83dca7",
86 "31895de0-1ad2-4443-9d63-de60e097cb45",
87 "33eb196b-a7a9-425e-8347-fde8546c2fde",
88 "34ef9e0d-4b0a-4257-92c9-79e194790077",
89 "371174eb-1547-4c3d-b310-38220e80cc71",
90 "37dcd6a0-94a3-4012-b66b-66863f32af34",
91 "39a414fc-95b3-4f00-89b8-9d7aff89a63b",
92 "3be90933-bafd-4f97-92cb-68328dbeb632",
93 "3df57340-2d22-437e-9225-c171e2fdef98",
94 "3e54fb84-b45d-49df-8bb2-f951b4dc6e71",
95 "40729ced-9dda-4f56-97bc-cffcca2ed641",
96 "49a4f7e2-ee6d-4938-bd6d-ae6d2f142529",
97 "4a86ad3e-8026-405b-af52-85c16ebd2bd1",
98 "4c30c92d-5c7f-4bb6-8e41-32dc78eaefff",
99 "4e119624-8eeb-4c15-98ee-507fe259f942",
100 "4e5542b6-65ea-45e3-9e06-4feb7d67b3b5",
101 "5033d31b-3504-456d-aa19-ca2ddc086a58",
102 "50b6cf91-033e-4b9e-af0b-03f05467d834",
103 "510a701b-a221-4b74-a429-c8d5cf4a1d67",
104 "51ad1361-391a-4a18-894f-2331838e73e8",
105 "59c2e0a0-28a8-4345-abe2-dd9310452fc4",
106 "5b2fb2ed-1867-417a-a9f6-2c74df64f512",
107 "5eb01f9e-0058-42a6-b942-28aa6fd14bd6",
108 "5f0f12c4-2b40-4544-8f1e-d937853b0f65",
109 "5f2ab9d5-26a5-4dd1-a633-a44dd9f9cbdf",
110 "5fda59aa-2bee-42f2-b36f-96fd291a9d7d",
111 "60f47385-680a-4e9b-ae53-3490920a51eb",
112 "61c6f740-93f8-471a-8df9-96a17e3e096c",
113 "626cf4cd-914b-49a3-a2b4-8b836c6fc693",
114 "6358adb8-60ed-4982-b091-0055eaa1a1a4",
115 "6381face-4e20-4fc4-a98a-052c02b7dc29",
116 "65a97bdb-2713-4129-a664-7a57b51f45db",
117 "6661284f-e282-4ca5-99df-ee872586aa14",
118 "6936ea76-d2ea-4e4d-9c11-03043a66cda7",
119 "6b8f9c95-5e00-4317-a701-10fd459b19fc",
120 "6c275d7b-d93c-4269-88eb-91b0b9e3548f",
121 "6d3ea0e7-4ce4-430d-b839-c34043a40e02",
122 "6d785ef9-9517-4ce3-a6cb-d39f9f810cbb",
123 "7083fa70-82fd-4bdb-92ac-b1faa3cfd1da",
124 "70c426ea-ea18-4eef-b20a-bcb92bc2d096",
125 "73aa844f-3e8d-4d35-a0cf-6597bec3a4df",
126 "7759a14c-be98-41e8-9e54-023732266bbb",
127 "7b3d75a5-ae19-4a74-8a07-a880df9acc0b",
128 "7d6cbe9b-7e9f-41fc-be14-c452921bb6c0",
129 "7e9f1a53-a6c6-4245-bb7f-95c28bfa1967",
130 "7fd407a4-f87a-47fd-aa54-68b862037f44",
131 "834d1435-7684-429c-aafa-92fac236068a",
132 "8764935e-e015-4faf-8272-c8f96f5bbc28",
133 "87ca94d6-dd3f-412f-a26b-26b34032fe3b",
134 "8a087933-565d-4748-b9f4-56fdeb6d4ffe",
135 "8b57e639-1d19-4508-872f-3e5c6da07750",
136 "8be5af6a-1d4e-4cc5-9827-75246efc7da7",
137 "8befb71b-dace-4a09-a47c-766428892731",
138 "8bfa7b87-5a48-4fc0-aac8-d0493d786f30",
139 "8ecce06c-d5b7-41e9-9313-c8b43ab7a200",
140 "906e0d98-6109-4b4d-b157-f7d8ff662bdb",
141 "9337172f-21a6-4c50-b7a6-3d24f697a9f7",
142 "94d9237b-af39-4211-901b-b88b41752d8d",
143 "95234230-f1f1-4665-8569-8bce7637a485",
144 "95bf9c62-6458-4a9d-be51-43904f822778",
145 "96053b8c-7735-4009-9041-8f1a3a38badd",
146 "97e84327-120b-4d65-9d90-008f64559a0c",
147 "9e4bf5b3-2eb6-4728-9626-250c93c80f70",
148 "9e4c5bad-2b3f-4aef-91ed-4d5b0fd74ded",
149 "a01b9fe9-26f4-4cff-9c50-34300782e670",
150 "a18b672c-79a3-45cd-a86b-03af1e77bb0c",
151 "a2d3fe30-aa36-4e0c-8e80-5f388f13af6c",
152 "a38ec610-5afa-408b-a6ba-6a43f2b3dee0",
153 "a5f20784-2560-4810-86be-668261c53da3",
154 "a6b10e50-bab2-4e29-99d3-7e0891138038",
155 "a76acb6f-fc98-4973-bed3-fef6383319c5",
156 "a7c14500-9709-42bf-9cdf-d61507d9f83a",
157 "a933428a-4ff9-42c8-a196-e6f257702116",
158 "ad533aeb-35d4-4386-9937-fceff5e937e9",
159 "ae8d868d-e778-49c9-9505-e619e724a7ab",
160 "afbc6ddb-1622-4d8c-b358-b62dffef5734",
161 "b165aabd-8363-4c5f-8033-568ce60174e9",
162 "b4258b7b-76d7-4662-8803-8c0384cb12bf",
163 "b4494697-c9d4-4b69-982d-f2954519f0e3",
164 "b4bfa7f8-f65d-4f48-9ba5-64abf548b854"};
165
166 String[] aoIds = {"34534989-dce6-4e54-80d2-2725e57d599f",
167 "0bfe63c1-4a77-4d90-89bb-42942f3a04c1",
168 "3a301fd0-bbc0-4763-9f1c-88631b1d209e",
169 "e49e158b-9c95-4aab-8c67-6d0fc38041e9",
170 "bb65fe98-964c-4dd5-b50c-92544d7f5ccf",
171 "40e30b81-66ff-4c19-b194-27b204e8a75d",
172 "34fc0741-0df6-489b-ad66-eb0b2507e8c6",
173 "9ef1c8af-87cc-4722-af76-b97866d5a506",
174 "0677a25f-5275-448c-bdd2-3cb0309f7a5a",
175 "4c014238-c2ff-40e6-add9-5a8982d35870",
176 "955579e4-2679-4f69-bcb9-9d194024b4c5",
177 "619451a5-e0ca-49ef-abf8-4345f101565d",
178 "4a4bb795-9671-44a8-93f2-b5455f311c10",
179 "c45bf6fc-d694-4fa0-b2d4-2f7e19fc40c8",
180 "34fc0741-0df6-489b-ad66-eb0b2507e8c6",
181 "99d2e788-bc46-4242-a0a4-406b4b2b620f",
182 "c76e3d55-0154-4da2-9f6d-1304a0c1528a",
183 "9e06c246-6d4b-405d-a0f5-311bc95f6503",
184 "9c8fd6bd-5fa2-4545-951e-de164a3abe5e",
185 "bb65fe98-964c-4dd5-b50c-92544d7f5ccf",
186 "045885e0-2527-459d-82cb-f4ebf59db3be",
187 "c4c4dd73-95d7-41e4-aad2-f11c88c40237",
188 "f651bd99-206c-447e-bc7b-c029f74aabaf",
189 "736064c9-7f87-45bf-8af2-3155a61e0d33",
190 "5805a0ca-dd9d-4559-a628-378b0f923db1",
191 "0b4bbd1b-41a0-4127-87bd-e8e33415dca7",
192 "9a81a6f7-d31a-4b49-a7f0-ff581be89fff",
193 "e636edef-6d7a-422b-b1af-1905c9d22860",
194 "736064c9-7f87-45bf-8af2-3155a61e0d33",
195 "bdc264b4-0e94-4576-89c2-b62edf38ff2c",
196 "276b19bd-3694-4c7b-9dfe-70fb468dca93",
197 "0f072c7f-bd4b-4f30-afad-f3c48655d5d1",
198 "f651bd99-206c-447e-bc7b-c029f74aabaf",
199 "37f45d7a-e5f5-469f-9923-6e21339ffac7",
200 "9e06c246-6d4b-405d-a0f5-311bc95f6503",
201 "3be9d106-f201-445b-94b8-af34c430a830",
202 "069d6479-0874-4839-ab06-a76107a2e2ed",
203 "0f072c7f-bd4b-4f30-afad-f3c48655d5d1",
204 "0f072c7f-bd4b-4f30-afad-f3c48655d5d1",
205 "15d39449-795f-448e-b184-e5df3430d18e",
206 "0bfe63c1-4a77-4d90-89bb-42942f3a04c1",
207 "d084e676-d009-4e4c-bdda-ba4c2b21517c",
208 "8c8dd5bf-d678-4be1-982f-1f074cf9fe1a",
209 "e5fbb3cb-20d4-4885-ac6a-5e0a0aea4a5e",
210 "8d136d8d-4bed-4048-95d9-6dfefd44c994",
211 "b36f0037-bb56-49cd-b7de-7919572c8f92",
212 "9c8fd6bd-5fa2-4545-951e-de164a3abe5e",
213 "8d136d8d-4bed-4048-95d9-6dfefd44c994",
214 "af6971b5-b2e3-4c33-8718-dafd184150d6",
215 "46594cb4-9ac0-495b-b574-a5f5d83286a8",
216 "3a301fd0-bbc0-4763-9f1c-88631b1d209e",
217 "be68efa2-819d-4ecc-87bf-dc74d5dfaada",
218 "506f8275-b474-47bd-8cdc-0385c74ab2eb",
219 "a21d0070-d68f-4ff2-831b-9ab7880fc185",
220 "e49e158b-9c95-4aab-8c67-6d0fc38041e9",
221 "b36f0037-bb56-49cd-b7de-7919572c8f92",
222 "a2df8009-4a92-4204-9e07-5b21499a463e",
223 "d9440f0a-5c1f-44f4-ae49-27040da066ee",
224 "99d2e788-bc46-4242-a0a4-406b4b2b620f",
225 "455ba0f9-7089-413d-b18f-3fb1e796017c",
226 "0118da0b-73bf-47f3-9ebd-3547efa174ce",
227 "3343d76f-7eb0-403d-bb0e-236cffc7e7bb",
228 "efb38ffc-85f7-43ab-8857-5a3a74679670",
229 "15d39449-795f-448e-b184-e5df3430d18e",
230 "0b4bbd1b-41a0-4127-87bd-e8e33415dca7",
231 "48d97a2d-17f7-4216-be5f-68f1e8770b87",
232 "f651bd99-206c-447e-bc7b-c029f74aabaf",
233 "a7a950d8-dedc-40f5-b087-3acd1b4abec3",
234 "65109be4-7345-426e-af50-f1f3dded9c2e",
235 "5e106f60-21f4-403b-8d50-71b121b265cb",
236 "4fbb6527-88e5-42fc-8e6d-3c8c3bd9ee53",
237 "e49e158b-9c95-4aab-8c67-6d0fc38041e9",
238 "06089a2b-5199-4aac-927f-c6b956113ed3",
239 "0ceaede7-542b-4a36-a894-889a0eab4888",
240 "b4a1fc65-c36c-4a58-9918-5cae14011697",
241 "e636edef-6d7a-422b-b1af-1905c9d22860",
242 "c45bf6fc-d694-4fa0-b2d4-2f7e19fc40c8",
243 "0118da0b-73bf-47f3-9ebd-3547efa174ce",
244 "b57726de-f7da-4d3c-bc53-52b0f5aa1b40",
245 "15d39449-795f-448e-b184-e5df3430d18e",
246 "9e06c246-6d4b-405d-a0f5-311bc95f6503",
247 "276b19bd-3694-4c7b-9dfe-70fb468dca93",
248 "a2df8009-4a92-4204-9e07-5b21499a463e",
249 "9a81a6f7-d31a-4b49-a7f0-ff581be89fff",
250 "128e4bf2-2fe9-44bd-96c1-d0f155049cda",
251 "e5fbb3cb-20d4-4885-ac6a-5e0a0aea4a5e",
252 "34fc0741-0df6-489b-ad66-eb0b2507e8c6",
253 "5805a0ca-dd9d-4559-a628-378b0f923db1",
254 "be68efa2-819d-4ecc-87bf-dc74d5dfaada",
255 "e636edef-6d7a-422b-b1af-1905c9d22860",
256 "99d2e788-bc46-4242-a0a4-406b4b2b620f",
257 "0b4bbd1b-41a0-4127-87bd-e8e33415dca7",
258 "0118da0b-73bf-47f3-9ebd-3547efa174ce",
259 "b4a1fc65-c36c-4a58-9918-5cae14011697",
260 "c6f0c211-619f-47fe-8470-343f246d3273",
261 "276b19bd-3694-4c7b-9dfe-70fb468dca93",
262 "bb65fe98-964c-4dd5-b50c-92544d7f5ccf",
263 "4d9ea07b-82ec-4af6-9a6d-c6a5f977f727",
264 "8d136d8d-4bed-4048-95d9-6dfefd44c994",
265 "48d97a2d-17f7-4216-be5f-68f1e8770b87"};
266
267 @Override
268 public void verifyPopulations() throws Exception {
269
270 _initServices();
271
272 new Thread(new CluFixRunner(cluFixer)).start();
273 }
274
275 public class CluFixRunner implements Runnable {
276 private CluFixer cluFixer;
277
278 public CluFixRunner(CluFixer cluFixer) {
279 this.cluFixer = cluFixer;
280 }
281
282 @Override
283 public void run() {
284 try {
285 cluFixer.cleanClus("C:/Users/Charles/Desktop/Kuali/RefData/courseIds.txt");
286 } catch (Exception e) {
287 e.printStackTrace();
288 }
289 }
290 }
291
292 private void _initServices() {
293 if (coService == null) {
294 coService = (CourseOfferingService) GlobalResourceLoader.getService(new QName(CourseOfferingServiceConstants.NAMESPACE,
295 CourseOfferingServiceConstants.SERVICE_NAME_LOCAL_PART));
296 }
297
298 if (socService == null) {
299 socService = (CourseOfferingSetService) GlobalResourceLoader.getService(new QName(CourseOfferingSetServiceConstants.NAMESPACE,
300 CourseOfferingSetServiceConstants.SERVICE_NAME_LOCAL_PART));
301 }
302
303 if (courseService == null) {
304 Object o = GlobalResourceLoader.getService(new QName(CommonServiceConstants.REF_OBJECT_URI_GLOBAL_PREFIX + "course",
305 "CourseService"));
306 courseService = (CourseService) o;
307 }
308
309 if (acalService == null) {
310 acalService = (AcademicCalendarService) GlobalResourceLoader.getService(new QName(AcademicCalendarServiceConstants.NAMESPACE,
311 AcademicCalendarServiceConstants.SERVICE_NAME_LOCAL_PART));
312 }
313
314 if (populationService == null) {
315 populationService = (PopulationService) GlobalResourceLoader.getService(new QName(PopulationServiceConstants.NAMESPACE,
316 PopulationServiceConstants.SERVICE_NAME_LOCAL_PART));
317 }
318
319 if (lrcService == null) {
320 lrcService = (LRCService) GlobalResourceLoader.getService(new QName(LrcServiceConstants.NAMESPACE,
321 LrcServiceConstants.SERVICE_NAME_LOCAL_PART));
322 }
323
324 if(cluFixer == null){
325 cluFixer = (CluFixer) GlobalResourceLoader.getService(new QName("http://student.kuali.org/wsdl/cluFixer","CluFixer"));
326 }
327 }
328 }
329