Package com._1c.g5.v8.dt.core.provider
Interface IResourceContentImporter
-
- All Known Implementing Classes:
BaseBmBlobImporter
,BinaryResourceContentImporter
,CaiResourceContentImporter
,CmiResourceContentImporter
,HpwaResourceContentImporter
,ScheduleResourceContentImporter
,StandardBmObjectImporter
,TransactionalBmContentImporter
public interface IResourceContentImporter
Resource content importer.Implementations should be registered by
com._1c.g5.v8.bm.resourceContentImporter
extension point. How model merging is performed can be defined byIResourceContentImporter.IMergeStrategy
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
IResourceContentImporter.IMergeStrategy
Model to BM model merge strategy
-
Field Summary
Fields Modifier and Type Field Description static String
PLATFORM_VERSION
Platform version parameter name.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description byte[]
computeSignature(InputStream content)
Computes signature.int
getOrder()
Gets importer order.default byte[]
handleResourceCreationOrModification(IBmNamespace namespace, IDtProject project, org.eclipse.core.runtime.IPath path, Supplier<InputStream> contentSupplier, boolean fullOverride, boolean executeInGlobalContext)
Handles resource creation or modification.default 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.
-
-
-
Field Detail
-
PLATFORM_VERSION
static final String PLATFORM_VERSION
Platform version parameter name. Being transferred as an option during the resource loading- See Also:
- Constant Field Values
-
-
Method Detail
-
getOrder
int getOrder()
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
boolean supports(org.eclipse.core.runtime.IPath path)
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.
-
computeSignature
byte[] computeSignature(InputStream content)
Computes signature.- Parameters:
content
- The imported content stream. May not benull
- Returns:
- A signature of the content. May be empty or
null
-
handleResourceCreationOrModification
default byte[] handleResourceCreationOrModification(IBmNamespace namespace, IDtProject project, org.eclipse.core.runtime.IPath path, Supplier<InputStream> contentSupplier, boolean fullOverride, boolean executeInGlobalContext)
Handles resource creation or modification.- 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
default void handleResourceDeletion(IBmNamespace namespace, IDtProject project, org.eclipse.core.runtime.IPath path, boolean executeInGlobalContext)
Handles resource deletion.- 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
-
-