Re: check user folder exists
Frank Otto <[email protected]> Tue, 08 Jan 2013 08:17:51 +0100
| Newsgroups | gmane.comp.jakarta.jetspeed.user |
|---|---|
| Message-ID | <[email protected]> |
folderExists works like this: folderExists("_user/admin");
And I have found a possibility to get the document root dir:
PortalConfiguration portalConfiguration =
(PortalConfiguration)
componentManager.getComponent("PortalConfiguration");
String rootDir = portalConfiguration.getString("psml.pages.path");
Thanks!
Frank
Am 07.01.2013 15:56, schrieb Randy Watler:
> Frank:
>
> The folderExists() method takes a path, so try "/_user/admin".
>
> AFAIK, the document root is not available in an API. This is
> configured via Spring using the psml.pages.path property. If you have
> a Spring component some place in you portal customizations, you can
> easily get it from there on container start via a bean property or
> constructor argument.
>
> HTH,
>
> Randy
>
> On 1/7/2013 5:56 AM, Frank Otto wrote:
>> Hi,
>>
>> how can I check, that a user folder exists? I'm getting always false.
>>
>> f.e.: pageManager.folderExists("_user/admin");
>>
>> Another question is, how can I get the document root dir from
>> PageManager or PortalAdministration or ...?
>>
>> I have a servlet, which check something in jetspeed. This Servlet
>> retrieves this jetspeed components:
>>
>> jsUserManager =
>> (UserManager)
>> componentManager.getComponent("org.apache.jetspeed.security.UserManager");
>>
>> jsRoleManager =
>> (RoleManager)
>> componentManager.getComponent("org.apache.jetspeed.security.RoleManager");
>>
>> jsGroupManager =
>> (GroupManager)
>> componentManager.getComponent("org.apache.jetspeed.security.GroupManager");
>>
>> jsPageManager =
>> (PageManager)
>> componentManager.getComponent("org.apache.jetspeed.page.PageManager");
>>
>> jsPortalAdmin =
>> (PortalAdministration)
>> componentManager.getComponent("PortalAdministration");
>>
>> But I can't find a method to get it.
>>
>> kind regards,
>>
>> Frank
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>