mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged 5.1.N (5.1.1) to HEAD (5.1)
118307 nsmintanca: Merged 5.0.N (5.0.4) to 5.1.N (5.1.1) 118231 aleahu: MNT-14853 : Unable to download zip with non primary child - Added the flag exportSecondaryNodes for the ExporterComponent, and if this is set on true we export the secondary nodes as actual nodes. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@123591 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -41,6 +41,7 @@ import org.alfresco.service.cmr.download.DownloadService;
|
||||
import org.alfresco.service.cmr.download.DownloadStatus;
|
||||
import org.alfresco.service.cmr.download.DownloadStatus.Status;
|
||||
import org.alfresco.service.cmr.repository.AssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ContentReader;
|
||||
import org.alfresco.service.cmr.repository.ContentService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
@@ -107,6 +108,7 @@ public class DownloadServiceIntegrationTest
|
||||
// Test Content
|
||||
private NodeRef rootFolder;
|
||||
private NodeRef rootFile;
|
||||
private NodeRef secondaryNode;
|
||||
|
||||
private NodeRef level1Folder1;
|
||||
|
||||
@@ -167,7 +169,12 @@ public class DownloadServiceIntegrationTest
|
||||
|
||||
testNodes.createNodeWithTextContent(level1Folder2, "level2File.txt", ContentModel.TYPE_CONTENT, AuthenticationUtil.getAdminUserName(), "Level 2 file content");
|
||||
allEntries.add("rootFolder/level1Folder2/level2File.txt");
|
||||
|
||||
|
||||
secondaryNode = testNodes.createNodeWithTextContent(COMPANY_HOME, "secondaryNodeFile.txt", ContentModel.TYPE_CONTENT, AuthenticationUtil.getAdminUserName(), "Secondary node");
|
||||
ChildAssociationRef assoc = NODE_SERVICE.addChild(rootFolder, secondaryNode, ContentModel.ASSOC_CONTAINS, ContentModel.ASSOC_CONTAINS);
|
||||
Assert.assertFalse(assoc.isPrimary());
|
||||
allEntries.add("rootFolder/secondaryNodeFile.txt");
|
||||
|
||||
fileToCheckout = testNodes.createNodeWithTextContent(level1Folder2, "fileToCheckout.txt", ContentModel.TYPE_CONTENT, AuthenticationUtil.getAdminUserName(), "Level 2 file content");
|
||||
// Add the lock and version aspects to the created node
|
||||
NODE_SERVICE.addAspect(fileToCheckout, ContentModel.ASPECT_VERSIONABLE, null);
|
||||
@@ -217,7 +224,7 @@ public class DownloadServiceIntegrationTest
|
||||
status = getDownloadStatus(downloadNode);
|
||||
}
|
||||
|
||||
Assert.assertEquals(5l, status.getTotalFiles());
|
||||
Assert.assertEquals(6l, status.getTotalFiles());
|
||||
|
||||
long elapsedTime = waitForDownload(downloadNode);
|
||||
|
||||
|
Reference in New Issue
Block a user