Class BinaryResourceContentImporter

    • Constructor Detail

      • BinaryResourceContentImporter

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

      • 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.
      • doImportContent

        protected void doImportContent​(IBmEngine engine,
                                       IBmTransaction transaction,
                                       IDtProject project,
                                       org.eclipse.core.runtime.IPath path,
                                       String fqn,
                                       IResourceAccessor resourceAccessor,
                                       boolean fullOverride)
        Description copied from class: BaseSingleResourceObjectImporter
        Subclasses implement this method to provide import logics.
        Specified by:
        doImportContent in class BaseSingleResourceObjectImporter
        Parameters:
        engine - The BM engine to import the object into. May not be null.
        transaction - The BM transaction to import the object within. May not be null.
        project - The project the object belongs to. May not be null.
        path - The resource path to import the object from. May not be null.
        fqn - The fully qualified name of the object. May not be null.
        resourceAccessor - The accessor to use to obtain the resource content etc. May not be null.
        fullOverride - The flag indicating that the full override strategy rather than merge must be used in case the object already exists.