Class BaseBmBlobExporter

    • Constructor Detail

      • BaseBmBlobExporter

        protected BaseBmBlobExporter​(IBmModelManager modelManager)
        Constructs a new instance.
        Parameters:
        modelManager - The model manager. May not be null.
    • Method Detail

      • saveFile

        public final BmFileSaveResult saveFile​(IDtProject project,
                                               IBmNamespace namespace,
                                               String fqn,
                                               String type)
                                        throws org.eclipse.core.runtime.CoreException
        Description copied from interface: IBmBlobExporter
        Exports the specified blob and saves it in the corresponding workspace file(s) as a response to the blob's creation or modification.
        Specified by:
        saveFile in interface IBmBlobExporter
        Parameters:
        project - The project the blob belongs to. May not be null.
        namespace - The namespace the blob belongs to. May not be null.
        fqn - The FQN of the blob. May not be null.
        type - The type of the blob. May not be null.
        Returns:
        an instance of BmFileSaveResult containing information about the saved file(s).
        Throws:
        org.eclipse.core.runtime.CoreException - if an error occurs.
      • deleteFile

        public final BmFileDeletionResult deleteFile​(IDtProject project,
                                                     IBmNamespace namespace,
                                                     String fqn,
                                                     String type)
                                              throws org.eclipse.core.runtime.CoreException
        Description copied from interface: IBmBlobExporter
        Deletes the file(s) the blob is saved in as a response to the blob's deletion.
        Specified by:
        deleteFile in interface IBmBlobExporter
        Parameters:
        project - The project the blob belongs to. May not be null.
        namespace - The namespace the blob belongs to. May not be null.
        fqn - The FQN of the blob. May not be null.
        type - The type of the blob. May not be null.
        Returns:
        an instance of BmFileDeletionResult containing information about the deleted file(s).
        Throws:
        org.eclipse.core.runtime.CoreException - if an error occurs.
      • getWorkspaceFilePath

        protected abstract org.eclipse.core.runtime.IPath getWorkspaceFilePath​(String fqn,
                                                                               String type)
        Gets project-relative workspace file path.
        Parameters:
        fqn - The FQN of the corresponding BM file. May not be null.
        type - The type of the file. May not be null.
        Returns:
        the workspace file path or null if no file path corresponds to the specified parameters.