Package com._1c.g5.v8.dt.core.provider
Class BaseSingleResourceObjectImporter
- java.lang.Object
-
- com._1c.g5.v8.dt.core.provider.BaseSingleResourceObjectImporter
-
- All Implemented Interfaces:
IResourceContentImporter
- Direct Known Subclasses:
BaseSingleEmfResourceObjectImporter
,BinaryResourceContentImporter
public abstract class BaseSingleResourceObjectImporter extends Object implements IResourceContentImporter
Base single-resource object importer.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com._1c.g5.v8.dt.core.provider.IResourceContentImporter
IResourceContentImporter.IImportTask, IResourceContentImporter.IMergeStrategy
-
-
Field Summary
-
Fields inherited from interface com._1c.g5.v8.dt.core.provider.IResourceContentImporter
PLATFORM_VERSION
-
-
Constructor Summary
Constructors Constructor Description BaseSingleResourceObjectImporter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Collection<? extends IResourceContentImporter.IImportTask>
createTasks(Collection<org.eclipse.core.runtime.IPath> affectedPaths)
Creates tasks based on the specified collection of affected (created, modified, deleted) resource paths.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.void
processTask(IBmEngine engine, IBmTransaction transaction, IDtProject project, IResourceContentImporter.IImportTask task, IResourceAccessor resourceAccessor, boolean fullOverride)
Processes the specified import task.-
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.core.provider.IResourceContentImporter
getOrder, supports
-
-
-
-
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 theaffectedPaths
contains unsupported resources the behaviour of this method is not specified.- Specified by:
createTasks
in interfaceIResourceContentImporter
- Parameters:
affectedPaths
- The affected resource paths. May not benull
.- 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 interfaceIResourceContentImporter
- Parameters:
engine
- The BM engine to import the object into. May not benull
.transaction
- The BM transaction to import the object within. May not benull
.project
- The project the object belongs to. May not benull
.task
- The task. May not benull
.resourceAccessor
- The accessor to use to obtain the resource content etc. May not benull
.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 benull
.transaction
- The BM transaction to import the object within. May not benull
.project
- The project the object belongs to. May not benull
.objectPath
- The resource path to import the object from. May not benull
.resourceAccessor
- The accessor to use to obtain the resource content etc. May not benull
.fullOverride
- The flag indicating that the full override strategy rather than merge must be used in case the object already exists.
-
-