Package org.xwiki.diff
Class MergeConfiguration<E>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,Object>
-
- org.xwiki.diff.MergeConfiguration<E>
-
- Type Parameters:
E- the type of compared elements
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>
public class MergeConfiguration<E> extends HashMap<String,Object>
Setup merge behavior.- Version:
- $Id: 435063b4b11dca02f242e06f319765ba796e25cc $
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMergeConfiguration.VersionOne of the merged versions.-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static StringKEY_FALLBACKONCONFLICTThe name of the key used to setup the default fallback to use when finding a conflict.
-
Constructor Summary
Constructors Constructor Description MergeConfiguration()Create a default merge configuration without any decisions and with a fallback on current version by default.MergeConfiguration(List<ConflictDecision<E>> conflictDecisions)Create a merge configuration with the given list of decisions and a fallback to current version by default.MergeConfiguration(MergeConfiguration.Version version, List<ConflictDecision<E>> conflictDecisions)Crate a merge configuration with the given fallback version and the given conflict decisions to be taken.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ConflictDecision<E>>getConflictDecisionList()MergeConfiguration.VersiongetFallbackOnConflict()voidsetConflictDecisionList(List<ConflictDecision<E>> conflictDecisionList)Set the list of conflict decision to be taken.voidsetFallbackOnConflict(MergeConfiguration.Version version)-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
-
-
-
Field Detail
-
KEY_FALLBACKONCONFLICT
public static final String KEY_FALLBACKONCONFLICT
The name of the key used to setup the default fallback to use when finding a conflict.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MergeConfiguration
public MergeConfiguration(List<ConflictDecision<E>> conflictDecisions)
Create a merge configuration with the given list of decisions and a fallback to current version by default.- Parameters:
conflictDecisions- the decisions to be taken in case of conflict.- Since:
- 11.7RC1
-
MergeConfiguration
public MergeConfiguration(MergeConfiguration.Version version, List<ConflictDecision<E>> conflictDecisions)
Crate a merge configuration with the given fallback version and the given conflict decisions to be taken.- Parameters:
version- the fallback version.conflictDecisions- the decisions to be taken in case of conflict.- Since:
- 11.7RC1
-
MergeConfiguration
public MergeConfiguration()
Create a default merge configuration without any decisions and with a fallback on current version by default.
-
-
Method Detail
-
setFallbackOnConflict
public void setFallbackOnConflict(MergeConfiguration.Version version)
- Parameters:
version- the version to fallback on when finding a conflict. Default isMergeConfiguration.Version.CURRENT.
-
getFallbackOnConflict
public MergeConfiguration.Version getFallbackOnConflict()
- Returns:
- the version to fallback on when finding a conflict. Default is
MergeConfiguration.Version.CURRENT.
-
getConflictDecisionList
public List<ConflictDecision<E>> getConflictDecisionList()
- Returns:
- the list of decisions to be taken in case of conflicts.
- Since:
- 11.7RC1
-
setConflictDecisionList
public void setConflictDecisionList(List<ConflictDecision<E>> conflictDecisionList)
Set the list of conflict decision to be taken. This list of decision is consumed inDiffManager.merge(List, List, List, MergeConfiguration).- Parameters:
conflictDecisionList- the new conflict decision list.- Since:
- 11.7RC1
-
-