1 package org.kuali.ole.ncip.service.impl;
2
3 import org.kuali.asr.handler.CheckoutItemResponseHandler;
4 import org.kuali.ole.OLEConstants;
5 import org.kuali.ole.bo.OLECheckOutItem;
6 import org.kuali.ole.deliver.service.ParameterValueResolver;
7
8
9
10
11 public class Sip2CheckoutItemService extends CheckoutItemService {
12
13 @Override
14 public String prepareResponse(OLECheckOutItem oleCheckOutItem) {
15
16 switch (responseFormatType) {
17 case ("XML"):
18 response = ((CheckoutItemResponseHandler) getResponseHandler()).marshalObjectToSIP2Xml(oleCheckOutItem);
19 break;
20 case ("JSON"):
21 response = getResponseHandler().marshalObjectToJson(oleCheckOutItem);
22 break;
23 }
24
25 return response;
26 }
27
28 @Override
29 public String getOperatorId(String operatorId) {
30 return ParameterValueResolver.getInstance().getParameter(OLEConstants
31 .APPL_ID_OLE, OLEConstants.DLVR_NMSPC, OLEConstants.DLVR_CMPNT, operatorId);
32 }
33 }