Interface DownloadService
- All Known Implementing Classes:
DownloadServiceImpl
public interface DownloadService
Zip download service.
Implementations are responsible for triggering the Zip creation process and
reporting on the status of the of this process.
- Author:
- Alex Miller
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancelDownload(NodeRef downloadNodeRef) Cancel a download requestcreateDownload(NodeRef[] nodeRefs, boolean recursive) Start the creation of a downloadable archive file containing the content from the given nodeRefs.createDownload(NodeRef[] nodeRefs, boolean recursive, String downloadNodeName) Start the creation of a downloadable archive file containing the content from the given nodeRefs.voiddeleteDownloads(Date before) Delete downloads created before before.voiddeleteDownloads(Date before, int batchSize, boolean cleanAllSysDownloadFolders) Delete downloads created before the specified date.getDownloadStatus(NodeRef downloadNode) Get the status of the of the download identified by downloadNode.
-
Method Details
-
createDownload
Start the creation of a downloadable archive file containing the content from the given nodeRefs. Implementations are expected to do this asynchronously, with clients using the returned NodeRef to check on progress. Initially, only zip files will be supported, however this could be extended in the future, to support additional archive types.- Parameters:
nodeRefs- NodeRefs of content to be added to the archive filerecursive- Recurse into container nodes- Returns:
- Reference to node which will eventually contain the archive file
-
createDownload
Start the creation of a downloadable archive file containing the content from the given nodeRefs. Implementations are expected to do this asynchronously, with clients using the returned NodeRef to check on progress. Initially, only zip files will be supported, however this could be extended in the future, to support additional archive types.- Parameters:
nodeRefs- NodeRefs of content to be added to the archive filerecursive- Recurse into container nodesdownloadNodeName- Download node name- Returns:
- Reference to node which will eventually contain the archive file
-
getDownloadStatus
Get the status of the of the download identified by downloadNode. -
deleteDownloads
Delete downloads created before before.- Parameters:
before- Date
-
deleteDownloads
Delete downloads created before the specified date. It also limits the number of deleted files for this batch of work to the specified batchSize; It can also look into deleting downloads files from all sys:Download folders affected by MNT-20212 -
cancelDownload
Cancel a download request- Parameters:
downloadNodeRef- NodeRef of the download to cancel
-