Class InfobaseUpdateDialogBasedCallback
- java.lang.Object
-
- com._1c.g5.v8.dt.platform.services.ui.infobases.sync.InfobaseUpdateDialogBasedCallback
-
- All Implemented Interfaces:
IInfobaseChangesPullCallback
,IInfobaseUpdateCallback
public class InfobaseUpdateDialogBasedCallback extends Object implements IInfobaseUpdateCallback
Infobase updateIInfobaseUpdateCallback
implementation that dispays changes to user in dialog window and asks user to apply these changes or to resolve or not infobase conflict.
-
-
Constructor Summary
Constructors Constructor Description InfobaseUpdateDialogBasedCallback(org.eclipse.swt.widgets.Shell shell, IV8ProjectManager v8projectManager, IDtComparisonEditorInputFactory compareEditorInputFactory, IComparisonManager comparisonManager)
Creates an instance ofInfobaseUpdateDialogBasedCallback
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.ui.IWorkbenchPage
getActivePage()
boolean
onConfirm(org.eclipse.core.resources.IProject project, InfobaseReference infobase, List<com._1c.g5.designer.ssh.client.operation.IDbStructureChange> changes, org.eclipse.core.runtime.IProgressMonitor monitor)
Confirm the provided database structure changes.boolean
onInfobaseChanges(org.eclipse.core.resources.IProject project, InfobaseReference infobase, Set<org.eclipse.emf.ecore.EObject> projectChanges, IInfobaseConfigurationChange infobaseChange, IInfobaseUpdateConflictResolver conflictResolver, IInfobaseUpdateConflictResolver.IConflictResolveAssist assist, org.eclipse.core.runtime.IProgressMonitor monitor)
Resolve conflict the provided project changes with the infobase configuration changes.void
setAllowOverrideConflict(boolean allowOverride)
Sets whether update conflict dialog allows user to override infobase changes with project content.
-
-
-
Constructor Detail
-
InfobaseUpdateDialogBasedCallback
public InfobaseUpdateDialogBasedCallback(org.eclipse.swt.widgets.Shell shell, IV8ProjectManager v8projectManager, IDtComparisonEditorInputFactory compareEditorInputFactory, IComparisonManager comparisonManager)
Creates an instance ofInfobaseUpdateDialogBasedCallback
.- Parameters:
shell
- the parent shell to dispay changes to user, cannot benull
v8projectManager
- the V8 project manager, cannot benull
compareEditorInputFactory
- the compare editor input factory, cannot benull
comparisonManager
- the comparison process manager, cannot benull
-
-
Method Detail
-
setAllowOverrideConflict
public void setAllowOverrideConflict(boolean allowOverride)
Sets whether update conflict dialog allows user to override infobase changes with project content. By default the value istrue
.- Parameters:
allowOverride
- whether update conflict dialog allows user to override infobase changes with project content
-
onConfirm
public boolean onConfirm(org.eclipse.core.resources.IProject project, InfobaseReference infobase, List<com._1c.g5.designer.ssh.client.operation.IDbStructureChange> changes, org.eclipse.core.runtime.IProgressMonitor monitor)
Description copied from interface:IInfobaseUpdateCallback
Confirm the provided database structure changes. Clients need to implement and returntrue
whether need to apply changes to database orfalse
to deny changes and cancel update.- Specified by:
onConfirm
in interfaceIInfobaseUpdateCallback
- Parameters:
project
- the project to update infobase for, cannot benull
infobase
- the updating infobase, cannot benull
changes
- the database structure changes, cannot benull
monitor
- the progress monitor to report progress to, cannot benull
- Returns:
true
whether need to apply changes to database orfalse
to deny changes
-
onInfobaseChanges
public boolean onInfobaseChanges(org.eclipse.core.resources.IProject project, InfobaseReference infobase, Set<org.eclipse.emf.ecore.EObject> projectChanges, IInfobaseConfigurationChange infobaseChange, IInfobaseUpdateConflictResolver conflictResolver, IInfobaseUpdateConflictResolver.IConflictResolveAssist assist, org.eclipse.core.runtime.IProgressMonitor monitor) throws InfobaseSynchronizationException
Description copied from interface:IInfobaseChangesPullCallback
Resolve conflict the provided project changes with the infobase configuration changes. Clients need to implement using provided resolver and resolve assint and then returntrue
whether conflict is resolved orfalse
if resolve was unsuccessful or been cancelled.- Specified by:
onInfobaseChanges
in interfaceIInfobaseChangesPullCallback
- Parameters:
project
- the project to update infobase for, cannot benull
infobase
- the updating infobase, cannot benull
projectChanges
- the project metadata object changes, cannot benull
infobaseChange
- the infobase configuration changes, cannot benull
conflictResolver
- the conflict resolver to use to resolve conflict, cannot benull
assist
- the resolve conflict assist to provide to conflict resolver, cannot benull
monitor
- the progress monitor to report progress to, cannot benull
- Returns:
true
whether conflict is resolved orfalse
if resolve was unsuccessful or has been cancelled- Throws:
InfobaseSynchronizationException
- if a conflict resolve error occurred- See Also:
IInfobaseConfigurationChange
,IInfobaseUpdateConflictResolver
-
getActivePage
public org.eclipse.ui.IWorkbenchPage getActivePage()
-
-