Class AbstractHierarchyImporter

    • Constructor Detail

      • AbstractHierarchyImporter

        public AbstractHierarchyImporter()
    • Method Detail

      • convertXmlPathToFolder

        protected Path convertXmlPathToFolder​(Path xmlPath)
        Convert xml file path to path without xml extension
        Parameters:
        xmlPath - the path to xml file (not null)
        Returns:
        new path to folder with same name as xml file, never null
      • processingByNames

        protected void processingByNames​(IHierarchyImporterContext importerContext,
                                         String importerKey,
                                         IHierarchyImporterNode parentNode,
                                         Path sourcePath,
                                         org.eclipse.core.runtime.IProgressMonitor monitor,
                                         String... names)
                                  throws ImportException,
                                         IOException,
                                         org.eclipse.core.runtime.OperationCanceledException

        Take hierarchy importer by given key and 1C:Runtime version, then create and add dependent import nodes, by files with given names in given source path (if file exist), in parent node

        Parameters:
        importerContext - the import context info, can't be null
        importerKey - the string key of hierarchy importer type (not null)
        parentNode - the parent node (not null)
        sourcePath - the source folder path (not null)
        monitor - the progress monitor for check cancel job, cannot be null
        names - the names of files in source folder path, name will be ignored if file with this name not exist in source path (not null)
        Throws:
        ImportException - if importer for this key and version is unregistered
        IOException - if an I/O error occurs at creating tree nodes
        org.eclipse.core.runtime.OperationCanceledException - if the operation detects a request to cancel, using IProgressMonitor.isCanceled(), it should exit by throwing OperationCanceledException
      • processingByNames

        protected void processingByNames​(IHierarchyImporterContext importerContext,
                                         String importerKey,
                                         IHierarchyImporterNode parentNode,
                                         Path sourcePath,
                                         boolean independent,
                                         org.eclipse.core.runtime.IProgressMonitor monitor,
                                         String... names)
                                  throws ImportException,
                                         IOException,
                                         org.eclipse.core.runtime.OperationCanceledException

        Take hierarchy importer by given key and 1C:Runtime version, then create and add import nodes, by files with given names in given source path (if file exist), in parent node

        Parameters:
        importerContext - the import context info, can't be null
        importerKey - the string key of hierarchy importer type (not null)
        parentNode - the parent node (not null)
        sourcePath - the source folder path (not null)
        independent - the flag showing whether the added nodes are independent.
        monitor - the progress monitor for check cancel job, cannot be null
        names - the names of files in source folder path, name will be ignored if file with this name not exist in source path (not null)
        Throws:
        ImportException - if importer for this key and version is unregistered
        IOException - if an I/O error occurs at creating tree nodes
        org.eclipse.core.runtime.OperationCanceledException - if the operation detects a request to cancel, using IProgressMonitor.isCanceled(), it should exit by throwing OperationCanceledException
      • processingByFolder

        protected void processingByFolder​(IHierarchyImporterContext importerContext,
                                          String importerKey,
                                          IHierarchyImporterNode parentNode,
                                          Path sourcePath,
                                          org.eclipse.core.runtime.IProgressMonitor monitor)
                                   throws ImportException,
                                          IOException,
                                          org.eclipse.core.runtime.OperationCanceledException

        Take hierarchy importer by given key and 1C:Runtime version, then create and add dependent import nodes, by all xml files in given source folder path, in parent node

        Parameters:
        importerContext - the import context info, can't be null
        importerKey - the string key of hierarchy importer type (not null)
        parentNode - the parent node (not null)
        sourcePath - the source folder path (not null)
        monitor - the progress monitor for check cancel job, cannot be null
        Throws:
        ImportException - if importer for this key and version is unregistered
        IOException - if an I/O error occurs at creating tree nodes
        org.eclipse.core.runtime.OperationCanceledException - if the operation detects a request to cancel, using IProgressMonitor.isCanceled(), it should exit by throwing OperationCanceledException
      • processingByFolder

        protected void processingByFolder​(IHierarchyImporterContext importerContext,
                                          String importerKey,
                                          IHierarchyImporterNode parentNode,
                                          Path sourcePath,
                                          boolean independent,
                                          org.eclipse.core.runtime.IProgressMonitor monitor)
                                   throws ImportException,
                                          IOException,
                                          org.eclipse.core.runtime.OperationCanceledException

        Take hierarchy importer by given key and 1C:Runtime version, then create and add import nodes, by all xml files in given source folder path, in parent node

        Parameters:
        importerContext - the import context info, can't be null
        importerKey - the string key of hierarchy importer type (not null)
        parentNode - the parent node (not null)
        sourcePath - the source folder path (not null)
        independent - the flag showing whether the added nodes are independent.
        monitor - the progress monitor for check cancel job, cannot be null
        Throws:
        ImportException - if importer for this key and version is unregistered
        IOException - if an I/O error occurs at creating tree nodes
        org.eclipse.core.runtime.OperationCanceledException - if the operation detects a request to cancel, using IProgressMonitor.isCanceled(), it should exit by throwing OperationCanceledException