org.eclipse.emf.emfstore.internal.server.impl.api
Class ESConflictImpl

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.common.api.AbstractAPIImpl<ESConflict,ConflictBucket>
      extended by org.eclipse.emf.emfstore.internal.server.impl.api.ESConflictImpl
All Implemented Interfaces:
InternalAPIDelegator<ESConflict,ConflictBucket>, ESConflict

public class ESConflictImpl
extends AbstractAPIImpl<ESConflict,ConflictBucket>
implements ESConflict

Mapping between ESConflict and ConflictBucket.


Constructor Summary
ESConflictImpl(ConflictBucket internalType)
          Constructs a new instance by wrapping a ConflictBucket.
 
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.
 
Methods inherited from class org.eclipse.emf.emfstore.internal.common.api.AbstractAPIImpl
equals, hashCode, toInternalAPI
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ESConflictImpl

public ESConflictImpl(ConflictBucket internalType)
Constructs a new instance by wrapping a ConflictBucket.

Parameters:
internalType - the internal object
Method Detail

getLocalOperations

public 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.

Specified by:
getLocalOperations in interface ESConflict
Returns:
a set of operations
See Also:
ESConflict.getLocalOperations()

getRemoteOperations

public 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.

Specified by:
getRemoteOperations in interface ESConflict
Returns:
a set of operations
See Also:
ESConflict.getRemoteOperations()

resolveConflict

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

Specified by:
resolveConflict in interface ESConflict
Parameters:
acceptedLocalOperations - a list of local accepted operations
rejectedRemoteOperations - a list of rejected remote operations
See Also:
ESConflict.resolveConflict(java.util.Set, java.util.Set)


Copyright © 2015. All Rights Reserved.