You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Esteban Franqueiro <es...@bea.com> on 2008/01/02 19:07:55 UTC

Using PathResolver

I'm updating an application to work with Jackrabbit 1.4, and in my code I have the following (for 
Jackrabbit 1.3):

Path p = PathFormat.parse("/jcr:system/jcr:versionStorage", 
s.getNamespaceResolver()).getNormalizedPath();

Is the following Jackrabbit 1.4 code funtionally equivalent:

Path p = new ParsingPathResolver(PathFactoryImpl.getInstance(), 
s.getNamePathResolver()).getQPath("/jcr:system/jcr:versionStorage").getNormalizedPath();

Thanks a lot.

Esteban Franqueiro
esteban.franqueiro@bea.com 


Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

Re: Using PathResolver

Posted by Angela Schreiber <an...@day.com>.
Esteban Franqueiro wrote:

> Path p = PathFormat.parse("/jcr:system/jcr:versionStorage", 
> s.getNamespaceResolver()).getNormalizedPath();
> 
> Is the following Jackrabbit 1.4 code funtionally equivalent:
> 
> Path p = new ParsingPathResolver(PathFactoryImpl.getInstance(), 
> s.getNamePathResolver()).getQPath("/jcr:system/jcr:versionStorage").getNormalizedPath();

since SessionImpl implements the NamePathResolver interface
i would rather call SessionImpl.getQPath instead of creating
a new resolver instance.

angela