Interface ThreeWayConflictHandler
- All Known Implementing Classes:
AnnotatingConflictHandler,CompositeConflictHandler,DefaultThreeWayConflictHandler,JcrLastModifiedConflictHandler
public interface ThreeWayConflictHandler
A
ThreeWayConflictHandler is responsible for handling conflicts which happen
on Root.rebase() and on the implicit rebase operation which
takes part on Root.commit().
This interface contains one method per type of conflict which might occur.
Each of these methods must return a ThreeWayConflictHandler.Resolution for the current conflict.
The resolution indicates to use the changes in the current Root instance
(ThreeWayConflictHandler.Resolution.OURS) or to use the changes from the underlying persistence
store (ThreeWayConflictHandler.Resolution.THEIRS). Alternatively the resolution can also indicate
that the changes have been successfully merged by this ThreeWayConflictHandler
instance (ThreeWayConflictHandler.Resolution.MERGED).-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumResolutions for conflicts -
Method Summary
Modifier and TypeMethodDescription@NotNull ThreeWayConflictHandler.ResolutionaddExistingNode(@NotNull NodeBuilder parent, @NotNull String name, @NotNull NodeState ours, @NotNull NodeState theirs) The nodeourshas been added toparentwhich conflicts with nodetheirswhich has been added in the persistence store.@NotNull ThreeWayConflictHandler.ResolutionaddExistingProperty(@NotNull NodeBuilder parent, @NotNull PropertyState ours, @NotNull PropertyState theirs) The propertyourshas been added toparentwhich conflicts with propertytheirswhich has been added in the persistence store.@NotNull ThreeWayConflictHandler.ResolutionchangeChangedProperty(@NotNull NodeBuilder parent, @NotNull PropertyState ours, @NotNull PropertyState theirs, @NotNull PropertyState base) The propertyourshas been changed inparentwhile it was also changed to a different value (theirs) in the persistence store.@NotNull ThreeWayConflictHandler.ResolutionchangeDeletedNode(@NotNull NodeBuilder parent, @NotNull String name, @NotNull NodeState ours, @NotNull NodeState base) The nodeourshas been changed inparentwhile it was removed in the persistence store.@NotNull ThreeWayConflictHandler.ResolutionchangeDeletedProperty(@NotNull NodeBuilder parent, @NotNull PropertyState ours, @NotNull PropertyState base) The propertyourshas been changed inparentwhile it was removed in the persistence store.@NotNull ThreeWayConflictHandler.ResolutiondeleteChangedNode(@NotNull NodeBuilder parent, @NotNull String name, @NotNull NodeState theirs, @NotNull NodeState base) The nodetheirschanged in the persistence store while it has been deleted locally.@NotNull ThreeWayConflictHandler.ResolutiondeleteChangedProperty(@NotNull NodeBuilder parent, @NotNull PropertyState theirs, @NotNull PropertyState base) The propertytheirschanged in the persistence store while it has been deleted locally.@NotNull ThreeWayConflictHandler.ResolutiondeleteDeletedNode(@NotNull NodeBuilder parent, @NotNull String name, @NotNull NodeState base) The nodenamehas been removed inparentwhile it was also removed in the persistence store.@NotNull ThreeWayConflictHandler.ResolutiondeleteDeletedProperty(@NotNull NodeBuilder parent, @NotNull PropertyState base) The propertyourshas been removed inparentwhile it was also removed in the persistence store.
-
Method Details
-
addExistingProperty
@NotNull @NotNull ThreeWayConflictHandler.Resolution addExistingProperty(@NotNull @NotNull NodeBuilder parent, @NotNull @NotNull PropertyState ours, @NotNull @NotNull PropertyState theirs) The propertyourshas been added toparentwhich conflicts with propertytheirswhich has been added in the persistence store.- Parameters:
parent- root of the conflictours- our version of the propertytheirs- their version of the property- Returns:
ThreeWayConflictHandler.Resolutionof the conflict
-
changeDeletedProperty
@NotNull @NotNull ThreeWayConflictHandler.Resolution changeDeletedProperty(@NotNull @NotNull NodeBuilder parent, @NotNull @NotNull PropertyState ours, @NotNull @NotNull PropertyState base) The propertyourshas been changed inparentwhile it was removed in the persistence store.- Parameters:
parent- root of the conflictours- our version of the propertybase- the base version of the property- Returns:
ThreeWayConflictHandler.Resolutionof the conflict
-
changeChangedProperty
@NotNull @NotNull ThreeWayConflictHandler.Resolution changeChangedProperty(@NotNull @NotNull NodeBuilder parent, @NotNull @NotNull PropertyState ours, @NotNull @NotNull PropertyState theirs, @NotNull @NotNull PropertyState base) The propertyourshas been changed inparentwhile it was also changed to a different value (theirs) in the persistence store.- 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
-
deleteDeletedProperty
@NotNull @NotNull ThreeWayConflictHandler.Resolution deleteDeletedProperty(@NotNull @NotNull NodeBuilder parent, @NotNull @NotNull PropertyState base) The propertyourshas been removed inparentwhile it was also removed in the persistence store.- Parameters:
parent- root of the conflictbase- the base version of the property- Returns:
ThreeWayConflictHandler.Resolutionof the conflict
-
deleteChangedProperty
@NotNull @NotNull ThreeWayConflictHandler.Resolution deleteChangedProperty(@NotNull @NotNull NodeBuilder parent, @NotNull @NotNull PropertyState theirs, @NotNull @NotNull PropertyState base) The propertytheirschanged in the persistence store while it has been deleted locally.- Parameters:
parent- root of the conflicttheirs- their version of the propertybase- the base version of the property- Returns:
ThreeWayConflictHandler.Resolutionof the conflict
-
addExistingNode
@NotNull @NotNull ThreeWayConflictHandler.Resolution addExistingNode(@NotNull @NotNull NodeBuilder parent, @NotNull @NotNull String name, @NotNull @NotNull NodeState ours, @NotNull @NotNull NodeState theirs) The nodeourshas been added toparentwhich conflicts with nodetheirswhich has been added in the persistence store.- 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
@NotNull @NotNull ThreeWayConflictHandler.Resolution changeDeletedNode(@NotNull @NotNull NodeBuilder parent, @NotNull @NotNull String name, @NotNull @NotNull NodeState ours, @NotNull @NotNull NodeState base) The nodeourshas been changed inparentwhile it was removed in the persistence store.- 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
@NotNull @NotNull ThreeWayConflictHandler.Resolution deleteChangedNode(@NotNull @NotNull NodeBuilder parent, @NotNull @NotNull String name, @NotNull @NotNull NodeState theirs, @NotNull @NotNull NodeState base) The nodetheirschanged in the persistence store while it has been deleted locally.- 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
@NotNull @NotNull ThreeWayConflictHandler.Resolution deleteDeletedNode(@NotNull @NotNull NodeBuilder parent, @NotNull @NotNull String name, @NotNull @NotNull NodeState base) The nodenamehas been removed inparentwhile it was also removed in the persistence store.- Parameters:
parent- root of the conflictname- name of the nodebase- the base version of the node- Returns:
ThreeWayConflictHandler.Resolutionof the conflict
-