Coverage Report - org.kuali.student.enrollment.class2.courseoffering.service.impl.FormatOfferingInfoInquirableImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
FormatOfferingInfoInquirableImpl
0%
0/7
N/A
2
 
 1  
 /**
 2  
  * Copyright 2012 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  *
 15  
  */
 16  
 package org.kuali.student.enrollment.class2.courseoffering.service.impl;
 17  
 
 18  
 import org.kuali.rice.krad.inquiry.InquirableImpl;
 19  
 import org.kuali.student.enrollment.class2.courseoffering.util.CourseOfferingResourceLoader;
 20  
 import org.kuali.student.enrollment.common.util.ContextBuilder;
 21  
 import org.kuali.student.enrollment.courseoffering.dto.FormatOfferingInfo;
 22  
 import org.kuali.student.enrollment.courseoffering.service.CourseOfferingService;
 23  
 import org.kuali.student.r2.common.dto.ContextInfo;
 24  
 import org.kuali.student.r2.common.exceptions.*;
 25  
 
 26  
 import java.util.Map;
 27  
 
 28  
 /**
 29  
  * This class //TODO ...
 30  
  *
 31  
  * @author Kuali Student Team
 32  
  */
 33  0
 public class FormatOfferingInfoInquirableImpl extends InquirableImpl {
 34  
     public final static String FORMAT_OFFERING_ID = "id";
 35  
 
 36  
     @Override
 37  
     public FormatOfferingInfo retrieveDataObject(Map<String, String> parameters) {
 38  
 
 39  
         try {
 40  0
             FormatOfferingInfo formatOfferingInfo = getCourseOfferingService().getFormatOffering(parameters.get(FORMAT_OFFERING_ID), getContextInfo());
 41  0
             return formatOfferingInfo;
 42  0
         } catch (Exception e) {
 43  0
             throw new RuntimeException(e);
 44  
         }
 45  
     }
 46  
 
 47  
 
 48  
     public CourseOfferingService getCourseOfferingService() {
 49  0
         return CourseOfferingResourceLoader.loadCourseOfferingService();
 50  
     }
 51  
 
 52  
     public ContextInfo getContextInfo() {
 53  0
         return ContextBuilder.loadContextInfo();
 54  
     }
 55  
 }