<?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 name of the space from any .java file in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40454#M21637</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks! &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;that helped. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bird&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Aug 2006 08:26:33 GMT</pubDate>
    <dc:creator>unknown-user</dc:creator>
    <dc:date>2006-08-01T08:26:33Z</dc:date>
    <item>
      <title>how to get the name of the space from any .java file</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40447#M21630</link>
      <description>Hello there. I have a problem &lt;IMG id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; What i want to do is to get the name of the space where the document is created. I know how to do it from a file which has a NavigatorBean, then with a getNavigation().getName(). But what i have in my .java file is only the NodeService, and a NodeRef.Any ideas of how</description>
      <pubDate>Thu, 13 Jul 2006 14:17:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40447#M21630</guid>
      <dc:creator>unknown-user</dc:creator>
      <dc:date>2006-07-13T14:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the name of the space from any .java file</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40448#M21631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There is a method called getPrimaryParent on the NodeService, you can pass in the NodeRef you have, you can retrieve the parent NodeRef from the returned object and finally get the parents cm:name property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jul 2006 15:21:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40448#M21631</guid>
      <dc:creator>gavinc</dc:creator>
      <dc:date>2006-07-13T15:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the name of the space from any .java file</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40449#M21632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried that, but what i get from :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;QName qname = this.nodeService.getPrimaryParent(nodeRef).getQName()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (qname != null)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;name = qname.getLocalName();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What i get is the name of the file. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then i have tried other things, such as retrieve the parend NodeRef… but then i am at the same point as a started. is a cercle!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also tried do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Path p = this.nodeService.getPath(nodeRef);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;String camino = p.toDisplayPath(this.nodeService);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but what i get is the full path, and i only want to get the last folder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas about this? I don't want to treat the String, so there have to be other ways.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for all. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bird&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jul 2006 16:34:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40449#M21632</guid>
      <dc:creator>unknown-user</dc:creator>
      <dc:date>2006-07-13T16:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the name of the space from any .java file</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40450#M21633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The code you need is as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;NodeRef parent = this.nodeService.getPrimaryParent(nodeRef).getParentRef();&lt;BR /&gt;String name = (String)this.nodeService.getProperty(parent, ContentModel.PROP_NAME);&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2006 08:09:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40450#M21633</guid>
      <dc:creator>gavinc</dc:creator>
      <dc:date>2006-07-14T08:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the name of the space from any .java file</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40451#M21634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks very much! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That works perfectly!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2006 08:18:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40451#M21634</guid>
      <dc:creator>unknown-user</dc:creator>
      <dc:date>2006-07-14T08:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the name of the space from any .java file</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40452#M21635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A new question about getting the name of one space. Not the working one, but another. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have a QName, but anything else. Neither the nameservice, nor the nodeRef. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the tag "cm:my_space" (which cm is namespace.prefix, and my_space is the localname). That's the QName.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to know the Node or NodeRef of the namespace, so in that way i can get the name and description. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can i do that? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bird&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jul 2006 16:10:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40452#M21635</guid>
      <dc:creator>unknown-user</dc:creator>
      <dc:date>2006-07-18T16:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the name of the space from any .java file</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40453#M21636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can do a search for QName.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;See the search docs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/Search" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Search&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Andy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 07:41:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40453#M21636</guid>
      <dc:creator>andy</dc:creator>
      <dc:date>2006-07-20T07:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the name of the space from any .java file</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40454#M21637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks! &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;that helped. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bird&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Aug 2006 08:26:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-the-name-of-the-space-from-any-java-file/m-p/40454#M21637</guid>
      <dc:creator>unknown-user</dc:creator>
      <dc:date>2006-08-01T08:26:33Z</dc:date>
    </item>
  </channel>
</rss>

