Class DownloadServiceImpl

  • All Implemented Interfaces:
    DownloadService

    public class DownloadServiceImpl
    extends java.lang.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 Detail

      • DownloadServiceImpl

        public DownloadServiceImpl()
    • Method Detail

      • setActionServiceHelper

        public void setActionServiceHelper​(ActionServiceHelper actionServiceHelper)
      • setDownloadStorage

        public void setDownloadStorage​(DownloadStorage downloadStorage)
      • createDownload

        public org.alfresco.service.cmr.repository.NodeRef createDownload​(org.alfresco.service.cmr.repository.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
      • deleteDownloads

        public void deleteDownloads​(java.util.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​(java.util.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​(org.alfresco.service.cmr.repository.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