Package org.xwiki.store.merge
Class MergeManagerResult<R,C>
- java.lang.Object
-
- org.xwiki.store.merge.MergeManagerResult<R,C>
-
- Type Parameters:
R
- the type of the merge resultC
- the type of the conflicts
- Direct Known Subclasses:
MergeDocumentResult
public class MergeManagerResult<R,C> extends Object
This represents the result of a merge operation: it contains both the result of the merge, the possible conflicts that happened during the merge, and the logs.The merge result and the conflict might have distinct types: for example, a merge performed on
String
by splitting it by characters, will expect aString
result type, but aCharacter
conflict type.- Since:
- 11.8RC1
- Version:
- $Id: b24e0b26ef389d5be6768befa28ed9a57c2b29a9 $
-
-
Constructor Summary
Constructors Constructor Description MergeManagerResult()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConflicts(List<org.xwiki.diff.Conflict<C>> conflicts)
Add some conflicts returned by aMergeResult
inside this result.boolean
equals(Object o)
List<org.xwiki.diff.Conflict<C>>
getConflicts()
org.xwiki.logging.LogQueue
getLog()
R
getMergeResult()
boolean
hasConflicts()
int
hashCode()
boolean
isModified()
void
setLog(org.xwiki.logging.LogQueue logQueue)
Specify the log queue to be used: this method should mainly be used when wrapping a result.void
setMergeResult(R result)
Set the result obtained during the merge.void
setModified(boolean modified)
String
toString()
-
-
-
Method Detail
-
isModified
public boolean isModified()
- Returns:
true
if the merge result version is different than the current one.
-
setModified
public void setModified(boolean modified)
- Parameters:
modified
- settrue
if the merge result is different than the current version.
-
addConflicts
public void addConflicts(List<org.xwiki.diff.Conflict<C>> conflicts)
Add some conflicts returned by aMergeResult
inside this result.- Parameters:
conflicts
- the conflicts to add
-
getConflicts
public List<org.xwiki.diff.Conflict<C>> getConflicts()
- Returns:
- all the conflicts occured during this merge
-
setMergeResult
public void setMergeResult(R result)
Set the result obtained during the merge.- Parameters:
result
- the result of the merge operation.
-
getMergeResult
public R getMergeResult()
- Returns:
- the resulted object of the merge.
-
setLog
@Unstable public void setLog(org.xwiki.logging.LogQueue logQueue)
Specify the log queue to be used: this method should mainly be used when wrapping a result.- Parameters:
logQueue
- the log queue to be used.- Since:
- 14.10.7, 15.2RC1
-
getLog
public org.xwiki.logging.LogQueue getLog()
- Returns:
- the log associated to the merge
-
hasConflicts
public boolean hasConflicts()
- Returns:
true
if at least one conflict occured during the merge operation.
-
-