Package org.nuxeo.ecm.webengine.model.io
Class DownloadContextBlobHolderWriter
- java.lang.Object
-
- org.nuxeo.ecm.webengine.model.io.DownloadContextBlobHolderWriter
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<DownloadContextBlobHolder>
@Provider public class DownloadContextBlobHolderWriter extends Object implements javax.ws.rs.ext.MessageBodyWriter<DownloadContextBlobHolder>
Writer for aDownloadContextBlobHolder
, keeping the original document context, which allows for later filtering on document permissions by theDownloadService
.- Since:
- 2021.25
-
-
Constructor Summary
Constructors Constructor Description DownloadContextBlobHolderWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
commitAndReopenTransaction()
long
getSize(DownloadContextBlobHolder blobHolder, 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)
void
writeTo(DownloadContextBlobHolder blobHolder, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
-
-
-
Method Detail
-
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<DownloadContextBlobHolder>
-
getSize
public long getSize(DownloadContextBlobHolder blobHolder, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
getSize
in interfacejavax.ws.rs.ext.MessageBodyWriter<DownloadContextBlobHolder>
-
writeTo
public void writeTo(DownloadContextBlobHolder blobHolder, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException
- Specified by:
writeTo
in interfacejavax.ws.rs.ext.MessageBodyWriter<DownloadContextBlobHolder>
- Throws:
IOException
-
commitAndReopenTransaction
protected void commitAndReopenTransaction()
-
-