Interface ImportOperation
@NonExtendable
public interface ImportOperation
Operation providing means to import store elements from files in a
file system.- Since:
- 5.1.42
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceDeprecated.static classDeprecated.since 5.2.513 - useLayerMapperinsteadstatic interfacestatic interfaceContainer providing access to the result of the import operation. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ImportOperation.DatabaseLayerMapperDeprecated.since 5.2.513 - useLayerMapperinsteadstatic final OperationType<ImportOperation>Operation providing means to import store elements from files in afile system. -
Method Summary
Modifier and TypeMethodDescriptionperform(@NotNull FileSystem<?> fileSystem) Perform the import on the givenfile system.voidsetCreateEntities(boolean enable) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.410, replaced bysetIgnoreEntities(boolean)voidsetDatabaseLayerMapper(@NotNull ImportOperation.DatabaseLayerMapper mapper) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.513 - usesetLayerMapper(LayerMapper)insteadvoidsetIgnoreEntities(boolean ignore) Defines to ignore entities when importing.voidsetImportFilter(@NotNull Filter<ImportElementInfo> filter) Sets a filter being used to decide upon elements to be imported.voidsetImportScheduleEntryActiveState(boolean importScheduleEntryActiveState) Option to import theactive stateof aScheduleEntryduring the import (default =false).
By default, all newschedule entrieswill be imported as inactive entries.voidsetLayerMapper(@NotNull LayerMapper layerMapper) Sets a mapper providing information to map imported schemes to a specific layer of the target project.voidsetRevisionComment(@NotNull String comment) Sets a comment for revisions createdduring the update.voidsetStepsListener(@NotNull StepsListener listener) Sets the listener that gets informed on steps being started.
-
Field Details
-
TYPE
Operation providing means to import store elements from files in afile system.- Since:
- 5.1.42
-
IDENTITY_LAYER_MAPPING
Deprecated.since 5.2.513 - useLayerMapperinsteadIdentity layer mapping, mapping source layer to target layer with same name.- Since:
- 5.1.104
- See Also:
-
-
Method Details
-
setCreateEntities
Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.410, replaced bysetIgnoreEntities(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 - usesetLayerMapper(LayerMapper)insteadSets 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
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 beSerializable.- Parameters:
layerMapper- The mapper providing the relevant information.- Since:
- 5.2.513
-
setImportFilter
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 inperform(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
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 theactive stateof aScheduleEntryduring the import (default =false).
By default, all newschedule entrieswill be imported as inactive entries.- Parameters:
importScheduleEntryActiveState- whether to import the active state or not (default =false)- Since:
- 5.2.200902
-
setRevisionComment
Sets a comment for revisions createdduring the update.- Parameters:
comment- Revision comment, should not contain line breaks.- Since:
- 5.1.107
-
perform
ImportOperation.Result perform(@NotNull @NotNull FileSystem<?> fileSystem) throws IOException, LockException, ElementDeletedException, ElementMovedException, SyncOperationException Perform the import on the givenfile 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 anyelementis already locked by another user during the import.ElementDeletedException- if anelementhas been expected to exist but is deleted on the server side.ElementMovedException- if anelementhas 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
-
LayerMapperinstead