Get All Alfresco Tags With CMIS - Stack

Download Get All Alfresco Tags With CMIS - Stack

Post on 08-Feb-2016

109 views

Category:

Documents

1 download

Embed Size (px)

DESCRIPTION

Alfresco Personal Wiki Doc

TRANSCRIPT

<ul><li><p>14/2/2014 Get all Alfresco tags with CMIS - Stack Overflow</p><p>http://stackoverflow.com/questions/19333232/get-all-alfresco-tags-with-cmis 1/4</p><p>Take the 2-minute tour </p><p>Pymoo</p><p>29 1 7</p><p>I'm trying to get all tags (nodeRefs and names) from alfresco using CMIS.</p><p>The Alfresco version is 3.4.</p><p>Before googling a lot, I don't find any good query to do this? Any advice?</p><p>Thanks in advanced,</p><p>Juanjo.</p><p>alfresco cmis opencmis taggable</p><p>asked Oct 12 '13 at 10:36</p><p> Do you want to get the Tags on a given Node, or do you want to get the Nodes which represent specific Tags?</p><p>Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, noregistration required.</p><p>Get all Alfresco tags with CMIS</p><p>sign up</p><p>log in</p><p>tour</p><p>help </p><p>careers 2.0 </p></li><li><p>14/2/2014 Get all Alfresco tags with CMIS - Stack Overflow</p><p>http://stackoverflow.com/questions/19333232/get-all-alfresco-tags-with-cmis 2/4</p><p>1 Answer</p><p> Gagravarr Oct 12 '13 at 17:26</p><p> Thanks for your answer Gagravarr. I will try to clarify the question. I need to show all the tags on a Node (folder)</p><p>recursively, because in my integration I have to make a form for uploading files and the user wants to add</p><p>existing tags to the document in this moment. Pymoo Oct 13 '13 at 7:15</p><p> Does it have to just be the tags used by that folder+children, or would the tags used on the Site containing the</p><p>folder be OK? (Only Alfresco already maintains the list of the latter for you) Gagravarr Oct 13 '13 at 9:33</p><p> I need all the tags for all the Site (including the current folder). What's the best query to do this? It's possible to</p><p>access via opencmis? Thanks a lot Gagravarr. Pymoo Oct 13 '13 at 16:13</p><p> All the tags for a site is an easy query to make, just not one available via CMIS. You'll need to use the normal</p><p>Alfresco APIs to get it. (I'll try to make an answer out of it later, if no-one beats me to it) Gagravarr Oct 13 '13</p><p>at 18:28</p><p>show 1 more comment</p><p>I can't find a huge amount of detail written up on the Alfresco wiki on how the Tagging Service works, soif someone fancies taking this and updating the wiki that might be helpful!</p><p>There are three key parts to tagging:</p><p>Tag nodes themselvesTagged nodesTag Scopes</p><p>Tag Nodes live under a special node workspace://SpacesStore/tag:tag-root which is in/cm:categoryRoot/cm:taggable. Tag Nodes are of type cm:category and the cm:name is the</p><p>tag</p><p>Next, you'll want to apply a tag to a node. If it's a new tag, it needs creating in the tag root first. If this isthe first tag on a node, add the cm:taggable aspect. Get the noderef of the tag node, then add that tothe multi-valued cm:taggable property on the node. (The tagging service will do all of this for you ifyou call addTag(NodeRef,String)</p><p>Finally, various nodes up the primary parent hierarchy of the node you just tagged may be defined as aTag Scope (eg the Site Node). With this, the nodes with the cm:tagscope aspect have the</p></li><li><p>14/2/2014 Get all Alfresco tags with CMIS - Stack Overflow</p><p>http://stackoverflow.com/questions/19333232/get-all-alfresco-tags-with-cmis 3/4</p><p>Gagravarr</p><p>11.8k 4 17 47</p><p>cm:tagScopeSummary property updated. cm:tagScopeSummary holds the list of tags used by thechildren of the node, along with the number of times the tag is used. This lets you work out what the mostpopular tags are for that bit of the tree, as well as working out what tags are used, and when a tag is nolonger used by the tree. Again, the TaggingService updates all of that for you.</p><p>AFAIK, the various tag properties ( cm:taggable and cm:tagScopeSummary) are not exposed viaCMIS. You'd need to use one of the normal Alfresco APIs, either from the Public API, or something like</p><p>script/org/alfresco/collaboration/tagQuery.get which will let you get the list of tags appliedto a node. I'd suggest you ensure that the node you query from is a tag scope, so it's nice and quick.The Site is always a tag scope, so that's a good place to start.</p><p>answered Oct 14 '13 at 11:10</p><p> Great answer. Thank you. I think, correct me if I'm wrong, the tagging service addTag begins from 4.0 version</p><p>of Liferay. isn't it? So I can't make it works just with alfresco-opencmis-extension and chemistry-opencmis</p><p>APIs? Could I use Web Services optionally? Note: WARNING! I'm a newbie with Alfresco. Pymoo Oct 14</p><p>'13 at 14:28</p><p> I don't know anything about liferay, sorry. I believe you'll need to make a non-CMIS REST api calls to get the</p><p>data you want, calling straight to Alfresco. Gagravarr Oct 14 '13 at 15:18</p><p> Excuse I meant Alfresco 4.0 not Liferay. To many opened wars, sorry :-( Pymoo Oct 14 '13 at 17:01</p><p>1 I wouldn't recommend trying it with WebServices. There's a very simple and easy to use REST api that doesexactly what you need, use that! There's no point wasting huge amounts of time trying to hack something up</p><p>badly with ws*, embrace the Alfresco way and go with the simple REST call! Gagravarr Oct 14 '13 at 18:06</p><p>1 The Alfresco wiki has lots of examples. Also, another good thing about simple RESTful APIs is that you canprototype most of it straight from your web browser! Gagravarr Oct 15 '13 at 8:57</p><p>show 3 more comments</p><p>Not the answer you're looking for? Browse other questions tagged alfresco cmis </p><p>opencmis taggable or ask your own question.</p></li><li><p>14/2/2014 Get all Alfresco tags with CMIS - Stack Overflow</p><p>http://stackoverflow.com/questions/19333232/get-all-alfresco-tags-with-cmis 4/4</p></li></ul>

Recommended

View more >