View Javadoc
1   package org.kuali.asr.handler;
2   
3   import org.kuali.ole.ncip.bo.OLERenewItem;
4   import org.kuali.ole.ncip.bo.OLERenewItemList;
5   import org.kuali.ole.ncip.converter.OLERenewItemConverter;
6   
7   /**
8    * Created by pvsubrah on 6/26/15.
9    */
10  public class RenewItemResponseHandler extends ResponseHandler {
11  
12      private OLERenewItemConverter oleRenewItemConverter;
13  
14      public String marshalObjectToSIP2Xml(Object object) {
15          String renewItemXml = getOleRenewItemConverter().generateRenewItemListXmlForSip2((OLERenewItemList) object);
16          return renewItemXml;
17      }
18  
19      @Override
20      public String marshalObjectToXml(Object object) {
21          String renewItemXml = getOleRenewItemConverter().generateRenewItemListXml((OLERenewItemList) object);
22          return renewItemXml;
23      }
24  
25      @Override
26      public String marshalObjectToJson(Object object) {
27          return super.marshalObjectToJson(object);
28      }
29  
30      private OLERenewItemConverter getOleRenewItemConverter() {
31          if (null == oleRenewItemConverter) {
32              oleRenewItemConverter = new OLERenewItemConverter();
33          }
34          return oleRenewItemConverter;
35      }
36  }