Class PartialCoreIODelegate

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>
    Direct Known Subclasses:
    CoreIODelegate, JsonCoreIODelegate

    public abstract class PartialCoreIODelegate
    extends Object
    implements javax.ws.rs.ext.MessageBodyWriter<Object>, javax.ws.rs.ext.MessageBodyReader<Object>
    An abstract JAX-RS MessageBodyWriter that delegate marshalling to all nuxeo-core-io Writer and Reader with conditions.
    Since:
    7.2
    • Constructor Detail

      • PartialCoreIODelegate

        public PartialCoreIODelegate()
    • Method Detail

      • accept

        protected abstract boolean accept​(Class<?> type,
                                          Type genericType,
                                          Annotation[] annotations,
                                          javax.ws.rs.core.MediaType mediaType)
        If it returns true, it delegates marshalling to MarshallerRegistry.
        Since:
        7.2
      • isWriteable

        public boolean isWriteable​(Class<?> type,
                                   Type genericType,
                                   Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mediaType)
        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)
        Specified by:
        isReadable in interface javax.ws.rs.ext.MessageBodyReader<Object>
      • getSize

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

        public final void writeTo​(Object t,
                                  Class<?> type,
                                  Type genericType,
                                  Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mediaType,
                                  javax.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders,
                                  OutputStream entityStream)
                           throws IOException,
                                  javax.ws.rs.WebApplicationException
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<Object>
        Throws:
        IOException
        javax.ws.rs.WebApplicationException
      • readFrom

        public Object readFrom​(Class<Object> type,
                               Type genericType,
                               Annotation[] annotations,
                               javax.ws.rs.core.MediaType mediaType,
                               javax.ws.rs.core.MultivaluedMap<String,​String> httpHeaders,
                               InputStream entityStream)
                        throws IOException,
                               javax.ws.rs.WebApplicationException
        Specified by:
        readFrom in interface javax.ws.rs.ext.MessageBodyReader<Object>
        Throws:
        IOException
        javax.ws.rs.WebApplicationException