Package org.xwiki.store.merge
Class MergeDocumentResult
- java.lang.Object
-
- org.xwiki.store.merge.MergeManagerResult<DocumentModelBridge,Object>
-
- org.xwiki.store.merge.MergeDocumentResult
-
public class MergeDocumentResult extends MergeManagerResult<DocumentModelBridge,Object>
Store information about a merge operation of documents. This object stores the three documents used for the merge, and all results of the different parts of the documents. SeeputMergeResult(DocumentPart, MergeManagerResult)
for more information.- Since:
- 11.5RC1
- Version:
- $Id: d85ec1e2fca314725e6a916d27da29b26e821c66 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MergeDocumentResult.DocumentPart
Represents the different parts of a document that are merged.
-
Constructor Summary
Constructors Constructor Description MergeDocumentResult(DocumentModelBridge currentDocument, DocumentModelBridge previousDocument, DocumentModelBridge nextDocument)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
List<org.xwiki.diff.Conflict<?>>
getConflicts(MergeDocumentResult.DocumentPart documentPart)
Retrieve the conclicts that occurred during merging a specific part of the document.DocumentModelBridge
getCurrentDocument()
MergeManagerResult
getMergeResult(MergeDocumentResult.DocumentPart documentPart)
DocumentModelBridge
getNextDocument()
DocumentModelBridge
getPreviousDocument()
int
hashCode()
void
putMergeResult(MergeDocumentResult.DocumentPart documentPart, MergeManagerResult mergeManagerResult)
Stores the result of merging a part of the document.String
toString()
-
Methods inherited from class org.xwiki.store.merge.MergeManagerResult
addConflicts, getConflicts, getLog, getMergeResult, hasConflicts, isModified, setLog, setMergeResult, setModified
-
-
-
-
Constructor Detail
-
MergeDocumentResult
public MergeDocumentResult(DocumentModelBridge currentDocument, DocumentModelBridge previousDocument, DocumentModelBridge nextDocument)
Default constructor.- Parameters:
currentDocument
- the current document used for the merge.previousDocument
- the previous document used for the merge.nextDocument
- the next document used for the merge.- Since:
- 11.8RC1
-
-
Method Detail
-
getCurrentDocument
public DocumentModelBridge getCurrentDocument()
- Returns:
- the current document.
-
getPreviousDocument
public DocumentModelBridge getPreviousDocument()
- Returns:
- the previous document.
-
getNextDocument
public DocumentModelBridge getNextDocument()
- Returns:
- the next document.
-
putMergeResult
public void putMergeResult(MergeDocumentResult.DocumentPart documentPart, MergeManagerResult mergeManagerResult)
Stores the result of merging a part of the document. This allows to easily retrieve the information of merging a specific portion of the document. All logs and conflicts are automatically retrieved from the givenMergeManagerResult
and stored in the current object.- Parameters:
documentPart
- the part of the document that has been merged.mergeManagerResult
- the result of the given merge operation.- Since:
- 11.8RC1
-
getMergeResult
public MergeManagerResult getMergeResult(MergeDocumentResult.DocumentPart documentPart)
- Parameters:
documentPart
- a document part that has been merged- Returns:
- the information result object of the part merge
- Since:
- 11.8RC1
-
getConflicts
public List<org.xwiki.diff.Conflict<?>> getConflicts(MergeDocumentResult.DocumentPart documentPart)
Retrieve the conclicts that occurred during merging a specific part of the document.- Parameters:
documentPart
- the part of the document that has been merged.- Returns:
- a list of conflicts or null. The parameter type of conflicts depends on the document part.
- Since:
- 11.8RC1
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classMergeManagerResult<DocumentModelBridge,Object>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classMergeManagerResult<DocumentModelBridge,Object>
-
toString
public String toString()
- Overrides:
toString
in classMergeManagerResult<DocumentModelBridge,Object>
-
-