com.atlassian.confluence.importexport.impl
Class FileXmlExporter

java.lang.Object
  extended by com.atlassian.confluence.importexport.Exporter
      extended by com.atlassian.confluence.importexport.impl.AbstractExporterImpl
          extended by com.atlassian.confluence.importexport.impl.AbstractXmlExporter
              extended by com.atlassian.confluence.importexport.impl.FileXmlExporter
Direct Known Subclasses:
BackupExporter, XmlExporter

public abstract class FileXmlExporter
extends AbstractXmlExporter

Performs the file IO side of the export/backup

For example: - copying attachments to temp directory - copying config files

Then performs the zipping and packaging into a zip file


Field Summary
protected  AttachmentManager attachmentManager
           
 
Fields inherited from class com.atlassian.confluence.importexport.impl.AbstractXmlExporter
ATTACHMENTS_DIRECTORY, bootstrapManager, ENTITIES_FILE_NAME, EXPORT_DESCRIPTOR_FILE_NAME, sessionFactory, spaceManager, TEMPLATES_DIRECTORY
 
Fields inherited from class com.atlassian.confluence.importexport.Exporter
context, log
 
Constructor Summary
FileXmlExporter()
           
 
Method Summary
protected  void backupAttachments()
          Backs up the Attachments and stores them in the "attachments" directory of the export.
protected  void backupConfigFiles()
           
protected  void backupEverything(ObjectHandleTranslator translator, com.atlassian.core.util.ProgressMeter progress)
          copies attachments, templates and config files
protected  void backupResources()
           
protected  void backupTemplates()
           
 java.lang.String doExport(com.atlassian.core.util.ProgressMeter progress)
           
protected abstract  java.util.List getIncludedSpaces()
          Returns the List of Spaces that should be included in the export When all Spaces are included, an empty List should be returned
 void setAttachmentManager(AttachmentManager attachmentManager)
           
 
Methods inherited from class com.atlassian.confluence.importexport.impl.AbstractXmlExporter
addPropertiesForContent, backupEntities, doExport, getContentAndContentPropertiesFromSpace, getDescriptorOutputStream, getExportType, getHandlesOfObjectsForExport, getObjectsExcludedFromExport, getSettingsManager, getSourceTemplateDirForCopying, getXmlOutputStream, setBootstrapManager, setMailContentManager, setPageManager, setPropertySetManager, setSessionFactory, setSettingsManager, setSpaceManager, writeBackupDescriptor
 
Methods inherited from class com.atlassian.confluence.importexport.impl.AbstractExporterImpl
checkHaveSomethingToExport, ensureDirectoryCreated, getExportDirectory, getSpaceKeyForExportFileName, getWorkingExportContext, prepareExportFileName, setExportFileNameGenerator
 
Methods inherited from class com.atlassian.confluence.importexport.Exporter
getContext, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attachmentManager

protected AttachmentManager attachmentManager
Constructor Detail

FileXmlExporter

public FileXmlExporter()
Method Detail

doExport

public java.lang.String doExport(com.atlassian.core.util.ProgressMeter progress)
                          throws ImportExportException
Specified by:
doExport in class Exporter
Throws:
ImportExportException

backupEverything

protected void backupEverything(ObjectHandleTranslator translator,
                                com.atlassian.core.util.ProgressMeter progress)
                         throws ImportExportException
copies attachments, templates and config files

Overrides:
backupEverything in class AbstractXmlExporter
Throws:
ImportExportException

getIncludedSpaces

protected abstract java.util.List getIncludedSpaces()
Returns the List of Spaces that should be included in the export When all Spaces are included, an empty List should be returned

Returns:
a List of Space objects
See Also:
AttachmentDao.AttachmentCopier.setSpacesToInclude(java.util.List)

backupAttachments

protected void backupAttachments()
                          throws ImportExportException
Backs up the Attachments and stores them in the "attachments" directory of the export. This method copies all attachments from the current Attachment store to the export location. The spaces to be included in the export are used to restrict what attachments are included. The pages to be excluded in the export are used to restrict what attachments are included.

Throws:
ImportExportException
See Also:
AbstractXmlExporter.getObjectsExcludedFromExport(), getIncludedSpaces()

backupResources

protected void backupResources()
                        throws ImportExportException
Throws:
ImportExportException

backupTemplates

protected void backupTemplates()
                        throws ImportExportException
Throws:
ImportExportException

backupConfigFiles

protected void backupConfigFiles()
                          throws ImportExportException
Throws:
ImportExportException

setAttachmentManager

public void setAttachmentManager(AttachmentManager attachmentManager)


Copyright © 2003-2011 Atlassian. All Rights Reserved.