Package com._1c.g5.v8.dt.core.provider
Class StandardBmObjectImporter
- java.lang.Object
-
- com._1c.g5.v8.dt.core.provider.BmContentImportSupport
-
- com._1c.g5.v8.dt.core.provider.TransactionalBmContentImporter
-
- com._1c.g5.v8.dt.core.provider.StandardBmObjectImporter
-
- All Implemented Interfaces:
IResourceContentImporter
- Direct Known Subclasses:
CaiResourceContentImporter
,CmiResourceContentImporter
,HpwaResourceContentImporter
,ScheduleResourceContentImporter
public abstract class StandardBmObjectImporter extends TransactionalBmContentImporter
Standard single object resource importer implementation. Performs an import of a single top-object in a single transaction
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com._1c.g5.v8.dt.core.provider.BmContentImportSupport
BmContentImportSupport.ILoadOptionsProvider, BmContentImportSupport.LoadedData, BmContentImportSupport.NonCloseableHashingInputStream
-
Nested classes/interfaces inherited from interface com._1c.g5.v8.dt.core.provider.IResourceContentImporter
IResourceContentImporter.IMergeStrategy
-
-
Field Summary
-
Fields inherited from interface com._1c.g5.v8.dt.core.provider.IResourceContentImporter
PLATFORM_VERSION
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
StandardBmObjectImporter(IResourceContentImporter.IMergeStrategy mergeStrategy, IQualifiedNameFilePathConverter qualifiedNameFilePathConverter, ISymbolicNameService symbolicNameService, IRuntimeVersionSupport runtimeVersionSupport, IResourceContentImporterExtensionManager resourceContentImporterExtensionManager, IBmModelManager bmModelManager, IDerivedDataManagerProvider derivedDataManagerProvider)
Constructs a new instance.protected
StandardBmObjectImporter(IResourceContentImporter.IMergeStrategy mergeStrategy, IQualifiedNameFilePathConverter qualifiedNameFilePathConverter, ISymbolicNameService symbolicNameService, IRuntimeVersionSupport runtimeVersionSupport, IResourceContentImporterExtensionManager resourceContentImporterExtensionManager, IBmModelManager bmModelManager, IDerivedDataManagerProvider derivedDataManagerProvider, org.eclipse.emf.ecore.resource.Resource.Factory resourceFactory)
Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<Object,Object>
getLoadOptions(org.eclipse.emf.ecore.resource.Resource resource)
Subclasses override this method to provide custom resource load options.protected byte[]
handleResourceCreationOrModification(IBmPlatformTransaction transaction, IBmNamespace namespace, IDtProject project, org.eclipse.core.runtime.IPath path, InputStream content, boolean fullOverride)
Handles a data import process for an imported resourceprotected void
handleResourceDeletion(IBmPlatformTransaction transaction, IBmNamespace namespace, IDtProject project, org.eclipse.core.runtime.IPath path)
Handles a data removal process for a removed resourceprotected void
postProcess(IBmObject object)
Post-processes the imported object.protected boolean
resolveExternalReferencesDuringImport()
Subclasses override this method to configure external reference resolving during the import of original XML document.-
Methods inherited from class com._1c.g5.v8.dt.core.provider.TransactionalBmContentImporter
computeSignature, handleResourceCreationOrModification, handleResourceDeletion
-
Methods inherited from class com._1c.g5.v8.dt.core.provider.BmContentImportSupport
computeSha256Hash, doResourceLoad, executeTaskInContextIfNecessary, forceDerivedDataRebuild, getRuntimeVersion, loadData, resolveFqn
-
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
-
-
-
-
Constructor Detail
-
StandardBmObjectImporter
protected StandardBmObjectImporter(IResourceContentImporter.IMergeStrategy mergeStrategy, IQualifiedNameFilePathConverter qualifiedNameFilePathConverter, ISymbolicNameService symbolicNameService, IRuntimeVersionSupport runtimeVersionSupport, IResourceContentImporterExtensionManager resourceContentImporterExtensionManager, IBmModelManager bmModelManager, IDerivedDataManagerProvider derivedDataManagerProvider)
Constructs a new instance.- Parameters:
mergeStrategy
- the merge strategy to use, may not benull
.qualifiedNameFilePathConverter
- the qualified name file path converter to use, may not benull
.symbolicNameService
- the symbolic name service to use, may not benull
.runtimeVersionSupport
- the runtime version support to use, may not benull
.resourceContentImporterExtensionManager
- the import extensions manager, may not benull
.bmModelManager
-IBmModelManager
service reference, may not benull
derivedDataManagerProvider
-IDerivedDataManagerProvider
service reference, may not benull
-
StandardBmObjectImporter
protected StandardBmObjectImporter(IResourceContentImporter.IMergeStrategy mergeStrategy, IQualifiedNameFilePathConverter qualifiedNameFilePathConverter, ISymbolicNameService symbolicNameService, IRuntimeVersionSupport runtimeVersionSupport, IResourceContentImporterExtensionManager resourceContentImporterExtensionManager, IBmModelManager bmModelManager, IDerivedDataManagerProvider derivedDataManagerProvider, org.eclipse.emf.ecore.resource.Resource.Factory resourceFactory)
Constructs a new instance.- Parameters:
mergeStrategy
- the merge strategy to use, may not benull
.qualifiedNameFilePathConverter
- the qualified name file path converter to use, may not benull
.symbolicNameService
- the symbolic name service to use, may not benull
.runtimeVersionSupport
- the runtime version support to use, may not benull
.resourceContentImporterExtensionManager
- the import extensions manager, may not benull
.derivedDataManagerProvider
- theIDerivedDataManagerProvider
service instance, may not benull
.resourceFactory
- the resource factory, may benull
.
-
-
Method Detail
-
getLoadOptions
protected Map<Object,Object> getLoadOptions(org.eclipse.emf.ecore.resource.Resource resource)
Subclasses override this method to provide custom resource load options. The default implementation always returnsnull
.- Parameters:
resource
- The resource to provide load options for. May not benull
.- Returns:
- the load options. May be
null
.
-
handleResourceCreationOrModification
protected final byte[] handleResourceCreationOrModification(IBmPlatformTransaction transaction, IBmNamespace namespace, IDtProject project, org.eclipse.core.runtime.IPath path, InputStream content, boolean fullOverride)
Description copied from class:TransactionalBmContentImporter
Handles a data import process for an imported resource- Specified by:
handleResourceCreationOrModification
in classTransactionalBmContentImporter
- Parameters:
transaction
- The data import BM transaction. Nevernull
namespace
- The target BM namespace for an import. Nevernull
project
- The targetIDtProject
. Nevernull
path
- The imported resource path. May not benull
content
- The imported content stream. May not benull
fullOverride
- Data full override import mode- Returns:
- Signature of imported data. Never
null
-
handleResourceDeletion
protected final void handleResourceDeletion(IBmPlatformTransaction transaction, IBmNamespace namespace, IDtProject project, org.eclipse.core.runtime.IPath path)
Description copied from class:TransactionalBmContentImporter
Handles a data removal process for a removed resource- Specified by:
handleResourceDeletion
in classTransactionalBmContentImporter
- Parameters:
transaction
- The data import BM transaction. Nevernull
namespace
- The target BM namespace for an import. Nevernull
project
- TargetIDtProject
. Nevernull
path
- The removed resource path. May not benull
-
postProcess
protected void postProcess(IBmObject object)
Post-processes the imported object.- Parameters:
object
- The imported object. May not benull
.
-
resolveExternalReferencesDuringImport
protected boolean resolveExternalReferencesDuringImport()
Subclasses override this method to configure external reference resolving during the import of original XML document.- Returns:
true
if the external refererences need to be resolved during the import,false
otherwise.
-
-