Merged WEBAPP-API (5.2.1) to 5.2.N (5.2.1)

134630 cpopa: APPSREPO-105 : Add an API to download multiple file/folders as a zip
      - Added an API for creating a download, retrieving download info and canceling a download


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@134671 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Constantin Popa
2017-01-20 12:56:01 +00:00
parent 88f99d6e9a
commit c5baf57662
2 changed files with 10 additions and 3 deletions

View File

@@ -74,7 +74,8 @@
<bean id="downloadStorage" class="org.alfresco.repo.download.DownloadStorage"> <bean id="downloadStorage" class="org.alfresco.repo.download.DownloadStorage">
<property name="importerBootstrap" ref="spacesBootstrap"/> <property name="importerBootstrap" ref="spacesBootstrap"/>
<property name="repositoryHelper" ref="repositoryHelper"/> <property name="repositoryHelper" ref="repositoryHelper"/>
<property name="nodeService" ref="nodeService"/> <property name="nodeService" ref="NodeService"/>
<property name="noPermissionCheckNodeService" ref="nodeService"/>
<property name="namespaceService" ref="namespaceService"/> <property name="namespaceService" ref="namespaceService"/>
<property name="queryRegistry" ref="downloadCannedQueryRegistry"/> <property name="queryRegistry" ref="downloadCannedQueryRegistry"/>
</bean> </bean>

View File

@@ -68,6 +68,7 @@ public class DownloadStorage
private ImporterBootstrap bootstrap; private ImporterBootstrap bootstrap;
private Repository repositoryHelper; private Repository repositoryHelper;
private NodeService nodeService; private NodeService nodeService;
private NodeService noPermissionCheckNodeService;
private NamespaceService namespaceService; private NamespaceService namespaceService;
private NamedObjectRegistry<CannedQueryFactory<? extends Object>> queryRegistry; private NamedObjectRegistry<CannedQueryFactory<? extends Object>> queryRegistry;
@@ -91,6 +92,11 @@ public class DownloadStorage
this.nodeService = nodeService; this.nodeService = nodeService;
} }
public void setNoPermissionCheckNodeService(NodeService noPermissionCheckNodeService)
{
this.noPermissionCheckNodeService = noPermissionCheckNodeService;
}
public void setNamespaceService(NamespaceService namespaceService) public void setNamespaceService(NamespaceService namespaceService)
{ {
this.namespaceService = namespaceService; this.namespaceService = namespaceService;
@@ -135,7 +141,7 @@ public class DownloadStorage
Map<QName, Serializable> downloadProperties = new HashMap<QName, Serializable>(); Map<QName, Serializable> downloadProperties = new HashMap<QName, Serializable>();
downloadProperties.put(DownloadModel.PROP_RECURSIVE, recursive); downloadProperties.put(DownloadModel.PROP_RECURSIVE, recursive);
ChildAssociationRef newChildAssoc = nodeService.createNode(downloadsContainer, ChildAssociationRef newChildAssoc = noPermissionCheckNodeService.createNode(downloadsContainer,
ContentModel.ASSOC_CHILDREN, ContentModel.ASSOC_CHILDREN, ContentModel.ASSOC_CHILDREN, ContentModel.ASSOC_CHILDREN,
DownloadModel.TYPE_DOWNLOAD, DownloadModel.TYPE_DOWNLOAD,
downloadProperties); downloadProperties);