Package org.mycore.restapi.converter
Class MCRContentAbstractWriter
java.lang.Object
org.mycore.restapi.converter.MCRContentAbstractWriter
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<MCRContent>
- Direct Known Subclasses:
MCRContentJSONWriter
,MCRContentXMLWriter
public abstract class MCRContentAbstractWriter
extends Object
implements jakarta.ws.rs.ext.MessageBodyWriter<MCRContent>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract jakarta.ws.rs.core.MediaType
protected abstract void
handleFallback
(MCRContent content, OutputStream entityStream) boolean
isWriteable
(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) void
writeTo
(MCRContent content, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.ws.rs.ext.MessageBodyWriter
getSize
-
Field Details
-
PARAM_OBJECTTYPE
- See Also:
-
-
Constructor Details
-
MCRContentAbstractWriter
public MCRContentAbstractWriter()
-
-
Method Details
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
isWriteable
in interfacejakarta.ws.rs.ext.MessageBodyWriter<MCRContent>
-
writeTo
public void writeTo(MCRContent content, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException, jakarta.ws.rs.WebApplicationException- Specified by:
writeTo
in interfacejakarta.ws.rs.ext.MessageBodyWriter<MCRContent>
- Throws:
IOException
jakarta.ws.rs.WebApplicationException
-
getTransfomerFormat
protected abstract jakarta.ws.rs.core.MediaType getTransfomerFormat() -
handleFallback
protected abstract void handleFallback(MCRContent content, OutputStream entityStream) throws IOException - Throws:
IOException
-