Package com._1c.g5.v8.dt.compare.core
Class ComparisonProcessSettings
- java.lang.Object
-
- com._1c.g5.v8.dt.compare.core.ComparisonProcessSettings
-
- All Implemented Interfaces:
IComparisonProcessSettings
public class ComparisonProcessSettings extends Object implements IComparisonProcessSettings
Basic implementation of comparison process settings with a builder.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ComparisonProcessSettings.ComparisonSettingsBuilder
A builder of comparison process settings objects.
-
Constructor Summary
Constructors Constructor Description ComparisonProcessSettings(MatchingStrategy matchingStrategy, List<ObjectsTriple<String>> correspondences, IMergeSettingsModel mergeSettingsModel)
Constructs a settings object with the specified values.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ComparisonProcessSettings.ComparisonSettingsBuilder
builder(MatchingStrategy matchingStrategy)
Returns a builder of comparison process settings.List<ObjectsTriple<String>>
getCorrespondences()
Returns the list of explicit correspondences between main and other objects and their common ancestor (optional) that must be used in the process.String
getIntegrationSettingsName()
Gets the integration settings name.IEObjectTrie
getMainSideModifiedObjectsTrie()
Returns the trie of main side modified (changed, added, deleted) objects compared to the ancestor side.MatchingStrategy
getMatchingStrategy()
Returns the MD object matching strategy.IMergeSettingsModel
getMergeSettingsModel()
Returns model of restored merge settings.IEObjectTrie
getOtherSideModifiedObjectsTrie()
Returns the trie of other side modified (changed, added, deleted) objects compared to the ancestor side.String
getPlatformSupplySettingsFileName()
Gets the platform supply settings file name.boolean
isAvoidExternalMergeToolSupport()
Tells whether to avoid the external merge tool support.boolean
isMainSideObjectsDeletionAllowed()
Checks whether the main side object deletion is allowed.boolean
isMergeObjectsContent()
Checks is merge objects content only.boolean
isMergeWithInfobase()
Checks whether the compare/merge is with the infobase.boolean
isParseBslModuleStructure()
Tells whether to compare and merge a Bsl module with parsing module structure.void
setIntegrationSettingsName(String integrationSettingsName)
Sets the integration settings set name.void
setPlatformSupplySettingsFileName(String fileName)
Sets the platform supply settings file name.void
setRestoredMergeSettings(RestoredMergeSettings restoredMergeSettings)
Sets the restored merge settings.
-
-
-
Constructor Detail
-
ComparisonProcessSettings
public ComparisonProcessSettings(MatchingStrategy matchingStrategy, List<ObjectsTriple<String>> correspondences, IMergeSettingsModel mergeSettingsModel)
Constructs a settings object with the specified values.Note. The recommended way of instantiation is via the provided factory builder.
- Parameters:
matchingStrategy
- the matching strategy,not null
correspondences
- a list of triple of symbolic links defining the correspondences, notnull
mergeSettingsModel
- restored model of merge settings, can benull
-
-
Method Detail
-
getMatchingStrategy
public MatchingStrategy getMatchingStrategy()
Description copied from interface:IComparisonProcessSettings
Returns the MD object matching strategy.- Specified by:
getMatchingStrategy
in interfaceIComparisonProcessSettings
- Returns:
- the MD object matching strategy
-
getCorrespondences
public List<ObjectsTriple<String>> getCorrespondences()
Description copied from interface:IComparisonProcessSettings
Returns the list of explicit correspondences between main and other objects and their common ancestor (optional) that must be used in the process.- Specified by:
getCorrespondences
in interfaceIComparisonProcessSettings
- Returns:
- the list of explicit correspondences as triple of strings, where the first string is the symbolic link of the main
object, the second string is the symbolic link of the other object, the third string is the symbolic link of the
ancestor object (optional).
Main or other object (but not both) may be
null
, which means that the specified (non-null) object must be excluded from matching on the opposite side (if main non-null - other side is opposite, if other side non-null - main side is opposite). Ancestor object may benull
, which means that main and other object do not have a correspondence with common ancestor side.
-
getMergeSettingsModel
public IMergeSettingsModel getMergeSettingsModel()
Description copied from interface:IComparisonProcessSettings
Returns model of restored merge settings.- Specified by:
getMergeSettingsModel
in interfaceIComparisonProcessSettings
- Returns:
- merge settings model, can be
null
-
getMainSideModifiedObjectsTrie
public IEObjectTrie getMainSideModifiedObjectsTrie()
Description copied from interface:IComparisonProcessSettings
Returns the trie of main side modified (changed, added, deleted) objects compared to the ancestor side. It is actual for merge with infobase case.- Specified by:
getMainSideModifiedObjectsTrie
in interfaceIComparisonProcessSettings
- Returns:
- the trie of main side modified objects compared to the ancestor side, may be
null
if the trie wasn't specified
-
getOtherSideModifiedObjectsTrie
public IEObjectTrie getOtherSideModifiedObjectsTrie()
Description copied from interface:IComparisonProcessSettings
Returns the trie of other side modified (changed, added, deleted) objects compared to the ancestor side. It is actual for merge with infobase case.- Specified by:
getOtherSideModifiedObjectsTrie
in interfaceIComparisonProcessSettings
- Returns:
- the trie of other side modified objects compared to the ancestor side, may be
null
if the trie wasn't specified
-
isParseBslModuleStructure
public boolean isParseBslModuleStructure()
Description copied from interface:IComparisonProcessSettings
Tells whether to compare and merge a Bsl module with parsing module structure.- Specified by:
isParseBslModuleStructure
in interfaceIComparisonProcessSettings
- Returns:
true
if compare and merge a Bsl module with parsing module structure,false
otherwise
-
builder
public static ComparisonProcessSettings.ComparisonSettingsBuilder builder(MatchingStrategy matchingStrategy)
Returns a builder of comparison process settings.- Parameters:
matchingStrategy
-- Returns:
- a builder of comparison process settings
-
isMergeWithInfobase
public boolean isMergeWithInfobase()
Description copied from interface:IComparisonProcessSettings
Checks whether the compare/merge is with the infobase. The collection of the main side changed objects compared to the ancestor side should be specified.- Specified by:
isMergeWithInfobase
in interfaceIComparisonProcessSettings
- Returns:
true
if the object deletion is allowed for 2-way merge,false
otherwise
-
isMainSideObjectsDeletionAllowed
public boolean isMainSideObjectsDeletionAllowed()
Description copied from interface:IComparisonProcessSettings
Checks whether the main side object deletion is allowed.- Specified by:
isMainSideObjectsDeletionAllowed
in interfaceIComparisonProcessSettings
- Returns:
true
if the main side object deletion is allowed,false
otherwise
-
setRestoredMergeSettings
public void setRestoredMergeSettings(RestoredMergeSettings restoredMergeSettings)
Description copied from interface:IComparisonProcessSettings
Sets the restored merge settings. Only for initialization settings.- Specified by:
setRestoredMergeSettings
in interfaceIComparisonProcessSettings
- Parameters:
restoredMergeSettings
- - container with restored merge settings, can benull
-
setIntegrationSettingsName
public void setIntegrationSettingsName(String integrationSettingsName)
Description copied from interface:IComparisonProcessSettings
Sets the integration settings set name.- Specified by:
setIntegrationSettingsName
in interfaceIComparisonProcessSettings
- Parameters:
integrationSettingsName
- The name of the integration settings set. Can benull
-
getIntegrationSettingsName
public String getIntegrationSettingsName()
Description copied from interface:IComparisonProcessSettings
Gets the integration settings name.- Specified by:
getIntegrationSettingsName
in interfaceIComparisonProcessSettings
- Returns:
- The name of integration settings set. Can be
null
-
setPlatformSupplySettingsFileName
public void setPlatformSupplySettingsFileName(String fileName)
Description copied from interface:IComparisonProcessSettings
Sets the platform supply settings file name.- Specified by:
setPlatformSupplySettingsFileName
in interfaceIComparisonProcessSettings
- Parameters:
fileName
- The name of the file. Can benull
-
getPlatformSupplySettingsFileName
public String getPlatformSupplySettingsFileName()
Description copied from interface:IComparisonProcessSettings
Gets the platform supply settings file name.- Specified by:
getPlatformSupplySettingsFileName
in interfaceIComparisonProcessSettings
- Returns:
- The name of the file. Can be
null
-
isMergeObjectsContent
public boolean isMergeObjectsContent()
Description copied from interface:IComparisonProcessSettings
Checks is merge objects content only.- Specified by:
isMergeObjectsContent
in interfaceIComparisonProcessSettings
- Returns:
true
if merge objects content only,false
otherwise
-
isAvoidExternalMergeToolSupport
public boolean isAvoidExternalMergeToolSupport()
Description copied from interface:IComparisonProcessSettings
Tells whether to avoid the external merge tool support.- Specified by:
isAvoidExternalMergeToolSupport
in interfaceIComparisonProcessSettings
- Returns:
true
if avoid the external merge tool support,false
otherwise
-
-