public class CompositeConflictHandler extends java.lang.Object implements ConflictHandler
CompositeConflictHandler delegates conflict handling
to multiple backing handlers. The backing handlers are invoked in
the inverse order they have been installed until a handler returning
a valid resolution (i.e. not null) is found. If for a certain
conflict none of the backing handlers returns a valid resolution
this implementation throws an IllegalStateException.PartialConflictHandler.Resolution| Constructor and Description |
|---|
CompositeConflictHandler()
Create a new
CompositeConflictHandler with no backing handlers. |
CompositeConflictHandler(java.lang.Iterable<PartialConflictHandler> handlers)
Create a new
CompositeConflictHandler with an initial set of
backing handler. |
| Modifier and Type | Method and Description |
|---|---|
PartialConflictHandler.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. |
PartialConflictHandler.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. |
CompositeConflictHandler |
addHandler(PartialConflictHandler handler)
Add a new backing conflict handler.
|
PartialConflictHandler.Resolution |
changeChangedProperty(NodeBuilder parent,
PropertyState ours,
PropertyState theirs)
The property
ours has been changed in parent 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)
The node
ours has been changed in parent while it was
removed in the persistence store. |
PartialConflictHandler.Resolution |
changeDeletedProperty(NodeBuilder parent,
PropertyState ours)
The property
ours has been changed in parent while it was
removed in the persistence store. |
PartialConflictHandler.Resolution |
deleteChangedNode(NodeBuilder parent,
java.lang.String name,
NodeState theirs)
The node
theirs changed in the persistence store while it has been
deleted locally. |
PartialConflictHandler.Resolution |
deleteChangedProperty(NodeBuilder parent,
PropertyState theirs)
The property
theirs changed in the persistence store while it has been
deleted locally. |
PartialConflictHandler.Resolution |
deleteDeletedNode(NodeBuilder parent,
java.lang.String name)
The node
name has been removed in parent while it was
also removed in the persistence store. |
PartialConflictHandler.Resolution |
deleteDeletedProperty(NodeBuilder parent,
PropertyState ours)
The property
ours has been removed in parent while it was
also removed in the persistence store. |
public CompositeConflictHandler(java.lang.Iterable<PartialConflictHandler> handlers)
CompositeConflictHandler with an initial set of
backing handler. Use addHandler(PartialConflictHandler) to add additional
handlers.handlers - the backing handlerspublic CompositeConflictHandler()
CompositeConflictHandler with no backing handlers.
backing handler. Use addHandler(PartialConflictHandler) to add handlers.public CompositeConflictHandler addHandler(PartialConflictHandler handler)
handler - public PartialConflictHandler.Resolution addExistingProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs)
ConflictHandlerours has been added to parent which conflicts
with property theirs which has been added in the persistence store.addExistingProperty in interface ConflictHandleraddExistingProperty in interface PartialConflictHandlerparent - root of the conflictours - our version of the propertytheirs - their version of the propertyResolution of the conflictpublic PartialConflictHandler.Resolution changeDeletedProperty(NodeBuilder parent, PropertyState ours)
ConflictHandlerours has been changed in parent while it was
removed in the persistence store.changeDeletedProperty in interface ConflictHandlerchangeDeletedProperty in interface PartialConflictHandlerparent - root of the conflictours - our version of the propertyResolution of the conflictpublic PartialConflictHandler.Resolution changeChangedProperty(NodeBuilder parent, PropertyState ours, PropertyState theirs)
ConflictHandlerours has been changed in parent while it was
also changed to a different value (theirs) in the persistence store.changeChangedProperty in interface ConflictHandlerchangeChangedProperty in interface PartialConflictHandlerparent - root of the conflictours - our version of the propertytheirs - their version of the propertyResolution of the conflictpublic PartialConflictHandler.Resolution deleteDeletedProperty(NodeBuilder parent, PropertyState ours)
ConflictHandlerours has been removed in parent while it was
also removed in the persistence store.deleteDeletedProperty in interface ConflictHandlerdeleteDeletedProperty in interface PartialConflictHandlerparent - root of the conflictours - our version of the propertyResolution of the conflictpublic PartialConflictHandler.Resolution deleteChangedProperty(NodeBuilder parent, PropertyState theirs)
ConflictHandlertheirs changed in the persistence store while it has been
deleted locally.deleteChangedProperty in interface ConflictHandlerdeleteChangedProperty in interface PartialConflictHandlerparent - root of the conflicttheirs - their version of the propertyResolution of the conflictpublic PartialConflictHandler.Resolution addExistingNode(NodeBuilder parent, java.lang.String name, NodeState ours, NodeState theirs)
ConflictHandlerours has been added to parent which conflicts
with node theirs which has been added in the persistence store.addExistingNode in interface ConflictHandleraddExistingNode in interface PartialConflictHandlerparent - root of the conflictname - name of the nodeours - our version of the nodetheirs - their version of the nodeResolution of the conflictpublic PartialConflictHandler.Resolution changeDeletedNode(NodeBuilder parent, java.lang.String name, NodeState ours)
ConflictHandlerours has been changed in parent while it was
removed in the persistence store.changeDeletedNode in interface ConflictHandlerchangeDeletedNode in interface PartialConflictHandlerparent - root of the conflictname - name of the nodeours - our version of the nodeResolution of the conflictpublic PartialConflictHandler.Resolution deleteChangedNode(NodeBuilder parent, java.lang.String name, NodeState theirs)
ConflictHandlertheirs changed in the persistence store while it has been
deleted locally.deleteChangedNode in interface ConflictHandlerdeleteChangedNode in interface PartialConflictHandlerparent - root of the conflictname - name of the nodetheirs - their version of the nodeResolution of the conflictpublic PartialConflictHandler.Resolution deleteDeletedNode(NodeBuilder parent, java.lang.String name)
ConflictHandlername has been removed in parent while it was
also removed in the persistence store.deleteDeletedNode in interface ConflictHandlerdeleteDeletedNode in interface PartialConflictHandlerparent - root of the conflictname - name of the nodeResolution of the conflict"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"