[ 
https://issues.apache.org/jira/browse/OAK-783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13804194#comment-13804194
 ] 

Michael Dürig commented on OAK-783:
-----------------------------------

At http://svn.apache.org/r1535380. I committed an initial implementation for 
move detection in the {{MoveDetector}} class. A {{MoveDetector}} is a 
{{Validator}} that can detect certain move operations and reports these to a 
wrapped {{MoveValidator}} by calling its {{move()}}. That method is called 
additional to {{MoveValidator.childNodeAdded()}} for the destination of the 
move operation and {{MoveValidator.childNodeDeleted()}} for the source of the 
move operation.

Detection of move operations relies on the presence of the {{:source-path}} 
property on moved nodes. New nodes with this property set have been moved from 
the path indicated by the value of the property to its current location.

Limitations:
* Moving a moved node only reports one move from the original source to the 
final target.
* Moving a transiently added node is not reported as a move operation but as an 
add operation on the move target.
* Moving a child node of a transiently moved node is not reported as a move 
operation but as an add operation on the move target.
* Moving a node back and forth to its original location is not reported at all.

I will add further tests to {{MoveDetectorTest}} demonstrating these 
limitations. 

> Reflect Move and Rename upon Root#commit
> ----------------------------------------
>
>                 Key: OAK-783
>                 URL: https://issues.apache.org/jira/browse/OAK-783
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>            Reporter: angela
>
> right now rename and move operations cannot be identified during 
> commit processing in validators or commit hooks.
> for proper (and backwards compatible) permission evaluation however
> we need the ability to distinguish between moving a node around or
> having nodes + properties being removed and added.
> during the last oakathon michael and myself had a discussion regarding
> that issue and michael convinced me that this can't be achieved by simply
> passing the move information contained in RootImpl to the commit hook.
> therefore creating this issue to track progress and discussions regarding
> move and renaming.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to