Class TransactionalBmContentImporter

    • Constructor Detail

      • TransactionalBmContentImporter

        protected TransactionalBmContentImporter​(IBmModelManager bmModelManager)
        Constructs an instance
        Parameters:
        bmModelManager - Reference to the IBmModelManager service. Cannot be null
    • Method Detail

      • handleResourceCreationOrModification

        public final byte[] handleResourceCreationOrModification​(IBmNamespace namespace,
                                                                 IDtProject project,
                                                                 org.eclipse.core.runtime.IPath path,
                                                                 Supplier<InputStream> contentSupplier,
                                                                 boolean fullOverride,
                                                                 boolean executeInGlobalContext)
        Description copied from interface: IResourceContentImporter
        Handles resource creation or modification.
        Specified by:
        handleResourceCreationOrModification in interface IResourceContentImporter
        Parameters:
        namespace - The target IBmNamespace. May not be null
        project - The target IDtProject. May not be null
        path - The imported resource path. May not be null
        contentSupplier - The imported content supplier. May not be null. Implementations should support any number of context requests to support the re-import process in case of BM deadlocks
        fullOverride - The full override mode switch. The full override mode replaces content of an old object completelly without merge
        executeInGlobalContext - The global editing context execution flag
        Returns:
        A signature of the imported content. May be null or empty
      • handleResourceDeletion

        public final void handleResourceDeletion​(IBmNamespace namespace,
                                                 IDtProject project,
                                                 org.eclipse.core.runtime.IPath path,
                                                 boolean executeInGlobalContext)
        Description copied from interface: IResourceContentImporter
        Handles resource deletion.
        Specified by:
        handleResourceDeletion in interface IResourceContentImporter
        Parameters:
        namespace - The target IBmNamespace. May not be null
        project - The target IDtProject. May not be null
        path - The imported resource path. May not be null
        executeInGlobalContext - The global editing context execution flag
      • handleResourceCreationOrModification

        protected abstract byte[] handleResourceCreationOrModification​(IBmPlatformTransaction transaction,
                                                                       IBmNamespace namespace,
                                                                       IDtProject project,
                                                                       org.eclipse.core.runtime.IPath path,
                                                                       InputStream content,
                                                                       boolean fullOverride)
        Handles a data import process for an imported resource
        Parameters:
        transaction - The data import BM transaction. Never null
        namespace - The target BM namespace for an import. Never null
        project - The target IDtProject. Never null
        path - The imported resource path. May not be null
        content - The imported content stream. May not be null
        fullOverride - Data full override import mode
        Returns:
        Signature of imported data. Never null
      • handleResourceDeletion

        protected abstract void handleResourceDeletion​(IBmPlatformTransaction transaction,
                                                       IBmNamespace namespace,
                                                       IDtProject project,
                                                       org.eclipse.core.runtime.IPath path)
        Handles a data removal process for a removed resource
        Parameters:
        transaction - The data import BM transaction. Never null
        namespace - The target BM namespace for an import. Never null
        project - Target IDtProject. Never null
        path - The removed resource path. May not be null