Class UpmJsonProvider

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>

    @Provider
    @Deprecated
    public class UpmJsonProvider
    extends Object
    implements javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>
    Deprecated.
    since 7.14.0, use confluence-test-utils
    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 Detail

      • UpmJsonProvider

        public UpmJsonProvider​(org.codehaus.jackson.jaxrs.JacksonJsonProvider provider)
        Deprecated.
    • Method Detail

      • getSize

        public long getSize​(Object value,
                            Class<?> type,
                            Type genericType,
                            Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType)
        Deprecated.
        Specified by:
        getSize in interface javax.ws.rs.ext.MessageBodyWriter<Object>
      • isWriteable

        public boolean isWriteable​(Class<?> type,
                                   Type genericType,
                                   Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mediaType)
        Deprecated.
        Specified by:
        isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<Object>
      • isReadable

        public boolean isReadable​(Class<?> type,
                                  Type genericType,
                                  Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mediaType)
        Deprecated.
        Specified by:
        isReadable in interface javax.ws.rs.ext.MessageBodyReader<Object>