<?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: How to get the path of all the folders of the sites? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-the-path-of-all-the-folders-of-the-sites/m-p/109144#M30604</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all perform a search to get the list of folder nodes. Once you have nodeRefs of all the folders.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using javascript, you can use following to get the path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; displayPathOfANode &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; node&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;displayPath&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you are using java,&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;you can use following to get the path.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;nodeService&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getPath&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;nodeRef&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;toDisplayPath&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;nodeService&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; permissionService&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;final String displayPathofANode = getDisplayPath(nodeRef);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;private String getDisplayPath(final NodeRef nodeRef) {&lt;BR /&gt;		return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork&amp;lt;String&amp;gt;() {&lt;BR /&gt;            @Override&lt;BR /&gt;            public String doWork() {&lt;BR /&gt;            	final Path nodePath = this.nodeService.getPath(nodeRef);&lt;BR /&gt;        		return nodePath.toDisplayPath(this.nodeService, this.permissionService);&lt;BR /&gt;            }&lt;BR /&gt;        }, AuthenticationUtil.getSystemUserName());&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Jul 2019 13:36:29 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2019-07-15T13:36:29Z</dc:date>
    <item>
      <title>How to get the path of all the folders of the sites?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-the-path-of-all-the-folders-of-the-sites/m-p/109143#M30603</link>
      <description>I need to get the path of all folders present in alfresco sites.Could someone please help me?</description>
      <pubDate>Mon, 15 Jul 2019 09:35:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-the-path-of-all-the-folders-of-the-sites/m-p/109143#M30603</guid>
      <dc:creator>madhu_sudireddy</dc:creator>
      <dc:date>2019-07-15T09:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the path of all the folders of the sites?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-the-path-of-all-the-folders-of-the-sites/m-p/109144#M30604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all perform a search to get the list of folder nodes. Once you have nodeRefs of all the folders.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using javascript, you can use following to get the path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; displayPathOfANode &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; node&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;displayPath&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you are using java,&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;you can use following to get the path.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;nodeService&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getPath&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;nodeRef&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;toDisplayPath&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;nodeService&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; permissionService&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;final String displayPathofANode = getDisplayPath(nodeRef);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;private String getDisplayPath(final NodeRef nodeRef) {&lt;BR /&gt;		return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork&amp;lt;String&amp;gt;() {&lt;BR /&gt;            @Override&lt;BR /&gt;            public String doWork() {&lt;BR /&gt;            	final Path nodePath = this.nodeService.getPath(nodeRef);&lt;BR /&gt;        		return nodePath.toDisplayPath(this.nodeService, this.permissionService);&lt;BR /&gt;            }&lt;BR /&gt;        }, AuthenticationUtil.getSystemUserName());&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2019 13:36:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-the-path-of-all-the-folders-of-the-sites/m-p/109144#M30604</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2019-07-15T13:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the path of all the folders of the sites?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-the-path-of-all-the-folders-of-the-sites/m-p/109145#M30605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, I will try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2019 05:25:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-the-path-of-all-the-folders-of-the-sites/m-p/109145#M30605</guid>
      <dc:creator>madhu_sudireddy</dc:creator>
      <dc:date>2019-07-16T05:25:04Z</dc:date>
    </item>
  </channel>
</rss>

