> -----Original Message----- > From: Benjamin Brown [mailto:[email protected]] > Sent: 29 May 2009 10:48 > To: [email protected] > Subject: RE: Auditing required - JCR hack added > > That looks ideal - I wonder why I missed that...! > > Thanks, > > Benjamin > > > -----Original Message----- > > From: Jukka Zitting [mailto:[email protected]] > > Sent: 29 May 2009 10:50 > > To: [email protected] > > Subject: Re: Auditing required - JCR hack added > > > > Hi, > > > > On Fri, May 29, 2009 at 11:25 AM, Benjamin Brown > > <[email protected]> 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
