public interface RestoreOperation
Restore operation reads a backup file and loads it into the Structure database.
Note that if there's existing data in the structure database, it's not removed, but rather written over. If there's a structure with an ID that is present in the backup file, it will be overwritten. If there's a structure that's not present in the backup file, it will remain.
Modifier and Type | Method and Description |
---|---|
RestoreOperation |
checkBackupFile()
Checks that backup file has correct format.
|
ErrorsContainer |
getErrorsContainer() |
ProgressGauge |
getProgressGauge() |
Map<Long,String> |
getStructureNames()
Call this method after
restore() has completed to get names of all restored structures. |
RestoreOperation |
restore()
Performs the restore from backup synchronously.
|
RestoreOperation |
setFile(File file)
Sets the location of the backup file.
|
RestoreOperation |
setRestoreHistory(boolean restoreHistory)
Sets the
restoreHistory flag. |
@NotNull RestoreOperation setFile(@NotNull File file)
file
- backup file@NotNull RestoreOperation restore() throws IOException
Performs the restore from backup synchronously. After this method has finished successfully, the structure data contains all structures and other data from the backup file.
Issues in the backup file are referred to by their ID.
During this operation all exceptions or not found issues in JIRA are collected in getErrorsContainer()
IOException
- if the file cannot be read or has invalid format@NotNull RestoreOperation checkBackupFile() throws IOException
IOException
- if the file cannot be read or has invalid format@NotNull Map<Long,String> getStructureNames()
restore()
has completed to get names of all restored structures.ErrorsContainer getErrorsContainer()
ProgressGauge getProgressGauge()
ProgressGauge
allowing you to check this operation's progress and cancel it in a different thread.@NotNull RestoreOperation setRestoreHistory(boolean restoreHistory)
restoreHistory
flag. When the flag is set, the histories will be restored.restoreHistory
- default value is trueCopyright © 2024 Tempo Software. All Rights Reserved.