Class ComparisonManager
java.lang.Object
com._1c.g5.v8.dt.internal.compare.ComparisonManager
- All Implemented Interfaces:
IResourcePlan,IComparisonManager,ISymlinkTranslator,IComparisonProcessController,IBatchComparisonRunner,IMergeProcessor,IManagedService
@LifecycleService(name="COMPARISON_MANAGER")
public class ComparisonManager
extends Object
implements IComparisonManager, IComparisonProcessController, IBatchComparisonRunner, IMergeProcessor, ISymlinkTranslator, IResourcePlan
Default implementation of the comparison manager.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com._1c.g5.v8.dt.compare.core.IComparisonManager
IComparisonManager.ICompareMergeStatusListener -
Field Summary
FieldsFields inherited from interface com._1c.g5.v8.dt.compare.core.IComparisonManager
SERVICE_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanableToBreakCorrespondence(ComparisonProcessHandle handle, ComparisonNode node) Checks if there is a participant able to break a correspondence stored in the specified node.voidactivate()addNewTopObjectToComparison(IComparisonSession comparisonSession, String mainSymlink, org.eclipse.emf.ecore.EClass eClass) Adds a new object to the comparison.voidAdds a comparison status listener.org.eclipse.emf.ecore.EStructuralFeatureadoptMainSideFeature(org.eclipse.emf.ecore.EStructuralFeature mainSideFeature, IComparisonSession session) Converts, if possible, the main side feature into a other supported by the other side object.voidbreakCorrespondence(ComparisonContext comparisonContext, ComparisonNode node) Breaks correspondence represented by the specified model node with the help of a participant supporting this operation.voidbreakMainSideCorrespondence(IComparisonSession comparisonSession, ComparisonNode node) Breaks main side correspondence represented by the specified model node with the help of a participant supporting this operation.voidcancel(ComparisonProcessHandle handle) Cancels the compare/merge process defined by the specified handle and discards its comparison session.voidChecks the comparison for the memory overload.voidcombineOneSideNodes(ComparisonContext comparisonContext, ComparisonNode mainNode, ComparisonNode otherNode, List<Long> newNodeIds) Combines two complementing one-side nodes with the help of a participant supporting this operation.voidcompare(long topNodeId, ComparisonSession session, org.eclipse.core.runtime.IProgressMonitor monitor) Compares the specified result node of the specified session.voidNotifies the controller about finishing of all comparison processes of the specified batch.voiddeserializeMergeSettings(ComparisonProcessHandle handle, String mergeSettingsFileName) Reads the merge settings for the given comparison process from a xml-file or zip-file.Proclaim demands of resources for a given set of activities.getComparedObjects(IComparisonSession comparisonSession, ComparisonNode node, ComparisonContext comparisonContext) Returns compared objects for the specified node.Returns the comparison session for the specified comparison process handle.getDefaultMergeRule(ComparisonNode node, IComparisonSession session) Returns the default merge rule for the given node.getDefaultMustBeMerged(ComparisonNode node, IComparisonSession session) Returns the default must be merged value for the given node.getHandles(IV8Project v8Project) Returns handles of all sides of a comparison process with the specified V8 project.getMatchingSymlinks(ComparisonNode node, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference reference, ComparisonSide sourceSide, String symlink, ComparisonContext comparisonContext, IMergeSession mergeSession) For the specified symbolic link in the specified context on the specified side ("source side"), returns an object with this link on the specified target side and symbolic links (within the same context) of objects corresponding to the source object in the comparison model.getMatchingSymlinksToTopObject(ComparisonContext comparisonContext, String symlink, ComparisonSide side, IMergeSession mergeSession) Returns matched symlinks to the top object with the given symlink on a given comparison side.Returns a list of all merge problems found during merge validation and merge using external tool phases.getPotentialCorrespondingNodes(ComparisonProcessHandle handle, ComparisonNode node, ComparisonSide sourceSide) Returns a list of candidate nodes for setting as corresponding to the specified node.getPotentialMergeProblemsDescriptions(ComparisonNode node, ComparisonContext comparisonContext) Returns human-readable descriptions of merge problems of the specified node.getStatus(ComparisonProcessHandle handle) Returns the status of a comparison process managed by this.booleanTells if there any active comparison being executed at the moment.booleanisCandidateForPotentialMergeProblems(ComparisonNode node, IComparisonSession session) Tells whether the given node may break the configuration if it is merged.booleanisExcludedFromComparison(org.eclipse.emf.ecore.EStructuralFeature feature, AbstractComparedEmfObjects<?> comparedContextObjects, IComparisonSession session) Checks whether the feature is to be excluded from the comparison via any of existing comparison participants.voidlink()Participates thelinkingphase. Performs initialization steps only once, no matter how many times it is invoked.voidonResourceUnloading(ProjectContext context) Participates theresource unloadingphase. For more information seeLifecyclePhase.RESOURCE_UNLOADING.org.eclipse.core.runtime.IStatusperformComparisonProcess(ComparisonProcessHandle handle, org.eclipse.core.runtime.IProgressMonitor monitor) Performs the process of comparison for the specified handle.org.eclipse.core.runtime.IStatusperformMergeProcess(CompareMergeProcessBatch batch, org.eclipse.core.runtime.IProgressMonitor monitor) Performs merging for the specified compare/merge processes batch.voidRemoves a comparison status listener.voidrestoreCustomSettings(ComparisonNode node, SerializableMergeSettings container, IComparisonSession session) Restores custom settings for the specified node from the given merge settings container.voidRuns the comparison of the given batch.<T> TrunComparisonTreeBmModelReadonlyTask(IComparisonSession session, IBmTask<T> task) Executes the given read-only BM task in a comparison tree BM model of the specified session.<T> TrunComparisonTreeBmModelTask(IComparisonSession session, IBmTask<T> task) Executes the given BM task in a comparison tree BM model of the specified session.voidsaveCustomSettings(ComparisonNode node, SerializableMergeSettings container, IComparisonSession session) Saves custom settings for the specified node into the given merge settings container.voidserializeMergeSettings(Collection<ComparisonProcessHandle> handles, String mergeSettingsFileName) Serializes the merge settings for the given comparison session/-s to a zip-file.voidsetStrictOverloadCheckMode(boolean strict) Sets/resets the strict mode for the memory overload checks.voidshutdown()Performs the shutdown.voidSchedules asynchronous job that will start the comparison of projects specified by the given batch of compare/merge processes.org.eclipse.core.runtime.IStatusstartMerge(CompareMergeProcessBatch batch, org.eclipse.core.runtime.IProgressMonitor monitor) Schedules asynchronous job that will merge changes detected in the specified batch of compare/merge processes.voidstop(ComparisonProcessHandle handle) Forgets the compare/merge process defined by the specified handle and discards its comparison session.booleansupportsCustomMerging(IComparisonSession session, ComparisonNode node) Tells whether the given node supports custom merging.booleansupportsMergingUsingExternalTool(IComparisonSession session, ComparisonNode node) Tells whether the given node supports merging using external tool.booleansupportsPrioritizedMerging(IComparisonSession session, ComparisonNode node) Tells whether the given node supports prioritized merging.translateForImport(IMergeSession mergeSession, ComparisonNode node, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference reference, String symlink, ComparisonContext comparisonContext) Translates the specified symbolic link referencing an object on the OTHER side of comparison for the purposes of import, that is, when the reference is situated in an imported other object.voidupdateComparison(ComparisonContext comparisonContext, ComparisonNode node, List<Long> newNodeIds) Updates the comparison results for a given object.
-
Field Details
-
EXTENSION_POINT_ID
- See Also:
-
COMPARISON_JOB_FAMILY
- See Also:
-
-
Constructor Details
-
ComparisonManager
public ComparisonManager()Constructs an instance of the comparison manager.
-
-
Method Details
-
activate
public void activate()- Specified by:
activatein interfaceIManagedService
-
addStatusListener
Description copied from interface:IComparisonManagerAdds a comparison status listener.- Specified by:
addStatusListenerin interfaceIComparisonManager- Parameters:
listener- the status listener, notnull
-
compare
public void compare(long topNodeId, ComparisonSession session, org.eclipse.core.runtime.IProgressMonitor monitor) Description copied from interface:IComparisonProcessControllerCompares the specified result node of the specified session.- Specified by:
comparein interfaceIComparisonProcessController- Parameters:
topNodeId- the top node idsession- the comparison sessionmonitor- the progress monitor
-
deactivate
public void deactivate()- Specified by:
deactivatein interfaceIManagedService
-
getHandles
Description copied from interface:IComparisonManagerReturns handles of all sides of a comparison process with the specified V8 project.- Specified by:
getHandlesin interfaceIComparisonManager- Parameters:
v8Project- the V8 project, notnull- Returns:
- the handles, never
null
-
getStatus
Description copied from interface:IComparisonManagerReturns the status of a comparison process managed by this.- Specified by:
getStatusin interfaceIComparisonManager- Parameters:
handle- the handle of comparison, notnull- Returns:
- the status of comparison, may be
nullin case if the handle is not known to this
-
hasActiveComparison
public boolean hasActiveComparison()Description copied from interface:IComparisonManagerTells if there any active comparison being executed at the moment.- Specified by:
hasActiveComparisonin interfaceIComparisonManager- Returns:
trueif any comparison is being executed,falseotherwise
-
performComparisonProcess
public org.eclipse.core.runtime.IStatus performComparisonProcess(ComparisonProcessHandle handle, org.eclipse.core.runtime.IProgressMonitor monitor) Description copied from interface:IComparisonProcessControllerPerforms the process of comparison for the specified handle.- Specified by:
performComparisonProcessin interfaceIComparisonProcessController- Parameters:
handle- the comparison process handle, cannot benullmonitor- the progress monitor, cannot benull- Returns:
- the resulting status of the comparison process, never
null
-
comparisonFinished
Description copied from interface:IComparisonProcessControllerNotifies the controller about finishing of all comparison processes of the specified batch.- Specified by:
comparisonFinishedin interfaceIComparisonProcessController- Parameters:
batch- the batch whose comparison was finished, cannot benull
-
removeStatusListener
Description copied from interface:IComparisonManagerRemoves a comparison status listener.- Specified by:
removeStatusListenerin interfaceIComparisonManager- Parameters:
listener- the status listener, notnull
-
startComparison
Description copied from interface:IComparisonManagerSchedules asynchronous job that will start the comparison of projects specified by the given batch of compare/merge processes.- Specified by:
startComparisonin interfaceIComparisonManager- Parameters:
batch- the batch of compare/merge processes to start comparison for, cannot benullor empty
-
runComparison
Description copied from interface:IBatchComparisonRunnerRuns the comparison of the given batch.- Specified by:
runComparisonin interfaceIBatchComparisonRunner- Parameters:
batch- the batch to run comparison for, cannot benullor empty
-
stop
Description copied from interface:IComparisonManagerForgets the compare/merge process defined by the specified handle and discards its comparison session. Stops the whole batch of compare/merge processes this handle relates to if this batch is under active comparison. Does nothing if the process in under active merge.- Specified by:
stopin interfaceIComparisonManager- Parameters:
handle- the handle, notnull
-
cancel
Description copied from interface:IComparisonManagerCancels the compare/merge process defined by the specified handle and discards its comparison session. Stops the whole batch of compare/merge processes this handle relates to if this batch is under active comparison. Does nothing if the process in under active merge or merge already performed.- Specified by:
cancelin interfaceIComparisonManager- Parameters:
handle- the handle, notnull
-
startMerge
public org.eclipse.core.runtime.IStatus startMerge(CompareMergeProcessBatch batch, org.eclipse.core.runtime.IProgressMonitor monitor) Description copied from interface:IComparisonManagerSchedules asynchronous job that will merge changes detected in the specified batch of compare/merge processes.NOTE that it is not possible to schedule the job if the processes in the batch have not yet been fully compared.
- Specified by:
startMergein interfaceIComparisonManager- Parameters:
batch- the batch of compare/merge processes to start merge for, cannot benullor emptymonitor- the progress monitor, may benull- Returns:
Status.OK_STATUSif the merge job has been successfully scheduled, an error status otherwise
-
getMergeProblems
Description copied from interface:IComparisonManagerReturns a list of all merge problems found during merge validation and merge using external tool phases. The list will be empty if no problems found.NOTE that this method may only be called for processes that are in the
ComparisonProcessStatus.MERGE_PROCESS_USING_EXTERNAL_TOOL_FINISHEDorComparisonProcessStatus.MERGE_PROCESS_VALIDATION_FINISHEDstate, and an exception will be thrown otherwise.- Specified by:
getMergeProblemsin interfaceIComparisonManager- Parameters:
handle- the handle of the comparison process to get merge problems of, cannot benull- Returns:
- a list of merge problems, never
null
-
performMergeProcess
public org.eclipse.core.runtime.IStatus performMergeProcess(CompareMergeProcessBatch batch, org.eclipse.core.runtime.IProgressMonitor monitor) Description copied from interface:IMergeProcessorPerforms merging for the specified compare/merge processes batch.- Specified by:
performMergeProcessin interfaceIMergeProcessor- Parameters:
batch- the compare/merge processes batch to perform merge on, notnullmonitor- the progress monitor, notnull- Returns:
- the result merging status, never
null
-
getComparisonSession
Description copied from interface:IComparisonManagerReturns the comparison session for the specified comparison process handle.- Specified by:
getComparisonSessionin interfaceIComparisonManager- Parameters:
handle- the handle, notnull- Returns:
- the session, may be
nullif the handle is not known to the manager
-
getPotentialCorrespondingNodes
public List<ComparisonNode> getPotentialCorrespondingNodes(ComparisonProcessHandle handle, ComparisonNode node, ComparisonSide sourceSide) Description copied from interface:IComparisonManagerReturns a list of candidate nodes for setting as corresponding to the specified node.- Specified by:
getPotentialCorrespondingNodesin interfaceIComparisonManager- Parameters:
handle- the comparison process handle, notnullnode- the comparison result node to find potential correspondences for, notnullsourceSide- the source side of the correspondence, notnull- Returns:
- a list of comparison result nodes, never
null
-
ableToBreakCorrespondence
Description copied from interface:IComparisonManagerChecks if there is a participant able to break a correspondence stored in the specified node.- Specified by:
ableToBreakCorrespondencein interfaceIComparisonManager- Parameters:
handle- the comparison process handle, notnullnode- the node to check whether the correspondence represented by it can be broken, notnull- Returns:
trueif at least one participant is able to break the correspondence, andfalseotherwise
-
breakCorrespondence
Breaks correspondence represented by the specified model node with the help of a participant supporting this operation.- Parameters:
comparisonContext- the comparison context, cannot benullnode- the node with the correspondence to break, cannot benull
-
updateComparison
public void updateComparison(ComparisonContext comparisonContext, ComparisonNode node, List<Long> newNodeIds) Updates the comparison results for a given object. Usually it's a reset of already available object, etc.- Parameters:
comparisonContext- the comparison context. Cannot benull.node- The node to update comparison information for. Cannot benull.newNodeIds- the list of created new node Ids to fill by participants, notnull
-
addNewTopObjectToComparison
public TopComparisonNode addNewTopObjectToComparison(IComparisonSession comparisonSession, String mainSymlink, org.eclipse.emf.ecore.EClass eClass) Adds a new object to the comparison.- Parameters:
comparisonSession- The session to update into. Cannot benull.mainSymlink- the main symlinkeClass- the e class- Returns:
- the new top node created.
-
combineOneSideNodes
public void combineOneSideNodes(ComparisonContext comparisonContext, ComparisonNode mainNode, ComparisonNode otherNode, List<Long> newNodeIds) Combines two complementing one-side nodes with the help of a participant supporting this operation.- Parameters:
comparisonContext- the comparison context, cannot benullmainNode- the one-side MAIN node, cannot benullotherNode- the one-side OTHER node, cannot benullnewNodeIds- the list of new node Ids to fill by participants, notnull
-
getComparedObjects
public IComparedObjects<?> getComparedObjects(IComparisonSession comparisonSession, ComparisonNode node, ComparisonContext comparisonContext) Returns compared objects for the specified node.- Parameters:
comparisonSession- the comparison session, cannot benullnode- the node to get the compared objects for, cannot benullcomparisonContext- the current comparison context, cannot benull- Returns:
- the compared objects
-
getMatchingSymlinks
public IMatchingSymlinks getMatchingSymlinks(ComparisonNode node, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference reference, ComparisonSide sourceSide, String symlink, ComparisonContext comparisonContext, IMergeSession mergeSession) Description copied from interface:ISymlinkTranslatorFor the specified symbolic link in the specified context on the specified side ("source side"), returns an object with this link on the specified target side and symbolic links (within the same context) of objects corresponding to the source object in the comparison model.- Specified by:
getMatchingSymlinksin interfaceISymlinkTranslator- Parameters:
node- the comparison result nodeeObject- the EObject containing the symbolic linkreference- the reference of the linksourceSide- the source sidesymlink- the source symbolic linkcomparisonContext- the current comparison context, cannot benullmergeSession- the merge session ornull- Returns:
- an object with matching symbolic links where the source symbolic is on the source side
-
getMatchingSymlinksToTopObject
public IMatchingSymlinks getMatchingSymlinksToTopObject(ComparisonContext comparisonContext, String symlink, ComparisonSide side, IMergeSession mergeSession) Description copied from interface:ISymlinkTranslatorReturns matched symlinks to the top object with the given symlink on a given comparison side.- Specified by:
getMatchingSymlinksToTopObjectin interfaceISymlinkTranslator- Parameters:
comparisonContext- the comparison context, cannot benullsymlink- the top object symlink to be matched, cannot benullside- the comparison side where the top object lies, cannot benullmergeSession- the merge session, can benullif no merge process run- Returns:
- the triple of matched symlinks or
nullif no matched symlinks found
-
translateForImport
public String translateForImport(IMergeSession mergeSession, ComparisonNode node, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference reference, String symlink, ComparisonContext comparisonContext) Description copied from interface:ISymlinkTranslatorTranslates the specified symbolic link referencing an object on the OTHER side of comparison for the purposes of import, that is, when the reference is situated in an imported other object. An object is imported if it is present only on the OTHER side of comparison and is merged according to the merge settings. The translated symlink, if the original symlink was referencing an object having a correspondence on the MAIN side of comparison, will be the same as in thegetMatchingSymlinksmethod. If the symlink was pointing to an object not present on the MAIN side but imported in the specified session (or an object derived from one), the result will take into account the closest existing parent correspondence.- Specified by:
translateForImportin interfaceISymlinkTranslator- Parameters:
mergeSession- the merge sessionnode- the comparison result nodeeObject- the EObject containing the symbolic linkreference- the reference of the linksymlink- the symbolic link on the other sidecomparisonContext- the current comparison context, cannot benull- Returns:
- the symlink in terms of the main side after import
-
getDefaultMustBeMerged
Returns the default must be merged value for the given node.- Parameters:
node- the node to get default must be merged value for, can not benullsession- the comparison session, can not benull- Returns:
- the default must be merged value or
nullif it wasn't specified
-
runComparisonTreeBmModelTask
Executes the given BM task in a comparison tree BM model of the specified session.- Type Parameters:
T- the generic type- Parameters:
session- the session, cannot benulltask- the task to execute, cannot benull- Returns:
- the result returned by
IBmTask.execute(IBmTransaction, IProgressMonitor)method
-
runComparisonTreeBmModelReadonlyTask
Executes the given read-only BM task in a comparison tree BM model of the specified session.- Type Parameters:
T- the generic type- Parameters:
session- the session, cannot benulltask- the task to execute, cannot benull- Returns:
- the result returned by
IBmTask.execute(IBmTransaction, IProgressMonitor)method
-
supportsPrioritizedMerging
Tells whether the given node supports prioritized merging.- Parameters:
session- the session, cannot benullnode- the node to check, cannot benull- Returns:
trueif the node supports prioritized merging,falseotherwise
-
supportsCustomMerging
Tells whether the given node supports custom merging.- Parameters:
session- the session, cannot benullnode- the node to check, cannot benull- Returns:
trueif the node supports custom merging,falseotherwise
-
supportsMergingUsingExternalTool
Tells whether the given node supports merging using external tool.- Parameters:
session- the comparison session, cannot benullnode- the comparison node to check, cannot benull- Returns:
trueif the node supports merging using external tool,falseotherwise
-
breakMainSideCorrespondence
Breaks main side correspondence represented by the specified model node with the help of a participant supporting this operation.- Parameters:
comparisonSession- the session in which to break correspondence, can not be {@code null{ @param node the node with the correspondence to break, can not be {@code null}
-
gatherActivities
Description copied from interface:IResourcePlanProclaim demands of resources for a given set of activities.- Specified by:
gatherActivitiesin interfaceIResourcePlan- Returns:
- Returns
IActivityDemandsDefinitionmapped to respective name of the activity.
-
isExcludedFromComparison
public boolean isExcludedFromComparison(org.eclipse.emf.ecore.EStructuralFeature feature, AbstractComparedEmfObjects<?> comparedContextObjects, IComparisonSession session) Checks whether the feature is to be excluded from the comparison via any of existing comparison participants.- Parameters:
feature- the feature to check, cannot benullcomparedContextObjects- the triple of compared objects, cannot benullsession- the comparison session, cannot benull- Returns:
trueif the feature is to be excluded,falseotherwise
-
getDefaultMergeRule
Returns the default merge rule for the given node.- Parameters:
node- the node to get default merge rule for, can not benullsession- the comparison session, can not benull- Returns:
- the default merge rule or
nullif it wasn't specified
-
isCandidateForPotentialMergeProblems
public boolean isCandidateForPotentialMergeProblems(ComparisonNode node, IComparisonSession session) Tells whether the given node may break the configuration if it is merged.- Parameters:
node- the node to check, cannot benullsession- the comparison session, cannot benull- Returns:
trueif the node may break the configuration,falseotherwise
-
getPotentialMergeProblemsDescriptions
public List<PotentialMergeProblemDescription> getPotentialMergeProblemsDescriptions(ComparisonNode node, ComparisonContext comparisonContext) Returns human-readable descriptions of merge problems of the specified node.- Parameters:
node- the node to get merge problems descriptions for, cannot benullcomparisonContext- the comparison context, cannot benull- Returns:
- the list of descriptions, never
null, can be empty if the node doesn't bring any merge problems
-
saveCustomSettings
public void saveCustomSettings(ComparisonNode node, SerializableMergeSettings container, IComparisonSession session) Saves custom settings for the specified node into the given merge settings container. Does nothing if the node doesn't have any custom settings.- Parameters:
node- the comparison node to save custom settings for, cannot benullcontainer- the container of serializable settings, cannot benullsession- the comparison session, cannot benull
-
restoreCustomSettings
public void restoreCustomSettings(ComparisonNode node, SerializableMergeSettings container, IComparisonSession session) Restores custom settings for the specified node from the given merge settings container.- Parameters:
node- the comparison node to restore custom settings for, cannot benullcontainer- the container of serialized settings, cannot benullsession- the comparison session, cannot benull
-
adoptMainSideFeature
public org.eclipse.emf.ecore.EStructuralFeature adoptMainSideFeature(org.eclipse.emf.ecore.EStructuralFeature mainSideFeature, IComparisonSession session) Converts, if possible, the main side feature into a other supported by the other side object. Returns the given main side feature if no convert was found.- Parameters:
mainSideFeature- the main side feature to convert, cannot benullsession- the comparison session, cannot benull- Returns:
- the converted feature applicable for other side object or given main side feature
if no convert was found, never
null
-
checkForOverload
public void checkForOverload()Checks the comparison for the memory overload. Throws aComparisonMemoryOverloadExceptionin case of check failure and the strict mode is being enabled.- See Also:
-
setStrictOverloadCheckMode
public void setStrictOverloadCheckMode(boolean strict) Sets/resets the strict mode for the memory overload checks.- Parameters:
strict- The strict mode
-
link
Participates thelinkingphase. Performs initialization steps only once, no matter how many times it is invoked. -
shutdown
public void shutdown()Performs the shutdown.We do not call this method on unlinking phase as unlinking can be executed a few times per EDT session whereas this method must be executed exactly once.
-
onResourceUnloading
@LifecycleParticipant(phase=RESOURCE_UNLOADING, dependsOn="BM_MODEL_MANAGER") public void onResourceUnloading(ProjectContext context) Participates theresource unloadingphase. For more information seeLifecyclePhase.RESOURCE_UNLOADING.- Parameters:
context- the project context, cannot benull.- See Also:
-
serializeMergeSettings
public void serializeMergeSettings(Collection<ComparisonProcessHandle> handles, String mergeSettingsFileName) throws IOException Description copied from interface:IComparisonManagerSerializes the merge settings for the given comparison session/-s to a zip-file.- Specified by:
serializeMergeSettingsin interfaceIComparisonManager- Parameters:
handles- the comparison process handles to serialize merge settings for, cannot be or emptymergeSettingsFileName- the merge settings file name, cannot benull- Throws:
IOException- if a file serialization error occurred
-
deserializeMergeSettings
public RestoredMergeSettings deserializeMergeSettings(ComparisonProcessHandle handle, String mergeSettingsFileName) throws FileNotFoundException, IOException, InvalidPreferencesFormatException Description copied from interface:IComparisonManagerReads the merge settings for the given comparison process from a xml-file or zip-file.- Specified by:
deserializeMergeSettingsin interfaceIComparisonManager- Parameters:
handle- the comparison process handle to read merge settings for, cannot benullmergeSettingsFileName- the merge settings file name, may benull- Returns:
- the restored merge settings, can be
null - Throws:
FileNotFoundException- if the file does not exist, is a directory rather than a regular file, or for some other reason cannot be opened forreadingIOException- if an input/output operation was failed or interaptedInvalidPreferencesFormatException- unsupported version of input file serialization format
-