public interface DownloadService
Modifier and Type | Interface and Description |
---|---|
static class |
DownloadService.ByteRange |
Modifier and Type | Field and Description |
---|---|
static String |
BLOBHOLDER_0 |
static String |
BLOBHOLDER_PREFIX |
static String |
EVENT_NAME |
static String |
NXBIGBLOB |
static String |
NXBIGFILE |
static String |
NXBIGZIPFILE |
static String |
NXDOWNLOADINFO |
Modifier and Type | Method and Description |
---|---|
void |
downloadBlob(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
DocumentModel doc,
String xpath,
Blob blob,
String filename,
String reason)
Triggers a blob download.
|
void |
downloadBlob(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
DocumentModel doc,
String xpath,
Blob blob,
String filename,
String reason,
Map<String,Serializable> extendedInfos)
Triggers a blob download.
|
String |
getDownloadUrl(String repositoryName,
String docId,
String xpath,
String filename)
Gets the URL to use to download the blob at the given xpath in the given document.
|
void |
logDownload(DocumentModel doc,
String blobXPath,
String filename,
String reason,
Map<String,Serializable> extendedInfos)
Logs a download.
|
Blob |
resolveBlob(DocumentModel doc,
String xpath)
Finds a document's blob given an xpath or blobholder index
|
static final String EVENT_NAME
static final String NXBIGFILE
static final String NXDOWNLOADINFO
static final String NXBIGBLOB
static final String NXBIGZIPFILE
static final String BLOBHOLDER_PREFIX
static final String BLOBHOLDER_0
String getDownloadUrl(String repositoryName, String docId, String xpath, String filename)
The URL is relative to the Nuxeo Web Application context.
Returns something like nxbigfile/reponame/docuuid/blobholder:0/foo.jpg
doc
- the documentxpath
- the blob's xpath or blobholder indexvoid downloadBlob(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, DocumentModel doc, String xpath, Blob blob, String filename, String reason) throws IOException
doc
- the document, if availablexpath
- the blob's xpath or blobholder index, if availableblob
- the blob, if already fetchedfilename
- the filename to usereason
- the download reasonIOException
void downloadBlob(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, DocumentModel doc, String xpath, Blob blob, String filename, String reason, Map<String,Serializable> extendedInfos) throws IOException
doc
- the document, if availablexpath
- the blob's xpath or blobholder index, if availableblob
- the blob, if already fetchedfilename
- the filename to usereason
- the download reasonextendedInfos
- an optional map of extended informations to logIOException
void logDownload(DocumentModel doc, String blobXPath, String filename, String reason, Map<String,Serializable> extendedInfos)
doc
- the doc for which this download occurs, if availableblobXPath
- the blob's xpath or blobholder index, if availablefilename
- the filenamereason
- the download reasonextendedInfos
- an optional map of extended informations to logBlob resolveBlob(DocumentModel doc, String xpath)
doc
- the documentxpath
- the xpath or blobholder indexnull
if not foundCopyright © 2015 Nuxeo SA. All rights reserved.