Package com._1c.g5.v8.dt.core.provider
Class BaseBmObjectExporter
- java.lang.Object
-
- com._1c.g5.v8.dt.core.provider.BaseBmObjectExporter
-
- All Implemented Interfaces:
IBmObjectExporter
- Direct Known Subclasses:
CaiBmExporter
,CmiExporter
,HpwaExporter
,ScheduleExporter
public abstract class BaseBmObjectExporter extends Object implements IBmObjectExporter
BasicIBmObjectExporter
implementation for serializing BigModel objects.How objects would be merged to target resource is defined by
IResourceContentImporter.IMergeStrategy
. Resource name is defined byIProjectFileSystemSupport
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseBmObjectExporter(IBmModelManager modelManager, ISymbolicNameService symbolicNameService, org.eclipse.xtext.naming.IQualifiedNameConverter qualifiedNameConverter, IQualifiedNameFilePathConverter qualifiedNameFilePathConverter, org.eclipse.emf.ecore.resource.Resource.Factory resourceFactory, IResourceContentExporterExtensionManager resourceContentExporterExtensionManager)
Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IBmObject
cloneObject(IBmObject object)
Clones object to be exported.BmFileDeletionResult
deleteFile(IDtProject project, IBmNamespace namespace, org.eclipse.emf.ecore.EClass eClass, String fqn)
Deletes the file(s) the top object data is saved in as a response to the object's deletion.protected IFormatter
getFormatter()
BmFileSaveResult
saveFile(IDtProject project, IBmNamespace namespace, long id)
Exports the specified top object data and saves it in the corresponding workspace file(s) as a response to the object's creation or modification.protected void
waitDerivedDataComputation(IDtProject project)
Waits DS calculation before save.-
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.IBmObjectExporter
supports
-
-
-
-
Constructor Detail
-
BaseBmObjectExporter
protected BaseBmObjectExporter(IBmModelManager modelManager, ISymbolicNameService symbolicNameService, org.eclipse.xtext.naming.IQualifiedNameConverter qualifiedNameConverter, IQualifiedNameFilePathConverter qualifiedNameFilePathConverter, org.eclipse.emf.ecore.resource.Resource.Factory resourceFactory, IResourceContentExporterExtensionManager resourceContentExporterExtensionManager)
Constructs a new instance.- Parameters:
modelManager
- the model manager, may not benull
.symbolicNameService
- the symbolic name service to use, may not benull
.qualifiedNameConverter
- the qualified name converter, may not benull
.qualifiedNameFilePathConverter
- the qualified-name-to-file-path converter, may not benull
.resourceFactory
- the resource factory to use, may not benull
.resourceContentExporterExtensionManager
- the exporter extension manager to use, may not benull
.
-
-
Method Detail
-
saveFile
public final BmFileSaveResult saveFile(IDtProject project, IBmNamespace namespace, long id) throws org.eclipse.core.runtime.CoreException
Description copied from interface:IBmObjectExporter
Exports the specified top object data and saves it in the corresponding workspace file(s) as a response to the object's creation or modification.- Specified by:
saveFile
in interfaceIBmObjectExporter
- Parameters:
project
- The project the top object belongs to. May not benull
.namespace
- The namespace the top object belongs to. May not benull
.id
- The identifier of the top object.- Returns:
- an instance of
BmFileSaveResult
containing information about the saved file(s). - Throws:
org.eclipse.core.runtime.CoreException
- if an error occurs.
-
deleteFile
public final BmFileDeletionResult deleteFile(IDtProject project, IBmNamespace namespace, org.eclipse.emf.ecore.EClass eClass, String fqn) throws org.eclipse.core.runtime.CoreException
Description copied from interface:IBmObjectExporter
Deletes the file(s) the top object data is saved in as a response to the object's deletion.- Specified by:
deleteFile
in interfaceIBmObjectExporter
- Parameters:
project
- The project the top object belongs to. May not benull
.namespace
- The namespace the top object belongs to. May not benull
.eClass
- TheEMF class
of the top object. May not benull
.fqn
- The FQN of the top object. May not benull
.- Returns:
- an instance of
BmFileDeletionResult
containing information about the deleted file(s). - Throws:
org.eclipse.core.runtime.CoreException
- if an error occurs.
-
cloneObject
protected IBmObject cloneObject(IBmObject object)
Clones object to be exported. The given object isn't attached to the transaction.- Parameters:
object
-- Returns:
- clone
-
waitDerivedDataComputation
protected void waitDerivedDataComputation(IDtProject project)
Waits DS calculation before save. Implementing class should define the logic of waiting by itself.- Parameters:
project
-
-
getFormatter
protected IFormatter getFormatter()
-
-