2 Replies Latest reply: Mar 16, 2012 1:11 PM by Akram Ben Aissi RSS

Getting versions of a deleted node?

Akram Ben Aissi Newbie

Hi all,

 

a simple question (I hope).

 

How can I get versions of a deleted node?

The simple example:

I add A/B/c to my repository, all of them are versionnable.

 

I delete A (recursively).

Then I want to access to the history of node "/A/B/c" . Apparently, VersionManager.getBaseVersion(String absPath) rely on the absolute path.

And When doing that I receive a PathNotFoundException.

  • 1. Re: Getting versions of a deleted node?
    Randall Hauch Master

    That's really not a simple question.

     

    The VersionManager methods that take a path really cannot be used once a node has been deleted, because nodes with the same paths might be re-created as different nodes (with different identifiers). In fact, the JCR specification doesn't seem to address (at least where I can find it) how to find a version for a deleted node. Jackrabbit even automatically deletes the version history when the versionable node is removed.

     

    Perhaps I'm wrong, but that seems to be outside the scope of the specification.

  • 2. Re: Getting versions of a deleted node?
    Akram Ben Aissi Newbie

    That hurts So, I hope that some people form the JCR expert group would read us

    Another point around this issue is around ObservationManager which does not contain enough (well this probably my point of view) informations in case of a deleted node.

     

    As discussed in another thread, I tried to "implement" a kind of Journal which contain informations on events happening on nodes. And because one can't get the node type on a deleted node, the journal may be incomplete.