1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
package org.kuali.student.enrollment.class2.courseoffering.service.impl; |
16 | |
|
17 | |
import org.apache.commons.lang.StringUtils; |
18 | |
import org.kuali.rice.krad.inquiry.InquirableImpl; |
19 | |
import org.kuali.student.enrollment.class2.courseoffering.util.ActivityOfferingConstants; |
20 | |
import org.kuali.student.enrollment.class2.courseoffering.util.CourseOfferingResourceLoader; |
21 | |
import org.kuali.student.enrollment.common.util.ContextBuilder; |
22 | |
import org.kuali.student.enrollment.courseoffering.dto.ActivityOfferingInfo; |
23 | |
import org.kuali.student.enrollment.courseoffering.service.CourseOfferingService; |
24 | |
import org.kuali.student.r2.common.dto.ContextInfo; |
25 | |
import org.kuali.student.r2.common.exceptions.*; |
26 | |
|
27 | |
import java.util.Map; |
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | 0 | public class ActivityOfferingInquirableImpl extends InquirableImpl { |
35 | |
|
36 | |
@Override |
37 | |
public ActivityOfferingInfo retrieveDataObject(Map<String, String> parameters) { |
38 | |
try { |
39 | 0 | ActivityOfferingInfo activityOfferingInfo = getCourseOfferingService().getActivityOffering(parameters.get(ActivityOfferingConstants.ACTIVITYOFFERING_ID), getContextInfo()); |
40 | 0 | return activityOfferingInfo; |
41 | 0 | } catch (Exception e) { |
42 | 0 | throw new RuntimeException(e); |
43 | |
} |
44 | |
} |
45 | |
|
46 | |
public CourseOfferingService getCourseOfferingService() { |
47 | 0 | return CourseOfferingResourceLoader.loadCourseOfferingService(); |
48 | |
} |
49 | |
|
50 | |
public ContextInfo getContextInfo() { |
51 | 0 | return ContextBuilder.loadContextInfo(); |
52 | |
} |
53 | |
} |