|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.mk.model.NodeStateDiff
public class NodeStateDiff
Utility base class for comparing two NodeState instances. The
compare(NodeState, NodeState) 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.
| Constructor Summary | |
|---|---|
NodeStateDiff()
|
|
| Method Summary | |
|---|---|
void |
childNodeAdded(String name,
NodeState after)
Called by compare(NodeState, NodeState) for all added
child nodes. |
void |
childNodeChanged(String name,
NodeState before,
NodeState after)
Called by compare(NodeState, NodeState) for all changed
child nodes. |
void |
childNodeDeleted(String name,
NodeState before)
Called by compare(NodeState, NodeState) for all deleted
child nodes. |
void |
compare(NodeState before,
NodeState after)
Compares the given two node states. |
void |
propertyAdded(PropertyState after)
Called by compare(NodeState, NodeState) for all added
properties. |
void |
propertyChanged(PropertyState before,
PropertyState after)
Called by compare(NodeState, NodeState) for all changed
properties. |
void |
propertyDeleted(PropertyState before)
Called by compare(NodeState, NodeState) for all deleted
properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NodeStateDiff()
| Method Detail |
|---|
public void propertyAdded(PropertyState after)
compare(NodeState, NodeState) for all added
properties. The default implementation does nothing.
after - property state after the change
public void propertyChanged(PropertyState before,
PropertyState after)
compare(NodeState, NodeState) for all changed
properties. The names of the given two property states are guaranteed
to be the same. The default implementation does nothing.
before - property state before the changeafter - property state after the changepublic void propertyDeleted(PropertyState before)
compare(NodeState, NodeState) for all deleted
properties. The default implementation does nothing.
before - property state before the change
public void childNodeAdded(String name,
NodeState after)
compare(NodeState, NodeState) for all added
child nodes. The default implementation does nothing.
name - name of the added child nodeafter - child node state after the change
public void childNodeChanged(String name,
NodeState before,
NodeState after)
compare(NodeState, NodeState) for all changed
child nodes. The default implementation does nothing.
name - name of the changed child nodebefore - child node state before the changeafter - child node state after the change
public void childNodeDeleted(String name,
NodeState before)
compare(NodeState, NodeState) for all deleted
child nodes. The default implementation does nothing.
name - name of the deleted child nodebefore - child node state before the change
public void compare(NodeState before,
NodeState after)
before - node state before changesafter - node state after changes
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||