Class DownloadServiceImpl

java.lang.Object
org.alfresco.repo.download.DownloadServiceImpl
All Implemented Interfaces:
DownloadService

public class DownloadServiceImpl extends Object implements 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 Details

    • DownloadServiceImpl

      public DownloadServiceImpl()
  • Method Details

    • setActionServiceHelper

      public void setActionServiceHelper(ActionServiceHelper actionServiceHelper)
    • setTransactionHelper

      public void setTransactionHelper(RetryingTransactionHelper transactionHelper)
    • setDownloadStorage

      public void setDownloadStorage(DownloadStorage downloadStorage)
    • createDownload

      public NodeRef createDownload(NodeRef[] requestedNodes, boolean recursive)
      Description copied from interface: DownloadService
      Start 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:
      createDownload in interface DownloadService
      Parameters:
      requestedNodes - NodeRefs of content to be added to the archive file
      recursive - Recurse into container nodes
      Returns:
      Reference to node which will eventually contain the archive file
    • getDownloadStatus

      public DownloadStatus getDownloadStatus(NodeRef downloadNode)
      Description copied from interface: DownloadService
      Get the status of the of the download identified by downloadNode.
      Specified by:
      getDownloadStatus in interface DownloadService
    • deleteDownloads

      public void deleteDownloads(Date before)
      Description copied from interface: DownloadService
      Delete downloads created before before.
      Specified by:
      deleteDownloads in interface DownloadService
      Parameters:
      before - Date
    • deleteDownloads

      public void deleteDownloads(Date before, int batchSize, boolean cleanAllSysDownloadFolders)
      Description copied from interface: DownloadService
      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
      Specified by:
      deleteDownloads in interface DownloadService
    • cancelDownload

      public void cancelDownload(NodeRef downloadNodeRef)
      Description copied from interface: DownloadService
      Cancel a download request
      Specified by:
      cancelDownload in interface DownloadService
      Parameters:
      downloadNodeRef - NodeRef of the download to cancel