public class DefaultImportExportManager extends Object implements ImportExportManager
Modifier and Type | Field and Description |
---|---|
static String |
EXPORT_ALL_FILE_PREFIX |
static ArrayList<String> |
importExportTypes
Deprecated.
since 5.10 Use
getImportExportTypeSpecifications() |
TYPE_ALL_DATA, TYPE_HTML, TYPE_MOINMOIN, TYPE_PDF, TYPE_XML
Constructor and Description |
---|
DefaultImportExportManager(ContentPermissionManager contentPermissionManager,
BootstrapManager bootstrapManager,
PageManager pageManager,
com.atlassian.event.api.EventPublisher eventPublisher,
UpgradeManager upgradeManager,
com.atlassian.plugin.PluginController pluginController,
com.atlassian.plugin.PluginAccessor pluginAccessor) |
Modifier and Type | Method and Description |
---|---|
protected String |
doExport(ExportContext context,
com.atlassian.core.util.ProgressMeter progress) |
void |
doImport(ImportContext context)
Performs an import specified by the given
context . |
protected ImmutableImportProcessorSummary |
doPerformImport(ImportContext context) |
String |
exportAs(ExportContext context,
com.atlassian.core.util.ProgressMeter progress) |
ContentPermissionManager |
getContentPermissionManager() |
ContentTree |
getContentTree(com.atlassian.user.User user,
Space space)
Returns a tree of content including pages for a space.
|
List |
getImportExportTypeSpecifications() |
BuildNumber |
getOldestSpaceImportAllowed()
The oldest build number a space can be imported from.
|
ContentTree |
getPageBlogTree(com.atlassian.user.User user,
Space space)
Returns a tree of content including pages and blog posts for a space.
|
boolean |
isImportAllowed(String buildNumber)
Is the manager capable of importing a backup of the given build number.
|
ImmutableImportProcessorSummary |
performImport(ImportContext context)
Performs an import specified by the given context and returns the summary of import result.
|
String |
prepareDownloadPath(String path)
Helper method - returns the location to be used in the URL generated to download
an exported archive.
|
protected Cleanup |
temporarilyShutdownInterferingPlugins(ImportContext context) |
public static final String EXPORT_ALL_FILE_PREFIX
@Deprecated public static final ArrayList<String> importExportTypes
getImportExportTypeSpecifications()
public DefaultImportExportManager(ContentPermissionManager contentPermissionManager, BootstrapManager bootstrapManager, PageManager pageManager, com.atlassian.event.api.EventPublisher eventPublisher, UpgradeManager upgradeManager, com.atlassian.plugin.PluginController pluginController, com.atlassian.plugin.PluginAccessor pluginAccessor)
public void doImport(ImportContext context) throws ImportExportException
ImportExportManager
context
.doImport
in interface ImportExportManager
context
- a filled out contextImportExportException
public ImmutableImportProcessorSummary performImport(ImportContext context) throws ImportExportException
ImportExportManager
performImport
in interface ImportExportManager
context
- a filled out contextImportExportException
- if somethings goes wrong in the importprotected ImmutableImportProcessorSummary doPerformImport(ImportContext context) throws ImportExportException
ImportExportException
protected final Cleanup temporarilyShutdownInterferingPlugins(ImportContext context)
public String exportAs(ExportContext context, com.atlassian.core.util.ProgressMeter progress) throws ImportExportException
exportAs
in interface ImportExportManager
ImportExportException
protected String doExport(ExportContext context, com.atlassian.core.util.ProgressMeter progress) throws ImportExportException
ImportExportException
public List getImportExportTypeSpecifications()
getImportExportTypeSpecifications
in interface ImportExportManager
public ContentTree getContentTree(com.atlassian.user.User user, Space space)
ImportExportManager
getContentTree
in interface ImportExportManager
user
- to generate tree of content for, taking into account their permissionspace
- to generate tree of content frompublic ContentTree getPageBlogTree(com.atlassian.user.User user, Space space)
ImportExportManager
getPageBlogTree
in interface ImportExportManager
user
- to generate tree of content for, taking into account their permissionspace
- to generate tree of content frompublic String prepareDownloadPath(String path) throws IOException
ImportExportManager
prepareDownloadPath
in interface ImportExportManager
IOException
public boolean isImportAllowed(String buildNumber)
ImportExportManager
isImportAllowed
in interface ImportExportManager
buildNumber
- the build number of the backup to be importedpublic BuildNumber getOldestSpaceImportAllowed()
ImportExportManager
getOldestSpaceImportAllowed
in interface ImportExportManager
public ContentPermissionManager getContentPermissionManager()
Copyright © 2003–2020 Atlassian. All rights reserved.