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
ThisThreeWayConflictHandlerimplementation resolves conflicts toThreeWayConflictHandler.Resolution.THEIRSand 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:ourssub 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.ResolutionaddExistingNode(NodeBuilder parent, java.lang.String name, NodeState ours, NodeState theirs)The nodeourshas been added toparentwhich conflicts with nodetheirswhich has been added in the persistence store.ThreeWayConflictHandler.ResolutionaddExistingProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs)The propertyourshas been added toparentwhich conflicts with propertytheirswhich has been added in the persistence store.ThreeWayConflictHandler.ResolutionchangeChangedProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs, PropertyState base)The propertyourshas been changed inparentwhile it was also changed to a different value (theirs) in the persistence store.ThreeWayConflictHandler.ResolutionchangeDeletedNode(NodeBuilder parent, java.lang.String name, NodeState ours, NodeState base)The nodeourshas been changed inparentwhile it was removed in the persistence store.ThreeWayConflictHandler.ResolutionchangeDeletedProperty(NodeBuilder parent, PropertyState ours, PropertyState base)The propertyourshas been changed inparentwhile it was removed in the persistence store.ThreeWayConflictHandler.ResolutiondeleteChangedNode(NodeBuilder parent, java.lang.String name, NodeState theirs, NodeState base)The nodetheirschanged in the persistence store while it has been deleted locally.ThreeWayConflictHandler.ResolutiondeleteChangedProperty(NodeBuilder parent, PropertyState theirs, PropertyState base)The propertytheirschanged in the persistence store while it has been deleted locally.ThreeWayConflictHandler.ResolutiondeleteDeletedNode(NodeBuilder parent, java.lang.String name, NodeState base)The nodenamehas been removed inparentwhile it was also removed in the persistence store.ThreeWayConflictHandler.ResolutiondeleteDeletedProperty(NodeBuilder parent, PropertyState base)The propertyourshas been removed inparentwhile 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:ThreeWayConflictHandlerThe propertyourshas been added toparentwhich conflicts with propertytheirswhich has been added in the persistence store.- Specified by:
addExistingPropertyin interfaceThreeWayConflictHandler- Parameters:
parent- root of the conflictours- our version of the propertytheirs- their version of the property- Returns:
ThreeWayConflictHandler.Resolutionof the conflict
-
changeDeletedProperty
public ThreeWayConflictHandler.Resolution changeDeletedProperty(NodeBuilder parent, PropertyState ours, PropertyState base)
Description copied from interface:ThreeWayConflictHandlerThe propertyourshas been changed inparentwhile it was removed in the persistence store.- Specified by:
changeDeletedPropertyin interfaceThreeWayConflictHandler- Parameters:
parent- root of the conflictours- our version of the propertybase- the base version of the property- Returns:
ThreeWayConflictHandler.Resolutionof the conflict
-
changeChangedProperty
public ThreeWayConflictHandler.Resolution changeChangedProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs, PropertyState base)
Description copied from interface:ThreeWayConflictHandlerThe propertyourshas been changed inparentwhile it was also changed to a different value (theirs) in the persistence store.- Specified by:
changeChangedPropertyin 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.Resolutionof the conflict
-
deleteChangedProperty
public ThreeWayConflictHandler.Resolution deleteChangedProperty(NodeBuilder parent, PropertyState theirs, PropertyState base)
Description copied from interface:ThreeWayConflictHandlerThe propertytheirschanged in the persistence store while it has been deleted locally.- Specified by:
deleteChangedPropertyin interfaceThreeWayConflictHandler- Parameters:
parent- root of the conflicttheirs- their version of the propertybase- the base version of the property- Returns:
ThreeWayConflictHandler.Resolutionof the conflict
-
deleteDeletedProperty
public ThreeWayConflictHandler.Resolution deleteDeletedProperty(NodeBuilder parent, PropertyState base)
Description copied from interface:ThreeWayConflictHandlerThe propertyourshas been removed inparentwhile it was also removed in the persistence store.- Specified by:
deleteDeletedPropertyin interfaceThreeWayConflictHandler- Parameters:
parent- root of the conflictbase- the base version of the property- Returns:
ThreeWayConflictHandler.Resolutionof the conflict
-
addExistingNode
public ThreeWayConflictHandler.Resolution addExistingNode(NodeBuilder parent, java.lang.String name, NodeState ours, NodeState theirs)
Description copied from interface:ThreeWayConflictHandlerThe nodeourshas been added toparentwhich conflicts with nodetheirswhich has been added in the persistence store.- Specified by:
addExistingNodein interfaceThreeWayConflictHandler- Parameters:
parent- root of the conflictname- name of the nodeours- our version of the nodetheirs- their version of the node- Returns:
ThreeWayConflictHandler.Resolutionof the conflict
-
changeDeletedNode
public ThreeWayConflictHandler.Resolution changeDeletedNode(NodeBuilder parent, java.lang.String name, NodeState ours, NodeState base)
Description copied from interface:ThreeWayConflictHandlerThe nodeourshas been changed inparentwhile it was removed in the persistence store.- Specified by:
changeDeletedNodein interfaceThreeWayConflictHandler- Parameters:
parent- root of the conflictname- name of the nodeours- our version of the nodebase- the base version of the node- Returns:
ThreeWayConflictHandler.Resolutionof the conflict
-
deleteChangedNode
public ThreeWayConflictHandler.Resolution deleteChangedNode(NodeBuilder parent, java.lang.String name, NodeState theirs, NodeState base)
Description copied from interface:ThreeWayConflictHandlerThe nodetheirschanged in the persistence store while it has been deleted locally.- Specified by:
deleteChangedNodein interfaceThreeWayConflictHandler- Parameters:
parent- root of the conflictname- name of the nodetheirs- their version of the nodebase- the base version of the node- Returns:
ThreeWayConflictHandler.Resolutionof the conflict
-
deleteDeletedNode
public ThreeWayConflictHandler.Resolution deleteDeletedNode(NodeBuilder parent, java.lang.String name, NodeState base)
Description copied from interface:ThreeWayConflictHandlerThe nodenamehas been removed inparentwhile it was also removed in the persistence store.- Specified by:
deleteDeletedNodein interfaceThreeWayConflictHandler- Parameters:
parent- root of the conflictname- name of the nodebase- the base version of the node- Returns:
ThreeWayConflictHandler.Resolutionof the conflict
-
-