Class JsonRecordSetWriter

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

@Singleton @Provider @Produces("application/json") public class JsonRecordSetWriter extends Object implements jakarta.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, jakarta.ws.rs.core.MediaType mediaType)
      Specified by:
      isWriteable in interface jakarta.ws.rs.ext.MessageBodyWriter<RecordSet>
    • getSize

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

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

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