Class ResourceImportHelper

  • public class ResourceImportHelper
    extends Object
    Resource import helper.
    • Constructor Detail

      • ResourceImportHelper

        public ResourceImportHelper​(IResourceContentImporter.IMergeStrategy mergeStrategy,
                                    ISymbolicNameService symbolicNameService,
                                    IRuntimeVersionSupport runtimeVersionSupport,
                                    IResourceContentImporterExtensionManager resourceContentImporterExtensionManager)
        Constructs a new instance with the specified parameters.
        mergeStrategy - the merge strategy to use, may not be null.
        qualifiedNameFilePathConverter - the qualified name file path converter to use, may not be null.
        symbolicNameService - the symbolic name service to use, may not be null.
        runtimeVersionSupport - the runtime version support to use, may not be null.
        resourceContentImporterExtensionManager - the import extensions manager, may not be null.
    • Method Detail

      • performImport

        public IBmObject performImport​(IBmEngine engine,
                                       IBmTransaction transaction,
                                       IDtProject project,
                                       String fqn,
                                       org.eclipse.core.runtime.IPath path,
                                       InputStream inputStream,
                                       IBmObject existingObject,
                                       boolean fullOverride,
                                       boolean resolveExternalReferencesDuringImport,
                                       ResourceImportHelper.ILoadOptionsProvider loadOptionsProvider)
        Imports the only object residing in the specified resource. In case the resource contains no objects or more than one objects, the behaviour of this method is not specified.
        engine - The BM engine to import the object into. May not be null.
        transaction - The BM transaction to import the object within. May not be null.
        project - The project the object belongs to. May not be null.
        fqn - The FQN to assign to the imported object. May not be null.
        path - The path to the resource to import object from. May not be null.
        inputStream - The input stream to read the resource data from. May not be null.
        existingObject - The existing object if any. May be null.
        fullOverride - The flag indicating that the full override strategy rather than merge must be used in case the object already exists.
        resolveExternalReferencesDuringImport - The flag indicating whether external refererences need to be resolved during the import.
        loadOptionsProvider - The resource load options provider. May be null.
        the only top object residing in the resource. Never null.