Class SpaceBackupExporter
- java.lang.Object
-
- com.atlassian.confluence.importexport.Exporter
-
- com.atlassian.confluence.impl.importexport.AbstractExporterImpl
-
- com.atlassian.confluence.impl.importexport.AbstractXmlExporter
-
- com.atlassian.confluence.impl.importexport.AbstractFileXmlExporter
-
- com.atlassian.confluence.impl.importexport.SpaceBackupExporter
-
public class SpaceBackupExporter extends AbstractFileXmlExporter
Exports the entities added to the workingEntities collection in the context to xml. Used for making page and space xml exports.- Since:
- 7.14
-
-
Field Summary
-
Fields inherited from class com.atlassian.confluence.impl.importexport.AbstractFileXmlExporter
attachmentManager
-
Fields inherited from class com.atlassian.confluence.impl.importexport.AbstractXmlExporter
ATTACHMENTS_DIRECTORY, bootstrapManager, ENTITIES_FILE_NAME, EXPORT_DESCRIPTOR_FILE_NAME, sessionFactory5, spaceManager, TEMPLATES_DIRECTORY
-
Fields inherited from class com.atlassian.confluence.impl.importexport.AbstractExporterImpl
i18nBeanFactory
-
-
Constructor Summary
Constructors Constructor Description SpaceBackupExporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdoExport(com.atlassian.core.util.ProgressMeter progress)Exports the content specified by the configuredExportContext.protected List<TransientHibernateHandle>getHandlesOfObjectsForExport(HibernateObjectHandleTranslator translator, org.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 ListgetSourceTemplateDirForCopying()If we're doing an export rather than a full backup, we don't export any templatesvoidsetConfluenceBandanaRecordDao(ConfluenceBandanaRecordDao dao)voidsetContent2ContentHibernateRelationDao(Content2ContentHibernateRelationDao content2ContentHibernateRelationDao)voidsetContext(ExportContext context)voidsetCustomContentManager(CustomContentManager customContentManager)protected voidsetCustomProperties(ExportDescriptor exportDescriptor)Adds the space key to the customer descriptor properties.voidsetLikeEntityDao(LikeEntityDao likeEntityDao)voidsetNotificationManager(NotificationManager notificationManager)voidsetPageManager(PageManager pageManager)voidsetPropertySetManager(ConfluencePropertySetManager propertySetManager)voidsetStorageFormatUserRewriter(StorageFormatUserRewriter storageFormatUserRewriter)voidsetUser2ContentHibernateRelationDao(User2ContentHibernateRelationDao user2ContentHibernateRelationDao)-
Methods inherited from class com.atlassian.confluence.impl.importexport.AbstractFileXmlExporter
backupAttachments, backupConfigFiles, backupEverything, backupPluginData, backupResources, backupTemplates, doExportInternal, setAttachmentManager, setBackupRestoreProviderManager, setConfluenceHome
-
Methods inherited from class com.atlassian.confluence.impl.importexport.AbstractXmlExporter
backupEntities, doExport, getDescriptorOutputStream, getExportScope, getSettingsManager, getXmlOutputStream, setBootstrapManager, setSessionFactory5, setSettingsManager, setSpaceManager, setUpgradeManager, writeBackupDescriptor
-
Methods inherited from class com.atlassian.confluence.impl.importexport.AbstractExporterImpl
checkHaveSomethingToExport, createAndSetExportDirectory, createExportDirectory, ensureDirectoryCreated, getSpaceKeyForExportFileName, getWorkingExportContext, prepareExportFileName, setExportFileNameGenerator, setI18NBeanFactory
-
Methods inherited from class com.atlassian.confluence.importexport.Exporter
getContext
-
-
-
-
Method Detail
-
setContext
public void setContext(ExportContext context)
- Overrides:
setContextin classExporter
-
doExport
public String doExport(com.atlassian.core.util.ProgressMeter progress) throws ImportExportException
Description copied from class:ExporterExports the content specified by the configuredExportContext.- Overrides:
doExportin classAbstractFileXmlExporter- 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:
getIncludedSpacesin classAbstractFileXmlExporter- Returns:
- an ArrayList containing the relevant Space
- See Also:
AttachmentDao.AttachmentCopier.setSpacesToInclude(List)
-
setCustomProperties
protected final void setCustomProperties(ExportDescriptor exportDescriptor)
Adds the space key to the customer descriptor properties.- Overrides:
setCustomPropertiesin classAbstractXmlExporter
-
getSourceTemplateDirForCopying
protected List getSourceTemplateDirForCopying()
If we're doing an export rather than a full backup, we don't export any templates- Specified by:
getSourceTemplateDirForCopyingin classAbstractXmlExporter
-
getHandlesOfObjectsForExport
protected List<TransientHibernateHandle> getHandlesOfObjectsForExport(HibernateObjectHandleTranslator translator, org.hibernate.Session session) throws ImportExportException
- Specified by:
getHandlesOfObjectsForExportin classAbstractXmlExporter- Returns:
- A list of
TransientHibernateHandles to be exported based on theAbstractExporterImpl.getWorkingExportContext(). - Throws:
ImportExportException
-
getObjectsExcludedFromExport
protected List<ConfluenceEntityObject> getObjectsExcludedFromExport() throws ImportExportException
Description copied from class:AbstractXmlExporterGets a list of actual objects (not handles) to exclude from export.- Overrides:
getObjectsExcludedFromExportin classAbstractXmlExporter- 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)
-
setUser2ContentHibernateRelationDao
public void setUser2ContentHibernateRelationDao(User2ContentHibernateRelationDao user2ContentHibernateRelationDao)
-
setContent2ContentHibernateRelationDao
public void setContent2ContentHibernateRelationDao(Content2ContentHibernateRelationDao content2ContentHibernateRelationDao)
-
-