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 object URIs.

    The manager configures BM model instances after creation with BM model providers, link providers, indexes, etc.

    Clients are intended to activate manager before work and deactivate 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.
    • 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 interface IManagedService
      • deactivate

        void deactivate()
        Shut down BM manager work. The manager shutdowns itself and all associated infrastructure.
        Specified by:
        deactivate in interface IManagedService
      • getModel

        IBmModel getModel​(org.eclipse.core.resources.IProject project)
        Returns IBmModel instance by given project. If model is not created yet, manager tries to create model, using IBmModelInitializationService (if there are registered matching initializer for this type of project).
        Can return null if there is no BM instances, associated with the given project, and cannot create one.
        Parameters:
        project - the project (not null)
        Returns:
        IBmModel instance or null if given project doesn't associated with any BM model and cannot create one
      • getModel

        IBmModel getModel​(IDtProject dtProject)
        Returns IBmModel instance by given project. If model is not created yet, manager tries to create model, using IBmModelInitializationService (if there are registered matching initializer for this type of project).
        Can return null if there is no BM instances, associated with the given project, and cannot create one.
        Parameters:
        project - the project (not null)
        Returns:
        IBmModel instance or null if given project doesn't associated with any BM model and cannot create one
      • getModel

        IBmModel getModel​(org.eclipse.emf.common.util.URI uri)
        Returns IBmModel which contains object with given URI.
        Can return null if there is no BM instances, that handles the object with the given URI.
        Parameters:
        uri - the object URI (not null)
        Returns:
        IBmModel which contains object with given URI or null if object is not handled by any IBmModel
      • getModel

        IBmModel getModel​(org.eclipse.emf.ecore.EObject object)
        Returns IBmModel which contains the given model object.
        Can return null if there is no BM instances, that handles the given model object.
        Parameters:
        uri - the model object (not null)
        Returns:
        IBmModel which contains the given model object or null if object is not handled by any IBmModel
      • getProject

        org.eclipse.core.resources.IProject getProject​(IBmModel bmModel)
        Returns project associated with given BM instance.
        Can return null if there is no projects, associated with the given BM instance.
        Parameters:
        bmModel - the IBmModel instance (not null)
        Returns:
        project associated with given big model instance
      • getDtProject

        IDtProject getDtProject​(String engineId)
        Returns project associated with given BM engine.
        Can return null if there is no projects, associated with the given BM engine.
        Parameters:
        engineId - the identifier of the BM engine, (not null)
        Returns:
        project associated with given engine
      • getDtProject

        IDtProject getDtProject​(IBmModel bmModel)
        Returns IDtProject project associated with given BM instance.
        Can return null if there is no projects, associated with the given BM instance.
        Parameters:
        bmModel - the IBmModel instance (not null)
        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 be null
        delete - whether need to delete actual BM store content
        monitor - the progress monitor to use for reporting progress to the user, cannot be null
      • 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 soon
        Resolves 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 be null
      • removeListener

        void removeListener​(IEventListener listener)
        Remove event listener
        Parameters:
        listener - the listener to remove, cannot be null
      • 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 be null
        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 be null
      • 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 be null
      • 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 be null.
      • 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 be null.
      • 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.