DocumentModelJsonWriter
. To use it in JAX-RS, use
JsonCoreIODelegate
to forward JAX-RS marshalling to core io. To use it your code, please refer to
MarshallerRegistry
service or use MarshallerHelper
.@Deprecated @Provider public class JsonDocumentWriter extends Object implements javax.ws.rs.ext.MessageBodyWriter<DocumentModel>
Modifier and Type | Field and Description |
---|---|
static String |
DOCUMENT_PROPERTIES_HEADER
Deprecated.
|
Constructor and Description |
---|
JsonDocumentWriter()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
long |
getSize(DocumentModel arg0,
Class<?> arg1,
Type arg2,
Annotation[] arg3,
javax.ws.rs.core.MediaType arg4)
Deprecated.
|
boolean |
isWriteable(Class<?> arg0,
Type arg1,
Annotation[] arg2,
javax.ws.rs.core.MediaType arg3)
Deprecated.
|
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)
Deprecated.
|
static void |
writeDocument(org.codehaus.jackson.JsonGenerator jg,
DocumentModel doc,
String[] schemas,
Map<String,String> contextParameters,
javax.servlet.ServletRequest request)
Deprecated.
|
static void |
writeDocument(org.codehaus.jackson.JsonGenerator jg,
DocumentModel doc,
String[] schemas,
javax.servlet.ServletRequest request)
Deprecated.
|
void |
writeDocument(OutputStream out,
DocumentModel doc,
String[] schemas)
Deprecated.
|
void |
writeDocument(OutputStream out,
DocumentModel doc,
String[] schemas,
Map<String,String> contextParameters)
Deprecated.
|
static void |
writePropertyValue(org.codehaus.jackson.JsonGenerator jg,
Property prop,
String filesBaseUrl)
Deprecated.
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)
Deprecated.
|
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>
IOException
javax.ws.rs.WebApplicationException
public void writeDocument(OutputStream out, DocumentModel doc, String[] schemas) throws IOException
IOException
public void writeDocument(OutputStream out, DocumentModel doc, String[] schemas, Map<String,String> contextParameters) throws IOException
IOException
public static void writeDocument(org.codehaus.jackson.JsonGenerator jg, DocumentModel doc, String[] schemas, javax.servlet.ServletRequest request) throws IOException
IOException
public static void writeDocument(org.codehaus.jackson.JsonGenerator jg, DocumentModel doc, String[] schemas, Map<String,String> contextParameters, javax.servlet.ServletRequest request) throws IOException
IOException
public 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 IOException
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.IOException
public static void writePropertyValue(org.codehaus.jackson.JsonGenerator jg, Property prop, String filesBaseUrl) throws PropertyException, org.codehaus.jackson.JsonGenerationException, IOException
PropertyException
org.codehaus.jackson.JsonGenerationException
IOException
Copyright © 2015 Nuxeo SA. All rights reserved.