[
https://issues.apache.org/jira/browse/JCR-3884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14565861#comment-14565861
]
Satya Deep Maheshwari commented on JCR-3884:
--------------------------------------------
Sure [[email protected]]
First let me provide the background context. When a file is edited using some
common desktop applications like MS Word, Adobe Photoshop etc. the following
happens:
1.A temp file is created for the original file being edited.
2.When the use clicks on 'Save', the original file is deleted.
3.The temp file is renamed to the original file.
If this file is in a mapped drive mounted from jackrabbit, all these events are
received as webdav requests in the jackrabbit's webdav servlet.
Now coming to our application, the 'delete' operation on the original file (as
in step#3) above causes all versioning information on the original file to be
removed as well. We want to avoid this as this 'delete' wasn't a user initiated
delete but one of the intermediate steps of editing a file.
So I want to have a handle to hook in our application logic to salvage the
version history before the file gets deleted. Hope I was able to explain the
problem.
> Add handler to handle webdav based DELETE requests
> --------------------------------------------------
>
> Key: JCR-3884
> URL: https://issues.apache.org/jira/browse/JCR-3884
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-webdav
> Reporter: Satya Deep Maheshwari
>
> The AbstractWebdavServlet takes care of handling
> the webdav requests. In case of DELETE, it just goes ahead and deletes the
> resource. See [1]. A mechanism is needed to hook in any code here to get
> invoked whenever a DELETE request is made, similar to CopyMoveHandler which
> get invoked in case of COPY/MOVE requests.
> Related conversation on this in jackrabbit users' mailing list at [2].
> Proposed Solution:
> https://github.com/sdmcraft/jackrabbit/commit/14490d3e29bfc72624879df9b91586e1ef31a7fe
> [1]-https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/server/AbstractWebdavServlet.java#L336
> [2]-http://jackrabbit.510166.n4.nabble.com/Handling-webdav-DELETE-request-td4662375.html
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)