how to get user home space via scheduler job

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2007 11:21 AM
Hi,
i have a scheduler job and i want the get the current user's home space when the job runs.
how can i get it?.
i tried to use the
Thanks in advance,
Shay.
i have a scheduler job and i want the get the current user's home space when the job runs.
how can i get it?.
i tried to use the
User user = Application.getCurrentUser(context);String homeSpaceID = user.getHomeSpaceId();
but since i run it from a scheduler i don't know how to get the FacesContext object.Thanks in advance,
Shay.
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2007 09:13 AM
That's web-client code - it can only run within the context of a JSF page.
You can use the AuthenticationService to get the current user name with getCurrentUserName(), then use the PersonService to lookup the noderef that represents the associated Person node. And finally get the cm:homeFolder property from the Person node - that contains the NodeRef to the user home folder.
Thanks,
Kevin
You can use the AuthenticationService to get the current user name with getCurrentUserName(), then use the PersonService to lookup the noderef that represents the associated Person node. And finally get the cm:homeFolder property from the Person node - that contains the NodeRef to the user home folder.
Thanks,
Kevin
