org.electrocodeogram.cpc.core.api.provider.merge
Interface IMergeResult

All Known Subinterfaces:
IWriteableMergeResult

public interface IMergeResult

A result wrapper object for the IMergeProvider.

Author:
vw
See Also:
IMergeProvider, IMergeProvider.merge(IMergeTask)

Nested Class Summary
static class IMergeResult.Status
          Possible result status values for a merge operation.
 
Method Summary
 ICloneFile getCloneFile()
          The new ICloneFile data for the merged file.
 IMergeResultPerspective getLocalPerspective()
          Description of the merge implications from the perspective of the local clone data.
 java.util.List<IClone> getMergedClones()
          A list of the final IClone instances for the merged source file.
 IMergeResultPerspective getRemotePerspective()
          Description of the merge implications from the perspective of the remote clone data.
 IMergeResult.Status getStatus()
          Information about the success or failure of this merge operation.
 boolean isFullyMerged()
          Checks whether this result represents a fully merged state.
 java.lang.String toString()
          All implementations should provide a meaningful toString() method for debugging purposes.
 

Method Detail

getStatus

IMergeResult.Status getStatus()
Information about the success or failure of this merge operation.

Returns:
status of the merge operation, never null.
See Also:
IMergeResult.Status

isFullyMerged

boolean isFullyMerged()
Checks whether this result represents a fully merged state.
Convenience method.

Returns:
true if getStatus() is IMergeResult.Status.FULL_MERGE.

getCloneFile

ICloneFile getCloneFile()
The new ICloneFile data for the merged file.

Returns:
merged ICloneFile, never null.

getLocalPerspective

IMergeResultPerspective getLocalPerspective()
Description of the merge implications from the perspective of the local clone data.

This is the perspective needed to update the local IStoreProvider.

Returns:
local perspective of the merge implications, never null.
See Also:
IMergeResultPerspective

getRemotePerspective

IMergeResultPerspective getRemotePerspective()
Description of the merge implications from the perspective of the remote clone data.

In most cases a client will probably only need the getLocalPerspective() or getMergedClones().

Returns:
remote perspective of the merge implications, never null.
See Also:
IMergeResultPerspective

getMergedClones

java.util.List<IClone> getMergedClones()
A list of the final IClone instances for the merged source file.
The list does not contain duplicates.

This data might be calculated on demand. A call might therefore be expensive.
This method is not guaranteed to be thread save.

This is equivalent to (after removing duplicates):
getAddedClones()+getMovedClones()+getModifiedClones()+getUnchangedClones()

A client which only intents to update an IStoreProvider will not need this information.

The order of the IClone instances in this list is not defined.

Returns:
a complete list of IClone instances for the final merged source file, may be empty, never null.

toString

java.lang.String toString()
All implementations should provide a meaningful toString() method for debugging purposes.

Overrides:
toString in class java.lang.Object