Interface IResourceContentImporter

    • Field Detail

      • PLATFORM_VERSION

        static final String PLATFORM_VERSION
        Platform version parameter name. Being transferred as an option during the resource loading
        See Also:
        Constant Field Values
    • Method Detail

      • getOrder

        int getOrder()
        Gets importer order. The lower the order value is, the earlier tasks created by this importer must be processed. The value of Integer.MAX_VALUE means that the tasks created by this importer should be processed when requested explicitly by the user.
        Returns:
        the order value.
        See Also:
        IBmModelManager#forceImport(IDtProject, String)
      • supports

        boolean supports​(org.eclipse.core.runtime.IPath path)
        Checks if this importer supports the specified resource.
        Parameters:
        path - The path to the resource to check. May not be null.
        Returns:
        true if the resource is supported, false otherwise.
      • computeSignature

        byte[] computeSignature​(InputStream content)
        Computes signature.
        Parameters:
        content - The imported content stream. May not be null
        Returns:
        A signature of the content. May be empty or null
      • handleResourceCreationOrModification

        default byte[] handleResourceCreationOrModification​(IBmNamespace namespace,
                                                            IDtProject project,
                                                            org.eclipse.core.runtime.IPath path,
                                                            Supplier<InputStream> contentSupplier,
                                                            boolean fullOverride,
                                                            boolean executeInGlobalContext)
        Handles resource creation or modification.
        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

        default void handleResourceDeletion​(IBmNamespace namespace,
                                            IDtProject project,
                                            org.eclipse.core.runtime.IPath path,
                                            boolean executeInGlobalContext)
        Handles resource deletion.
        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