com.atlassian.confluence.it.rpc
Class UpmJsonProvider
java.lang.Object
com.atlassian.confluence.it.rpc.UpmJsonProvider
- All Implemented Interfaces:
- javax.ws.rs.ext.MessageBodyReader<java.lang.Object>, javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
@Provider
public class UpmJsonProvider
- extends java.lang.Object
- implements javax.ws.rs.ext.MessageBodyReader<java.lang.Object>, javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
JsonProvider
is an implementation of the MessageBodyReader
and MessageBodyWriter
interfaces.
It provides serialization and deserialization of objects annotated with Jackson annotations. The implementation
simply wraps the JacksonJsonProvider
which would not be loaded by the REST module otherwise.
This code is lifted from com.atlassian.upm.core.rest.representations.JsonProvider.
Constructor Summary |
UpmJsonProvider(org.codehaus.jackson.jaxrs.JacksonJsonProvider provider)
|
Method Summary |
long |
getSize(java.lang.Object value,
java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
|
boolean |
isReadable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
|
boolean |
isWriteable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
|
java.lang.Object |
readFrom(java.lang.Class<java.lang.Object> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders,
java.io.InputStream entityStream)
|
void |
writeTo(java.lang.Object value,
java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders,
java.io.OutputStream entityStream)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UpmJsonProvider
public UpmJsonProvider(org.codehaus.jackson.jaxrs.JacksonJsonProvider provider)
getSize
public long getSize(java.lang.Object value,
java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
- Specified by:
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
isWriteable
public boolean isWriteable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
- Specified by:
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
writeTo
public void writeTo(java.lang.Object value,
java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders,
java.io.OutputStream entityStream)
throws java.io.IOException
- Specified by:
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
- Throws:
java.io.IOException
isReadable
public boolean isReadable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
- Specified by:
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<java.lang.Object>
readFrom
public java.lang.Object readFrom(java.lang.Class<java.lang.Object> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders,
java.io.InputStream entityStream)
throws java.io.IOException
- Specified by:
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<java.lang.Object>
- Throws:
java.io.IOException
Copyright © 2003-2014 Atlassian. All Rights Reserved.