com.ibm.commerce.foundation.rest.providers

Class XMLSDOProvider

  • java.lang.Object
    • com.ibm.commerce.foundation.rest.providers.AbstractSDOProvider
      • com.ibm.commerce.foundation.rest.providers.XMLSDOProvider
  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<commonj.sdo.DataObject>, javax.ws.rs.ext.MessageBodyWriter<commonj.sdo.DataObject>


    @Provider
     @Consumes(value="application/sdo")
     @Produces(value="application/xml")
    public class XMLSDOProvider
    extends com.ibm.commerce.foundation.rest.providers.AbstractSDOProvider
    This class converts a SDO into XML.
    • Constructor Summary

      Constructors 
      Constructor and Description
      XMLSDOProvider() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void writeTo(commonj.sdo.DataObject dataObject, java.lang.Class<?> dataObjectClass, java.lang.reflect.Type dataObjectType, java.lang.annotation.Annotation[] resourceAnnotations, javax.ws.rs.core.MediaType responseMediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> responseHttpHeaders, java.io.OutputStream responseOutputStream)
      This method converts a SDO into XML.
      • Methods inherited from class com.ibm.commerce.foundation.rest.providers.AbstractSDOProvider

        getSize, isReadable, isWriteable, readFrom
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XMLSDOProvider

        public XMLSDOProvider()
    • Method Detail

      • writeTo

        public void writeTo(commonj.sdo.DataObject dataObject,
                            java.lang.Class<?> dataObjectClass,
                            java.lang.reflect.Type dataObjectType,
                            java.lang.annotation.Annotation[] resourceAnnotations,
                            javax.ws.rs.core.MediaType responseMediaType,
                            javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> responseHttpHeaders,
                            java.io.OutputStream responseOutputStream)
                     throws java.io.IOException,
                            javax.ws.rs.WebApplicationException
        This method converts a SDO into XML.
        Parameters:
        dataObject - The SDO to convert.
        dataObjectClass - The SDO class.
        dataObjectType - The SDO type.
        resourceAnnotations - An array of annotations defined on the calling resource.
        responseMediaType - The media type to covert to, ie. "application/atom+xml".
        responseHttpHeaders - A map consisting of the response HTTP headers and the business context parameters of the request.
        responseOutputStream - The stream to write the Atom feed too.
        Throws:
        java.io.IOException
        javax.ws.rs.WebApplicationException