001package org.kuali.asr.handler;
002
003import org.kuali.ole.bo.OLECheckInItem;
004import org.kuali.ole.converter.OLECheckInItemConverter;
005
006/**
007 * Created by chenchulakshmig on 8/27/15.
008 */
009public class CheckinItemResponseHandler extends ResponseHandler {
010
011    private OLECheckInItemConverter oleCheckInItemConverter;
012
013    public String marshalObjectToSIP2Xml(Object object) {
014        String checkinItemXml = getOleCheckInItemConverter().generateCheckInItemXmlForSIP2((OLECheckInItem) object);
015        return checkinItemXml;
016    }
017
018    @Override
019    public String marshalObjectToXml(Object object) {
020        String checkinItemXml = getOleCheckInItemConverter().generateCheckInItemXml((OLECheckInItem) object);
021        return checkinItemXml;
022    }
023
024    public OLECheckInItemConverter getOleCheckInItemConverter() {
025        if (null == oleCheckInItemConverter){
026            oleCheckInItemConverter = new OLECheckInItemConverter();
027        }
028        return oleCheckInItemConverter;
029    }
030
031    public void setOleCheckInItemConverter(OLECheckInItemConverter oleCheckInItemConverter) {
032        this.oleCheckInItemConverter = oleCheckInItemConverter;
033    }
034}