<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Custom Folder Created But Name is UUID? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/custom-folder-created-but-name-is-uuid/m-p/273507#M226637</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm writing a Java-backed webscript that creates a custom folder (a type that extends "cm:folder" with a few additional attributes). The folder is created without a problem, but the "cm:name" attribute is set to the node's UUID and not the file name I'm passing into the FileFolderService. I'm using the following command, where "filename" is a String that I'd like to use as the object's name (e.g., "Test Folder"). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;FileInfo fileInfo = fileFolderService.create(parentNodeRef, filename, customQName);&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;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:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;NodeRef currentNode = fileInfo.getNodeRef();&lt;BR /&gt;HashMap&amp;lt;QName, Serializable&amp;gt; propertyMap = new HashMap&amp;lt;QName, Serializable&amp;gt;();&lt;BR /&gt;propertyMap.put(ContentModel.PROP_NAME, filename);&lt;BR /&gt;propertyMap.put(ContentModel.PROP_DESCRIPTION, description);&lt;BR /&gt;propertyMap.put(ContentModel.PROP_TITLE, title);&lt;BR /&gt;nodeService.setProperties(currentNode, propertyMap);&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;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?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Mar 2012 03:58:00 GMT</pubDate>
    <dc:creator>cpaul</dc:creator>
    <dc:date>2012-03-09T03:58:00Z</dc:date>
    <item>
      <title>Custom Folder Created But Name is UUID?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-folder-created-but-name-is-uuid/m-p/273507#M226637</link>
      <description>Hi all,I'm writing a Java-backed webscript that creates a custom folder (a type that extends "cm:folder" with a few additional attributes). The folder is created without a problem, but the "cm:name" attribute is set to the node's UUID and not the file name I'm passing into the FileFolderService. I'm</description>
      <pubDate>Fri, 09 Mar 2012 03:58:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-folder-created-but-name-is-uuid/m-p/273507#M226637</guid>
      <dc:creator>cpaul</dc:creator>
      <dc:date>2012-03-09T03:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Folder Created But Name is UUID?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-folder-created-but-name-is-uuid/m-p/273508#M226638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Aha! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Turns out the nodeService.setProperties() method clears all attributes that are not in the HashMap. I was adding more properties later on down the line to the same node via another setProperties() call, thus clearing the name, etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cautionary tale!&amp;nbsp; :mrgreen:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2012 23:47:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-folder-created-but-name-is-uuid/m-p/273508#M226638</guid>
      <dc:creator>cpaul</dc:creator>
      <dc:date>2012-03-09T23:47:27Z</dc:date>
    </item>
  </channel>
</rss>

