com.atlassian.confluence.importexport.impl
Class XmlExporter

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
                  extended by com.atlassian.confluence.importexport.impl.XmlExporter

public class XmlExporter
extends FileXmlExporter

Exports the entities added to the workingEntities collection in the context to xml. Used for making page and space xml exports.


Field Summary
 
Fields inherited from class com.atlassian.confluence.importexport.impl.FileXmlExporter
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.impl.AbstractExporterImpl
i18nBeanFactory
 
Fields inherited from class com.atlassian.confluence.importexport.Exporter
context
 
Constructor Summary
XmlExporter()
           
 
Method Summary
 String doExport(com.atlassian.core.util.ProgressMeter progress)
          Exports the content specified by the configured ExportContext.
protected  List<TransientHibernateHandle> getHandlesOfObjectsForExport(HibernateObjectHandleTranslator translator, net.sf.hibernate.Session session)
           
protected  List<Space> getIncludedSpaces()
          In this implementation, we want to find out the root entity and include the Space from that.
protected  List<ConfluenceEntityObject> getObjectsExcludedFromExport()
          Gets a list of actual objects (not handles) to exclude from export.
protected  List getSourceTemplateDirForCopying()
          If we're doing an export rather than a full backup, we don't export any templates
 void setConfluenceBandanaRecordDao(ConfluenceBandanaRecordDao dao)
           
 void setContext(ExportContext context)
           
 void setCustomContentManager(CustomContentManager customContentManager)
           
protected  void setCustomProperties(ExportDescriptor exportDescriptor)
          Adds the space key to the customer descriptor properties.
 void setLikeEntityDao(LikeEntityDao likeEntityDao)
           
 void setNotificationManager(NotificationManager notificationManager)
           
 void setPageManager(PageManager pageManager)
           
 void setPropertySetManager(ConfluencePropertySetManager propertySetManager)
           
 void setStorageFormatUserRewriter(StorageFormatUserRewriter storageFormatUserRewriter)
           
 
Methods inherited from class com.atlassian.confluence.importexport.impl.FileXmlExporter
backupAttachments, backupConfigFiles, backupEverything, backupPluginData, backupResources, backupTemplates, setAttachmentManager, setBackupRestoreProviderManager
 
Methods inherited from class com.atlassian.confluence.importexport.impl.AbstractXmlExporter
backupEntities, doExport, getDescriptorOutputStream, getExportScope, getExportType, getSettingsManager, getXmlOutputStream, setBootstrapManager, setSessionFactory, setSettingsManager, setSpaceManager, setUpgradeManager, writeBackupDescriptor
 
Methods inherited from class com.atlassian.confluence.importexport.impl.AbstractExporterImpl
checkHaveSomethingToExport, createAndSetExportDirectory, createExportDirectory, ensureDirectoryCreated, getSpaceKeyForExportFileName, getWorkingExportContext, prepareExportFileName, setExportFileNameGenerator, setI18NBeanFactory
 
Methods inherited from class com.atlassian.confluence.importexport.Exporter
getContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlExporter

public XmlExporter()
Method Detail

setContext

public void setContext(ExportContext context)
Overrides:
setContext in class Exporter

doExport

public String doExport(com.atlassian.core.util.ProgressMeter progress)
                throws ImportExportException
Description copied from class: Exporter
Exports the content specified by the configured ExportContext.

Overrides:
doExport in class FileXmlExporter
Parameters:
progress - the meter to update with progress during the export.
Returns:
the path to the exported content.
Throws:
ImportExportException - if it fails for any reason.

getIncludedSpaces

protected final List<Space> getIncludedSpaces()
In this implementation, we want to find out the root entity and include the Space from that.

Specified by:
getIncludedSpaces in class FileXmlExporter
Returns:
an ArrayList containing the relevant Space
See Also:
AttachmentDao.AttachmentCopier.setSpacesToInclude(java.util.List)

setCustomProperties

protected final void setCustomProperties(ExportDescriptor exportDescriptor)
Adds the space key to the customer descriptor properties.

Overrides:
setCustomProperties in class AbstractXmlExporter

getSourceTemplateDirForCopying

protected List getSourceTemplateDirForCopying()
If we're doing an export rather than a full backup, we don't export any templates

Specified by:
getSourceTemplateDirForCopying in class AbstractXmlExporter

getHandlesOfObjectsForExport

protected List<TransientHibernateHandle> getHandlesOfObjectsForExport(HibernateObjectHandleTranslator translator,
                                                                      net.sf.hibernate.Session session)
                                                               throws ImportExportException
Specified by:
getHandlesOfObjectsForExport in class AbstractXmlExporter
Returns:
A list of TransientHibernateHandles to be exported based on the AbstractExporterImpl.getWorkingExportContext().
Throws:
ImportExportException

getObjectsExcludedFromExport

protected List<ConfluenceEntityObject> getObjectsExcludedFromExport()
                                                             throws ImportExportException
Description copied from class: AbstractXmlExporter
Gets a list of actual objects (not handles) to exclude from export.

Overrides:
getObjectsExcludedFromExport in class AbstractXmlExporter
Throws:
ImportExportException

setConfluenceBandanaRecordDao

public void setConfluenceBandanaRecordDao(ConfluenceBandanaRecordDao dao)

setNotificationManager

public void setNotificationManager(NotificationManager notificationManager)

setCustomContentManager

public void setCustomContentManager(CustomContentManager customContentManager)

setPropertySetManager

public void setPropertySetManager(ConfluencePropertySetManager propertySetManager)

setPageManager

public void setPageManager(PageManager pageManager)

setLikeEntityDao

public void setLikeEntityDao(LikeEntityDao likeEntityDao)

setStorageFormatUserRewriter

public void setStorageFormatUserRewriter(StorageFormatUserRewriter storageFormatUserRewriter)


Copyright © 2003–2015 Atlassian. All rights reserved.