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-RSMessageBodyWriterthat delegate marshalling to all nuxeo-core-ioWriterandReaderwith conditions.- Since:
- 7.2
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTENT_TYPEstatic StringNUXEO_ENTITY
-
Constructor Summary
Constructors Constructor Description PartialCoreIODelegate()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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)ObjectreadFrom(Class<Object> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream)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 Detail
-
CONTENT_TYPE
public static final String CONTENT_TYPE
- See Also:
- Constant Field Values
-
NUXEO_ENTITY
public static final String NUXEO_ENTITY
- See Also:
- Constant Field Values
-
-
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 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
-
-