View Javadoc
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   * Created by David Yin on 5/11/12
16   */
17  package org.kuali.student.enrollment.class2.courseoffering.service.impl;
18  
19  import org.kuali.rice.krad.inquiry.InquirableImpl;
20  import org.kuali.student.enrollment.class2.courseoffering.util.CourseOfferingManagementUtil;
21  import org.kuali.student.enrollment.courseofferingset.dto.SocRolloverResultItemInfo;
22  import org.kuali.student.common.util.security.ContextUtils;
23  
24  import java.util.Map;
25  
26  /**
27   * This class provides a Inquirable implementation for SocRolloverResultItems
28   *
29   * @author Kuali Student Team
30   */
31  public class SocRolloverResultItemInfoInquirableImpl extends InquirableImpl {
32  
33      private static final long serialVersionUID = 1L;
34      public final static String ID = "id";
35  
36      @Override
37      public SocRolloverResultItemInfo retrieveDataObject(Map<String, String> parameters) {
38          String id = parameters.get(ID);
39          try {
40              SocRolloverResultItemInfo socRolloverResultItemInfo = CourseOfferingManagementUtil.getCourseOfferingSetService().getSocRolloverResultItem(id, ContextUtils.createDefaultContextInfo());
41              return socRolloverResultItemInfo;
42          } catch (Exception e) {
43              throw new RuntimeException("socRolloverResultItemInfo inquiry has failed. ", e);
44          }
45      }
46  }