Merged 5.0.N (5.0.4) to 5.1.N (5.1.1)

118237 aleahu: MNT-14853 : Unable to download zip with non primary child
      - Fixed spacing by removing tabs as per Derek's request.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@118308 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Natalia Smintanca
2015-11-23 10:57:08 +00:00
parent e00500f6f0
commit 0c55fc5905
3 changed files with 41 additions and 41 deletions

View File

@@ -81,7 +81,7 @@
<bean id="downloadStatusUpdateService" class="org.alfresco.repo.download.DownloadStatusUpdateServiceImpl">
<property name="storage" ref="downloadStorage" />
<property name="storage" ref="downloadStorage" />
</bean>
<bean id="downloadContentServiceHelper" class="org.alfresco.repo.download.LocalContentServiceHelper">
@@ -91,13 +91,13 @@
<bean id="createDownloadArchiveAction" class="org.alfresco.repo.download.CreateDownloadArchiveAction" parent="action-executer">
<property name="checkOutCheckInSerivce" ref="checkOutCheckInService"/>
<property name="contentServiceHelper" ref="downloadContentServiceHelper" />
<property name="downloadStorage" ref="downloadStorage" />
<property name="exporterService" ref="downloadExporterComponent" />
<property name="maximumContentSize" value="${download.maxContentSize}" />
<property name="nodeService" ref="nodeService" />
<property name="publicAction" value="false"/>
<property name="transactionHelper" ref="retryingTransactionHelper"/>
<property name="updateService" ref="downloadStatusUpdateService"/>
<property name="downloadStorage" ref="downloadStorage" />
<property name="exporterService" ref="downloadExporterComponent" />
<property name="maximumContentSize" value="${download.maxContentSize}" />
<property name="nodeService" ref="nodeService" />
<property name="publicAction" value="false"/>
<property name="transactionHelper" ref="retryingTransactionHelper"/>
<property name="updateService" ref="downloadStatusUpdateService"/>
</bean>
<bean id="downloadExporterComponent" parent="exporterComponent">

View File

@@ -391,8 +391,8 @@ public class ExporterComponent
// explicitly included ?
if (parameters.getIncludedPaths() != null)
{
String nodePathPrefixString = nodeService.getPath(nodeRef).toPrefixString(namespaceService);
if (! (isIncludedPath(parameters.getIncludedPaths(), nodePathPrefixString)))
String nodePathPrefixString = nodeService.getPath(nodeRef).toPrefixString(namespaceService);
if (! (isIncludedPath(parameters.getIncludedPaths(), nodePathPrefixString)))
{
return;
}
@@ -515,7 +515,7 @@ public class ExporterComponent
// Export node children
if (parameters.isCrawlChildNodes())
{
// sort associations into assoc type buckets filtering out unneccessary associations
// sort associations into assoc type buckets filtering out unneccessary associations
Map<QName, List<ChildAssociationRef>> assocTypes = new HashMap<QName, List<ChildAssociationRef>>();
List<ChildAssociationRef> childAssocs = nodeService.getChildAssocs(nodeRef);
for (ChildAssociationRef childAssoc : childAssocs)
@@ -540,7 +540,7 @@ public class ExporterComponent
}
if (isExcludedURI(parameters.getExcludeNamespaceURIs(), childAssoc.getQName().getNamespaceURI()))
{
continue;
continue;
}
List<ChildAssociationRef> assocRefs = assocTypes.get(childAssocType);
@@ -688,7 +688,7 @@ public class ExporterComponent
*/
private void walkNodeSecondaryLinks(NodeRef nodeRef, ExporterCrawlerParameters parameters, Exporter exporter)
{
// sort associations into assoc type buckets filtering out unneccessary associations
// sort associations into assoc type buckets filtering out unneccessary associations
Map<QName, List<ChildAssociationRef>> assocTypes = new HashMap<QName, List<ChildAssociationRef>>();
List<ChildAssociationRef> childAssocs = nodeService.getChildAssocs(nodeRef);
for (ChildAssociationRef childAssoc : childAssocs)
@@ -758,7 +758,7 @@ public class ExporterComponent
*/
private void walkNodeAssociations(NodeRef nodeRef, ExporterCrawlerParameters parameters, Exporter exporter)
{
// sort associations into assoc type buckets filtering out unneccessary associations
// sort associations into assoc type buckets filtering out unneccessary associations
Map<QName, List<AssociationRef>> assocTypes = new HashMap<QName, List<AssociationRef>>();
List<AssociationRef> assocs = nodeService.getTargetAssocs(nodeRef, RegexQNamePattern.MATCH_ALL);
for (AssociationRef assoc : assocs)

View File

@@ -106,9 +106,9 @@ public class DownloadServiceIntegrationTest
private static IntegrityChecker INTEGRITY_CHECKER;
// Test Content
private NodeRef rootFolder;
private NodeRef rootFile;
private NodeRef secondaryNode;
private NodeRef rootFolder;
private NodeRef rootFile;
private NodeRef secondaryNode;
private NodeRef level1Folder1;
@@ -120,13 +120,13 @@ public class DownloadServiceIntegrationTest
@BeforeClass public static void init()
{
// Resolve required services
// Resolve required services
CHECK_OUT_CHECK_IN_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("CheckOutCheckInService", CheckOutCheckInService.class);
CONTENT_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("contentService", ContentService.class);
DOWNLOAD_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("DownloadService", DownloadService.class);
NODE_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("NodeService", NodeService.class);
PERMISSION_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("PermissionService", PermissionService.class);
TRANSACTION_HELPER = APP_CONTEXT_INIT.getApplicationContext().getBean("retryingTransactionHelper", RetryingTransactionHelper.class);
DOWNLOAD_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("DownloadService", DownloadService.class);
NODE_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("NodeService", NodeService.class);
PERMISSION_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("PermissionService", PermissionService.class);
TRANSACTION_HELPER = APP_CONTEXT_INIT.getApplicationContext().getBean("retryingTransactionHelper", RetryingTransactionHelper.class);
INTEGRITY_CHECKER = APP_CONTEXT_INIT.getApplicationContext().getBean("integrityChecker", IntegrityChecker.class);
INTEGRITY_CHECKER.setEnabled(true);
INTEGRITY_CHECKER.setFailOnViolation(true);
@@ -188,7 +188,7 @@ public class DownloadServiceIntegrationTest
@Test public void createDownload() throws IOException, InterruptedException
{
// Initiate the download
final NodeRef downloadNode = DOWNLOAD_SERVICE.createDownload(new NodeRef[] {rootFile, rootFolder}, true);
final NodeRef downloadNode = DOWNLOAD_SERVICE.createDownload(new NodeRef[] {rootFile, rootFolder}, true);
Assert.assertNotNull(downloadNode);
testNodes.addNodeRef(downloadNode);
@@ -218,15 +218,15 @@ public class DownloadServiceIntegrationTest
});
DownloadStatus status = getDownloadStatus(downloadNode);
while (status.getStatus() == Status.PENDING)
{
Thread.sleep(PAUSE_TIME);
status = getDownloadStatus(downloadNode);
}
while (status.getStatus() == Status.PENDING)
{
Thread.sleep(PAUSE_TIME);
status = getDownloadStatus(downloadNode);
}
Assert.assertEquals(6l, status.getTotalFiles());
Assert.assertEquals(6l, status.getTotalFiles());
long elapsedTime = waitForDownload(downloadNode);
long elapsedTime = waitForDownload(downloadNode);
Assert.assertTrue("Maximum creation time exceeded!", elapsedTime < MAX_TIME);