1 | |
package org.kuali.student.enrollment.class2.acal.service; |
2 | |
|
3 | |
import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader; |
4 | |
import org.kuali.rice.krad.inquiry.InquirableImpl; |
5 | |
import org.kuali.student.enrollment.acal.dto.AcademicCalendarInfo; |
6 | |
import org.kuali.student.enrollment.acal.service.AcademicCalendarService; |
7 | |
import org.kuali.student.r2.common.dto.ContextInfo; |
8 | |
import org.kuali.student.r2.common.exceptions.*; |
9 | |
|
10 | |
import javax.xml.namespace.QName; |
11 | |
import java.util.Map; |
12 | |
|
13 | |
|
14 | 0 | @Deprecated |
15 | 0 | public class AcademicCalendarInfoInquiryViewHelperServiceImpl extends InquirableImpl { |
16 | |
public final static String ACADEMIC_CALENDAR_KEY = "key"; |
17 | |
private transient AcademicCalendarService academicCalendarService; |
18 | |
|
19 | |
@Override |
20 | |
public AcademicCalendarInfo retrieveDataObject(Map<String, String> parameters) { |
21 | 0 | AcademicCalendarInfo academicCalendarInfo = null; |
22 | |
|
23 | 0 | String academicCalendarKey = parameters.get(ACADEMIC_CALENDAR_KEY); |
24 | 0 | ContextInfo context = new ContextInfo(); |
25 | |
try{ |
26 | 0 | academicCalendarInfo = getAcademicCalendarService().getAcademicCalendar(academicCalendarKey, context); |
27 | 0 | return academicCalendarInfo; |
28 | 0 | }catch (DoesNotExistException dnee){ |
29 | |
|
30 | 0 | }catch (InvalidParameterException ipe){ |
31 | |
|
32 | 0 | }catch (MissingParameterException mpe){ |
33 | |
|
34 | 0 | }catch (OperationFailedException ofe){ |
35 | |
|
36 | 0 | }catch (PermissionDeniedException pde){ |
37 | |
|
38 | 0 | } |
39 | 0 | return null; |
40 | |
|
41 | |
} |
42 | |
|
43 | |
protected AcademicCalendarService getAcademicCalendarService() { |
44 | 0 | if(academicCalendarService == null) { |
45 | 0 | academicCalendarService = (AcademicCalendarService) GlobalResourceLoader.getService(new QName("http://student.kuali.org/wsdl/acal","AcademicCalendarService")); |
46 | |
} |
47 | |
|
48 | 0 | return academicCalendarService; |
49 | |
} |
50 | |
|
51 | |
|
52 | |
} |
53 | |
|