jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paco Avila <monk...@gmail.com>
Subject Re: Get Path from Node
Date Mon, 01 Mar 2010 19:19:56 GMT
myNode.getPath() returns an string, and I need a Path. I need to make a call to

boolean isGranted(Path absPath, int permissions)

from AccessManager and this requires a Path.

On Mon, Mar 1, 2010 at 7:53 PM, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> Hi,
>
> On Mon, Mar 1, 2010 at 6:27 PM, Paco Avila <monkiki@gmail.com> wrote:
>> I see a couple of ways to obtain the Path from a Node:
>>
>> - Path path = ((NodeImpl) myNode).getPrimaryPath();
>> - Path path = ((SessionImpl)
>> session).getHierarchyManager().getPath(((NodeImpl) myNode).getId());
>>
>> Which is the preferred form?
>
> Neither. You shouldn't be typecasting instances to Jackrabbit-specific
> implementation classes.
>
> What's wrong with a standard myNode.getPath() call?
>
> BR,
>
> Jukka Zitting
>



-- 
OpenKM
http://www.openkm.com
http://www.guia-ubuntu.org

Mime
View raw message