1 | |
package org.kuali.student.enrollment.class2.courseoffering.service.impl; |
2 | |
|
3 | |
import org.kuali.rice.krad.inquiry.InquirableImpl; |
4 | |
import org.kuali.student.enrollment.class2.courseoffering.util.CourseOfferingResourceLoader; |
5 | |
import org.kuali.student.enrollment.common.util.ContextBuilder; |
6 | |
import org.kuali.student.enrollment.courseofferingset.dto.SocRolloverResultInfo; |
7 | |
import org.kuali.student.enrollment.courseofferingset.service.CourseOfferingSetService; |
8 | |
import org.kuali.student.enrollment.class2.courseoffering.util.CourseOfferingConstants; |
9 | |
import org.kuali.student.r2.common.dto.ContextInfo; |
10 | |
import org.kuali.student.r2.common.exceptions.*; |
11 | |
|
12 | |
import java.util.Map; |
13 | |
|
14 | 0 | public class SocRolloverResultInfoInquirableImpl extends InquirableImpl { |
15 | 0 | private transient CourseOfferingSetService courseOfferingSetService = null; |
16 | 0 | private ContextInfo contextInfo = null; |
17 | |
@Override |
18 | |
public SocRolloverResultInfo retrieveDataObject(Map<String, String> parameters) { |
19 | |
try { |
20 | 0 | SocRolloverResultInfo socRolloverResultInfo = getCourseOfferingSetService().getSocRolloverResult( |
21 | |
parameters.get(CourseOfferingConstants.SOCROLLOVERRESULTINFO_ID), getContextInfo()); |
22 | 0 | return socRolloverResultInfo; |
23 | 0 | } catch (DoesNotExistException e) { |
24 | 0 | e.printStackTrace(); |
25 | 0 | } catch (InvalidParameterException e) { |
26 | 0 | e.printStackTrace(); |
27 | 0 | } catch (MissingParameterException e) { |
28 | 0 | e.printStackTrace(); |
29 | 0 | } catch (OperationFailedException e) { |
30 | 0 | e.printStackTrace(); |
31 | 0 | } catch (PermissionDeniedException e) { |
32 | 0 | e.printStackTrace(); |
33 | 0 | } |
34 | |
|
35 | 0 | return null; |
36 | |
} |
37 | |
|
38 | |
|
39 | |
public CourseOfferingSetService getCourseOfferingSetService() { |
40 | 0 | if(courseOfferingSetService == null) |
41 | 0 | courseOfferingSetService= CourseOfferingResourceLoader.loadCourseOfferingSetService(); |
42 | 0 | return courseOfferingSetService; |
43 | |
} |
44 | |
|
45 | |
public ContextInfo getContextInfo() { |
46 | 0 | if (contextInfo == null){ |
47 | 0 | contextInfo = ContextBuilder.loadContextInfo(); |
48 | |
} |
49 | 0 | return contextInfo; |
50 | |
} |
51 | |
} |