@Provider public class JsonDocumentWriter extends Object implements javax.ws.rs.ext.MessageBodyWriter<DocumentModel>
| Modifier and Type | Field and Description |
|---|---|
static String |
DOCUMENT_PROPERTIES_HEADER |
| Constructor and Description |
|---|
JsonDocumentWriter() |
| Modifier and Type | Method and Description |
|---|---|
long |
getSize(DocumentModel arg0,
Class<?> arg1,
Type arg2,
Annotation[] arg3,
javax.ws.rs.core.MediaType arg4) |
boolean |
isWriteable(Class<?> arg0,
Type arg1,
Annotation[] arg2,
javax.ws.rs.core.MediaType arg3) |
static void |
writeDocument(org.codehaus.jackson.JsonGenerator jg,
DocumentModel doc,
String[] schemas,
Map<String,String> contextParameters,
javax.ws.rs.core.HttpHeaders headers,
javax.servlet.ServletRequest request) |
static void |
writeDocument(org.codehaus.jackson.JsonGenerator jg,
DocumentModel doc,
String[] schemas,
Map<String,String> contextParameters,
javax.servlet.ServletRequest request) |
static void |
writeDocument(org.codehaus.jackson.JsonGenerator jg,
DocumentModel doc,
String[] schemas,
javax.servlet.ServletRequest request) |
void |
writeDocument(OutputStream out,
DocumentModel doc,
String[] schemas) |
void |
writeDocument(OutputStream out,
DocumentModel doc,
String[] schemas,
Map<String,String> contextParameters) |
static void |
writePropertyValue(org.codehaus.jackson.JsonGenerator jg,
Property prop,
String filesBaseUrl)
Converts the value of the given core property to JSON format.
|
void |
writeTo(DocumentModel doc,
Class<?> arg1,
Type arg2,
Annotation[] arg3,
javax.ws.rs.core.MediaType arg4,
javax.ws.rs.core.MultivaluedMap<String,Object> arg5,
OutputStream out) |
public static final String DOCUMENT_PROPERTIES_HEADER
public long getSize(DocumentModel arg0, Class<?> arg1, Type arg2, Annotation[] arg3, javax.ws.rs.core.MediaType arg4)
getSize in interface javax.ws.rs.ext.MessageBodyWriter<DocumentModel>public boolean isWriteable(Class<?> arg0, Type arg1, Annotation[] arg2, javax.ws.rs.core.MediaType arg3)
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<DocumentModel>public void writeTo(DocumentModel doc, Class<?> arg1, Type arg2, Annotation[] arg3, javax.ws.rs.core.MediaType arg4, javax.ws.rs.core.MultivaluedMap<String,Object> arg5, OutputStream out) throws IOException, javax.ws.rs.WebApplicationException
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<DocumentModel>IOExceptionjavax.ws.rs.WebApplicationExceptionpublic void writeDocument(OutputStream out, DocumentModel doc, String[] schemas) throws Exception
Exceptionpublic void writeDocument(OutputStream out, DocumentModel doc, String[] schemas, Map<String,String> contextParameters) throws Exception
Exceptionpublic static void writeDocument(org.codehaus.jackson.JsonGenerator jg,
DocumentModel doc,
String[] schemas,
javax.servlet.ServletRequest request)
throws Exception
Exceptionpublic static void writeDocument(org.codehaus.jackson.JsonGenerator jg,
DocumentModel doc,
String[] schemas,
Map<String,String> contextParameters,
javax.servlet.ServletRequest request)
throws Exception
Exceptionpublic static void writeDocument(org.codehaus.jackson.JsonGenerator jg,
DocumentModel doc,
String[] schemas,
Map<String,String> contextParameters,
javax.ws.rs.core.HttpHeaders headers,
javax.servlet.ServletRequest request)
throws Exception
jg - a ready to user JSON generatordoc - the document to serializeschemas - an array of schemas that must be serialized in the
properties mapcontextParameters - headers - request - the ServletRequest. If null blob URLs won't be generated.Exceptionpublic static void writePropertyValue(org.codehaus.jackson.JsonGenerator jg,
Property prop,
String filesBaseUrl)
throws PropertyException,
org.codehaus.jackson.JsonGenerationException,
IOException
PropertyExceptionorg.codehaus.jackson.JsonGenerationExceptionIOExceptionCopyright © 2014 Nuxeo SA. All rights reserved.