Package com._1c.g5.v8.dt.core.platform
Interface IBmModelManager
-
- All Superinterfaces:
IManagedService
public interface IBmModelManager extends IManagedService
The BM model manager allows clients to create or get instances of BM model from the given objects: projects, model objects, model objectURI
s.The manager configures BM model instances after creation with BM model providers, link providers, indexes, etc.
Clients are intended to
activate
manager before work anddeactivate
manager after all work is done and manager is no longer needed.- Restriction:
- This interface is not intended to be extended by clients.
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
IBmModelManager.IModelInitializationEvent
Event class for model initialization event listeners
-
Field Summary
Fields Modifier and Type Field Description static String
SERVICE_NAME
Service name (using in recovery orchestrator)
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
activate()
Start up BM manager work.void
addLifecycleListener(IBmModel model, IBmLifecycleListener listener)
Deprecated.Use DT lifecycle listeners and lifecycle aware services instead.void
addModelInitializationListener(IEventListener listener)
Add model initialization listenervoid
closeModel(IDtProject project, boolean delete, org.eclipse.core.runtime.IProgressMonitor monitor)
Close BM model for the given project.void
deactivate()
Shut down BM manager work.IDtProject
getDtProject(IBmModel bmModel)
ReturnsIDtProject
project associated with given BM instance.IDtProject
getDtProject(String engineId)
Returnsproject
associated with given BM engine.IBmModel
getModel(IDtProject dtProject)
ReturnsIBmModel
instance by given project.IBmModel
getModel(org.eclipse.core.resources.IProject project)
ReturnsIBmModel
instance by given project.IBmModel
getModel(org.eclipse.emf.common.util.URI uri)
ReturnsIBmModel
which contains object with givenURI
.IBmModel
getModel(org.eclipse.emf.ecore.EObject object)
ReturnsIBmModel
which contains the given model object.Collection<org.eclipse.emf.ecore.EPackage>
getModelPackages()
Gets the collection of EMF packages supported by the model.org.eclipse.core.resources.IProject
getProject(IBmModel bmModel)
Returnsproject
associated with given BM instance.boolean
isLocked(org.eclipse.core.resources.IProject project)
Checks if the given project's BM model is locked at the moment.void
lockModel(org.eclipse.core.resources.IProject project)
Raises the lock on the given model.void
removeLifecycleListener(IBmModel model, IBmLifecycleListener listener)
Deprecated.Use DT lifecycle listeners and lifecycle aware services instead.void
removeListener(IEventListener listener)
Remove event listener<T extends org.eclipse.emf.ecore.EObject>
Tresolve(T proxyOrObject, org.eclipse.emf.ecore.resource.Resource context, org.eclipse.emf.ecore.EObject objContext)
Deprecated.this method can be deleted soonvoid
unlinkDependentProjectBm(org.eclipse.core.resources.IProject dependentProject)
Unlinks dependent project from the base one in terms of BM data exchange.void
unlockModel(org.eclipse.core.resources.IProject project)
Releases previously defined lock for the given project's modelvoid
waitModelSynchronization(org.eclipse.core.resources.IProject project)
Waits for project BM synchronization jobs.
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
Service name (using in recovery orchestrator)- See Also:
- Constant Field Values
-
-
Method Detail
-
activate
void activate()
Start up BM manager work. The manager configures itself and all associated infrastructure.Clients are intended to invoke
#shutdown()
when manager work is no longer needed.- Specified by:
activate
in interfaceIManagedService
-
deactivate
void deactivate()
Shut down BM manager work. The manager shutdowns itself and all associated infrastructure.- Specified by:
deactivate
in interfaceIManagedService
-
getModel
IBmModel getModel(org.eclipse.core.resources.IProject project)
ReturnsIBmModel
instance by given project. If model is not created yet, manager tries to create model, usingIBmModelInitializationService
(if there are registered matching initializer for this type of project).
Can returnnull
if there is no BM instances, associated with the given project, and cannot create one.- Parameters:
project
- the project (notnull
)- Returns:
IBmModel
instance ornull
if given project doesn't associated with any BM model and cannot create one
-
getModel
IBmModel getModel(IDtProject dtProject)
ReturnsIBmModel
instance by given project. If model is not created yet, manager tries to create model, usingIBmModelInitializationService
(if there are registered matching initializer for this type of project).
Can returnnull
if there is no BM instances, associated with the given project, and cannot create one.- Parameters:
project
- the project (notnull
)- Returns:
IBmModel
instance ornull
if given project doesn't associated with any BM model and cannot create one
-
getModel
IBmModel getModel(org.eclipse.emf.common.util.URI uri)
ReturnsIBmModel
which contains object with givenURI
.
Can returnnull
if there is no BM instances, that handles the object with the givenURI
.
-
getModel
IBmModel getModel(org.eclipse.emf.ecore.EObject object)
ReturnsIBmModel
which contains the given model object.
Can returnnull
if there is no BM instances, that handles the given model object.
-
getProject
org.eclipse.core.resources.IProject getProject(IBmModel bmModel)
Returnsproject
associated with given BM instance.
Can returnnull
if there is no projects, associated with the given BM instance.- Parameters:
bmModel
- theIBmModel
instance (notnull
)- Returns:
project
associated with given big model instance
-
getDtProject
IDtProject getDtProject(String engineId)
Returnsproject
associated with given BM engine.
Can returnnull
if there is no projects, associated with the given BM engine.- Parameters:
engineId
- the identifier of the BM engine, (notnull
)- Returns:
project
associated with given engine
-
getDtProject
IDtProject getDtProject(IBmModel bmModel)
ReturnsIDtProject
project associated with given BM instance.
Can returnnull
if there is no projects, associated with the given BM instance.- Parameters:
bmModel
- theIBmModel
instance (notnull
)- Returns:
IDtProject
project associated with given big model instance
-
closeModel
void closeModel(IDtProject project, boolean delete, org.eclipse.core.runtime.IProgressMonitor monitor)
Close BM model for the given project.- Parameters:
project
- project to close BM model for, cannot benull
delete
- whether need to delete actual BM store contentmonitor
- the progress monitor to use for reporting progress to the user, cannot benull
-
resolve
@Deprecated <T extends org.eclipse.emf.ecore.EObject> T resolve(T proxyOrObject, org.eclipse.emf.ecore.resource.Resource context, org.eclipse.emf.ecore.EObject objContext)
Deprecated.this method can be deleted soonResolves given proxy using the provide resource context for the resolving/starting point.
Aware of BM infrastructure and standalone resources.- Parameters:
proxyOrObject
- proxy to resolve.context
- the context resource.objContext
- the object context.- Returns:
- The resolved object (if referenced object already exists and reachable) or proxy of the source type.
-
unlinkDependentProjectBm
void unlinkDependentProjectBm(org.eclipse.core.resources.IProject dependentProject)
Unlinks dependent project from the base one in terms of BM data exchange.- Parameters:
dependentProject
- The project to unlink its BM from the base one.
-
waitModelSynchronization
void waitModelSynchronization(org.eclipse.core.resources.IProject project)
Waits for project BM synchronization jobs.
-
addModelInitializationListener
void addModelInitializationListener(IEventListener listener)
Add model initialization listener- Parameters:
listener
- the listener to add, cannot benull
-
removeListener
void removeListener(IEventListener listener)
Remove event listener- Parameters:
listener
- the listener to remove, cannot benull
-
isLocked
boolean isLocked(org.eclipse.core.resources.IProject project)
Checks if the given project's BM model is locked at the moment.- Parameters:
project
- The project to check the locked state for. Cannot benull
- Returns:
- True if the corresponding BM is locked at the moment; false otherwise
-
unlockModel
void unlockModel(org.eclipse.core.resources.IProject project)
Releases previously defined lock for the given project's model- Parameters:
project
- The project to unlock the BM model for. Cannot benull
-
lockModel
void lockModel(org.eclipse.core.resources.IProject project)
Raises the lock on the given model. The lock indicates that all data critical clients should cease their requests and wait until the lock is released.- Parameters:
project
- The target project which BM should be locked. Cannot benull
-
addLifecycleListener
@Deprecated void addLifecycleListener(IBmModel model, IBmLifecycleListener listener)
Deprecated.Use DT lifecycle listeners and lifecycle aware services instead.Registers the given lifecycle listener.- Parameters:
listener
- The lifecycle listener. May not benull
.
-
removeLifecycleListener
@Deprecated void removeLifecycleListener(IBmModel model, IBmLifecycleListener listener)
Deprecated.Use DT lifecycle listeners and lifecycle aware services instead.Unregisters the given lifecycle listener.- Parameters:
listener
- The lifecycle listener. May not benull
.
-
getModelPackages
Collection<org.eclipse.emf.ecore.EPackage> getModelPackages()
Gets the collection of EMF packages supported by the model.- Returns:
- the collection of EMF packages supported by the model, never
null
.
-
-