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
Modifier and TypeInterfaceDescriptionstatic interface
Deprecated.static class
Deprecated.since 5.2.513 - useLayerMapper
insteadstatic interface
static interface
Container providing access to the result of the import operation. -
Field Summary
Modifier and TypeFieldDescriptionstatic final ImportOperation.DatabaseLayerMapper
Deprecated.since 5.2.513 - useLayerMapper
insteadstatic 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
.void
setCreateEntities
(boolean enable) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.410, replaced bysetIgnoreEntities(boolean)
void
setDatabaseLayerMapper
(@NotNull ImportOperation.DatabaseLayerMapper mapper) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.513 - usesetLayerMapper(LayerMapper)
insteadvoid
setIgnoreEntities
(boolean ignore) Defines to ignore entities when importing.void
setImportFilter
(@NotNull Filter<ImportElementInfo> filter) Sets a filter being used to decide upon elements to be imported.void
setImportScheduleEntryActiveState
(boolean importScheduleEntryActiveState) Option to import theactive state
of aScheduleEntry
during the import (default =false
).
By default, all newschedule entries
will be imported as inactive entries.void
setLayerMapper
(@NotNull LayerMapper layerMapper) Sets a mapper providing information to map imported schemes to a specific layer of the target project.void
setRevisionComment
(@NotNull String comment) Sets a comment for revisions createdduring the update
.void
setStepsListener
(@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 - useLayerMapper
insteadIdentity 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 state
of aScheduleEntry
during the import (default =false
).
By default, all newschedule entries
will 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 anyelement
is already locked by another user during the import.ElementDeletedException
- if anelement
has been expected to exist but is deleted on the server side.ElementMovedException
- if anelement
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
-
LayerMapper
instead