Package com.xpn.xwiki.doc.merge
Class MergeConfiguration
- java.lang.Object
-
- com.xpn.xwiki.doc.merge.MergeConfiguration
-
public class MergeConfiguration extends Object
Allow to define some behaviors of the merge.- Since:
- 3.2M1
- Version:
- $Id: c1f7b2cda92c00d51a14701175c6906741da7437 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MergeConfiguration.ConflictFallbackVersion
Versions to use as fallback in case of conflicts.
-
Constructor Summary
Constructors Constructor Description MergeConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentReference
getConcernedDocument()
MergeConfiguration.ConflictFallbackVersion
getConflictFallbackVersion()
Get the version to use as fallback in case of conflict: this is the version that is used inMergeManagerResult.getMergeResult()
whenever a conflict is found.EntityReference
getUserReference()
boolean
isProvidedVersionsModifiables()
Indicate of the provided previous/new document can be modified.void
setConcernedDocument(DocumentReference concernedDocument)
Specify which document is currently merged.void
setConflictFallbackVersion(MergeConfiguration.ConflictFallbackVersion conflictFallbackVersion)
Specify the version to use as fallback in case of conflict.void
setProvidedVersionsModifiables(boolean providedVersionsModifiables)
void
setUserReference(EntityReference userReference)
Specify which user is performing the merge.
-
-
-
Method Detail
-
setProvidedVersionsModifiables
public void setProvidedVersionsModifiables(boolean providedVersionsModifiables)
- Parameters:
providedVersionsModifiables
- true if the merge is allowed to modify input elements
-
isProvidedVersionsModifiables
public boolean isProvidedVersionsModifiables()
Indicate of the provided previous/new document can be modified.By default merge can modify provided documents for performances reasons. For example when the new version of the document contains a new object it's directly moved without being cloned.
- Returns:
- true if merge is allowed to modify provided versions
-
getConcernedDocument
public DocumentReference getConcernedDocument()
- Returns:
- the reference of the document concerned by this merge.
-
setConcernedDocument
public void setConcernedDocument(DocumentReference concernedDocument)
Specify which document is currently merged.- Parameters:
concernedDocument
- the reference to the document that is merged.- Since:
- 11.8RC1
-
getUserReference
public EntityReference getUserReference()
- Returns:
- the reference of the user performing the merge.
- Since:
- 11.8RC1
-
setUserReference
public void setUserReference(EntityReference userReference)
Specify which user is performing the merge.- Parameters:
userReference
- the reference to the user doing the merge.- Since:
- 11.8RC1
-
getConflictFallbackVersion
@Unstable public MergeConfiguration.ConflictFallbackVersion getConflictFallbackVersion()
Get the version to use as fallback in case of conflict: this is the version that is used inMergeManagerResult.getMergeResult()
whenever a conflict is found. When not set the default value isMergeConfiguration.ConflictFallbackVersion.CURRENT
.- Returns:
- the version to use as fallback
- Since:
- 15.2RC1, 14.10.7
-
setConflictFallbackVersion
@Unstable public void setConflictFallbackVersion(MergeConfiguration.ConflictFallbackVersion conflictFallbackVersion)
Specify the version to use as fallback in case of conflict.- Parameters:
conflictFallbackVersion
- the fallback version to use- Since:
- 15.2RC1, 14.10.7
- See Also:
getConflictFallbackVersion()
-
-