001package org.kuali.asr.handler;
002
003import org.kuali.ole.ncip.bo.OLERenewItem;
004import org.kuali.ole.ncip.converter.OLERenewItemConverter;
005
006/**
007 * Created by pvsubrah on 6/26/15.
008 */
009public class RenewItemResponseHandler extends ResponseHandler {
010
011    private OLERenewItemConverter oleRenewItemConverter;
012
013    @Override
014    public String marshalObjectToXml(Object object) {
015        String renewItemXml = getOleRenewItemConverter().generateRenewItemXml((OLERenewItem) object);
016        return renewItemXml;
017    }
018
019    @Override
020    public String marshalObjectToJson(Object object) {
021        return super.marshalObjectToJson(object);
022    }
023
024    private OLERenewItemConverter getOleRenewItemConverter() {
025        if (null == oleRenewItemConverter) {
026            oleRenewItemConverter = new OLERenewItemConverter();
027        }
028        return oleRenewItemConverter;
029    }
030}