1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.enrollment.class2.courseoffering.service.impl;
17
18 import org.kuali.rice.krad.inquiry.InquirableImpl;
19 import org.kuali.student.enrollment.class2.courseoffering.util.CourseOfferingResourceLoader;
20 import org.kuali.student.enrollment.courseoffering.dto.FormatOfferingInfo;
21 import org.kuali.student.enrollment.courseoffering.service.CourseOfferingService;
22 import org.kuali.student.r2.common.util.ContextUtils;
23
24 import java.util.Map;
25
26
27
28
29
30
31 public class FormatOfferingInfoInquirableImpl extends InquirableImpl {
32 public final static String FORMAT_OFFERING_ID = "id";
33
34 @Override
35 public FormatOfferingInfo retrieveDataObject(Map<String, String> parameters) {
36 try {
37 FormatOfferingInfo formatOfferingInfo = getCourseOfferingService().getFormatOffering(parameters.get(FORMAT_OFFERING_ID), ContextUtils.createDefaultContextInfo());
38 return formatOfferingInfo;
39 } catch (Exception e) {
40 throw new RuntimeException("FormatOfferingInfo inquiry has failed. ", e);
41 }
42 }
43
44 public CourseOfferingService getCourseOfferingService() {
45 return CourseOfferingResourceLoader.loadCourseOfferingService();
46 }
47 }