<?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: Turning a qname path into a NodeRef, not by searching in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/turning-a-qname-path-into-a-noderef-not-by-searching/m-p/259952#M213082</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just tried the XPath NodeLocatorService solution, it leads to race conditions:&lt;/P&gt;&lt;P&gt;Nodes that have been created recently are sometimes not found (about 30% of calls fail, in my tests).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I switched to using &lt;EM&gt;serviceRegistry.getNodeLocatorService().getNode("xpath", null, params);&lt;/EM&gt; to get the NodeRef of the folders that I know always exist (such as /app:company_home/app:shared), and then use &lt;EM&gt;serviceRegistry.getFileFolderService().resolveNamePath&lt;/EM&gt; for everything below these nodes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would use &lt;EM&gt;resolveNamePath&lt;/EM&gt; all the time if I could, but unfortunately it would fail on a Alfresco installed in Japanese, for instance, because "Shared" becomes "共有フォルダ" in a Japanese Alfresco (yes, the path is different).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone has any better idea I would be glad to hear about it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;Nicolas Raoul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Apr 2017 04:35:35 GMT</pubDate>
    <dc:creator>nicolasraoul</dc:creator>
    <dc:date>2017-04-05T04:35:35Z</dc:date>
    <item>
      <title>Turning a qname path into a NodeRef, not by searching</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/turning-a-qname-path-into-a-noderef-not-by-searching/m-p/259950#M213080</link>
      <description>I thought that one of the core services supported this, but I can't for the life of me find it… I have a qname based path, something like "/app:company_home/app:dictionary/app:email_templates", and I want to get the NodeRef of that. However, I don't want to use the SearchService to do that lookup, a</description>
      <pubDate>Thu, 13 Sep 2012 15:15:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/turning-a-qname-path-into-a-noderef-not-by-searching/m-p/259950#M213080</guid>
      <dc:creator>nickburch</dc:creator>
      <dc:date>2012-09-13T15:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Turning a qname path into a NodeRef, not by searching</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/turning-a-qname-path-into-a-noderef-not-by-searching/m-p/259951#M213081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;your qname path is essentially a XPath expression and you can use the SearchService to resolve XPath expressions without going to SOLR. The XPath query language in Alfresco is implemented directly on top of the DB / core services - no SOLR involved. So SearchService.selectNodes() is the way to go here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 07:10:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/turning-a-qname-path-into-a-noderef-not-by-searching/m-p/259951#M213081</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2012-09-14T07:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: Turning a qname path into a NodeRef, not by searching</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/turning-a-qname-path-into-a-noderef-not-by-searching/m-p/259952#M213082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just tried the XPath NodeLocatorService solution, it leads to race conditions:&lt;/P&gt;&lt;P&gt;Nodes that have been created recently are sometimes not found (about 30% of calls fail, in my tests).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I switched to using &lt;EM&gt;serviceRegistry.getNodeLocatorService().getNode("xpath", null, params);&lt;/EM&gt; to get the NodeRef of the folders that I know always exist (such as /app:company_home/app:shared), and then use &lt;EM&gt;serviceRegistry.getFileFolderService().resolveNamePath&lt;/EM&gt; for everything below these nodes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would use &lt;EM&gt;resolveNamePath&lt;/EM&gt; all the time if I could, but unfortunately it would fail on a Alfresco installed in Japanese, for instance, because "Shared" becomes "共有フォルダ" in a Japanese Alfresco (yes, the path is different).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone has any better idea I would be glad to hear about it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;Nicolas Raoul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Apr 2017 04:35:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/turning-a-qname-path-into-a-noderef-not-by-searching/m-p/259952#M213082</guid>
      <dc:creator>nicolasraoul</dc:creator>
      <dc:date>2017-04-05T04:35:35Z</dc:date>
    </item>
  </channel>
</rss>

