Interface ImportOperation


@NonExtendable public interface ImportOperation
Operation providing means to import store elements from files in a file system.
Since:
5.1.42
  • Field Details

  • Method Details

    • setCreateEntities

      @Deprecated(forRemoval=true) void setCreateEntities(boolean enable)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 5.2.410, replaced by setIgnoreEntities(boolean)
      Defines to import and update entities when importing. This option is enabled by default.
      Parameters:
      enable - true, to import and update entities.
      Since:
      5.1.42
    • setIgnoreEntities

      void setIgnoreEntities(boolean ignore)
      Defines to ignore entities when importing. This option is disabled by default.
      Parameters:
      ignore - true, to ignore entities.
      Since:
      5.2.410
    • setDatabaseLayerMapper

      @Deprecated(forRemoval=true) void setDatabaseLayerMapper(@NotNull @NotNull ImportOperation.DatabaseLayerMapper mapper)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 5.2.513 - use setLayerMapper(LayerMapper) instead
      Sets a mapper providing information to map imported schemes to different layers.
      Parameters:
      mapper - The mapper providing the relevant information.
      Since:
      5.1.42
      See Also:
    • setLayerMapper

      void setLayerMapper(@NotNull @NotNull LayerMapper layerMapper)
      Sets a mapper providing information to map imported schemes to a specific layer of the target project. Be aware that specifying a layer is mandatory if a new schema will be imported which doesn't exists in the target project. The given layerMapper needs to be Serializable.
      Parameters:
      layerMapper - The mapper providing the relevant information.
      Since:
      5.2.513
    • setImportFilter

      void setImportFilter(@NotNull @NotNull Filter<ImportElementInfo> filter)
      Sets a filter being used to decide upon elements to be imported. This is a pre-import filter that will be applied on the available file hierarchy as given by the file system in perform(FileSystem). Only elements passing the filter will be added for import. Children of passing elements will always be imported as well.
      Parameters:
      filter - The filter to be passed.
      Since:
      5.1.42
    • setStepsListener

      void setStepsListener(@NotNull @NotNull StepsListener listener)
      Sets the listener that gets informed on steps being started.
      Parameters:
      listener - The listener to be set.
      Since:
      5.1.42
    • setImportScheduleEntryActiveState

      void setImportScheduleEntryActiveState(boolean importScheduleEntryActiveState)
      Option to import the active state of a ScheduleEntry during the import (default = false).

      By default, all new schedule entries will be imported as inactive entries.
      Parameters:
      importScheduleEntryActiveState - whether to import the active state or not (default = false)
      Since:
      5.2.200902
    • setRevisionComment

      void setRevisionComment(@NotNull @NotNull String comment)
      Sets a comment for revisions created during the update.
      Parameters:
      comment - Revision comment, should not contain line breaks.
      Since:
      5.1.107
    • perform

      Perform the import on the given file system. Exported elements from the file system will be imported as new elements. Exported elements corresponding to elements, which already exist in the project, will be updated.
      Parameters:
      fileSystem - The file system to export to.
      Returns:
      A result object providing information about imported elements.
      Throws:
      IOException - if any access to the file system fails.
      LockException - if any element is already locked by another user during the import.
      ElementDeletedException - if an element has been expected to exist but is deleted on the server side.
      ElementMovedException - if an element has been expected to exist at a certain path but has been moved to a different path on the server side.
      SyncOperationException - if any unhandled RuntimeException is thrown during the import.
      Since:
      5.1.42