Class BinaryResourceContentImporter

    • Constructor Detail

      • BinaryResourceContentImporter

        @Inject
        public BinaryResourceContentImporter​(IBmModelManager bmModelManager,
                                             IQualifiedNameFilePathConverter qualifiedNameFilePathConverter)
        Constructs a new instance.
        Parameters:
        qualifiedNameFilePathConverter - The qualified-name-to-file-path converter. May not be null.
    • Method Detail

      • getOrder

        public int getOrder()
        Description copied from interface: IResourceContentImporter
        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

        public boolean supports​(org.eclipse.core.runtime.IPath path)
        Description copied from interface: IResourceContentImporter
        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.
      • handleResourceCreationOrModification

        protected byte[] handleResourceCreationOrModification​(IBmPlatformTransaction transaction,
                                                              IBmNamespace namespace,
                                                              IDtProject project,
                                                              org.eclipse.core.runtime.IPath path,
                                                              InputStream content,
                                                              boolean fullOverride)
        Description copied from class: TransactionalBmContentImporter
        Handles a data import process for an imported resource
        Specified by:
        handleResourceCreationOrModification in class TransactionalBmContentImporter
        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