jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Esposito" <...@txcore.com>
Subject undo deletion of a node (re-post)
Date Thu, 01 May 2008 19:36:21 GMT
Apologies for the re-post.  I was afraid I wasn't getting responses because
I may have been too verbose the first time around.

I'm looking for a way to recreate a node which has been deleted with the
same UUID without affecting the version history and without storing a copy
of it in another branch of the repository.  Is this possible?

thanks,
rob

---------- Forwarded message ----------
Date: Thu, Apr 10, 2008 at 5:59 PM
Subject: undo delete node
To: users@jackrabbit.apache.org


Hi all,

We are developing an application containing a GUI which allows users to
manipulate nodes in a JCR repository.  We're wondering if there is a
recommended way of restoring a node that has been deleted or removed.  For
example, if a user wishes to undo the deletion of a node.  We've come across
two different approaches, but neither of them seem to be the solution we're
looking for.

The first approach was in a post (
http://www.nabble.com/restoring-removed-node-td8182449.html#a8203066) and it
suggests using a 'Recycle Bin' type node to store the parent node
path/uuid.  The problem with this method is that you are left with the
decision of when/how to clean up the nodes in the 'Recycle Bin'.

The other approach we've been using is to store the state of the node just
before deletion using Session.exportSystemView and to bring it back using
Session.importXML.  The problem with this method is that, after an
importXML, the restored node is checked out with base version set to
rootVersion.  The expectation is that the user will have to check this node
back in and the version history will branch each time this happens.

So essentially, what we're looking for is a way to recreate a node with the
same UUID without affecting the version history or storing a copy of it in
another branch of the repository.  Is this possible?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message