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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleanaccept(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) If it returns true, it delegates marshalling toMarshallerRegistry.longgetSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) booleanisReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) booleanisWriteable(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 voidwriteTo(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:
isWriteablein interfacejavax.ws.rs.ext.MessageBodyWriter<Object>
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
isReadablein 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:
getSizein 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:
writeToin interfacejavax.ws.rs.ext.MessageBodyWriter<Object>- Throws:
IOExceptionjavax.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:
readFromin interfacejavax.ws.rs.ext.MessageBodyReader<Object>- Throws:
IOExceptionjavax.ws.rs.WebApplicationException
-