org.electrocodeogram.cpc.merge.api.strategy
Interface IWriteableMergeResult

All Superinterfaces:
IMergeResult

public interface IWriteableMergeResult
extends IMergeResult

Extension interface of IMergeResult which allows IMergeStrategys to incrementally build and modify the final IMergeResult of a merge operation.

All IClone instance lists which are part of the IMergeResultPerspectives and the ICloneFile instance which can be obtained from an IWriteableMergeResult (via the getters defined in IMergeResult) may be freely modified by an IMergeStrategy.

NOTE: The IMergeResult.getMergedClones() list must not be modified by a strategy. It is a cached, read-only list which is generated on demand.

Author:
vw

Nested Class Summary
static class IWriteableMergeResult.Type
          Specifies how a clone was affected by the merge operation.
 
Nested classes/interfaces inherited from interface org.electrocodeogram.cpc.core.api.provider.merge.IMergeResult
IMergeResult.Status
 
Method Summary
 void addClone(IClone clone, IWriteableMergeResult.Type localType, IWriteableMergeResult.Type remoteType)
          Adds the given clone to the clone lists of the local and remote perspective which correspond to the given types.
 void addCloneLocal(IClone clone, IWriteableMergeResult.Type localType)
          Adds the given clone to the clone lists of the local perspective which correspond to the given type.
 void addCloneRemote(IClone clone, IWriteableMergeResult.Type remoteType)
          Adds the given clone to the clone lists of the remote perspective which correspond to the given type.
 void addClones(java.util.Collection<IClone> clones, IWriteableMergeResult.Type localType, IWriteableMergeResult.Type remoteType)
          Adds the given clones to the clone lists of the local and remote perspective which correspond to the given types.
 void addClonesLocal(java.util.Collection<IClone> clones, IWriteableMergeResult.Type localType)
          Adds the given clones to the clone lists of the local perspective which correspond to the given type.
 void addClonesRemote(java.util.Collection<IClone> clones, IWriteableMergeResult.Type remoteType)
          Adds the given clones to the clone lists of the remote perspective which correspond to the given type.
 void setStatus(IMergeResult.Status status)
          Sets the new status for this merge.
 
Methods inherited from interface org.electrocodeogram.cpc.core.api.provider.merge.IMergeResult
getCloneFile, getLocalPerspective, getMergedClones, getRemotePerspective, getStatus, isFullyMerged, toString
 

Method Detail

setStatus

void setStatus(IMergeResult.Status status)
Sets the new status for this merge.
The default status is IMergeResult.Status#NO_MERGE.

Parameters:
status - the new status for the merge operation, never null.

addClone

void addClone(IClone clone,
              IWriteableMergeResult.Type localType,
              IWriteableMergeResult.Type remoteType)
Adds the given clone to the clone lists of the local and remote perspective which correspond to the given types.
Convenience method.


addClones

void addClones(java.util.Collection<IClone> clones,
               IWriteableMergeResult.Type localType,
               IWriteableMergeResult.Type remoteType)
Adds the given clones to the clone lists of the local and remote perspective which correspond to the given types.
Convenience method.


addCloneLocal

void addCloneLocal(IClone clone,
                   IWriteableMergeResult.Type localType)
Adds the given clone to the clone lists of the local perspective which correspond to the given type.
Convenience method.


addClonesLocal

void addClonesLocal(java.util.Collection<IClone> clones,
                    IWriteableMergeResult.Type localType)
Adds the given clones to the clone lists of the local perspective which correspond to the given type.
Convenience method.


addCloneRemote

void addCloneRemote(IClone clone,
                    IWriteableMergeResult.Type remoteType)
Adds the given clone to the clone lists of the remote perspective which correspond to the given type.
Convenience method.


addClonesRemote

void addClonesRemote(java.util.Collection<IClone> clones,
                     IWriteableMergeResult.Type remoteType)
Adds the given clones to the clone lists of the remote perspective which correspond to the given type.
Convenience method.