Merged 5.2.N (5.2.1) to HEAD (5.2)

127361 rmunteanu: Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)
      127307 cturlica: Merged 5.1.0 (5.1.0.6) to 5.1.N (5.1.2)
         127235 cturlica: MNT-16292: Unzipped files which have folders do not get the cm:titled aspect applied
            - updated ImporterActionExecuter to add titled aspect
            - added test case for change and refactored test class


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@127883 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-06-06 09:25:16 +00:00
parent 7593b222ee
commit 702c88f8fb
3 changed files with 142 additions and 35 deletions

View File

@@ -301,10 +301,17 @@ public class ImporterActionExecuter extends ActionExecuterAbstractBase
}
else
{
String folderName = file.getName();
// create a folder based on the folder name
FileInfo folderInfo = this.fileFolderService.create(root, file.getName(), ContentModel.TYPE_FOLDER);
FileInfo folderInfo = this.fileFolderService.create(root, folderName, ContentModel.TYPE_FOLDER);
NodeRef folderRef = folderInfo.getNodeRef();
// add titled aspect
Map<QName, Serializable> titledProps = new HashMap<QName, Serializable>(1, 1.0f);
titledProps.put(ContentModel.PROP_TITLE, folderName);
this.nodeService.addAspect(folderRef, ContentModel.ASPECT_TITLED, titledProps);
// add the uifacets aspect for the read/edit properties screens
this.nodeService.addAspect(folderRef, ApplicationModel.ASPECT_UIFACETS, null);