Class JsonRecordSetWriter

java.lang.Object
org.nuxeo.ecm.automation.jaxrs.io.JsonRecordSetWriter
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<RecordSet>

@Provider public class JsonRecordSetWriter extends Object implements javax.ws.rs.ext.MessageBodyWriter<RecordSet>
Manage JSON Marshalling for RecordSet objects
Since:
5.7
Author:
Tiry
  • Constructor Details

    • JsonRecordSetWriter

      public JsonRecordSetWriter()
  • Method Details

    • isWriteable

      public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      Specified by:
      isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<RecordSet>
    • getSize

      public long getSize(RecordSet t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      Specified by:
      getSize in interface javax.ws.rs.ext.MessageBodyWriter<RecordSet>
    • writeTo

      public void writeTo(RecordSet records, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream out) throws IOException, javax.ws.rs.WebApplicationException
      Specified by:
      writeTo in interface javax.ws.rs.ext.MessageBodyWriter<RecordSet>
      Throws:
      IOException
      javax.ws.rs.WebApplicationException
    • writeRecords

      protected void writeRecords(OutputStream out, RecordSet records) throws IOException
      Throws:
      IOException