<?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 Re: add a category to a document with Alfresco openCMIS extensio in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260657#M213787</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your help, I will try the webscript api.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Aug 2013 07:54:30 GMT</pubDate>
    <dc:creator>piotrp</dc:creator>
    <dc:date>2013-08-21T07:54:30Z</dc:date>
    <item>
      <title>add a category to a document with Alfresco openCMIS extensio</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260649#M213779</link>
      <description>Hello,I have to add a category to a document. I tried it with the Alfresco openCMIS extension but i didn't succeed.Could you please tell me how to do that with this extension?Thanks.</description>
      <pubDate>Sun, 13 Feb 2011 21:34:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260649#M213779</guid>
      <dc:creator>hatonis</dc:creator>
      <dc:date>2011-02-13T21:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: add a category to a document with Alfresco openCMIS extensio</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260650#M213780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, were you able to get it resolved? I'm having the same issue… would be great if you could share your solution&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 18:35:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260650#M213780</guid>
      <dc:creator>ifeldman</dc:creator>
      <dc:date>2012-03-01T18:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: add a category to a document with Alfresco openCMIS extensio</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260651#M213781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you have any solution? I have the same problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 10:28:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260651#M213781</guid>
      <dc:creator>piotrp</dc:creator>
      <dc:date>2013-08-20T10:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: add a category to a document with Alfresco openCMIS extensio</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260652#M213782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In alfresco category is implemented by and an aspect&amp;nbsp; cm:generalclassifiable(this aspect has an property named cm:categories).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So you can &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. add&amp;nbsp; cm:generalclassifiable aspect to the node;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.obtain the node ref values for the category or categories to be applied to the node; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3.set these values for the appropriate property on the aspect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can refer to&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://docs.alfresco.com/4.2/topic/com.alfresco.enterprise.doc/concepts/opencmis-ext-adding.html" rel="nofollow noopener noreferrer"&gt;http://docs.alfresco.com/4.2/topic/com.alfresco.enterprise.doc/concepts/opencmis-ext-adding.html&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;on how to add aspect with&amp;nbsp; Alfresco openCMIS extension&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 11:44:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260652#M213782</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2013-08-20T11:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: add a category to a document with Alfresco openCMIS extensio</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260653#M213783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for the reply. Did you try to work with Alfresco openCMIS extension particularly with cm:categories property?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 12:01:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260653#M213783</guid>
      <dc:creator>piotrp</dc:creator>
      <dc:date>2013-08-20T12:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: add a category to a document with Alfresco openCMIS extensio</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260654#M213784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I didn't get your point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A document's categories are saved in cm:categories property ,so you can modify&amp;nbsp; cm:categories directly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 12:35:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260654#M213784</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2013-08-20T12:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: add a category to a document with Alfresco openCMIS extensio</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260655#M213785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This code works for me:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;if(alfDoc.hasAspect("P:cm:titled")) {&lt;BR /&gt;&amp;nbsp; Map&amp;lt;String, Object&amp;gt; properties = new HashMap&amp;lt;String, Object&amp;gt;();&lt;BR /&gt;&amp;nbsp; properties.put("cm:description", "My taggable document");&lt;BR /&gt;&amp;nbsp; alfDoc.updateProperties(properties);&lt;BR /&gt;}&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But now I add alfDoc.addAspect("P:cm:generalclassifiable");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I list all the property definitions of this aspect I have many properties. Some of them I can add without problems like in the example above (for example I can use without problems cmis:name, cmis:lastModifiedBy and others).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a property with id cm:categories. I don't know how to add a property with such id. I would like to add new categories. Is this possible? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This code will not work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;if(alfDoc.hasAspect("P:cm:generalclassifiable")) {&lt;BR /&gt;&amp;nbsp; Map&amp;lt;String, Object&amp;gt; properties = new HashMap&amp;lt;String, Object&amp;gt;();&lt;BR /&gt;&amp;nbsp; properties.put("cm:categories", "my new category");&lt;BR /&gt;&amp;nbsp; alfDoc.updateProperties(properties);&lt;BR /&gt;}&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suspect that the xml structure of categories is different. But anyway I would like to see a simple OpenCMIS extension code to achieve this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. create a category&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. add the created category to the document&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this possible with OpenCMIS extension?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 13:21:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260655#M213785</guid>
      <dc:creator>piotrp</dc:creator>
      <dc:date>2013-08-20T13:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: add a category to a document with Alfresco openCMIS extensio</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260656#M213786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have just checked it ,There are 2 reasons why it didn't work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;First,you can't just&amp;nbsp; set arbitrary value to cm:categories property ,you should obtain the node ref values of a&amp;nbsp; category and set it to cm:categories property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Second,there is an constraint on&amp;nbsp; Alfresco openCMIS extension ,Because cmis root is mapped to workspace://SpacesStore/company_home,but category root is workspace://SpacesStore/categoryRoot.So you can't&amp;nbsp; obtain&amp;nbsp; category node using Alfresco openCMIS extension api.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That is to say you can't add default classification&amp;nbsp; category to a document with Alfresco openCMIS extension.,you can use webscipt api instead.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 14:47:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260656#M213786</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2013-08-20T14:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: add a category to a document with Alfresco openCMIS extensio</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260657#M213787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your help, I will try the webscript api.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 07:54:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/add-a-category-to-a-document-with-alfresco-opencmis-extensio/m-p/260657#M213787</guid>
      <dc:creator>piotrp</dc:creator>
      <dc:date>2013-08-21T07:54:30Z</dc:date>
    </item>
  </channel>
</rss>

