public abstract class AbstractRebaseDiff extends java.lang.Object implements NodeStateDiff
AbstractRebaseDiff
serves as base for rebase implementations.
It implements a NodeStateDiff
, which performs the conflict
handling as defined in NodeStore.rebase(NodeBuilder)
on the Oak SPI state level.
Intended use of this class is to re-base a branched version of the node state tree. Given below situation:
+ head (master) | | + branch |/ + base |The current state on the master branch is
head
and a branch
was created at base
. The current state on the branch is
branch
. Re-basing branch
to the current
head
works as follows:
NodeState head = ... NodeState branch = ... NodeState base = ... NodeBuilder builder = new MemoryNodeBuilder(head); branch.compareAgainstBaseState(base, new MyRebaseDiff(builder)); branch = builder.getNodeState();The result is:
+ branch / + head (master) |
Conflicts during rebase cause calls to the various abstracts conflict resolution methods of this class. Concrete subclasses of this class need to implement these methods for handling such conflicts.
Modifier and Type | Method and Description |
---|---|
boolean |
childNodeAdded(java.lang.String name,
NodeState after)
Called for all added child nodes.
|
boolean |
childNodeChanged(java.lang.String name,
NodeState before,
NodeState after)
Called for all child nodes that may contain changes between the before
and after states.
|
boolean |
childNodeDeleted(java.lang.String name,
NodeState before)
Called for all deleted child nodes.
|
boolean |
propertyAdded(PropertyState after)
Called for all added properties.
|
boolean |
propertyChanged(PropertyState before,
PropertyState after)
Called for all changed properties.
|
boolean |
propertyDeleted(PropertyState before)
Called for all deleted properties.
|
public boolean propertyAdded(PropertyState after)
NodeStateDiff
propertyAdded
in interface NodeStateDiff
after
- property state after the changetrue
to continue the comparison, false
to abort.
Abort will stop comparing completely, that means sibling nodes
and sibling nodes of all parents are not further compared.public boolean propertyChanged(PropertyState before, PropertyState after)
NodeStateDiff
propertyChanged
in interface NodeStateDiff
before
- property state before the changeafter
- property state after the changetrue
to continue the comparison, false
to abort.
Abort will stop comparing completely, that means sibling nodes
and sibling nodes of all parents are not further compared.public boolean propertyDeleted(PropertyState before)
NodeStateDiff
propertyDeleted
in interface NodeStateDiff
before
- property state before the changetrue
to continue the comparison, false
to abort.
Abort will stop comparing completely, that means sibling nodes
and sibling nodes of all parents are not further compared.public boolean childNodeAdded(java.lang.String name, NodeState after)
NodeStateDiff
childNodeAdded
in interface NodeStateDiff
name
- name of the added child nodeafter
- child node state after the changetrue
to continue the comparison, false
to abort.
Abort will stop comparing completely, that means sibling nodes
and sibling nodes of all parents are not further compared.public boolean childNodeChanged(java.lang.String name, NodeState before, NodeState after)
NodeStateDiff
childNodeChanged
in interface NodeStateDiff
name
- name of the changed child nodebefore
- child node state before the changeafter
- child node state after the changetrue
to continue the comparison, false
to abort.
Abort will stop comparing completely, that means sibling nodes
and sibling nodes of all parents are not further compared.public boolean childNodeDeleted(java.lang.String name, NodeState before)
NodeStateDiff
childNodeDeleted
in interface NodeStateDiff
name
- name of the deleted child nodebefore
- child node state before the changetrue
to continue the comparison, false
to abort.
Abort will stop comparing completely, that means sibling nodes
and sibling nodes of all parents are not further compared."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"