Package com._1c.g5.v8.dt.binary.resource
Class BinaryResourceContentImporter
- java.lang.Object
-
- com._1c.g5.v8.dt.core.provider.BmContentImportSupport
-
- com._1c.g5.v8.dt.core.provider.TransactionalBmContentImporter
-
- com._1c.g5.v8.dt.binary.resource.BinaryResourceContentImporter
-
- All Implemented Interfaces:
IResourceContentImporter
public final class BinaryResourceContentImporter extends TransactionalBmContentImporter
IResourceContentImporter
implementation for BinaryData.
-
-
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 Constructor Description BinaryResourceContentImporter(IBmModelManager bmModelManager, IQualifiedNameFilePathConverter qualifiedNameFilePathConverter)
Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getOrder()
Gets importer order.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 resourceboolean
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.TransactionalBmContentImporter
computeSignature, handleResourceCreationOrModification, handleResourceDeletion
-
Methods inherited from class com._1c.g5.v8.dt.core.provider.BmContentImportSupport
computeSha256Hash, doResourceLoad, executeTaskInContextIfNecessary, forceDerivedDataRebuild, getRuntimeVersion, loadData, resolveFqn
-
-
-
-
Constructor Detail
-
BinaryResourceContentImporter
@Inject public BinaryResourceContentImporter(IBmModelManager bmModelManager, IQualifiedNameFilePathConverter qualifiedNameFilePathConverter)
Constructs a new instance.- Parameters:
qualifiedNameFilePathConverter
- The qualified-name-to-file-path converter. May not benull
.
-
-
Method Detail
-
getOrder
public int getOrder()
Description copied from interface:IResourceContentImporter
Gets importer order. The lower the order value is, the earlier tasks created by this importer must be processed. The value ofInteger.MAX_VALUE
means that the tasks created by this importer should be processed when requested explicitly by the user.- Returns:
- the order value.
- See Also:
IBmModelManager#forceImport(IDtProject, String)
-
supports
public boolean supports(org.eclipse.core.runtime.IPath path)
Description copied from interface:IResourceContentImporter
Checks if this importer supports the specified resource.- Parameters:
path
- The path to the resource to check. May not benull
.- Returns:
true
if the resource is supported,false
otherwise.
-
handleResourceCreationOrModification
protected 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 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
-
-