Class AnnotatingConflictHandler
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.commit.AnnotatingConflictHandler
-
- All Implemented Interfaces:
ThreeWayConflictHandler
public class AnnotatingConflictHandler extends java.lang.Object implements ThreeWayConflictHandler
ThisThreeWayConflictHandler
implementation resolves conflicts toThreeWayConflictHandler.Resolution.THEIRS
and in addition marks nodes where a conflict occurred with the mixinrep:MergeConflict
:[rep:MergeConflict] mixin primaryitem rep:ours + rep:ours (rep:Unstructured) protected IGNORE
Therep:ours
sub node contains our version of the node prior to the conflict.- See Also:
ConflictValidator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.spi.commit.ThreeWayConflictHandler
ThreeWayConflictHandler.Resolution
-
-
Constructor Summary
Constructors Constructor Description AnnotatingConflictHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThreeWayConflictHandler.Resolution
addExistingNode(NodeBuilder parent, java.lang.String name, NodeState ours, NodeState theirs)
The nodeours
has been added toparent
which conflicts with nodetheirs
which has been added in the persistence store.ThreeWayConflictHandler.Resolution
addExistingProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs)
The propertyours
has been added toparent
which conflicts with propertytheirs
which has been added in the persistence store.ThreeWayConflictHandler.Resolution
changeChangedProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs, PropertyState base)
The propertyours
has been changed inparent
while it was also changed to a different value (theirs
) in the persistence store.ThreeWayConflictHandler.Resolution
changeDeletedNode(NodeBuilder parent, java.lang.String name, NodeState ours, NodeState base)
The nodeours
has been changed inparent
while it was removed in the persistence store.ThreeWayConflictHandler.Resolution
changeDeletedProperty(NodeBuilder parent, PropertyState ours, PropertyState base)
The propertyours
has been changed inparent
while it was removed in the persistence store.ThreeWayConflictHandler.Resolution
deleteChangedNode(NodeBuilder parent, java.lang.String name, NodeState theirs, NodeState base)
The nodetheirs
changed in the persistence store while it has been deleted locally.ThreeWayConflictHandler.Resolution
deleteChangedProperty(NodeBuilder parent, PropertyState theirs, PropertyState base)
The propertytheirs
changed in the persistence store while it has been deleted locally.ThreeWayConflictHandler.Resolution
deleteDeletedNode(NodeBuilder parent, java.lang.String name, NodeState base)
The nodename
has been removed inparent
while it was also removed in the persistence store.ThreeWayConflictHandler.Resolution
deleteDeletedProperty(NodeBuilder parent, PropertyState base)
The propertyours
has been removed inparent
while it was also removed in the persistence store.
-
-
-
Method Detail
-
addExistingProperty
public ThreeWayConflictHandler.Resolution addExistingProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs)
Description copied from interface:ThreeWayConflictHandler
The propertyours
has been added toparent
which conflicts with propertytheirs
which has been added in the persistence store.- Specified by:
addExistingProperty
in interfaceThreeWayConflictHandler
- Parameters:
parent
- root of the conflictours
- our version of the propertytheirs
- their version of the property- Returns:
ThreeWayConflictHandler.Resolution
of the conflict
-
changeDeletedProperty
public ThreeWayConflictHandler.Resolution changeDeletedProperty(NodeBuilder parent, PropertyState ours, PropertyState base)
Description copied from interface:ThreeWayConflictHandler
The propertyours
has been changed inparent
while it was removed in the persistence store.- Specified by:
changeDeletedProperty
in interfaceThreeWayConflictHandler
- Parameters:
parent
- root of the conflictours
- our version of the propertybase
- the base version of the property- Returns:
ThreeWayConflictHandler.Resolution
of the conflict
-
changeChangedProperty
public ThreeWayConflictHandler.Resolution changeChangedProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs, PropertyState base)
Description copied from interface:ThreeWayConflictHandler
The propertyours
has been changed inparent
while it was also changed to a different value (theirs
) in the persistence store.- Specified by:
changeChangedProperty
in interfaceThreeWayConflictHandler
- Parameters:
parent
- root of the conflictours
- our version of the propertytheirs
- their version of the propertybase
- the base version of the property- Returns:
ThreeWayConflictHandler.Resolution
of the conflict
-
deleteChangedProperty
public ThreeWayConflictHandler.Resolution deleteChangedProperty(NodeBuilder parent, PropertyState theirs, PropertyState base)
Description copied from interface:ThreeWayConflictHandler
The propertytheirs
changed in the persistence store while it has been deleted locally.- Specified by:
deleteChangedProperty
in interfaceThreeWayConflictHandler
- Parameters:
parent
- root of the conflicttheirs
- their version of the propertybase
- the base version of the property- Returns:
ThreeWayConflictHandler.Resolution
of the conflict
-
deleteDeletedProperty
public ThreeWayConflictHandler.Resolution deleteDeletedProperty(NodeBuilder parent, PropertyState base)
Description copied from interface:ThreeWayConflictHandler
The propertyours
has been removed inparent
while it was also removed in the persistence store.- Specified by:
deleteDeletedProperty
in interfaceThreeWayConflictHandler
- Parameters:
parent
- root of the conflictbase
- the base version of the property- Returns:
ThreeWayConflictHandler.Resolution
of the conflict
-
addExistingNode
public ThreeWayConflictHandler.Resolution addExistingNode(NodeBuilder parent, java.lang.String name, NodeState ours, NodeState theirs)
Description copied from interface:ThreeWayConflictHandler
The nodeours
has been added toparent
which conflicts with nodetheirs
which has been added in the persistence store.- Specified by:
addExistingNode
in interfaceThreeWayConflictHandler
- Parameters:
parent
- root of the conflictname
- name of the nodeours
- our version of the nodetheirs
- their version of the node- Returns:
ThreeWayConflictHandler.Resolution
of the conflict
-
changeDeletedNode
public ThreeWayConflictHandler.Resolution changeDeletedNode(NodeBuilder parent, java.lang.String name, NodeState ours, NodeState base)
Description copied from interface:ThreeWayConflictHandler
The nodeours
has been changed inparent
while it was removed in the persistence store.- Specified by:
changeDeletedNode
in interfaceThreeWayConflictHandler
- Parameters:
parent
- root of the conflictname
- name of the nodeours
- our version of the nodebase
- the base version of the node- Returns:
ThreeWayConflictHandler.Resolution
of the conflict
-
deleteChangedNode
public ThreeWayConflictHandler.Resolution deleteChangedNode(NodeBuilder parent, java.lang.String name, NodeState theirs, NodeState base)
Description copied from interface:ThreeWayConflictHandler
The nodetheirs
changed in the persistence store while it has been deleted locally.- Specified by:
deleteChangedNode
in interfaceThreeWayConflictHandler
- Parameters:
parent
- root of the conflictname
- name of the nodetheirs
- their version of the nodebase
- the base version of the node- Returns:
ThreeWayConflictHandler.Resolution
of the conflict
-
deleteDeletedNode
public ThreeWayConflictHandler.Resolution deleteDeletedNode(NodeBuilder parent, java.lang.String name, NodeState base)
Description copied from interface:ThreeWayConflictHandler
The nodename
has been removed inparent
while it was also removed in the persistence store.- Specified by:
deleteDeletedNode
in interfaceThreeWayConflictHandler
- Parameters:
parent
- root of the conflictname
- name of the nodebase
- the base version of the node- Returns:
ThreeWayConflictHandler.Resolution
of the conflict
-
-