03-08-2012 10:58 PM
FileInfo fileInfo = fileFolderService.create(parentNodeRef, filename, customQName);
When I view it in Share, instead of the filename, I see the folder with the UUID as its name (e.g., "0b9a49fd-972d-448a-9fb6-f92587755433"). I've even tried explicitly setting the "cm:name" attribute after the node is created:
NodeRef currentNode = fileInfo.getNodeRef();
HashMap<QName, Serializable> propertyMap = new HashMap<QName, Serializable>();
propertyMap.put(ContentModel.PROP_NAME, filename);
propertyMap.put(ContentModel.PROP_DESCRIPTION, description);
propertyMap.put(ContentModel.PROP_TITLE, title);
nodeService.setProperties(currentNode, propertyMap);
Not only does the "cm:name" attribute not get set, but the "cm:title" and "cm:description" fields are blank when I look at the node in Share. The really WEIRD thing is if I attempt to run the webscript again and create the folder with the same filename ("Test Folder"), I get a DB error tells me there's already a node with that name, even though it's clearly the UUID in Share and the node browser. Any idea what I'm doing wrong? Is there another/better way to do this?03-09-2012 06:47 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.