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/BRANCHES/DEV/5.1.N/root@127307 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Cristian Turlica
2016-05-20 14:10:12 +00:00
parent e3df2f6508
commit abc42c895e
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);