You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Frank Otto <ot...@delta-barth.de> on 2013/01/07 13:56:59 UTC

check user folder exists

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: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: check user folder exists

Posted by Frank Otto <ot...@delta-barth.de>.
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: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: check user folder exists

Posted by Randy Watler <wa...@wispertel.net>.
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: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org