Interface ExportOperation
public interface ExportOperation
Operation providing means to export store elements to files in a
Request this operation via
To get a
file system
.Request this operation via
OperationAgent
: OperationAgent.getOperation(ExportOperation.TYPE)
.To get a
file system
use FileSystemsAgent
.- Since:
- 5.1.42
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Options for configuring the export of an addedchannels provider
.static interface
Container providing access to the result of the export operation.static interface
Options for configuring the export of an addedschema
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final OperationType<ExportOperation>
Operation providing means to export store elements to files in afile system
. -
Method Summary
Modifier and TypeMethodDescriptionaddChannelProvider
(@NotNull ChannelSourceProvider element) Add a channels providing element for export.void
addElement
(@NotNull IDProvider element) Generically adds a FirstSpirit element to be exported.Add a schema element for export.Request a options object to configure global properties export.perform
(@NotNull FileSystem<?> fileSystem) Perform the export on the givenfile system
.void
setDeleteObsoleteFiles
(boolean enable) Defines to delete obsoletes files from the file system.void
setExportChildElements
(boolean enable) Defines to export child elements of elements added to this operation.void
setExportLostAndFound
(boolean enable) Defines whether the contents in lost and found folders should be exported or not.void
setExportParentElements
(boolean enable) Defines to export parent elements of elements added to this operation.void
setExportRelease
(boolean enable) Defines to operate on release or the latest revision of FirstSpirit elements or entities.void
setExportReleaseEntities
(boolean enable) Deprecated.void
setStepsListener
(@NotNull StepsListener listener) Sets the listener that gets informed on steps being started.
-
Field Details
-
TYPE
Operation providing means to export store elements to files in afile system
.- Since:
- 5.1.42
-
-
Method Details
-
addElement
Generically adds a FirstSpirit element to be exported. Added elements will be exported according to the global options enabled. For specific configurable elements, see the respective adding-methods.
UsesetExportRelease(boolean)
to define whether therelease
or thecurrent
version of given element should be exported duringperform(FileSystem)
- Parameters:
element
- The element to be added.- Throws:
IllegalArgumentException
- if the givenelement
has been deleted- Since:
- 5.1.42
- See Also:
-
addSchema
ExportOperation.SchemaOptions addSchema(@NotNull @NotNull Schema element) throws IllegalArgumentException Add a schema element for export. A schema can further be configured by the returnedoptions object
.- Parameters:
element
- The schema element to be added.- Returns:
- An options object for configuring the schema export.
- Throws:
IllegalArgumentException
- if the givenschema
has been deleted- Since:
- 5.1.42
-
addChannelProvider
ExportOperation.ChannelsProviderOptions addChannelProvider(@NotNull @NotNull ChannelSourceProvider element) throws IllegalArgumentException Add a channels providing element for export. A channel provider can be configured by the returnedoptions object
.- Parameters:
element
- The channels providing element.- Returns:
- An options object for configuring the channels export.
- Throws:
IllegalArgumentException
- if the givenChannelSourceProvider
has been deleted- Since:
- 5.1.42
-
setExportReleaseEntities
Deprecated.since 5.2.313, replaced bysetExportRelease(boolean)
Defines to operate on released entities or the latest entities.- Parameters:
enable
-true
, to operate on released elements.- Since:
- 5.1.103
-
setExportRelease
void setExportRelease(boolean enable) Defines to operate on release or the latest revision of FirstSpirit elements or entities. This option is disabled by default.- Parameters:
enable
-true
, to operate on released elements or entities.- Since:
- 5.2.313
-
setExportChildElements
void setExportChildElements(boolean enable) Defines to export child elements of elements added to this operation. Default value istrue
. Note that entities are not children of a schema. This option is enabled by default.- Parameters:
enable
-true
, to export recursively.- Since:
- 5.1.42
-
setExportParentElements
void setExportParentElements(boolean enable) Defines to export parent elements of elements added to this operation. This option is enabled by default.- Parameters:
enable
-true
, to export parents.- Since:
- 5.1.42
-
setDeleteObsoleteFiles
void setDeleteObsoleteFiles(boolean enable) Defines to delete obsoletes files from the file system. This option is enabled by default.- Parameters:
enable
-true
, to delete obsolete files.- Since:
- 5.1.42
-
setExportLostAndFound
void setExportLostAndFound(boolean enable) Defines whether the contents in lost and found folders should be exported or not. The default value isfalse
.- Parameters:
enable
-true
, to export the contents in lost and found folders.- Since:
- 5.2.1403
-
setStepsListener
Sets the listener that gets informed on steps being started.- Parameters:
listener
- The listener to be set.- Since:
- 5.1.42
-
configurePropertiesExport
Request a options object to configure global properties export. Global properties export is deactivated by default, therefore it is necessary to call this method to activate it.
Attention: This method is only available forproject admins
. Will throw an security exception otherwise.- Returns:
- An options object to configure global properties export.
- Throws:
SecurityException
- if current user is no project admin of the belonging project- Since:
- 5.2.21
-
perform
ExportOperation.Result perform(@NotNull @NotNull FileSystem<?> fileSystem) throws IOException, SyncOperationException - Parameters:
fileSystem
- The file system to export to.- Returns:
- A result object providing information about exported elements.
- Throws:
IOException
- if any access to the file system fails.SyncOperationException
- if any unhandled RuntimeException is thrown during the export.- Since:
- 5.1.42
- See Also:
-
setExportRelease(boolean)