com.atlassian.confluence.importexport
Class DefaultImportExportManager

java.lang.Object
  extended by com.atlassian.confluence.importexport.DefaultImportExportManager
All Implemented Interfaces:
ImportExportManager

public class DefaultImportExportManager
extends Object
implements ImportExportManager


Field Summary
static String EXPORT_ALL_FILE_PREFIX
           
static ArrayList<String> importExportTypes
           
 
Fields inherited from interface com.atlassian.confluence.importexport.ImportExportManager
EXPORT_XML_SCOPE_ALL, EXPORT_XML_SCOPE_PAGE, EXPORT_XML_SCOPE_SPACE, TYPE_ALL_DATA, TYPE_HTML, TYPE_MOINMOIN, TYPE_PDF, TYPE_XML
 
Constructor Summary
DefaultImportExportManager()
           
 
Method Summary
 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)
           
 List getImportExportTypeSpecifications()
           
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXPORT_ALL_FILE_PREFIX

public static final String EXPORT_ALL_FILE_PREFIX
See Also:
Constant Field Values

importExportTypes

public static final ArrayList<String> importExportTypes
Constructor Detail

DefaultImportExportManager

public DefaultImportExportManager()
Method Detail

importAs

public void importAs(Object type,
                     ImportContext context)
              throws ImportExportException
Deprecated. since 4.2 use doImport(ImportContext).

Specified by:
importAs in interface ImportExportManager
Throws:
ImportExportException

doImport

public void doImport(ImportContext context)
              throws ImportExportException
Description copied from interface: ImportExportManager
Performs an import specified by the given context.

Specified by:
doImport in interface ImportExportManager
Parameters:
context - a filled out context
Throws:
ImportExportException

performImport

public ImmutableImportProcessorSummary performImport(ImportContext context)
                                              throws ImportExportException
Description copied from interface: ImportExportManager
Performs an import specified by the given context and returns the summary of import result.

Specified by:
performImport in interface ImportExportManager
Parameters:
context - a filled out context
Returns:
the summary of all remapped ids
Throws:
ImportExportException - if somethings goes wrong in the import

exportAs

public String exportAs(ExportContext context,
                       com.atlassian.core.util.ProgressMeter progress)
                throws ImportExportException
Specified by:
exportAs in interface ImportExportManager
Throws:
ImportExportException

getImportExportTypeSpecifications

public List getImportExportTypeSpecifications()
Specified by:
getImportExportTypeSpecifications in interface ImportExportManager

getContentTree

public ContentTree getContentTree(com.atlassian.user.User user,
                                  Space space)
Specified by:
getContentTree in interface ImportExportManager
Returns:
a tree of ContentNodes for each page in the space the user can see (by checking page level permissions)

prepareDownloadPath

public String prepareDownloadPath(String path)
                           throws IOException
Description copied from interface: ImportExportManager
Helper method - returns the location to be used in the URL generated to download an exported archive.

Specified by:
prepareDownloadPath in interface ImportExportManager
Returns:
- relative path to be combined with the URL of the site to download the archive.
Throws:
IOException

isImportAllowed

public boolean isImportAllowed(String buildNumber)
Description copied from interface: ImportExportManager
Is the manager capable of importing a backup of the given build number. Backups from early versions of Confluence are no longer supported for importing.

Specified by:
isImportAllowed in interface ImportExportManager
Parameters:
buildNumber - the build number of the backup to be imported
Returns:
true if that build number is supported, false otherwise.

getContentPermissionManager

public ContentPermissionManager getContentPermissionManager()

setContentPermissionManager

public void setContentPermissionManager(ContentPermissionManager contentPermissionManager)

setBootstrapManager

public void setBootstrapManager(BootstrapManager bootstrapManager)

setPageManager

public void setPageManager(PageManager pageManager)

setEventPublisher

public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)


Copyright © 2003-2013 Atlassian. All Rights Reserved.