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