Package org.alfresco.repo.download
Class DownloadStorage
- java.lang.Object
-
- org.alfresco.repo.download.DownloadStorage
-
public class DownloadStorage extends Object
This class is responsible for the persistence of objects using lower-level repo services such as theNodeService. The higher-level business logic around these CRUD calls is contained within theDownloadServiceImpl.- Author:
- Alex Miller
-
-
Constructor Summary
Constructors Constructor Description DownloadStorage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNodeToDownload(NodeRef downloadNode, NodeRef nodeToAdd)voidcancelDownload(NodeRef downloadNodeRef)NodeRefcreateDownloadNode(boolean recursive)voiddelete(NodeRef nodeRef)Delete the download node identified by nodeRefDownloadRequestgetDownloadRequest(NodeRef downloadNodeRef)List<List<DownloadEntity>>getDownloadsCreatedBefore(Date before, int batchSize, boolean cleanAllSysDownloadFolders)Get all the downloads created before before.DownloadStatusgetDownloadStatus(NodeRef downloadNodeRef)NodeRefgetOrCreateDowloadContainer()This method finds the SyncSet Definition Container NodeRef, creating one if it does not exist.intgetSequenceNumber(NodeRef nodeRef)booleanisCancelled(NodeRef downloadNodeRef)voidsetImporterBootstrap(ImporterBootstrap bootstrap)voidsetNamespaceService(NamespaceService namespaceService)voidsetNodeService(NodeService nodeService)voidsetNoPermissionCheckNodeService(NodeService noPermissionCheckNodeService)voidsetQueryRegistry(NamedObjectRegistry<CannedQueryFactory<? extends Object>> queryRegistry)voidsetRepositoryHelper(Repository repositoryHelper)voidupdateStatus(NodeRef nodeRef, DownloadStatus status)
-
-
-
Method Detail
-
setImporterBootstrap
public void setImporterBootstrap(ImporterBootstrap bootstrap)
-
setQueryRegistry
public void setQueryRegistry(NamedObjectRegistry<CannedQueryFactory<? extends Object>> queryRegistry)
-
setRepositoryHelper
public void setRepositoryHelper(Repository repositoryHelper)
-
setNodeService
public void setNodeService(NodeService nodeService)
-
setNoPermissionCheckNodeService
public void setNoPermissionCheckNodeService(NodeService noPermissionCheckNodeService)
-
setNamespaceService
public void setNamespaceService(NamespaceService namespaceService)
-
getOrCreateDowloadContainer
public NodeRef getOrCreateDowloadContainer()
This method finds the SyncSet Definition Container NodeRef, creating one if it does not exist.- Returns:
- the syncset definition container
-
createDownloadNode
public NodeRef createDownloadNode(boolean recursive)
-
cancelDownload
public void cancelDownload(NodeRef downloadNodeRef)
-
isCancelled
public boolean isCancelled(NodeRef downloadNodeRef)
-
getDownloadRequest
public DownloadRequest getDownloadRequest(NodeRef downloadNodeRef)
-
getDownloadStatus
public DownloadStatus getDownloadStatus(NodeRef downloadNodeRef)
-
getSequenceNumber
public int getSequenceNumber(NodeRef nodeRef)
-
updateStatus
public void updateStatus(NodeRef nodeRef, DownloadStatus status)
-
getDownloadsCreatedBefore
public List<List<DownloadEntity>> getDownloadsCreatedBefore(Date before, int batchSize, boolean cleanAllSysDownloadFolders)
Get all the downloads created before before.
-
delete
public void delete(NodeRef nodeRef)
Delete the download node identified by nodeRef- Parameters:
nodeRef- NodeRef
-
-