Package com._1c.g5.v8.dt.internal.merge
Class MergeSession
java.lang.Object
com._1c.g5.v8.dt.internal.merge.MergeSession
- All Implemented Interfaces:
IMergeSession
The internal implementation of the merge session.
-
Constructor Summary
ConstructorsConstructorDescriptionMergeSession(ComparisonSession comparisonSession, ILibraryRegistry libraryRegistry) Constructs a merge session. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPostponedFileOperation(IPostponedFileOperation operation) Adds a postponed file operation.Returns the BM model.Returns the comparison session this merge session is based on.Returns the id of the imported BM object registered for the specified node.getImportedObjectSymlink(String otherSymlink) In case when a partial other datasource object is to be merged according to current settings, returns the symbolic link of the object in terms of the main datasource, ornullif the other object will not be imported.Returns the library descriptor change type during the merge.Returns the main data source of the session.Returns the runtime version of the main datasource.Gets actual symbolic link (a.k.a.Gets the list of postponed file operations in the order of addition.getRenamingObjectNewSymlink(String symlinkBeforeRename) Gets symbolic link of a renaming object after rename operation finish, if it registered byIMergeSession.registerRenamingObjectSymlink(String, String).voidregisterImportedObject(ComparisonNode node, IBmObject importedEmfObject) Registers a BM object imported during the merge of the specified node.voidregisterRenamingObject(SymlinkComparisonNode node, String newSymlink) Registers a new symbolic link of the object to be renamed during the merge process.voidregisterRenamingObjectSymlink(String currentSymlink, String newSymlink) Registers a new symbolic link of the object to be renamed during the merge process.
-
Constructor Details
-
MergeSession
Constructs a merge session.- Parameters:
comparisonSession- the comparison session on which the constructed merge session will be based, notnulllibraryRegistry- the library registry, notnull
-
-
Method Details
-
getBmModel
Description copied from interface:IMergeSessionReturns the BM model.- Specified by:
getBmModelin interfaceIMergeSession- Returns:
- the BM model, never
null
-
getComparisonSession
Description copied from interface:IMergeSessionReturns the comparison session this merge session is based on.- Specified by:
getComparisonSessionin interfaceIMergeSession- Returns:
- the comparison session, never
null
-
getImportedObjectId
Description copied from interface:IMergeSessionReturns the id of the imported BM object registered for the specified node.- Specified by:
getImportedObjectIdin interfaceIMergeSession- Parameters:
node- the node to get the id of the BM object imported and registered for it- Returns:
- the imported object id or
null
-
getImportedObjectSymlink
Description copied from interface:IMergeSessionIn case when a partial other datasource object is to be merged according to current settings, returns the symbolic link of the object in terms of the main datasource, ornullif the other object will not be imported.- Specified by:
getImportedObjectSymlinkin interfaceIMergeSession- Parameters:
otherSymlink- the symbolic link of the other object, notnull- Returns:
- a main symlink or
null(if not imported)
-
getMainDataSource
Description copied from interface:IMergeSessionReturns the main data source of the session.- Specified by:
getMainDataSourcein interfaceIMergeSession- Returns:
- the main data source, never
null
-
getMainRuntimeVersion
Description copied from interface:IMergeSessionReturns the runtime version of the main datasource.- Specified by:
getMainRuntimeVersionin interfaceIMergeSession- Returns:
- main datasource runtime version, never
null
-
registerImportedObject
Description copied from interface:IMergeSessionRegisters a BM object imported during the merge of the specified node.- Specified by:
registerImportedObjectin interfaceIMergeSession- Parameters:
node- the node for which to register the imported objectimportedEmfObject- the imported BM object
-
registerRenamingObject
Description copied from interface:IMergeSessionRegisters a new symbolic link of the object to be renamed during the merge process.- Specified by:
registerRenamingObjectin interfaceIMergeSession- Parameters:
node- the comparison node related to the renaming object, cannot benullnewSymlink- the new symbolic link the object will have after renaming, cannot benullor empty
-
getMainSymlink
Description copied from interface:IMergeSessionGets actual symbolic link (a.k.a. FQN) of the object from the MAIN side during the merge process. The FQN can be changed if the object is going to be renamed, so all participants have to use this method during the merge phase to obtain actual symbolic link instead of directComparisonNode#getMainSymlink()method.- Specified by:
getMainSymlinkin interfaceIMergeSession- Parameters:
node- the comparison node related to the object to get main symbolic link for, cannot benull- Returns:
- the actual symbolic link or
nullif there is no object from the MAIN side
-
registerRenamingObjectSymlink
Description copied from interface:IMergeSessionRegisters a new symbolic link of the object to be renamed during the merge process.- Specified by:
registerRenamingObjectSymlinkin interfaceIMergeSession- Parameters:
currentSymlink- the object symlink before rename operation, cannot benullnewSymlink- the object symlink after rename operation, cannot benull
-
getRenamingObjectNewSymlink
Description copied from interface:IMergeSessionGets symbolic link of a renaming object after rename operation finish, if it registered byIMergeSession.registerRenamingObjectSymlink(String, String).- Specified by:
getRenamingObjectNewSymlinkin interfaceIMergeSession- Parameters:
symlinkBeforeRename- the object's symbolic link before renaming, cannot benull- Returns:
- the actual object's symbolic link after renaming, may be
null
-
addPostponedFileOperation
Description copied from interface:IMergeSessionAdds a postponed file operation.- Specified by:
addPostponedFileOperationin interfaceIMergeSession- Parameters:
operation- the postponed file operation, cannot benull
-
getPostponedFileOperations
Description copied from interface:IMergeSessionGets the list of postponed file operations in the order of addition.- Specified by:
getPostponedFileOperationsin interfaceIMergeSession- Returns:
- the list of postponed file operations, never
null
-
getLibraryDescriptorChangeType
Description copied from interface:IMergeSessionReturns the library descriptor change type during the merge.- Specified by:
getLibraryDescriptorChangeTypein interfaceIMergeSession- Returns:
- the library descriptor change type, never
null
-