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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
getSize
(RecordSet t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) boolean
isWriteable
(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) protected void
writeRecords
(OutputStream out, RecordSet records) 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)
-
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 interfacejavax.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 interfacejavax.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 interfacejavax.ws.rs.ext.MessageBodyWriter<RecordSet>
- Throws:
IOException
javax.ws.rs.WebApplicationException
-
writeRecords
- Throws:
IOException
-