<?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 can i get the user home path? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-can-i-get-the-user-home-path/m-p/182312#M135442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just stumbled over the same problem, so thanks to derek for the answer!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;btw, to geth the currently logged in user, use&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;String userName = serviceRegistry.getAuthenticationService().getCurrentUserName();&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;Before finding this thread i had tried, the following line from a java backed webscript.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;repository.getUserHome(personNodeRef)&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;SPAN&gt;But this throws an exception. any idea when its safe to use repository.getUserHome?&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;Caused by: org.alfresco.error.AlfrescoRuntimeException: 11040002 Transaction must be active and synchronization is required:&lt;BR /&gt;…&lt;BR /&gt;at $Proxy11.getProperty(Unknown Source)&lt;BR /&gt;at org.alfresco.repo.model.Repository.getUserHome(Repository.java:288)&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Dec 2009 12:03:40 GMT</pubDate>
    <dc:creator>veronika_zenz</dc:creator>
    <dc:date>2009-12-04T12:03:40Z</dc:date>
    <item>
      <title>How can i get the user home path?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-can-i-get-the-user-home-path/m-p/182309#M135439</link>
      <description>Hi all,I'm a very newbie about the development as reguard as application Alfresco-based.In particular, in this period, i must develop (using J2ee) a web client for Alfresco.Because each Alfresco user has an home space, how can i get the path of a specific user home?Can you advice me classes and meth</description>
      <pubDate>Wed, 25 Feb 2009 15:07:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-can-i-get-the-user-home-path/m-p/182309#M135439</guid>
      <dc:creator>camillo</dc:creator>
      <dc:date>2009-02-25T15:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can i get the user home path?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-can-i-get-the-user-home-path/m-p/182310#M135440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;String homeSpaceId = Application.getCurrentUser(context).getHomeSpaceId();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NodeRef homeSpaceRef = new NodeRef(Repository.getStoreRef(), homeSpaceId);&lt;SPAN class="line-numbers-rows"&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;BR /&gt;&lt;SPAN&gt;quoted from public void processToolbarLocation(String location, boolean navigate) in NavigationBean.java&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2009 16:28:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-can-i-get-the-user-home-path/m-p/182310#M135440</guid>
      <dc:creator>zomurn</dc:creator>
      <dc:date>2009-02-25T16:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: How can i get the user home path?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-can-i-get-the-user-home-path/m-p/182311#M135441</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;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;NodeRef personNodeRef = personService.getPerson(userName);&lt;BR /&gt;NodeRef homespaceNodeRef = (NodeRef) nodeService.getProperty(personNodeRef, ContentModel.PROP_HOMEFOLDER);&amp;nbsp; // Might be null&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;SPAN&gt;You can use the Node Browser in the admin section of the UI to see what properties are on the nodes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2009 17:13:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-can-i-get-the-user-home-path/m-p/182311#M135441</guid>
      <dc:creator>derek</dc:creator>
      <dc:date>2009-02-25T17:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can i get the user home path?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-can-i-get-the-user-home-path/m-p/182312#M135442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just stumbled over the same problem, so thanks to derek for the answer!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;btw, to geth the currently logged in user, use&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;String userName = serviceRegistry.getAuthenticationService().getCurrentUserName();&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;Before finding this thread i had tried, the following line from a java backed webscript.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;repository.getUserHome(personNodeRef)&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;SPAN&gt;But this throws an exception. any idea when its safe to use repository.getUserHome?&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;Caused by: org.alfresco.error.AlfrescoRuntimeException: 11040002 Transaction must be active and synchronization is required:&lt;BR /&gt;…&lt;BR /&gt;at $Proxy11.getProperty(Unknown Source)&lt;BR /&gt;at org.alfresco.repo.model.Repository.getUserHome(Repository.java:288)&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 12:03:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-can-i-get-the-user-home-path/m-p/182312#M135442</guid>
      <dc:creator>veronika_zenz</dc:creator>
      <dc:date>2009-12-04T12:03:40Z</dc:date>
    </item>
  </channel>
</rss>

