Class AbstractHierarchyImporter
- java.lang.Object
-
- com._1c.g5.v8.dt.import_.xml.hierarchy.AbstractHierarchyImporter
-
- All Implemented Interfaces:
IHierarchyImporter
public abstract class AbstractHierarchyImporter extends Object implements IHierarchyImporter
Basic implementation of
IHierarchyImporter
Contain filters and helper methods for work with paths
-
-
Field Summary
Fields Modifier and Type Field Description static DirectoryStream.Filter<Path>
DIRECTORY_FILTER
static String
HTML_FILTER
static String
PICTURE_FILTER
static String
XML_FILTER
-
Constructor Summary
Constructors Constructor Description AbstractHierarchyImporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Path
convertXmlPathToFolder(Path xmlPath)
Convert xml file path to path without xml extensionprotected void
processingByFolder(IHierarchyImporterContext importerContext, String importerKey, IHierarchyImporterNode parentNode, Path sourcePath, boolean independent, org.eclipse.core.runtime.IProgressMonitor monitor)
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 nodeprotected void
processingByFolder(IHierarchyImporterContext importerContext, String importerKey, IHierarchyImporterNode parentNode, Path sourcePath, org.eclipse.core.runtime.IProgressMonitor monitor)
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 nodeprotected void
processingByNames(IHierarchyImporterContext importerContext, String importerKey, IHierarchyImporterNode parentNode, Path sourcePath, boolean independent, org.eclipse.core.runtime.IProgressMonitor monitor, String... names)
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 nodeprotected void
processingByNames(IHierarchyImporterContext importerContext, String importerKey, IHierarchyImporterNode parentNode, Path sourcePath, org.eclipse.core.runtime.IProgressMonitor monitor, String... names)
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-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.import_.xml.hierarchy.IHierarchyImporter
getHierarchyImporterSubTree
-
-
-
-
Field Detail
-
DIRECTORY_FILTER
public static final DirectoryStream.Filter<Path> DIRECTORY_FILTER
-
HTML_FILTER
public static final String HTML_FILTER
- See Also:
- Constant Field Values
-
XML_FILTER
public static final String XML_FILTER
- See Also:
- Constant Field Values
-
PICTURE_FILTER
public static final String PICTURE_FILTER
- See Also:
- Constant Field Values
-
-
Method Detail
-
convertXmlPathToFolder
protected Path convertXmlPathToFolder(Path xmlPath)
Convert xml file path to path without xml extension- Parameters:
xmlPath
- the path to xml file (notnull
)- 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 benull
importerKey
- the string key of hierarchy importer type (notnull
)parentNode
- the parent node (notnull
)sourcePath
- the source folder path (notnull
)monitor
- the progress monitor for check cancel job, cannot benull
names
- the names of files in source folder path, name will be ignored if file with this name not exist in source path (notnull
)- Throws:
ImportException
- if importer for this key and version is unregisteredIOException
- if an I/O error occurs at creating tree nodesorg.eclipse.core.runtime.OperationCanceledException
- if the operation detects a request to cancel, usingIProgressMonitor.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 benull
importerKey
- the string key of hierarchy importer type (notnull
)parentNode
- the parent node (notnull
)sourcePath
- the source folder path (notnull
)independent
- the flag showing whether the added nodes are independent.monitor
- the progress monitor for check cancel job, cannot benull
names
- the names of files in source folder path, name will be ignored if file with this name not exist in source path (notnull
)- Throws:
ImportException
- if importer for this key and version is unregisteredIOException
- if an I/O error occurs at creating tree nodesorg.eclipse.core.runtime.OperationCanceledException
- if the operation detects a request to cancel, usingIProgressMonitor.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 benull
importerKey
- the string key of hierarchy importer type (notnull
)parentNode
- the parent node (notnull
)sourcePath
- the source folder path (notnull
)monitor
- the progress monitor for check cancel job, cannot benull
- Throws:
ImportException
- if importer for this key and version is unregisteredIOException
- if an I/O error occurs at creating tree nodesorg.eclipse.core.runtime.OperationCanceledException
- if the operation detects a request to cancel, usingIProgressMonitor.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 benull
importerKey
- the string key of hierarchy importer type (notnull
)parentNode
- the parent node (notnull
)sourcePath
- the source folder path (notnull
)independent
- the flag showing whether the added nodes are independent.monitor
- the progress monitor for check cancel job, cannot benull
- Throws:
ImportException
- if importer for this key and version is unregisteredIOException
- if an I/O error occurs at creating tree nodesorg.eclipse.core.runtime.OperationCanceledException
- if the operation detects a request to cancel, usingIProgressMonitor.isCanceled()
, it should exit by throwing OperationCanceledException
-
-