<?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 Add category to node SDK in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/add-category-to-node-sdk/m-p/16732#M7407</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;I tried to add categories to a node that already have the aspect cm:generalclassifiable. Below the code using the SDK&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;AlfrescoClient client = AlfrescoService.getAlfrescoClient();&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;NodesAPI nodesAPI = client.getNodesAPI();&lt;/EM&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;BR /&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;ArrayList&amp;lt;Object&amp;gt; categoriesNames = new ArrayList&amp;lt;&amp;gt;();&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;categoriesNames.add("ad0d372b-d92b-4db4-a8ff-c837e4412674");&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;categoriesNames.add("62a15b1b-e47e-42bd-a557-fc8eef65f1ce");&lt;/EM&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;LinkedTreeMap&amp;lt;String, Object&amp;gt; map = new LinkedTreeMap&amp;lt;String, Object&amp;gt;();&lt;BR /&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;map.put("cm:categories", categoriesNames);&lt;/EM&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;NodeRepresentation categoryNode = nodesAPI.updateNodeCall("0e68a793-dbed-4f7f-bca6-8887aa02d9fa" , new NodeBodyUpdate(map)).execute().body();&lt;/EM&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;I received the following error :&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;{&lt;BR /&gt;"error" : {&lt;BR /&gt;"errorKey" : "framework.exception.ApiDefault",&lt;BR /&gt;"statusCode" : 500,&lt;BR /&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;"briefSummary" : "07210098 Failed to persist collection entry: \n Property: Name: {&lt;/SPAN&gt;&lt;A class="" href="http://www.alfresco.org/model/content/1.0" rel="nofollow noopener noreferrer" style="color: #1e88e5; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;http://www.alfresco.org/model/content/1.0&lt;/A&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;}categories\nTitle: Categories\nDescription: null\nDefault Value: null\nDataType Name: {&lt;/SPAN&gt;&lt;A class="" href="http://www.alfresco.org/model/dictionary/1.0" rel="nofollow noopener noreferrer" style="color: #1e88e5; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;http://www.alfresco.org/model/dictionary/1.0&lt;/A&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;}category\nContainerClass Name: {&lt;/SPAN&gt;&lt;A class="" href="http://www.alfresco.org/model/content/1.0" rel="nofollow noopener noreferrer" style="color: #1e88e5; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;http://www.alfresco.org/model/content/1.0&lt;/A&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;}generalclassifiable\nisMultiValued: true\nisMandatory: false\nisMandatoryEnforced: false\nisProtected: false\nisIndexed: true\nisStoredInIndex: true\nisIndexedAtomically: true\nindexTokenisationMode: FALSE\n\n Index: 0\n Value: ad0d372b-d92b-4db4-a8ff-c837e4412674",&lt;/SPAN&gt;&lt;BR /&gt;"stackTrace" : "For security reasons the stack trace is no longer displayed, but the property is kept for previous versions",&lt;BR /&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;"descriptionURL" : "&lt;/SPAN&gt;&lt;A class="" href="https://api-explorer.alfresco.com" rel="nofollow noopener noreferrer" style="color: #1e88e5; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;https://api-explorer.alfresco.com&lt;/A&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;",&lt;/SPAN&gt;&lt;BR /&gt;"logId" : "86f55e70-0839-4be5-9de1-ccff6f72d7ba"&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;Any suggestion please.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Aug 2017 20:35:34 GMT</pubDate>
    <dc:creator>abadr82</dc:creator>
    <dc:date>2017-08-21T20:35:34Z</dc:date>
    <item>
      <title>Add category to node SDK</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/add-category-to-node-sdk/m-p/16732#M7407</link>
      <description>Hi All,&amp;nbsp;I tried to add categories to a node that already have the aspect cm:generalclassifiable. Below the code using the SDKAlfrescoClient client = AlfrescoService.getAlfrescoClient();NodesAPI nodesAPI = client.getNodesAPI();ArrayList&amp;lt;Object&amp;gt; categoriesNames = new ArrayList&amp;lt;&amp;gt;();categori</description>
      <pubDate>Mon, 21 Aug 2017 20:35:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/add-category-to-node-sdk/m-p/16732#M7407</guid>
      <dc:creator>abadr82</dc:creator>
      <dc:date>2017-08-21T20:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Add category to node SDK</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/add-category-to-node-sdk/m-p/16733#M7408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please, do not post the same question more than once&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="232972" __jive_macro_name="thread" _jive_internal="true" class="jive_macro_thread jive_macro link-titled" href="https://community.alfresco.com/thread/232972-add-category-to-node" rel="nofollow noopener noreferrer"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2017 01:27:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/add-category-to-node-sdk/m-p/16733#M7408</guid>
      <dc:creator>douglascrp</dc:creator>
      <dc:date>2017-08-23T01:27:24Z</dc:date>
    </item>
  </channel>
</rss>

