Michael Dürig created OAK-1110:
----------------------------------

             Summary: Make NodeStateDiff composable
                 Key: OAK-1110
                 URL: https://issues.apache.org/jira/browse/OAK-1110
             Project: Jackrabbit Oak
          Issue Type: Improvement
          Components: core
            Reporter: Michael Dürig


Currently it is not possible to warp a {{NodeStateDiff}} instance into another 
one for delegation. The problem is that recursion is done by the consumer of 
the {{childNodeChanged()}} call back which causes wrapped {{NodeStateDiff}} "to 
escape". To fix that I propose to separate the concerns of change notification 
from recursing into a subtree. For this we need an extra method 
{{createChildDiff}} on the {{NodeStateDiff}} interface:

{code}
    /**
     * Create a {@code NodeStateDiff} for diffing the passed {@code before} and
     * {@code after} states. Returning {@code null} skips comparison for the sub
     * trees rooted at the passed states.
     *
     * @param name  name of the child node
     * @param before  before state of the child node
     * @param after   after state of the child node
     * @return  {@code NodeStateDiff} for the child node
     */
    @CheckForNull
    NodeStateDiff createChildDiff(String name, NodeState before, NodeState 
after);
{code}





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

Reply via email to