Coverage Report - org.kuali.student.enrollment.class2.acal.service.TermInfoInquiryViewHelperServiceImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
TermInfoInquiryViewHelperServiceImpl
0%
0/16
0%
0/2
4.5
 
 1  
 package org.kuali.student.enrollment.class2.acal.service;
 2  
 
 3  
 import java.util.ArrayList;
 4  
 import java.util.List;
 5  
 import java.util.Map;
 6  
 
 7  
 import javax.xml.namespace.QName;
 8  
 
 9  
 import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader;
 10  
 import org.kuali.rice.krad.inquiry.InquirableImpl;
 11  
 import org.kuali.student.enrollment.acal.dto.TermInfo;
 12  
 import org.kuali.student.enrollment.acal.service.AcademicCalendarService;
 13  
 import org.kuali.student.r2.common.dto.ContextInfo;
 14  
 import org.kuali.student.r2.common.exceptions.DoesNotExistException;
 15  
 import org.kuali.student.r2.common.exceptions.InvalidParameterException;
 16  
 import org.kuali.student.r2.common.exceptions.MissingParameterException;
 17  
 import org.kuali.student.r2.common.exceptions.OperationFailedException;
 18  
 import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
 19  
 
 20  0
 public class TermInfoInquiryViewHelperServiceImpl extends InquirableImpl {
 21  
     public final static String TERM_TYPE_KEY = "typeKey";
 22  
     public final static String TERM_KEY = "key";
 23  
          private transient AcademicCalendarService academicCalendarService;
 24  
         
 25  
          @Override
 26  
          public TermInfo retrieveDataObject(Map<String, String> parameters) {
 27  0
                     TermInfo termInfo = null;
 28  
                                         
 29  0
                     String termKey = parameters.get(TERM_KEY);
 30  0
                     ContextInfo context = new ContextInfo();
 31  
                     try{
 32  0
                             termInfo = getAcademicCalendarService().getTerm(termKey, context);                            
 33  0
                             return termInfo;
 34  0
                     }catch (DoesNotExistException dnee){
 35  
                             
 36  0
                     }catch (InvalidParameterException ipe){
 37  
                                                 
 38  0
                     }catch (MissingParameterException mpe){
 39  
                             
 40  0
                     }catch (OperationFailedException ofe){
 41  
                             
 42  0
                     }catch (PermissionDeniedException pde){
 43  
                             
 44  0
                     }
 45  0
                     return null;
 46  
 
 47  
                  
 48  
          }
 49  
 
 50  
          protected AcademicCalendarService getAcademicCalendarService() {
 51  0
                  if(academicCalendarService == null) {
 52  0
                          academicCalendarService = (AcademicCalendarService) GlobalResourceLoader.getService(new QName("http://student.kuali.org/wsdl/acal","AcademicCalendarService"));
 53  
              }
 54  0
              return academicCalendarService;
 55  
          }         
 56  
 
 57  
 }