Class SpreadsheetDocumentImporter
java.lang.Object
com._1c.g5.v8.dt.core.provider.BmContentImportSupport
com._1c.g5.v8.dt.internal.moxel.resource.SpreadsheetDocumentImporter
- All Implemented Interfaces:
IResourceContentImporter
public final class SpreadsheetDocumentImporter
extends BmContentImportSupport
implements IResourceContentImporter
Imports moxel data from the internal XML presentation
-
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
PIPELINE_SEGMENT_PREFIX, PLATFORM_VERSION
-
Constructor Summary
ConstructorsConstructorDescriptionSpreadsheetDocumentImporter
(IResourceContentImporter.IMergeStrategy mergeStrategy, IQualifiedNameFilePathConverter qualifiedNameFilePathConverter, ISymbolicNameService symbolicNameService, IRuntimeVersionSupport runtimeVersionSupport, IResourceContentImporterExtensionManager resourceContentImporterExtensionManager, IBmModelManager bmModelManager, IDerivedDataManagerProvider derivedDataManagerProvider) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
computeSignature
(InputStream content) Computes signature.Gets a dependency list of the importer.Gets the name of the async pipeline segment for this importer to runGets a human-readable description of the importing segment to be shown to the userbyte[]
handleResourceCreationOrModification
(IBmNamespace namespace, IDtProject project, org.eclipse.core.runtime.IPath path, Supplier<InputStream> contentSupplier, boolean fullOverride, boolean executeInGlobalContext) Handles resource creation or modification.void
handleResourceDeletion
(IBmNamespace namespace, IDtProject project, org.eclipse.core.runtime.IPath path, boolean executeInGlobalContext) Handles resource deletion.boolean
supports
(org.eclipse.core.runtime.IPath path) Checks if this importer supports the specified resource.Methods inherited from class com._1c.g5.v8.dt.core.provider.BmContentImportSupport
computeSha256Hash, doResourceLoad, executeImportInContextIfNecessary, executeTaskInContextIfNecessary, forceDerivedDataRebuild, getRuntimeVersion, loadData, resolveFqn
-
Constructor Details
-
SpreadsheetDocumentImporter
@Inject public SpreadsheetDocumentImporter(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
-
-
Method Details
-
computeSignature
Description copied from interface:IResourceContentImporter
Computes signature.- Specified by:
computeSignature
in interfaceIResourceContentImporter
- Parameters:
content
- The imported content stream. May not benull
- Returns:
- A signature of the content. May be empty or
null
-
getPipelineSegment
Description copied from interface:IResourceContentImporter
Gets the name of the async pipeline segment for this importer to run- Specified by:
getPipelineSegment
in interfaceIResourceContentImporter
- Returns:
- The target async pipeline segment. Never
null
-
dependsOn
Description copied from interface:IResourceContentImporter
Gets a dependency list of the importer. Dependencies are being defined in the form of async processing pipeline segment identifiers- Specified by:
dependsOn
in interfaceIResourceContentImporter
- Returns:
- The collection of dependencies. Never
null
. May be empty
-
getPipelineSegmentImportDescription
Description copied from interface:IResourceContentImporter
Gets a human-readable description of the importing segment to be shown to the user- Specified by:
getPipelineSegmentImportDescription
in interfaceIResourceContentImporter
- Returns:
- The description of an import stage. Never
null
-
handleResourceCreationOrModification
public byte[] handleResourceCreationOrModification(IBmNamespace namespace, IDtProject project, org.eclipse.core.runtime.IPath path, Supplier<InputStream> contentSupplier, boolean fullOverride, boolean executeInGlobalContext) Description copied from interface:IResourceContentImporter
Handles resource creation or modification.- Specified by:
handleResourceCreationOrModification
in interfaceIResourceContentImporter
- Parameters:
namespace
- The targetIBmNamespace
. May not benull
project
- The targetIDtProject
. May not benull
path
- The imported resource path. May not benull
contentSupplier
- The imported content supplier. May not benull
. Implementations should support any number of context requests to support the re-import process in case of BM deadlocksfullOverride
- The full override mode switch. The full override mode replaces content of an old object completelly without mergeexecuteInGlobalContext
- The global editing context execution flag- Returns:
- A signature of the imported content. May be
null
or empty
-
handleResourceDeletion
public void handleResourceDeletion(IBmNamespace namespace, IDtProject project, org.eclipse.core.runtime.IPath path, boolean executeInGlobalContext) Description copied from interface:IResourceContentImporter
Handles resource deletion.- Specified by:
handleResourceDeletion
in interfaceIResourceContentImporter
- Parameters:
namespace
- The targetIBmNamespace
. May not benull
project
- The targetIDtProject
. May not benull
path
- The imported resource path. May not benull
executeInGlobalContext
- The global editing context execution flag
-
supports
public boolean supports(org.eclipse.core.runtime.IPath path) Description copied from interface:IResourceContentImporter
Checks if this importer supports the specified resource.- Specified by:
supports
in interfaceIResourceContentImporter
- Parameters:
path
- The path to the resource to check. May not benull
.- Returns:
true
if the resource is supported,false
otherwise.
-