public class DefaultThreeWayConflictHandler extends java.lang.Object implements ThreeWayConflictHandler
ThreeWayConflictHandler
always returns the
same resolution. It can be used to implement default behaviour or as a base
class for more specialised implementations.ThreeWayConflictHandler.Resolution
Modifier and Type | Field and Description |
---|---|
static ThreeWayConflictHandler |
OURS
A
ConflictHandler which always return
ThreeWayConflictHandler.Resolution.OURS . |
static ThreeWayConflictHandler |
THEIRS
A
ConflictHandler which always return
ThreeWayConflictHandler.Resolution.THEIRS . |
Constructor and Description |
---|
DefaultThreeWayConflictHandler(ThreeWayConflictHandler.Resolution resolution)
Create a new
ConflictHandler which always returns
resolution . |
Modifier and Type | Method and Description |
---|---|
@NotNull ThreeWayConflictHandler.Resolution |
addExistingNode(NodeBuilder parent,
java.lang.String name,
NodeState ours,
NodeState theirs)
The node
ours has been added to parent which conflicts
with node theirs which has been added in the persistence store. |
@NotNull ThreeWayConflictHandler.Resolution |
addExistingProperty(NodeBuilder parent,
PropertyState ours,
PropertyState theirs)
The property
ours has been added to parent which conflicts
with property theirs which has been added in the persistence store. |
@NotNull ThreeWayConflictHandler.Resolution |
changeChangedProperty(NodeBuilder parent,
PropertyState ours,
PropertyState theirs,
PropertyState base)
The property
ours has been changed in parent while it was
also changed to a different value (theirs ) in the persistence store. |
@NotNull ThreeWayConflictHandler.Resolution |
changeDeletedNode(NodeBuilder parent,
java.lang.String name,
NodeState ours,
NodeState base)
The node
ours has been changed in parent while it was
removed in the persistence store. |
@NotNull ThreeWayConflictHandler.Resolution |
changeDeletedProperty(NodeBuilder parent,
PropertyState ours,
PropertyState base)
The property
ours has been changed in parent while it was
removed in the persistence store. |
@NotNull ThreeWayConflictHandler.Resolution |
deleteChangedNode(NodeBuilder parent,
java.lang.String name,
NodeState theirs,
NodeState base)
The node
theirs changed in the persistence store while it has been
deleted locally. |
@NotNull ThreeWayConflictHandler.Resolution |
deleteChangedProperty(NodeBuilder parent,
PropertyState theirs,
PropertyState base)
The property
theirs changed in the persistence store while it has been
deleted locally. |
@NotNull ThreeWayConflictHandler.Resolution |
deleteDeletedNode(NodeBuilder parent,
java.lang.String name,
NodeState base)
The node
name has been removed in parent while it was
also removed in the persistence store. |
@NotNull ThreeWayConflictHandler.Resolution |
deleteDeletedProperty(NodeBuilder parent,
PropertyState base)
The property
ours has been removed in parent while it was
also removed in the persistence store. |
public static final ThreeWayConflictHandler OURS
ConflictHandler
which always return
ThreeWayConflictHandler.Resolution.OURS
.public static final ThreeWayConflictHandler THEIRS
ConflictHandler
which always return
ThreeWayConflictHandler.Resolution.THEIRS
.public DefaultThreeWayConflictHandler(ThreeWayConflictHandler.Resolution resolution)
ConflictHandler
which always returns
resolution
.resolution
- the resolution to return from all methods of this
ConflictHandler
instance.@NotNull public @NotNull ThreeWayConflictHandler.Resolution addExistingProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs)
ThreeWayConflictHandler
ours
has been added to parent
which conflicts
with property theirs
which has been added in the persistence store.addExistingProperty
in interface ThreeWayConflictHandler
parent
- root of the conflictours
- our version of the propertytheirs
- their version of the propertyThreeWayConflictHandler.Resolution
of the conflict@NotNull public @NotNull ThreeWayConflictHandler.Resolution changeDeletedProperty(NodeBuilder parent, PropertyState ours, PropertyState base)
ThreeWayConflictHandler
ours
has been changed in parent
while it was
removed in the persistence store.changeDeletedProperty
in interface ThreeWayConflictHandler
parent
- root of the conflictours
- our version of the propertybase
- the base version of the propertyThreeWayConflictHandler.Resolution
of the conflict@NotNull public @NotNull ThreeWayConflictHandler.Resolution changeChangedProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs, PropertyState base)
ThreeWayConflictHandler
ours
has been changed in parent
while it was
also changed to a different value (theirs
) in the persistence store.changeChangedProperty
in interface ThreeWayConflictHandler
parent
- root of the conflictours
- our version of the propertytheirs
- their version of the propertybase
- the base version of the propertyThreeWayConflictHandler.Resolution
of the conflict@NotNull public @NotNull ThreeWayConflictHandler.Resolution deleteDeletedProperty(NodeBuilder parent, PropertyState base)
ThreeWayConflictHandler
ours
has been removed in parent
while it was
also removed in the persistence store.deleteDeletedProperty
in interface ThreeWayConflictHandler
parent
- root of the conflictbase
- the base version of the propertyThreeWayConflictHandler.Resolution
of the conflict@NotNull public @NotNull ThreeWayConflictHandler.Resolution deleteChangedProperty(NodeBuilder parent, PropertyState theirs, PropertyState base)
ThreeWayConflictHandler
theirs
changed in the persistence store while it has been
deleted locally.deleteChangedProperty
in interface ThreeWayConflictHandler
parent
- root of the conflicttheirs
- their version of the propertybase
- the base version of the propertyThreeWayConflictHandler.Resolution
of the conflict@NotNull public @NotNull ThreeWayConflictHandler.Resolution addExistingNode(NodeBuilder parent, java.lang.String name, NodeState ours, NodeState theirs)
ThreeWayConflictHandler
ours
has been added to parent
which conflicts
with node theirs
which has been added in the persistence store.addExistingNode
in interface ThreeWayConflictHandler
parent
- root of the conflictname
- name of the nodeours
- our version of the nodetheirs
- their version of the nodeThreeWayConflictHandler.Resolution
of the conflict@NotNull public @NotNull ThreeWayConflictHandler.Resolution changeDeletedNode(NodeBuilder parent, java.lang.String name, NodeState ours, NodeState base)
ThreeWayConflictHandler
ours
has been changed in parent
while it was
removed in the persistence store.changeDeletedNode
in interface ThreeWayConflictHandler
parent
- root of the conflictname
- name of the nodeours
- our version of the nodebase
- the base version of the nodeThreeWayConflictHandler.Resolution
of the conflict@NotNull public @NotNull ThreeWayConflictHandler.Resolution deleteChangedNode(NodeBuilder parent, java.lang.String name, NodeState theirs, NodeState base)
ThreeWayConflictHandler
theirs
changed in the persistence store while it has been
deleted locally.deleteChangedNode
in interface ThreeWayConflictHandler
parent
- root of the conflictname
- name of the nodetheirs
- their version of the nodebase
- the base version of the nodeThreeWayConflictHandler.Resolution
of the conflict@NotNull public @NotNull ThreeWayConflictHandler.Resolution deleteDeletedNode(NodeBuilder parent, java.lang.String name, NodeState base)
ThreeWayConflictHandler
name
has been removed in parent
while it was
also removed in the persistence store.deleteDeletedNode
in interface ThreeWayConflictHandler
parent
- root of the conflictname
- name of the nodebase
- the base version of the nodeThreeWayConflictHandler.Resolution
of the conflictCopyright © 2010 - 2020 Adobe. All Rights Reserved