Class DefaultConflictHandler
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.commit.DefaultConflictHandler
-
- All Implemented Interfaces:
ConflictHandler
,PartialConflictHandler
@Deprecated public class DefaultConflictHandler extends java.lang.Object implements ConflictHandler
Deprecated.UseDefaultThreeWayConflictHandler
instead.This implementation of aConflictHandler
always returns the same resolution. It can be used to implement default behaviour or as a base class for more specialised implementations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.spi.commit.PartialConflictHandler
PartialConflictHandler.Resolution
-
-
Field Summary
Fields Modifier and Type Field Description static ConflictHandler
OURS
Deprecated.AConflictHandler
which always returnPartialConflictHandler.Resolution.OURS
.static ConflictHandler
THEIRS
Deprecated.AConflictHandler
which always returnPartialConflictHandler.Resolution.THEIRS
.
-
Constructor Summary
Constructors Constructor Description DefaultConflictHandler(PartialConflictHandler.Resolution resolution)
Deprecated.Create a newConflictHandler
which always returnsresolution
.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PartialConflictHandler.Resolution
addExistingNode(NodeBuilder parent, java.lang.String name, NodeState ours, NodeState theirs)
Deprecated.The nodeours
has been added toparent
which conflicts with nodetheirs
which has been added in the persistence store.PartialConflictHandler.Resolution
addExistingProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs)
Deprecated.The propertyours
has been added toparent
which conflicts with propertytheirs
which has been added in the persistence store.PartialConflictHandler.Resolution
changeChangedProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs)
Deprecated.The propertyours
has been changed inparent
while it was also changed to a different value (theirs
) in the persistence store.PartialConflictHandler.Resolution
changeDeletedNode(NodeBuilder parent, java.lang.String name, NodeState ours)
Deprecated.The nodeours
has been changed inparent
while it was removed in the persistence store.PartialConflictHandler.Resolution
changeDeletedProperty(NodeBuilder parent, PropertyState ours)
Deprecated.The propertyours
has been changed inparent
while it was removed in the persistence store.PartialConflictHandler.Resolution
deleteChangedNode(NodeBuilder parent, java.lang.String name, NodeState theirs)
Deprecated.The nodetheirs
changed in the persistence store while it has been deleted locally.PartialConflictHandler.Resolution
deleteChangedProperty(NodeBuilder parent, PropertyState theirs)
Deprecated.The propertytheirs
changed in the persistence store while it has been deleted locally.PartialConflictHandler.Resolution
deleteDeletedNode(NodeBuilder parent, java.lang.String name)
Deprecated.The nodename
has been removed inparent
while it was also removed in the persistence store.PartialConflictHandler.Resolution
deleteDeletedProperty(NodeBuilder parent, PropertyState ours)
Deprecated.The propertyours
has been removed inparent
while it was also removed in the persistence store.
-
-
-
Field Detail
-
OURS
public static final ConflictHandler OURS
Deprecated.AConflictHandler
which always returnPartialConflictHandler.Resolution.OURS
.
-
THEIRS
public static final ConflictHandler THEIRS
Deprecated.AConflictHandler
which always returnPartialConflictHandler.Resolution.THEIRS
.
-
-
Constructor Detail
-
DefaultConflictHandler
public DefaultConflictHandler(PartialConflictHandler.Resolution resolution)
Deprecated.Create a newConflictHandler
which always returnsresolution
.- Parameters:
resolution
- the resolution to return from all methods of thisConflictHandler
instance.
-
-
Method Detail
-
addExistingProperty
public PartialConflictHandler.Resolution addExistingProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs)
Deprecated.Description copied from interface:ConflictHandler
The propertyours
has been added toparent
which conflicts with propertytheirs
which has been added in the persistence store.- Specified by:
addExistingProperty
in interfaceConflictHandler
- Specified by:
addExistingProperty
in interfacePartialConflictHandler
- Parameters:
parent
- root of the conflictours
- our version of the propertytheirs
- their version of the property- Returns:
PartialConflictHandler.Resolution
of the conflict
-
changeDeletedProperty
public PartialConflictHandler.Resolution changeDeletedProperty(NodeBuilder parent, PropertyState ours)
Deprecated.Description copied from interface:ConflictHandler
The propertyours
has been changed inparent
while it was removed in the persistence store.- Specified by:
changeDeletedProperty
in interfaceConflictHandler
- Specified by:
changeDeletedProperty
in interfacePartialConflictHandler
- Parameters:
parent
- root of the conflictours
- our version of the property- Returns:
PartialConflictHandler.Resolution
of the conflict
-
changeChangedProperty
public PartialConflictHandler.Resolution changeChangedProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs)
Deprecated.Description copied from interface:ConflictHandler
The propertyours
has been changed inparent
while it was also changed to a different value (theirs
) in the persistence store.- Specified by:
changeChangedProperty
in interfaceConflictHandler
- Specified by:
changeChangedProperty
in interfacePartialConflictHandler
- Parameters:
parent
- root of the conflictours
- our version of the propertytheirs
- their version of the property- Returns:
PartialConflictHandler.Resolution
of the conflict
-
deleteChangedProperty
public PartialConflictHandler.Resolution deleteChangedProperty(NodeBuilder parent, PropertyState theirs)
Deprecated.Description copied from interface:ConflictHandler
The propertytheirs
changed in the persistence store while it has been deleted locally.- Specified by:
deleteChangedProperty
in interfaceConflictHandler
- Specified by:
deleteChangedProperty
in interfacePartialConflictHandler
- Parameters:
parent
- root of the conflicttheirs
- their version of the property- Returns:
PartialConflictHandler.Resolution
of the conflict
-
deleteDeletedProperty
public PartialConflictHandler.Resolution deleteDeletedProperty(NodeBuilder parent, PropertyState ours)
Deprecated.Description copied from interface:ConflictHandler
The propertyours
has been removed inparent
while it was also removed in the persistence store.- Specified by:
deleteDeletedProperty
in interfaceConflictHandler
- Specified by:
deleteDeletedProperty
in interfacePartialConflictHandler
- Parameters:
parent
- root of the conflictours
- our version of the property- Returns:
PartialConflictHandler.Resolution
of the conflict
-
addExistingNode
public PartialConflictHandler.Resolution addExistingNode(NodeBuilder parent, java.lang.String name, NodeState ours, NodeState theirs)
Deprecated.Description copied from interface:ConflictHandler
The nodeours
has been added toparent
which conflicts with nodetheirs
which has been added in the persistence store.- Specified by:
addExistingNode
in interfaceConflictHandler
- Specified by:
addExistingNode
in interfacePartialConflictHandler
- Parameters:
parent
- root of the conflictname
- name of the nodeours
- our version of the nodetheirs
- their version of the node- Returns:
PartialConflictHandler.Resolution
of the conflict
-
changeDeletedNode
public PartialConflictHandler.Resolution changeDeletedNode(NodeBuilder parent, java.lang.String name, NodeState ours)
Deprecated.Description copied from interface:ConflictHandler
The nodeours
has been changed inparent
while it was removed in the persistence store.- Specified by:
changeDeletedNode
in interfaceConflictHandler
- Specified by:
changeDeletedNode
in interfacePartialConflictHandler
- Parameters:
parent
- root of the conflictname
- name of the nodeours
- our version of the node- Returns:
PartialConflictHandler.Resolution
of the conflict
-
deleteChangedNode
public PartialConflictHandler.Resolution deleteChangedNode(NodeBuilder parent, java.lang.String name, NodeState theirs)
Deprecated.Description copied from interface:ConflictHandler
The nodetheirs
changed in the persistence store while it has been deleted locally.- Specified by:
deleteChangedNode
in interfaceConflictHandler
- Specified by:
deleteChangedNode
in interfacePartialConflictHandler
- Parameters:
parent
- root of the conflictname
- name of the nodetheirs
- their version of the node- Returns:
PartialConflictHandler.Resolution
of the conflict
-
deleteDeletedNode
public PartialConflictHandler.Resolution deleteDeletedNode(NodeBuilder parent, java.lang.String name)
Deprecated.Description copied from interface:ConflictHandler
The nodename
has been removed inparent
while it was also removed in the persistence store.- Specified by:
deleteDeletedNode
in interfaceConflictHandler
- Specified by:
deleteDeletedNode
in interfacePartialConflictHandler
- Parameters:
parent
- root of the conflictname
- name of the node- Returns:
PartialConflictHandler.Resolution
of the conflict
-
-