public final class Importer extends Object
Modifier and Type | Field and Description |
---|---|
static TimePeriod |
DEFAULT_TIMEOUT |
static TimePeriod |
LONG_TIMEOUT |
static TimePeriod |
RIDICULOUSLY_LONG_TIMEOUT |
Constructor and Description |
---|
Importer(@NonNull ConfluenceRpc rpc,
@NonNull BaseUrlSelector baseUrlSelector)
Assumes that the webTester is already on the edit screen.
|
Importer(@NonNull ConfluenceRpc rpc,
@NonNull BaseUrlSelector baseUrlSelector,
net.sourceforge.jwebunit.junit.WebTester webTester) |
Modifier and Type | Method and Description |
---|---|
void |
attemptInvalidSpaceImport(File backupFile)
Attempt to import a space backup that is expected to fail.
|
String |
getExportBuildNumber() |
String |
getImportBackupValidationError(File backupFile) |
String |
getOldestSpaceImportAllowed() |
String |
getPluginExportCompatibility(String pluginKey) |
void |
importGlobalBackup(File backupFile,
TimePeriod importTimeout,
DirectoryConfiguration directoryConfig,
AdminConsole adminConsole)
Perform a site import via the web ui.
|
void |
importGlobalBackupAndWaitForReindex(File backupFile,
TimePeriod importTimeout,
DirectoryConfiguration directoryConfig,
AdminConsole adminConsole) |
void |
importSpaceBackup(File backupFile,
TimePeriod importTimeout)
Import an xml exported space from the classpath into Confluence via the web ui.
|
void |
importSpaceBackup(File backupFile,
TimePeriod importTimeout,
boolean buildIndex)
Same as
importSpaceBackup(File, TimePeriod) but lets you select whether "build index" checkbox should be set |
void |
importSynchronously(File exportZip,
DirectoryConfiguration directoryConfig,
AdminConsole adminConsole)
This method tests the synchronous import mode in Confluence.
|
public static final TimePeriod DEFAULT_TIMEOUT
public static final TimePeriod LONG_TIMEOUT
public static final TimePeriod RIDICULOUSLY_LONG_TIMEOUT
public Importer(@NonNull ConfluenceRpc rpc, @NonNull BaseUrlSelector baseUrlSelector)
rpc
- must be logged in as a user with administrative privileges.baseUrlSelector
- BaseUrlSelectorpublic Importer(@NonNull ConfluenceRpc rpc, @NonNull BaseUrlSelector baseUrlSelector, net.sourceforge.jwebunit.junit.WebTester webTester)
rpc
- must be logged in as a user with administrative privileges.baseUrlSelector
- BaseUrlSelectorwebTester
- WebTesterpublic void importSpaceBackup(File backupFile, TimePeriod importTimeout)
Import an xml exported space from the classpath into Confluence via the web ui. It sets the TextField containing location of the backup file, which must be set in setBackupFile method.
Does Not Rebuild Index.
This method relies on being the only import process running at the time,
since it waits for an ImportFinishedEvent
- up to the given timeout amount
backupFile
- to be importedimportTimeout
- maximum amount of time to wait for the import before failing with a RuntimeException.public void importSpaceBackup(File backupFile, TimePeriod importTimeout, boolean buildIndex)
importSpaceBackup(File, TimePeriod)
but lets you select whether "build index" checkbox should be setbackupFile
- importTimeout
- buildIndex
- public void attemptInvalidSpaceImport(File backupFile)
public void importGlobalBackup(File backupFile, TimePeriod importTimeout, DirectoryConfiguration directoryConfig, AdminConsole adminConsole)
Perform a site import via the web ui. It sets the TextField containing location of the backup file, which must be set in setBackupFile method. After the import is performed, the base url setting is restored.
Does Not Rebuild Index.
This method relies on being the only import process running at the time,
since it waits for an ImportFinishedEvent
- up to the given timeout amount
backupFile
- to be importedimportTimeout
- maximum amount of time to wait for the import before failing with a RuntimeException.directoryConfig
- the expected user directory configuration, which must be restored following a globaladminConsole
- required to disable websudo and enable the remote apipublic void importGlobalBackupAndWaitForReindex(File backupFile, TimePeriod importTimeout, DirectoryConfiguration directoryConfig, AdminConsole adminConsole)
public void importSynchronously(File exportZip, DirectoryConfiguration directoryConfig, AdminConsole adminConsole)
public String getExportBuildNumber()
public String getOldestSpaceImportAllowed()
Copyright © 2003–2021 Atlassian. All rights reserved.