jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mete Atamel <mata...@adobe.com>
Subject SessionImpl#getJCRPath replacement
Date Fri, 20 Apr 2012 12:12:29 GMT

I have a Path and I want to get the String representation of the full path
of that Path object. I could pass this Path to SessionImpl#getJCRPath and
that gives me what I want but I don't have access to a SessionImpl from
the place I have the Path (EventState). EventState has a session object
but it's not SessionImpl, so I cannot rely on SessionImpl#getJCRPath...

I looked into SessionImpl#getJCRPath and it uses a DefaultNamePathResolver
resolve the Path. One option is to create a DefaultNamePathResolver and
use that to resolve the Path but that has its problems. Namely,
DefaultNameResolver has a few constructors that require either a
NamespaceResolver, NamespaceRegistry, or Session. So, the question becomes
how do I access NamespaceResolver or NamespaceRegistry from EventState?

Can anyone think of a quick way to be able to convert Path into JCR path
String from EventState?


View raw message