@Role
@Unstable
public interface MergeManager
Modifier and Type | Method and Description |
---|---|
MergeManagerResult<String,Character> |
mergeCharacters(String previousStr,
String newStr,
String currentStr,
MergeConfiguration configuration)
Perform a 3-way merge between the given strings by first splitting them into arrays of characters.
|
MergeDocumentResult |
mergeDocument(DocumentModelBridge previousDoc,
DocumentModelBridge nextDoc,
DocumentModelBridge currentDoc,
MergeConfiguration mergeConfiguration)
Perform a 3-way merge between documents.
|
MergeManagerResult<String,String> |
mergeLines(String previousStr,
String newStr,
String currentStr,
MergeConfiguration configuration)
Perform a 3-way merge between the given strings by first splitting them into lines.
|
<T> MergeManagerResult<List<T>,T> |
mergeList(List<T> commonAncestor,
List<T> next,
List<T> current,
MergeConfiguration configuration)
Perform a 3-way merge between the list of elements.
|
<T> MergeManagerResult<T,T> |
mergeObject(T previousObject,
T newObject,
T currentObject,
MergeConfiguration configuration)
Perform a 3-way merge between the given objects.
|
MergeManagerResult<String,String> mergeLines(String previousStr, String newStr, String currentStr, MergeConfiguration configuration)
The comparison is performed line by line.
previousStr
- the previous string.newStr
- the new string.currentStr
- the current string.configuration
- the configuration for the merge operation.<T> MergeManagerResult<T,T> mergeObject(T previousObject, T newObject, T currentObject, MergeConfiguration configuration)
T
- the type of the objectpreviousObject
- the previous object.newObject
- the new object.currentObject
- the current object.configuration
- the configuration for the merge operation.MergeManagerResult<String,Character> mergeCharacters(String previousStr, String newStr, String currentStr, MergeConfiguration configuration)
The comparison is performed character by character.
previousStr
- the previous string.newStr
- the new string.currentStr
- the current string.configuration
- the configuration for the merge operation.<T> MergeManagerResult<List<T>,T> mergeList(List<T> commonAncestor, List<T> next, List<T> current, MergeConfiguration configuration)
The current list is modified during the operation.
T
- the type of elements.commonAncestor
- the previous list.next
- the next list.current
- the current list.configuration
- the configuration for the merge operation.MergeDocumentResult mergeDocument(DocumentModelBridge previousDoc, DocumentModelBridge nextDoc, DocumentModelBridge currentDoc, MergeConfiguration mergeConfiguration)
Note that if MergeConfiguration.isProvidedVersionsModifiables()
is false
then the current
document is cloned before the merge operation, else the given current document is directly modified for
performance.
previousDoc
- the previous document.nextDoc
- the next document.currentDoc
- the current document.mergeConfiguration
- the configuration.Copyright © 2004–2021 XWiki. All rights reserved.