<?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 Finding System Nodes By Path in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/finding-system-nodes-by-path/m-p/250058#M203188</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've got a webscript that browses the authorities node&amp;nbsp; for user groups under workspace://SpacesStore/system/authorities.&amp;nbsp;&amp;nbsp; To select the folder by its path, I'm using the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;groupsNode&amp;nbsp; = search.findNode("path",&amp;nbsp; ["workspace", "SpacesStore", "system", "authorities"]);&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;BR /&gt;&lt;SPAN&gt;This always returns null.&amp;nbsp;&amp;nbsp; Any idea why?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If I substitute the call to any folder under Company Home, it works fine.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Jun 2012 12:29:28 GMT</pubDate>
    <dc:creator>vamirr</dc:creator>
    <dc:date>2012-06-01T12:29:28Z</dc:date>
    <item>
      <title>Finding System Nodes By Path</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/finding-system-nodes-by-path/m-p/250058#M203188</link>
      <description>I've got a webscript that browses the authorities node&amp;nbsp; for user groups under workspace://SpacesStore/system/authorities.&amp;nbsp;&amp;nbsp; To select the folder by its path, I'm using the following:groupsNode&amp;nbsp; = search.findNode("path",&amp;nbsp; ["workspace", "SpacesStore", "system", "authorities"]);‍‍‍This always returns n</description>
      <pubDate>Fri, 01 Jun 2012 12:29:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/finding-system-nodes-by-path/m-p/250058#M203188</guid>
      <dc:creator>vamirr</dc:creator>
      <dc:date>2012-06-01T12:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Finding System Nodes By Path</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/finding-system-nodes-by-path/m-p/250059#M203189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you dig into the source, you'll find that that particular method assumes a root path of Company Home:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;// TODO: Allow a root path to be specified - for now, hard-code to Company Home&lt;BR /&gt;//NodeRef rootNodeRef = nodeService.getRootNode(storeRef);&lt;BR /&gt;NodeRef rootNodeRef = getCompanyHome();&lt;BR /&gt;if (reference.length == 3)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (reference[2].equals(nodeService.getPrimaryParent(rootNodeRef).getQName().toPrefixString(namespaceService)))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nodeRef = rootNodeRef;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; …SNIP…&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;/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;SPAN&gt;Try this instead:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;groupsNode&amp;nbsp; = search.luceneSearch("PATH:\"/sys:system/sys:authorities\"");&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2012 15:38:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/finding-system-nodes-by-path/m-p/250059#M203189</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2012-06-01T15:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Finding System Nodes By Path</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/finding-system-nodes-by-path/m-p/250060#M203190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Jeff.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To plunge into philosophy for a microsecond,&amp;nbsp;&amp;nbsp; isn't it the job of the documentation to explain that "Company Home" is assumed, and that substituting another node is of no use?&amp;nbsp; Should I really have to go to the source for something like that? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Further,&amp;nbsp;&amp;nbsp; The document shown here &lt;/SPAN&gt;&lt;A href="http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/references/API-JS-findNode.html" rel="nofollow noopener noreferrer"&gt;here&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; places "Company Home" in the reference.&amp;nbsp;&amp;nbsp;&amp;nbsp; Isn't that a little verbose?&amp;nbsp; Why bother if it's assumed?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var referenceType = "path";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// store type, store id, display path &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var reference = ["workspace", "SpacesStore", "Company Home","TEST_FILE_1.TXT"];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var foundNode = search.findNode(referenceType, reference);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2012 12:54:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/finding-system-nodes-by-path/m-p/250060#M203190</guid>
      <dc:creator>vamirr</dc:creator>
      <dc:date>2012-06-25T12:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Finding System Nodes By Path</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/finding-system-nodes-by-path/m-p/250061#M203191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Should the documentation note that Company Home is assumed? Yes. I've created a &lt;/SPAN&gt;&lt;A href="https://issues.alfresco.com/jira/browse/ALF-14798" rel="nofollow noopener noreferrer"&gt;Jira&lt;/A&gt;&lt;SPAN&gt; for the docs team on that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not saying this is the case with you, but I do come across many people who are reluctant to dig into the source to figure out stuff like this. A lot of times these are developers coming from the proprietary world who simply aren't used to having the source as a resource. So I agree that the docs could be clearer on this point, but Alfresco's a complex platform–there will always be improvements to be made. Therefore, I encourage everyone to set some breakpoints and step through code. Sometimes it can be tough to tell what's going on. Other times you'll get a quick win as a reward for having looked. Having the source code is extremely valuable, so do not ignore that resource.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't mean to preach, but you are the one who wanted to get philosophical. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2012 18:19:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/finding-system-nodes-by-path/m-p/250061#M203191</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2012-06-25T18:19:04Z</dc:date>
    </item>
  </channel>
</rss>

