You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Honoré David <dh...@oma.be> on 2005/02/17 14:51:12 UTC
Move on Delete
Hi,
For our project we need to keep trace of any information object
(Node+Revisions ... let's call this an Entity), Including after deletion.
We want that when a user delete an entity via webdav these entity will
be moved to another place (and a reference to the new uri will be stored
in a property of the parent node.)
(You can see this like a "recycle bin" or a "trash can" functionality)
I'am trying to use the event system to make a copy of the entity before
effective deletion. but ... MacroEvent.DELETE event is call after all
data have been deleted and StructureEvent.REMOVE is call before node
deletion but AFTER deletion of all revisions ... then impossible to do a
copy.
Is there any way do some task (with possibility to throw a
VetoException) BEFORE a delete or a remove ?
Thanks,
David.
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Re: Move on Delete
Posted by Honoré David <dh...@oma.be>.
Can't remove event be called *before* the remove actions, because if you
call them after, the object no longer exists and you can't do test on it
(and rise a VetoException in some case ...)
Honoré David wrote:
> Hi,
>
> For our project we need to keep trace of any information object
> (Node+Revisions ... let's call this an Entity), Including after deletion.
> We want that when a user delete an entity via webdav these entity will
> be moved to another place (and a reference to the new uri will be
> stored in a property of the parent node.)
> (You can see this like a "recycle bin" or a "trash can" functionality)
>
>
> I'am trying to use the event system to make a copy of the entity
> before effective deletion. but ... MacroEvent.DELETE event is call
> after all data have been deleted and StructureEvent.REMOVE is call
> before node deletion but AFTER deletion of all revisions ... then
> impossible to do a copy.
>
> Is there any way do some task (with possibility to throw a
> VetoException) BEFORE a delete or a remove ?
>
> Thanks,
> David.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org