Package org.alfresco.repo.download
Class DownloadServiceImpl
java.lang.Object
org.alfresco.repo.download.DownloadServiceImpl
- All Implemented Interfaces:
DownloadService
Implementation of the download service.
Persists the download reqest and then uses a local action service to execute
the
CreateDownloadArchiveAction.- Author:
- Alex Miller
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelDownload(NodeRef downloadNodeRef) Cancel a download requestcreateDownload(NodeRef[] requestedNodes, boolean recursive) Start the creation of a downlaodable 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.voidsetActionServiceHelper(ActionServiceHelper actionServiceHelper) voidsetDownloadStorage(DownloadStorage downloadStorage) voidsetTransactionHelper(RetryingTransactionHelper transactionHelper)
-
Constructor Details
-
DownloadServiceImpl
public DownloadServiceImpl()
-
-
Method Details
-
setActionServiceHelper
-
setTransactionHelper
-
setDownloadStorage
-
createDownload
Description copied from interface:DownloadServiceStart the creation of a downlaodable 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.- Specified by:
createDownloadin interfaceDownloadService- Parameters:
requestedNodes- 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
-
getDownloadStatus
Description copied from interface:DownloadServiceGet the status of the of the download identified by downloadNode.- Specified by:
getDownloadStatusin interfaceDownloadService
-
deleteDownloads
Description copied from interface:DownloadServiceDelete downloads created before before.- Specified by:
deleteDownloadsin interfaceDownloadService- Parameters:
before- Date
-
deleteDownloads
Description copied from interface:DownloadServiceDelete 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- Specified by:
deleteDownloadsin interfaceDownloadService
-
cancelDownload
Description copied from interface:DownloadServiceCancel a download request- Specified by:
cancelDownloadin interfaceDownloadService- Parameters:
downloadNodeRef- NodeRef of the download to cancel
-