Class PartialCoreIODelegate
java.lang.Object
org.nuxeo.ecm.webengine.jaxrs.coreiodelegate.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
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract boolean
accept
(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) If it returns true, it delegates marshalling toMarshallerRegistry
.long
getSize
(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) boolean
isReadable
(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) boolean
isWriteable
(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) readFrom
(Class<Object> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, String> httpHeaders, InputStream entityStream) 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)
-
Field Details
-
CONTENT_TYPE
- See Also:
-
NUXEO_ENTITY
- See Also:
-
-
Constructor Details
-
PartialCoreIODelegate
public PartialCoreIODelegate()
-
-
Method Details
-
accept
protected abstract boolean accept(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) If it returns true, it delegates marshalling toMarshallerRegistry
.- Since:
- 7.2
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
isWriteable
in interfacejavax.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 interfacejavax.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 interfacejavax.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 interfacejavax.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 interfacejavax.ws.rs.ext.MessageBodyReader<Object>
- Throws:
IOException
javax.ws.rs.WebApplicationException
-