diff --git a/ole-app/olefs/src/main/java/org/kuali/ole/ncip/servlet/OLECirculationServlet.java b/ole-app/olefs/src/main/java/org/kuali/ole/ncip/servlet/OLECirculationServlet.java index e0a74185d6..741348df31 100644 --- a/ole-app/olefs/src/main/java/org/kuali/ole/ncip/servlet/OLECirculationServlet.java +++ b/ole-app/olefs/src/main/java/org/kuali/ole/ncip/servlet/OLECirculationServlet.java @@ -1,19 +1,15 @@ package org.kuali.ole.ncip.servlet; import org.apache.log4j.Logger; -import org.kuali.ole.OLEConstants; import org.kuali.ole.converter.OLECheckInItemConverter; import org.kuali.ole.converter.OLELookupUserConverter; import org.kuali.ole.converter.OLERenewItemConverter; -import org.kuali.ole.deliver.bo.OleDeliverRequestBo; import org.kuali.ole.ncip.bo.OLECirculationErrorMessage; import org.kuali.ole.ncip.bo.OLENCIPConstants; import org.kuali.ole.ncip.bo.OLENCIPErrorResponse; import org.kuali.ole.ncip.converter.*; import org.kuali.ole.ncip.service.OLECirculationService; import org.kuali.ole.ncip.service.impl.*; -import org.kuali.rice.krad.service.BusinessObjectService; -import org.kuali.rice.krad.service.KRADServiceLocator; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; @@ -32,7 +28,6 @@ */ public class OLECirculationServlet extends HttpServlet { final Logger LOG = Logger.getLogger(OLECirculationServlet.class); - private BusinessObjectService businessObjectService; public void doPost(HttpServletRequest request, HttpServletResponse response) @@ -304,26 +299,6 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) }else{ responseString=getCirculationErrorMessage(service,OLENCIPConstants.INVALID_FORMAT,"504",null,outputFormat); } - Map requestMap = new HashMap(); - try { - Thread.sleep(3000); - requestMap.put(OLEConstants.OleDeliverRequest.ITEM_ID, parameterMap.get(OLENCIPConstants.ITEM_BARCODE)[0]); - List requestList = (List) getBusinessObjectService().findMatchingOrderBy(OleDeliverRequestBo.class, requestMap, OLEConstants.OleDeliverRequest.REQUEST_TYPE_ID, true); - for (int i = 0; i < requestList.size(); i++) { - for (int j = i + 1; j < requestList.size(); j++) { - if (requestList.get(i).getBorrowerQueuePosition().equals(requestList.get(j).getBorrowerQueuePosition()) && requestList.get(i).getRequestTypeId().equals(requestList.get(j).getRequestTypeId())) { - requestList.get(j).setBorrowerQueuePosition(requestList.get(j).getBorrowerQueuePosition() + 1); - responseString = responseString.replaceAll(responseString.substring(responseString.indexOf("") +15,responseString.indexOf("")),requestList.get(j).getBorrowerQueuePosition().toString()); - getBusinessObjectService().save(requestList.get(j)); - break; - - } - } - } - } - catch(Exception e) { - LOG.info("Request Failed" + e); - } } else{ responseString=OLENCIPConstants.NULL_SERVICE; @@ -351,13 +326,6 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) out.write(responseString); } - private BusinessObjectService getBusinessObjectService() { - if (null == businessObjectService) { - businessObjectService = KRADServiceLocator.getBusinessObjectService(); - } - return businessObjectService; - } - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { OLECirculationService oleCirculationService=new OLECirculationServiceImpl();