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.commons.lang.StringUtils;
20 import org.apache.log4j.Logger;
21 import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader;
22 import org.kuali.rice.kim.api.identity.Person;
23 import org.kuali.rice.krad.maintenance.MaintenanceDocument;
24 import org.kuali.rice.krad.uif.container.CollectionGroup;
25 import org.kuali.rice.krad.uif.view.View;
26 import org.kuali.rice.krad.util.GlobalVariables;
27 import org.kuali.rice.krad.util.KRADConstants;
28 import org.kuali.rice.krad.web.form.MaintenanceDocumentForm;
29 import org.kuali.student.enrollment.acal.dto.TermInfo;
30 import org.kuali.student.enrollment.acal.service.AcademicCalendarService;
31 import org.kuali.student.enrollment.class2.courseoffering.dto.CourseOfferingEditWrapper;
32 import org.kuali.student.enrollment.class2.courseoffering.dto.OfferingInstructorWrapper;
33 import org.kuali.student.enrollment.class2.courseoffering.dto.OrganizationInfoWrapper;
34 import org.kuali.student.enrollment.class2.courseoffering.service.CourseOfferingMaintainable;
35 import org.kuali.student.enrollment.class2.courseoffering.util.ActivityOfferingConstants;
36 import org.kuali.student.enrollment.class2.courseoffering.util.ViewHelperUtil;
37 import org.kuali.student.enrollment.courseoffering.dto.CourseOfferingInfo;
38 import org.kuali.student.enrollment.courseoffering.dto.CreditOptionInfo;
39 import org.kuali.student.enrollment.courseoffering.dto.FormatOfferingInfo;
40 import org.kuali.student.enrollment.courseoffering.dto.OfferingInstructorInfo;
41 import org.kuali.student.r2.common.constants.CommonServiceConstants;
42 import org.kuali.student.r2.common.dto.ContextInfo;
43 import org.kuali.student.r2.common.util.ContextUtils;
44 import org.kuali.student.r2.common.util.constants.CourseOfferingServiceConstants;
45 import org.kuali.student.r2.common.util.constants.LprServiceConstants;
46 import org.kuali.student.r2.common.util.constants.LuiServiceConstants;
47 import org.kuali.student.r2.common.util.date.DateFormatters;
48 import org.kuali.student.r2.core.organization.dto.OrgInfo;
49 import org.kuali.student.r2.core.organization.service.OrganizationService;
50 import org.kuali.student.r2.lum.course.dto.CourseInfo;
51 import org.kuali.student.r2.lum.course.dto.FormatInfo;
52 import org.kuali.student.r2.lum.course.service.assembler.CourseAssemblerConstants;
53 import org.kuali.student.r2.lum.lrc.dto.ResultValueInfo;
54 import org.kuali.student.r2.lum.lrc.dto.ResultValuesGroupInfo;
55 import org.kuali.student.r2.lum.lrc.service.LRCService;
56 import org.kuali.student.r2.lum.util.constants.LrcServiceConstants;
57
58 import javax.xml.namespace.QName;
59 import java.util.ArrayList;
60 import java.util.Arrays;
61 import java.util.Collections;
62 import java.util.HashSet;
63 import java.util.List;
64 import java.util.Map;
65 import java.util.Set;
66
67
68
69
70
71
72 public class CourseOfferingEditMaintainableImpl extends CourseOfferingMaintainableImpl implements CourseOfferingMaintainable{
73 private static final long serialVersionUID = 1L;
74 private final static Logger LOG = Logger.getLogger(CourseOfferingEditMaintainableImpl.class);
75
76 private transient OrganizationService organizationService;
77 private transient LRCService lrcService;
78 private transient AcademicCalendarService acalService;
79
80
81
82 @Override
83 public void saveDataObject() {
84 if (getMaintenanceAction().equals(KRADConstants.MAINTENANCE_EDIT_ACTION)) {
85 CourseOfferingEditWrapper coEditWrapper = (CourseOfferingEditWrapper)getDataObject();
86 updateCourseOffering(coEditWrapper);
87 }
88 else{
89 LOG.error(">>>Do not support!");
90 }
91
92 }
93
94 private void updateCourseOffering(CourseOfferingEditWrapper coEditWrapper){
95 try{
96
97 updateFormatOfferings(coEditWrapper);
98
99
100 List<String> unitDeploymentOrgIds = new ArrayList<String>();
101 for(OrganizationInfoWrapper orgWrapper : coEditWrapper.getOrganizationNames()){
102 unitDeploymentOrgIds.add(orgWrapper.getId());
103 }
104
105 CourseOfferingInfo coInfo = coEditWrapper.getCoInfo();
106 coInfo.setUnitsDeploymentOrgIds(unitDeploymentOrgIds);
107
108 ContextInfo contextInfo = ContextUtils.createDefaultContextInfo();
109
110
111 if (coEditWrapper.getCreditOption().getTypeKey().equals(LrcServiceConstants.RESULT_VALUES_GROUP_TYPE_KEY_FIXED) &&
112 !coEditWrapper.getCreditOption().getFixedCredit().isEmpty()) {
113 ResultValuesGroupInfo rvgInfo = getLrcService().getCreateFixedCreditResultValuesGroup(coEditWrapper.getCreditOption().getFixedCredit(),
114 LrcServiceConstants.RESULT_SCALE_KEY_CREDIT_DEGREE, contextInfo);
115 coInfo.setCreditOptionId(rvgInfo.getKey());
116 } else if (coEditWrapper.getCreditOption().getTypeKey().equals(LrcServiceConstants.RESULT_VALUES_GROUP_TYPE_KEY_RANGE) &&
117 !coEditWrapper.getCreditOption().getMinCredits().isEmpty() && !coEditWrapper.getCreditOption().getMaxCredits().isEmpty()) {
118 ResultValuesGroupInfo rvgInfo = getLrcService().getCreateRangeCreditResultValuesGroup(coEditWrapper.getCreditOption().getMinCredits(),
119 coEditWrapper.getCreditOption().getMaxCredits(), "1", LrcServiceConstants.RESULT_SCALE_KEY_CREDIT_DEGREE, contextInfo);
120 coInfo.setCreditOptionId(rvgInfo.getKey());
121 } else if (coEditWrapper.getCreditOption().getTypeKey().equals(LrcServiceConstants.RESULT_VALUES_GROUP_TYPE_KEY_MULTIPLE) &&
122 !coEditWrapper.getCreditOption().getCredits().isEmpty()) {
123 ResultValuesGroupInfo rvgInfo = getLrcService().getCreateMultipleCreditResultValuesGroup(coEditWrapper.getCreditOption().getCredits(),
124 LrcServiceConstants.RESULT_SCALE_KEY_CREDIT_DEGREE, contextInfo);
125 coInfo.setCreditOptionId(rvgInfo.getKey());
126 }
127
128
129 String courseOfferingCode = coEditWrapper.getCourse().getCode();
130 if (!StringUtils.isEmpty(coInfo.getCourseNumberSuffix())) {
131 courseOfferingCode += coInfo.getCourseNumberSuffix();
132 }
133 coInfo.setCourseOfferingCode(courseOfferingCode);
134
135
136 if (!coInfo.getHasWaitlist()) {
137 coInfo.setWaitlistTypeKey(null);
138 coInfo.setWaitlistLevelTypeKey(null);
139 }
140
141
142 if(coEditWrapper.getAuditStudentRegOpts() &&
143 !coInfo.getStudentRegistrationGradingOptions().contains(LrcServiceConstants.RESULT_GROUP_KEY_GRADE_AUDIT)){
144 coInfo.getStudentRegistrationGradingOptions().add(LrcServiceConstants.RESULT_GROUP_KEY_GRADE_AUDIT);
145 }else{
146 coInfo.getStudentRegistrationGradingOptions().remove(LrcServiceConstants.RESULT_GROUP_KEY_GRADE_AUDIT);
147 }
148 if(coEditWrapper.getPassFailStudentRegOpts() &&
149 !coInfo.getStudentRegistrationGradingOptions().contains(LrcServiceConstants.RESULT_GROUP_KEY_GRADE_PASSFAIL)){
150 coInfo.getStudentRegistrationGradingOptions().add(LrcServiceConstants.RESULT_GROUP_KEY_GRADE_PASSFAIL);
151 }else{
152 coInfo.getStudentRegistrationGradingOptions().remove(LrcServiceConstants.RESULT_GROUP_KEY_GRADE_PASSFAIL);
153 }
154
155 getCourseOfferingService().updateCourseOffering(coInfo.getId(), coInfo, contextInfo);
156
157
158 ViewHelperUtil.updateCourseOfferingStateFromActivityOfferingStateChange(coInfo, contextInfo);
159
160 } catch (Exception ex){
161 throw new RuntimeException(ex);
162 }
163
164 }
165
166 private void updateFormatOfferings(CourseOfferingEditWrapper coEditWrapper) throws Exception{
167 List<FormatOfferingInfo> updatedFormatOfferingList = new ArrayList<FormatOfferingInfo>();
168 List<FormatOfferingInfo> formatOfferingList = coEditWrapper.getFormatOfferingList();
169 CourseOfferingInfo coInfo = coEditWrapper.getCoInfo();
170 List <String> currentFOIds = getExistingFormatOfferingIds(coInfo.getId());
171 ContextInfo contextInfo = ContextUtils.createDefaultContextInfo();
172 if (formatOfferingList != null && !formatOfferingList.isEmpty()) {
173 for(FormatOfferingInfo formatOfferingInfo : formatOfferingList){
174 if(formatOfferingInfo.getId()!=null &&
175 !formatOfferingInfo.getId().isEmpty() &&
176 currentFOIds.contains(formatOfferingInfo.getId())) {
177
178 if (coInfo.getFinalExamType() != null && !coInfo.getFinalExamType().equals("STANDARD")) {
179 formatOfferingInfo.setFinalExamLevelTypeKey(null);
180 }
181 FormatOfferingInfo updatedFormatOffering = getCourseOfferingService().
182 updateFormatOffering(formatOfferingInfo.getId(),formatOfferingInfo, contextInfo);
183 updatedFormatOfferingList.add(updatedFormatOffering);
184 currentFOIds.remove(formatOfferingInfo.getId());
185 }
186 else{
187
188 formatOfferingInfo.setStateKey(LuiServiceConstants.LUI_FO_STATE_PLANNED_KEY);
189 formatOfferingInfo.setTypeKey(LuiServiceConstants.FORMAT_OFFERING_TYPE_KEY);
190 formatOfferingInfo.setTermId(coInfo.getTermId());
191 formatOfferingInfo.setCourseOfferingId(coInfo.getId());
192 if (coInfo.getFinalExamType() != null && !coInfo.getFinalExamType().equals("STANDARD")) {
193 formatOfferingInfo.setFinalExamLevelTypeKey(null);
194 }
195 FormatOfferingInfo createdFormatOffering = getCourseOfferingService().
196 createFormatOffering(coInfo.getId(), formatOfferingInfo.getFormatId(), formatOfferingInfo.getTypeKey(), formatOfferingInfo, contextInfo);
197 updatedFormatOfferingList.add(createdFormatOffering);
198 }
199 }
200 coEditWrapper.setFormatOfferingList(updatedFormatOfferingList);
201
202 }
203
204 if (currentFOIds != null && currentFOIds.size() > 0){
205 for(String formatOfferingId: currentFOIds){
206
207
208
209 getCourseOfferingService().deleteFormatOfferingCascaded(formatOfferingId, contextInfo);
210 }
211 }
212 }
213
214 private List<String> getExistingFormatOfferingIds(String courseOfferingId) throws Exception{
215 List<FormatOfferingInfo> formatOfferingInfoList = getCourseOfferingService().getFormatOfferingsByCourseOffering(courseOfferingId, ContextUtils.createDefaultContextInfo());
216 List<String> formatOfferingIds = new ArrayList<String>();
217
218 if(formatOfferingInfoList != null && !formatOfferingInfoList.isEmpty()){
219 for(FormatOfferingInfo formatOfferingInfo : formatOfferingInfoList){
220 formatOfferingIds.add(formatOfferingInfo.getId());
221 }
222 }
223 return formatOfferingIds;
224 }
225
226 @Override
227 protected boolean performAddLineValidation(View view, CollectionGroup collectionGroup, Object model, Object addLine) {
228 if (addLine instanceof OfferingInstructorInfo){
229 OfferingInstructorInfo instructorInfo = (OfferingInstructorInfo) addLine;
230
231
232 MaintenanceDocumentForm form = (MaintenanceDocumentForm)model;
233 CourseOfferingEditWrapper coEditWrapper = (CourseOfferingEditWrapper)form.getDocument().getNewMaintainableObject().getDataObject();
234 List<OfferingInstructorWrapper> instructors = coEditWrapper.getInstructors();
235 if(instructors != null && !instructors.isEmpty()){
236 for(OfferingInstructorWrapper thisInst : instructors){
237 if(instructorInfo.getPersonId().equals(thisInst.getOfferingInstructorInfo().getPersonId())){
238 GlobalVariables.getMessageMap().putErrorForSectionId("KS-CourseOfferingEdit-PersonnelSection", ActivityOfferingConstants.MSG_ERROR_INSTRUCTOR_DUPLICATE, instructorInfo.getPersonId());
239 return false;
240 }
241 }
242 }
243
244
245 List<Person> lstPerson = ViewHelperUtil.getInstructorByPersonId(instructorInfo.getPersonId());
246 if(lstPerson == null || lstPerson.isEmpty()){
247 GlobalVariables.getMessageMap().putErrorForSectionId("KS-CourseOfferingEdit-PersonnelSection", ActivityOfferingConstants.MSG_ERROR_INSTRUCTOR_NOTFOUND, instructorInfo.getPersonId());
248 return false;
249 }
250 }
251
252 return super.performAddLineValidation(view, collectionGroup, model, addLine);
253 }
254
255 @Override
256 protected void processBeforeAddLine(View view, CollectionGroup collectionGroup, Object model, Object addLine) {
257 if (addLine instanceof FormatOfferingInfo){
258 FormatOfferingInfo newLine = (FormatOfferingInfo)addLine;
259 String formatId = newLine.getFormatId();
260 MaintenanceDocumentForm form = (MaintenanceDocumentForm)model;
261 CourseOfferingEditWrapper coEditWrapper = (CourseOfferingEditWrapper)form.getDocument().getNewMaintainableObject().getDataObject();
262 getFormatInfo(coEditWrapper, formatId);
263
264 newLine.setName("FIX ME!");
265 newLine.setShortName("FIX ME!");
266 }
267 }
268
269 @Override
270 protected void processAfterAddLine(View view, CollectionGroup collectionGroup, Object model, Object addLine) {
271 if(addLine instanceof OfferingInstructorInfo) {
272
273 OfferingInstructorInfo instructorInfo = (OfferingInstructorInfo)addLine;
274 if(instructorInfo.getPersonName() == null && instructorInfo.getPersonId() != null) {
275 List<Person> personList = ViewHelperUtil.getInstructorByPersonId(instructorInfo.getPersonId());
276 if(personList.size() == 1) {
277 instructorInfo.setPersonName(personList.get(0).getName());
278 }
279 }
280
281
282 if(instructorInfo.getStateKey() == null) {
283 instructorInfo.setStateKey(LprServiceConstants.TENTATIVE_STATE_KEY);
284 }
285 }
286 }
287
288 @Override
289 public Object retrieveObjectForEditOrCopy(MaintenanceDocument document, Map<String, String> dataObjectKeys) {
290 try {
291 ContextInfo contextInfo = ContextUtils.createDefaultContextInfo();
292
293 if (getDataObject() instanceof CourseOfferingEditWrapper){
294
295 CourseOfferingInfo coInfo = getCourseOfferingService().getCourseOffering(dataObjectKeys.get("coInfo.id"), contextInfo);
296 CourseInfo courseInfo = getCourseService().getCourse(coInfo.getCourseId(), contextInfo);
297
298
299 CourseOfferingEditWrapper formObject = new CourseOfferingEditWrapper(coInfo);
300
301
302 formObject.setCourse(courseInfo);
303
304
305 List<FormatOfferingInfo> formatOfferingList = getCourseOfferingService().getFormatOfferingsByCourseOffering(coInfo.getId(), contextInfo);
306 formObject.setFormatOfferingList(formatOfferingList);
307
308
309
310 List<String> studentRegOptions = new ArrayList<String>();
311 List<String> crsGradingOptions = new ArrayList<String>();
312 if (coInfo.getCourseId() != null && courseInfo != null) {
313 List<String> gradingOptions = courseInfo.getGradingOptions();
314 Set<String> regOpts = new HashSet<String>(Arrays.asList(CourseOfferingServiceConstants.ALL_STUDENT_REGISTRATION_OPTION_TYPE_KEYS));
315 for (String gradingOption : gradingOptions) {
316 if (regOpts.contains(gradingOption)) {
317 studentRegOptions.add(gradingOption);
318 } else {
319 crsGradingOptions.add(gradingOption);
320 }
321 }
322
323 if("true".equals(courseInfo.getAttributeValue(CourseAssemblerConstants.COURSE_RESULT_COMP_ATTR_AUDIT))){
324 studentRegOptions.add(LrcServiceConstants.RESULT_GROUP_KEY_GRADE_AUDIT);
325 }
326 }
327
328
329 if(coInfo.getStudentRegistrationGradingOptions().contains(LrcServiceConstants.RESULT_GROUP_KEY_GRADE_AUDIT)){
330 formObject.setAuditStudentRegOpts(true);
331 }else{
332 formObject.setAuditStudentRegOpts(false);
333 }
334 if(coInfo.getStudentRegistrationGradingOptions().contains(LrcServiceConstants.RESULT_GROUP_KEY_GRADE_PASSFAIL)){
335 formObject.setPassFailStudentRegOpts(true);
336 }else{
337 formObject.setPassFailStudentRegOpts(false);
338 }
339
340 formObject.setStudentRegOptions(studentRegOptions);
341 formObject.setCrsGradingOptions(crsGradingOptions);
342
343
344 boolean creditOptionFixed = false;
345 String creditOptionId = coInfo.getCreditOptionId();
346
347 CreditOptionInfo creditOption = new CreditOptionInfo();
348
349
350
351 List<ResultValuesGroupInfo> courseCreditOptions = courseInfo.getCreditOptions();
352
353
354 if (coInfo.getCourseId() != null && !courseCreditOptions.isEmpty()) {
355 ResultValuesGroupInfo resultValuesGroupInfo = courseCreditOptions.get(0);
356
357 if (resultValuesGroupInfo.getTypeKey().equalsIgnoreCase(LrcServiceConstants.RESULT_VALUES_GROUP_TYPE_KEY_FIXED)) {
358 if (!resultValuesGroupInfo.getResultValueKeys().isEmpty()) {
359 creditOption.setCourseFixedCredits(getLrcService().getResultValue(resultValuesGroupInfo.getResultValueKeys().get(0), contextInfo).getValue());
360 }
361
362 creditOptionFixed = true;
363
364
365 creditOption.setTypeKey(LrcServiceConstants.RESULT_VALUES_GROUP_TYPE_KEY_FIXED);
366 creditOption.setFixedCredit(creditOption.getCourseFixedCredits());
367 } else {
368
369
370
371 List<ResultValueInfo> resultValueInfos = getLrcService().getResultValuesForResultValuesGroup(resultValuesGroupInfo.getKey(), contextInfo);
372 for (ResultValueInfo rVI: resultValueInfos) {
373 creditOption.getAllowedCredits().add(rVI.getValue());
374 }
375 Collections.sort(creditOption.getAllowedCredits());
376
377 if (resultValuesGroupInfo.getTypeKey().equalsIgnoreCase(LrcServiceConstants.RESULT_VALUES_GROUP_TYPE_KEY_RANGE)) {
378 creditOption.setCourseMinCredits(resultValuesGroupInfo.getResultValueRange().getMinValue());
379 creditOption.setCourseMaxCredits(resultValuesGroupInfo.getResultValueRange().getMaxValue());
380
381
382 creditOption.setTypeKey(LrcServiceConstants.RESULT_VALUES_GROUP_TYPE_KEY_RANGE);
383 creditOption.setMinCredits(creditOption.getCourseMinCredits());
384 creditOption.setMaxCredits(creditOption.getCourseMaxCredits());
385 } else if (resultValuesGroupInfo.getTypeKey().equalsIgnoreCase(LrcServiceConstants.RESULT_VALUES_GROUP_TYPE_KEY_MULTIPLE)) {
386
387 creditOption.setTypeKey(LrcServiceConstants.RESULT_VALUES_GROUP_TYPE_KEY_MULTIPLE);
388 creditOption.getCredits().addAll(creditOption.getAllowedCredits());
389 }
390 }
391 }
392
393
394 if (creditOptionId != null) {
395
396 ResultValuesGroupInfo resultValuesGroupInfo = getLrcService().getResultValuesGroup(creditOptionId, contextInfo);
397 String typeKey = resultValuesGroupInfo.getTypeKey();
398
399
400 List<ResultValueInfo> resultValueInfos = getLrcService().getResultValuesByKeys(resultValuesGroupInfo.getResultValueKeys(), contextInfo);
401
402 if (typeKey.equals(LrcServiceConstants.RESULT_VALUES_GROUP_TYPE_KEY_FIXED)) {
403 creditOption.setTypeKey(LrcServiceConstants.RESULT_VALUES_GROUP_TYPE_KEY_FIXED);
404 if (!resultValueInfos.isEmpty()) {
405 creditOption.setFixedCredit(resultValueInfos.get(0).getValue());
406 }
407 } else if (typeKey.equals(LrcServiceConstants.RESULT_VALUES_GROUP_TYPE_KEY_RANGE)) {
408 creditOption.setTypeKey(LrcServiceConstants.RESULT_VALUES_GROUP_TYPE_KEY_RANGE);
409 creditOption.setMinCredits(resultValuesGroupInfo.getResultValueRange().getMinValue());
410 creditOption.setMaxCredits(resultValuesGroupInfo.getResultValueRange().getMaxValue());
411 } else if (typeKey.equals(LrcServiceConstants.RESULT_VALUES_GROUP_TYPE_KEY_MULTIPLE)) {
412 creditOption.setTypeKey(LrcServiceConstants.RESULT_VALUES_GROUP_TYPE_KEY_MULTIPLE);
413 if (!resultValueInfos.isEmpty()) {
414 List<String> credits = new ArrayList<String>();
415 for (ResultValueInfo resultValueInfo : resultValueInfos) {
416 credits.add(resultValueInfo.getValue());
417 }
418 creditOption.setCredits(credits);
419 }
420 }
421 }
422
423 formObject.setCreditOption(creditOption);
424 formObject.setCreditOptionFixed(creditOptionFixed);
425
426 formObject.setOrganizationNames(new ArrayList<OrganizationInfoWrapper>());
427
428 ArrayList<OrganizationInfoWrapper> orgList = new ArrayList<OrganizationInfoWrapper>();
429
430 if(coInfo.getUnitsDeploymentOrgIds() != null){
431 for(String orgId: coInfo.getUnitsDeploymentOrgIds()){
432 OrgInfo orgInfo = getOrganizationService().getOrg(orgId,contextInfo);
433 orgList.add(new OrganizationInfoWrapper(orgInfo));
434 }
435 }
436 formObject.setOrganizationNames(orgList);
437
438
439 TermInfo termInfo = getAcalService().getTerm(coInfo.getTermId(), contextInfo);
440 StringBuilder termStartDate = new StringBuilder(DateFormatters.MONTH_DAY_YEAR_DATE_FORMATTER.format(termInfo.getStartDate()));
441 StringBuilder termEndDate = new StringBuilder(DateFormatters.MONTH_DAY_YEAR_DATE_FORMATTER.format(termInfo.getEndDate()));
442 String termStartEnd = termInfo.getName() + " (" + termStartDate + " to " +termEndDate + ")";
443 formObject.setTermStartEnd(termStartEnd);
444
445 document.getNewMaintainableObject().setDataObject(formObject);
446 document.getOldMaintainableObject().setDataObject(formObject);
447 document.getDocumentHeader().setDocumentDescription("Edit CO - " + coInfo.getCourseOfferingCode());
448
449
450
451 return formObject;
452 }
453 } catch (Exception e) {
454 throw new RuntimeException(e);
455 }
456 return null;
457 }
458
459 private FormatInfo getFormatInfo(CourseOfferingEditWrapper courseOfferingEditWrapper, String coFormId ){
460 List<FormatInfo> formatInfoList = courseOfferingEditWrapper.getCourse().getFormats();
461 for(FormatInfo formatInfo : formatInfoList) {
462 if(coFormId.equals(formatInfo.getId())){
463 return formatInfo;
464 }
465 }
466 return null;
467 }
468
469 private OrganizationService getOrganizationService(){
470 if(organizationService == null) {
471 organizationService = (OrganizationService) GlobalResourceLoader.getService(new QName(CommonServiceConstants.REF_OBJECT_URI_GLOBAL_PREFIX + "organization", "OrganizationService"));
472 }
473 return organizationService;
474 }
475
476 protected LRCService getLrcService() {
477 if(lrcService == null) {
478 lrcService = (LRCService) GlobalResourceLoader.getService(new QName("http://student.kuali.org/wsdl/lrc", "LrcService"));
479 }
480 return this.lrcService;
481 }
482
483 protected AcademicCalendarService getAcalService() {
484 if(acalService == null) {
485 acalService = (AcademicCalendarService) GlobalResourceLoader.getService(new QName("http://student.kuali.org/wsdl/acal", "AcademicCalendarService"));
486 }
487 return this.acalService;
488 }
489
490 }