jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Brown <benjamin.br...@thisisnumero.com>
Subject RE: Auditing required - JCR hack added
Date Mon, 01 Jun 2009 14:43:02 GMT
> -----Original Message-----
> From: Benjamin Brown [mailto:benjamin.brown@thisisnumero.com]
> Sent: 29 May 2009 10:48
> To: users@jackrabbit.apache.org
> Subject: RE: Auditing required - JCR hack added
> 
> That looks ideal - I wonder why I missed that...!
> 
> Thanks,
> 
> Benjamin
> 
> > -----Original Message-----
> > From: Jukka Zitting [mailto:jukka.zitting@gmail.com]
> > Sent: 29 May 2009 10:50
> > To: users@jackrabbit.apache.org
> > Subject: Re: Auditing required - JCR hack added
> >
> > Hi,
> >
> > On Fri, May 29, 2009 at 11:25 AM, Benjamin Brown
> > <benjamin.brown@thisisnumero.com> wrote:
> > > To do this I've implemented a NodeStateListener class - which seems to
> > do
> > > everything that I need such as watching for added/removed nodes etc
> etc.
> >
> > Couldn't you use the standard observation mechanism in JCR? That way
> > you wouldn't need to depend on Jackrabbit internals.
> >
> > BR,
> >
> > Jukka Zitting

Hi,

I'm now using this interface but for a NODE_REMOVED event I need to find the node id of the
now removed node (so I can audit that id as deleted).

The javax.jcr.observation.Event interface only provides jcr path, event type and user id information,
and the EventImpl implementation provides parent and child ids (but again no id of the node
affected).

I've noticed the internal org.apache.jackrabbit.core.state.NodeState class has a getId (for
my first approach mentioned above), as does the interface org.apache.jackrabbit.spi.Event
(getItemId()). 

How can I get the node id when using javax.jcr.observation.Event or org.apache.jackrabbit.core.observation.EventImpl
classes?

Thanks again,

Benjamin


Mime
View raw message