public abstract class ExportRepresentation extends org.restlet.resource.OutputRepresentation
DocumentPipe
using the facelet's output stream for the document
writer's output.
This abstract method must be subclassed to implement makePipe()
, makeDocumentReader(org.nuxeo.ecm.core.api.CoreSession, org.nuxeo.ecm.core.api.DocumentModel)
and
makeDocumentWriter(java.io.OutputStream)
.
Modifier and Type | Field and Description |
---|---|
protected boolean |
isUnrestricted |
protected String |
repositoryName |
protected String |
rootId |
Modifier | Constructor and Description |
---|---|
protected |
ExportRepresentation(org.restlet.data.MediaType mediaType,
DocumentModel root) |
protected |
ExportRepresentation(org.restlet.data.MediaType mediaType,
DocumentModel root,
boolean unrestricted) |
Modifier and Type | Method and Description |
---|---|
protected abstract DocumentReader |
makeDocumentReader(CoreSession documentManager,
DocumentModel root)
Create a
DocumentReader for the export. |
protected abstract DocumentWriter |
makeDocumentWriter(OutputStream outputStream)
Create a
DocumentWriter for the export. |
protected abstract DocumentPipe |
makePipe()
Create a
DocumentPipe adequate for the number of documents needed by the export. |
void |
write(OutputStream outputStream) |
getText, isAvailable, isTransient, setAvailable, setTransient
getCharacterSet, getEncodings, getExpirationDate, getIdentifier, getLanguages, getMediaType, getModificationDate, getSize, getTag, setCharacterSet, setExpirationDate, setIdentifier, setIdentifier, setMediaType, setModificationDate, setSize, setTag
protected final String repositoryName
protected final boolean isUnrestricted
protected ExportRepresentation(org.restlet.data.MediaType mediaType, DocumentModel root)
protected ExportRepresentation(org.restlet.data.MediaType mediaType, DocumentModel root, boolean unrestricted)
protected abstract DocumentPipe makePipe()
DocumentPipe
adequate for the number of documents needed by the export.protected abstract DocumentReader makeDocumentReader(CoreSession documentManager, DocumentModel root)
DocumentReader
for the export.documentManager
- a sessionroot
- the root of the exportprotected abstract DocumentWriter makeDocumentWriter(OutputStream outputStream) throws IOException
DocumentWriter
for the export.outputStream
- the stream to useIOException
public void write(OutputStream outputStream) throws IOException
write
in class org.restlet.resource.OutputRepresentation
IOException
Copyright © 2015 Nuxeo SA. All rights reserved.