public class DefaultImportExportManager extends Object implements ImportExportManager
Modifier and Type | Field and Description |
---|---|
static String |
EXPORT_ALL_FILE_PREFIX |
static ArrayList<String> |
importExportTypes |
EXPORT_XML_SCOPE_ALL, EXPORT_XML_SCOPE_PAGE, EXPORT_XML_SCOPE_SPACE, TYPE_ALL_DATA, TYPE_HTML, TYPE_MOINMOIN, TYPE_PDF, TYPE_XML
Constructor and Description |
---|
DefaultImportExportManager() |
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 . |
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.
|
void |
importAs(Object type,
ImportContext context)
Deprecated.
since 4.2 use
doImport(ImportContext) . |
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.
|
void |
setBootstrapManager(BootstrapManager bootstrapManager) |
void |
setContentPermissionManager(ContentPermissionManager contentPermissionManager) |
void |
setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher) |
void |
setPageManager(PageManager pageManager) |
void |
setUpgradeManager(UpgradeManager upgradeManager) |
public static final String EXPORT_ALL_FILE_PREFIX
public void importAs(Object type, ImportContext context) throws ImportExportException
doImport(ImportContext)
.importAs
in interface ImportExportManager
ImportExportException
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 importpublic 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()
public void setContentPermissionManager(ContentPermissionManager contentPermissionManager)
public void setBootstrapManager(BootstrapManager bootstrapManager)
public void setUpgradeManager(UpgradeManager upgradeManager)
public void setPageManager(PageManager pageManager)
public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
Copyright © 2003–2015 Atlassian. All rights reserved.