org.eclipse.emf.emfstore.server
Interface ESConflict

All Known Implementing Classes:
ESConflictImpl

public interface ESConflict

Represents conflict operations. Conflicting operations change the contents of a project, that is its model elements and their containment tree in way that is overlapping. For example the conflicting operations might try to delete and alter an EObject at the same time.

Author:
mkoegel

Method Summary
 Set<ESOperation> getLocalOperations()
          The involved local operations.
 Set<ESOperation> getRemoteOperations()
          The involved remote operations.
 void resolveConflict(Set<ESOperation> acceptedLocalOperations, Set<ESOperation> rejectedRemoteOperations)
          Resolve the conflict by accepting the given local operations and rejecting the given remote operations.
 

Method Detail

getLocalOperations

Set<ESOperation> getLocalOperations()
The involved local operations. These operations are negotiable. This means they have not been committed as part of a revision on the current branch. Rejecting them is easy, they can just be dropped. The local operations are the users local operations that have not been committed yet or the operations of a another branch that is merged into the current branch.

Returns:
a set of operations

getRemoteOperations

Set<ESOperation> getRemoteOperations()
The involved remote operations. These operations are non-negotiable. This means they have already been committed as part of a revision on the current branch. They have to be reverted if they are rejected. This means a counter operation canceling out the original operation will need to be calculated. The remote operations are usually their operations (operations of other committers, that are committed to the server already) or the operations of the current branch if another branch is merged into that branch.

Returns:
a set of operations

resolveConflict

void resolveConflict(Set<ESOperation> acceptedLocalOperations,
                     Set<ESOperation> rejectedRemoteOperations)
Resolve the conflict by accepting the given local operations and rejecting the given remote operations.

Parameters:
acceptedLocalOperations - a list of local accepted operations
rejectedRemoteOperations - a list of rejected remote operations


Copyright © 2015. All Rights Reserved.