Class BaseSingleResourceObjectImporter

    • Constructor Detail

      • BaseSingleResourceObjectImporter

        public BaseSingleResourceObjectImporter()
    • Method Detail

      • createTasks

        public final Collection<? extends IResourceContentImporter.IImportTask> createTasks​(Collection<org.eclipse.core.runtime.IPath> affectedPaths)
        Description copied from interface: IResourceContentImporter
        Creates tasks based on the specified collection of affected (created, modified, deleted) resource paths. The returned tasks can be processed in parallel. In case the affectedPaths contains unsupported resources the behaviour of this method is not specified.
        Specified by:
        createTasks in interface IResourceContentImporter
        Parameters:
        affectedPaths - The affected resource paths. May not be null.
        Returns:
        a collection of tasks. Never null.
      • processTask

        public final void processTask​(IBmEngine engine,
                                      IBmTransaction transaction,
                                      IDtProject project,
                                      IResourceContentImporter.IImportTask task,
                                      IResourceAccessor resourceAccessor,
                                      boolean fullOverride)
        Description copied from interface: IResourceContentImporter
        Processes the specified import task. In case the task has not been created by this importer, the behaviour of this method is not specified.
        Specified by:
        processTask in interface IResourceContentImporter
        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.
        task - The task. 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 that merge must be used in case the object already exists.
      • doImportContent

        protected abstract void doImportContent​(IBmEngine engine,
                                                IBmTransaction transaction,
                                                IDtProject project,
                                                org.eclipse.core.runtime.IPath objectPath,
                                                IResourceAccessor resourceAccessor,
                                                boolean fullOverride)
        Subclasses implement this method to provide import logics.
        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.
        objectPath - The resource path to import the object from. 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.