View Javadoc

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  //Core slice class.
14  @Deprecated
15  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      	AcademicCalendarInfo academicCalendarInfo = null;
22      	
23      	String academicCalendarKey = parameters.get(ACADEMIC_CALENDAR_KEY);
24      	ContextInfo context = new ContextInfo();
25      	try{
26      		academicCalendarInfo = getAcademicCalendarService().getAcademicCalendar(academicCalendarKey, context);
27      		return academicCalendarInfo;
28      	}catch (DoesNotExistException dnee){
29      		
30      	}catch (InvalidParameterException ipe){
31      		    		
32      	}catch (MissingParameterException mpe){
33      		
34      	}catch (OperationFailedException ofe){
35      		
36      	}catch (PermissionDeniedException pde){
37      		
38      	}
39      	return null;
40  
41      }
42      
43      protected AcademicCalendarService getAcademicCalendarService() {
44          if(academicCalendarService == null) {
45         	 academicCalendarService = (AcademicCalendarService) GlobalResourceLoader.getService(new QName("http://student.kuali.org/wsdl/acal","AcademicCalendarService"));
46         }
47  
48         return academicCalendarService;
49     }
50  
51  
52  }
53