Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

78564: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud)
      77751: Merged DEV to V4.2-BUG-FIX (4.2.4)
         77428 : MNT-11911 : Cancelling a download as ZIP archive leads to nodeRef-ID displayed at 'My Documents' dashlet
            - Added temp file aspect "indexControl", property "isIndexed" and "isContentIndexed" which allow not index files in the search. Added in JUnit test check to add properties and aspects. Now in "My Documents" dashlet is not visible zip file. 


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82601 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Erik Winlof
2014-09-03 12:34:48 +00:00
parent 87085fafda
commit ad229d966f
2 changed files with 11 additions and 0 deletions

View File

@@ -124,6 +124,12 @@ public class DownloadStorage
final NodeRef downloadNodeRef = newChildAssoc.getChildRef();
// MNT-11911 fix, add ASPECT_INDEX_CONTROL and property that not create indexes for search and not visible files/folders at 'My Documents' dashlet
Map<QName, Serializable> aspectProperties = new HashMap<QName, Serializable>(2);
aspectProperties.put(ContentModel.PROP_IS_INDEXED, Boolean.FALSE);
aspectProperties.put(ContentModel.PROP_IS_CONTENT_INDEXED, Boolean.FALSE);
nodeService.addAspect(downloadNodeRef, ContentModel.ASPECT_INDEX_CONTROL, aspectProperties);
if (log.isDebugEnabled())
{
StringBuilder msg = new StringBuilder();

View File

@@ -201,6 +201,11 @@ public class DownloadServiceIntegrationTest
{
Assert.assertTrue(association.getTargetRef().equals(rootFile) || association.getTargetRef().equals(rootFolder));
}
Assert.assertTrue(NODE_SERVICE.hasAspect(downloadNode, ContentModel.ASPECT_INDEX_CONTROL));
Assert.assertEquals(Boolean.FALSE,properties.get(ContentModel.PROP_IS_INDEXED));
Assert.assertEquals(Boolean.FALSE,properties.get(ContentModel.PROP_IS_CONTENT_INDEXED));
return null;
}
});