Interface IInfobaseConnection
-
public interface IInfobaseConnection
Describes a connection with an infobase. Infobase connections are defined by extensions. An infobase connection extension is defined inplugin.xml
.Following is an example definition of an infobase connection extension:
<extension point="com._1c.g5.v8.dt.platform.services.core.infobaseConnections"> <connection id="com._1c.g5.v8.dt.platform.services.core.infobaseConnection.ExampleConnection" class="com.example.ExampleConnectionClass"> name="Example Connection"> <supportedRuntimes runtime="com._1c.g5.v8.dt.platform.runtime.8.3.8"> </supportedRuntimes> </connection> </extension>
IInfobaseConnection
represents one-to-one connection with the infobase. Connection can be used load changes to the connected infobase and update the connected infobase to apply all loaded changes. Connections are not intended to buffer loading objects or errors, client may useISynchronizationStrategy
for these goals instead.This interface is intended to be implemented and registered by clients. Instances are not intended to be explicitly used by client.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
connect(org.eclipse.core.resources.IProject project, InfobaseReference infobase, IInfobaseAccessSettings settings, IResolvableRuntimeInstallation installation)
Connects with the provided infobase, using the provided infobase access settings.void
disconnect()
Disconnects from the connected infobase.boolean
loadConfiguration(Configuration configuration, org.eclipse.core.runtime.IProgressMonitor monitor, ILoadOption... options)
Loads the entire provided configuration to the connected infobase.boolean
loadObjects(Set<org.eclipse.emf.ecore.EObject> objects, org.eclipse.core.runtime.IProgressMonitor monitor, ILoadOption... options)
Loads the provided metadata objects to the connected infobase.boolean
pullChanges(Set<org.eclipse.emf.ecore.EObject> projectChanges, org.eclipse.core.runtime.IProgressMonitor monitor, ILoadOption... options)
Pulls and resolves changes of the infobase configuration according to provided conflict resolve and infobase configuration dump info options.boolean
updateDatabase(org.eclipse.core.runtime.IProgressMonitor monitor, IUpdateOption... options)
Performs updating actual infobase database update with current infobase configuration working copy.
-
-
-
Method Detail
-
connect
void connect(org.eclipse.core.resources.IProject project, InfobaseReference infobase, IInfobaseAccessSettings settings, IResolvableRuntimeInstallation installation) throws InfobaseSynchronizationException
Connects with the provided infobase, using the provided infobase access settings.IInfobaseConnection
establishes connection with infobae and ready to load configuration objects and update infobase database.- Parameters:
project
- the project that causes connection, cannot benull
infobase
- the infobase reference to connect to, cannot benull
settings
- the infobase access settings, cannot benull
installation
- the 1C:Enterprise runtime installation to use, cannot benull
- Throws:
InfobaseSynchronizationException
- if connection establish failed
-
disconnect
void disconnect() throws InfobaseSynchronizationException
Disconnects from the connected infobase.IInfobaseConnection
may not be used to load configuration objects and update infobase database after disconnect, but may be connected again.- Throws:
InfobaseSynchronizationException
- if connection release failed
-
loadObjects
boolean loadObjects(Set<org.eclipse.emf.ecore.EObject> objects, org.eclipse.core.runtime.IProgressMonitor monitor, ILoadOption... options) throws InfobaseSynchronizationException
Loads the provided metadata objects to the connected infobase. Metadata objects are loaded incrementally and only provided objects will be changed in the connected infobase. This operation may be long-running.Load options may customize objects load, for example, client may specify infobase configuration dump info file or confirm or conflict actions.
- Parameters:
objects
- a set of metadata objects to load to infobase, cannot benull
monitor
- the progress monitor to report progress to, cannot benull
options
- options specifying how the load should be done, cannot benull
, may be empty- Returns:
- whether infobase objects was successfully loaded to the infobase or
false
if load was aborted - Throws:
InfobaseSynchronizationException
- if metadata objects load failed- See Also:
ILoadOption
-
loadConfiguration
boolean loadConfiguration(Configuration configuration, org.eclipse.core.runtime.IProgressMonitor monitor, ILoadOption... options) throws InfobaseSynchronizationException
Loads the entire provided configuration to the connected infobase. This operation may be long-running.Load options may customize objects load, for example, client may specify infobase configuration dump info file or confirm or conflict actions.
- Parameters:
configuration
- the configuration to load to connected infobase, cannot benull
monitor
- the progress monitor to report progress to, cannot benull
options
- options specifying how the load should be done, cannot benull
, may be empty- Returns:
- whether infobase configuration was successfully loaded to the infobase or
false
if load was aborted - Throws:
InfobaseSynchronizationException
- if configuration load failed- See Also:
ILoadOption
-
pullChanges
boolean pullChanges(Set<org.eclipse.emf.ecore.EObject> projectChanges, org.eclipse.core.runtime.IProgressMonitor monitor, ILoadOption... options) throws InfobaseSynchronizationException
Pulls and resolves changes of the infobase configuration according to provided conflict resolve and infobase configuration dump info options.- Parameters:
projectChanges
- a set of project changed metadata objects to use for conflict resolve if infobase changes will be received, cannot benull
monitor
- the progress monitor to report progress to, cannot benull
options
- options specifying how the load should be done, cannot benull
, must contain the conflict resolve option and the infobase configuration dump info option- Returns:
- whether infobase configuration changes was successfully resolved and pulled to the project,
false
if resolve was aborted - Throws:
InfobaseSynchronizationException
- if infobase configuration changes pull failed- See Also:
ILoadOption
-
updateDatabase
boolean updateDatabase(org.eclipse.core.runtime.IProgressMonitor monitor, IUpdateOption... options) throws InfobaseSynchronizationException
Performs updating actual infobase database update with current infobase configuration working copy. Applies previously loaded configuration objects to the infobase configuration.Update options may customize update process, for example, client may specify infobase configuration dump info file or confirm or conflict actions.
- Parameters:
monitor
- the progress monitor to report progress to, cannot benull
options
- options specifying how the update should be done, cannot benull
, may be empty- Returns:
- whether infobase configuration was successfully updated and synchronized with the project or
false
if update was aborted - Throws:
InfobaseSynchronizationException
- if infobase database update failed- See Also:
IUpdateOption
-
-