org.apache.jackrabbit.mk.model
Interface NodeStateDiff

All Known Implementing Classes:
TraversingNodeDiffHandler

public interface NodeStateDiff

Handler of node state differences. The NodeStore.compare(NodeState, NodeState, NodeStateDiff) reports detected node state differences by calling methods of a handler instance that implements this interface. The compare method will go through all properties and child nodes of the two states, calling the relevant added, changed or deleted methods where appropriate. Differences in the ordering of properties or child nodes do not affect the comparison, and the order in which such differences are reported is unspecified.


Method Summary
 void childNodeAdded(String name, NodeState after)
          Called for all added child nodes.
 void childNodeChanged(String name, NodeState before, NodeState after)
          Called for all changed child nodes.
 void childNodeDeleted(String name, NodeState before)
          Called for all deleted child nodes.
 void propertyAdded(PropertyState after)
          Called for all added properties.
 void propertyChanged(PropertyState before, PropertyState after)
          Called for all changed properties.
 void propertyDeleted(PropertyState before)
          Called for all deleted properties.
 

Method Detail

propertyAdded

void propertyAdded(PropertyState after)
Called for all added properties.

Parameters:
after - property state after the change

propertyChanged

void propertyChanged(PropertyState before,
                     PropertyState after)
Called for all changed properties. The names of the given two property states are guaranteed to be the same.

Parameters:
before - property state before the change
after - property state after the change

propertyDeleted

void propertyDeleted(PropertyState before)
Called for all deleted properties.

Parameters:
before - property state before the change

childNodeAdded

void childNodeAdded(String name,
                    NodeState after)
Called for all added child nodes.

Parameters:
name - name of the added child node
after - child node state after the change

childNodeChanged

void childNodeChanged(String name,
                      NodeState before,
                      NodeState after)
Called for all changed child nodes.

Parameters:
name - name of the changed child node
before - child node state before the change
after - child node state after the change

childNodeDeleted

void childNodeDeleted(String name,
                      NodeState before)
Called for all deleted child nodes.

Parameters:
name - name of the deleted child node
before - child node state before the change


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.