|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMergeTask
A task description object for the IMergeProvider
.
An instance can be obtained via IMergeProvider.createTask()
.
Some values are required, some values are optional.
Depending on the provided data a Two-Way or a Three-Way merge may
be executed by the merge provider.
The contents of a IMergeTask
must not be modified in any way once it
has been completely filled with data.
Rationale:
Depending on the persistence provider used, it may not always be possible for a CPC Sensor and CPC Remote Store provider to obtain all the data needed for a Three-Way merge.
To allow maximum flexibility anIMergeProvider
must thus be able to handle Two-Way merges if the data required for a Three-Way merge can not be provided.
IMergeProvider
,
IMergeProvider.createTask()
Method Summary | |
---|---|
boolean |
isValid()
Checks whether this task is valid. |
void |
setBaseCloneFile(ICloneFile cloneFile)
The common base ICloneFile instance. |
void |
setBaseClones(java.util.List<IClone> clones)
The common base IClone instances. |
void |
setBaseSourceFileContent(java.lang.String content)
The common base source file content. |
void |
setLocalBaseInSyncHint(boolean localBaseInSyncHint)
Specifies whether the current revision is in sync with the base revision. |
void |
setLocalCloneFile(ICloneFile cloneFile)
The local ICloneFile instance (before the merge). |
void |
setLocalClones(java.util.List<IClone> clones)
The local IClone instances (before the merge). |
void |
setLocalSourceFileContent(java.lang.String content)
The local source file content before the merge. |
void |
setMergedSourceFileContent(java.lang.String content)
The result of the merge of the two source files. |
void |
setRemoteCloneFile(ICloneFile cloneFile)
The remote ICloneFile instance (before the merge). |
void |
setRemoteClones(java.util.List<IClone> clones)
The remote IClone instances (before the merge). |
void |
setRemoteSourceFileContent(java.lang.String content)
The remote source file content before the merge. |
java.lang.String |
toString()
All implementations should provide a meaningful toString() method for debugging purposes. |
Method Detail |
---|
void setLocalCloneFile(ICloneFile cloneFile)
ICloneFile
instance (before the merge).
Required value.
cloneFile
- old local clone file instance, never null.void setLocalClones(java.util.List<IClone> clones)
IClone
instances (before the merge).
Required value.
clones
- old local clones, may be empty, never null.void setLocalSourceFileContent(java.lang.String content)
Required value.
content
- old local content of the source file, never null.void setLocalBaseInSyncHint(boolean localBaseInSyncHint)
In some cases no information about the base revision might be available. However, the caller may still be able to determine whether the current local clone data was potentially modified or whether it can be guaranteed to be in sync with the base revision.
The default value is false which indicates that nothing is known about the synchronisation status between the local and the base revision.
If the caller can guarantee that the local clone data was not modified and that thus no merge is needed, this value should be set to true.
If this value is true a merge provider may simply "overwrite" the local clone data with the remote clone data without merging.
localBaseInSyncHint
- False (default) if local and base revision
might differ. True if local and base revision are guaranteed
to be in sync.void setRemoteCloneFile(ICloneFile cloneFile)
ICloneFile
instance (before the merge).
Required value.
cloneFile
- old remote clone file instance, never null.void setRemoteClones(java.util.List<IClone> clones)
IClone
instances (before the merge).
Required value.
clones
- old remote clones, may be empty, never null.void setRemoteSourceFileContent(java.lang.String content)
Required value.
content
- old remote content of the source file, may be NULL.void setBaseCloneFile(ICloneFile cloneFile)
ICloneFile
instance.
Optional value.
cloneFile
- common base clone file instance, may be NULL.void setBaseClones(java.util.List<IClone> clones)
IClone
instances.
Optional value.
clones
- common base clones, may be empty, may be NULL.void setBaseSourceFileContent(java.lang.String content)
Optional value.
content
- common base content of the source file, may be NULL.void setMergedSourceFileContent(java.lang.String content)
Required value.
content
- the content of the new source file on disk, never null.boolean isValid()
java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |