Coverage Report - org.kuali.student.enrollment.class2.acal.service.AcademicCalendarInfoLookupViewHelperServiceImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
AcademicCalendarInfoLookupViewHelperServiceImpl
0%
0/18
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.kns.uif.service.impl.LookupViewHelperServiceImpl;
 11  
 
 12  
 import org.kuali.student.enrollment.acal.service.AcademicCalendarService;
 13  
 import org.kuali.student.enrollment.acal.dto.AcademicCalendarInfo;
 14  
 import org.kuali.student.r2.common.dto.ContextInfo;
 15  
 import org.kuali.student.r2.common.exceptions.DoesNotExistException;
 16  
 import org.kuali.student.r2.common.exceptions.InvalidParameterException;
 17  
 import org.kuali.student.r2.common.exceptions.MissingParameterException;
 18  
 import org.kuali.student.r2.common.exceptions.OperationFailedException;
 19  
 import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
 20  
 
 21  0
 public class AcademicCalendarInfoLookupViewHelperServiceImpl  extends LookupViewHelperServiceImpl {
 22  
             public final static String CREDENTIAL_PROGRAM_TYPE_KEY = "credentialProgramTypeKey";
 23  
             public final static String ACADEMIC_CALENDAR_KEY = "key";
 24  
                  private transient AcademicCalendarService academicCalendarService;
 25  
                  
 26  
 
 27  
             @Override
 28  
             protected List<?> getSearchResultsWithBounding(Map<String, String> fieldValues, boolean unbounded) {
 29  
                     /*
 30  
                     String credentialProgramTypeKey = fieldValues.get(CREDENTIAL_PROGRAM_TYPE_KEY);
 31  
                     ContextInfo context = ContextInfo.newInstance();
 32  
                     try{
 33  
                             return getAcademicCalendarService().getAcademicCalendarsByCredentialProgramType(credentialProgramTypeKey, context);
 34  
                     }catch (InvalidParameterException ipe){
 35  
                             
 36  
                     }catch (MissingParameterException mpe){
 37  
                             
 38  
                     }catch (OperationFailedException ofe){
 39  
                             
 40  
                     }catch (PermissionDeniedException pde){
 41  
                             
 42  
                     }
 43  
                     return null;
 44  
                     */
 45  0
                     AcademicCalendarInfo academicCalendarInfo = null;
 46  0
                     List<AcademicCalendarInfo> academicCalendarInfoList = new ArrayList<AcademicCalendarInfo>();
 47  
                     
 48  0
                     String academicCalendarKey = fieldValues.get(ACADEMIC_CALENDAR_KEY);
 49  0
                     ContextInfo context = ContextInfo.newInstance();
 50  
                     try{
 51  0
                             academicCalendarInfo = getAcademicCalendarService().getAcademicCalendar(academicCalendarKey, context);
 52  0
                             academicCalendarInfoList.add(academicCalendarInfo);
 53  0
                             return academicCalendarInfoList;
 54  0
                     }catch (DoesNotExistException dnee){
 55  
                             
 56  0
                     }catch (InvalidParameterException ipe){
 57  
                                                 
 58  0
                     }catch (MissingParameterException mpe){
 59  
                             
 60  0
                     }catch (OperationFailedException ofe){
 61  
                             
 62  0
                     }catch (PermissionDeniedException pde){
 63  
                             
 64  0
                     }
 65  0
                     return null;
 66  
                 
 67  
             }
 68  
             
 69  
             protected AcademicCalendarService getAcademicCalendarService() {
 70  0
                  if(academicCalendarService == null) {
 71  0
                          academicCalendarService = (AcademicCalendarService) GlobalResourceLoader.getService(new QName("http://student.kuali.org/wsdl/acal","AcademicCalendarService"));
 72  
                 }
 73  
 
 74  0
                 return academicCalendarService;
 75  
             }
 76  
 
 77  
         
 78  
 }