Class AbstractXmlExporter
- java.lang.Object
-
- com.atlassian.confluence.importexport.Exporter
-
- com.atlassian.confluence.impl.importexport.AbstractExporterImpl
-
- com.atlassian.confluence.impl.importexport.AbstractXmlExporter
-
- Direct Known Subclasses:
AbstractFileXmlExporter
,FileXmlExporter
public abstract class AbstractXmlExporter extends AbstractExporterImpl
abstract class that deals strictly with the conversion of a objects to an xml stream- Since:
- 7.14
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTACHMENTS_DIRECTORY
Directory into which attachments will be placed in the exported ZIP fileprotected BootstrapManager
bootstrapManager
static String
ENTITIES_FILE_NAME
static String
EXPORT_DESCRIPTOR_FILE_NAME
protected org.hibernate.SessionFactory
sessionFactory5
protected SpaceManager
spaceManager
static String
TEMPLATES_DIRECTORY
Directory into which template overrides will be placed in the exported ZIP file-
Fields inherited from class com.atlassian.confluence.impl.importexport.AbstractExporterImpl
i18nBeanFactory
-
-
Constructor Summary
Constructors Constructor Description AbstractXmlExporter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
backupEntities(HibernateObjectHandleTranslator translator, com.atlassian.core.util.ProgressMeter progress)
Deprecated.since 7.16.0 usecom.atlassian.confluence.impl.importexport.export.BackupDescriptorWriter
protected void
backupEverything(HibernateObjectHandleTranslator translator, com.atlassian.core.util.ProgressMeter progress)
String
doExport(HibernateObjectHandleTranslator translator, com.atlassian.core.util.ProgressMeter progress)
protected OutputStream
getDescriptorOutputStream()
protected ExportScope
getExportScope()
protected abstract List<TransientHibernateHandle>
getHandlesOfObjectsForExport(HibernateObjectHandleTranslator translator, org.hibernate.Session session)
protected List<ConfluenceEntityObject>
getObjectsExcludedFromExport()
Gets a list of actual objects (not handles) to exclude from export.protected SettingsManager
getSettingsManager()
protected abstract List
getSourceTemplateDirForCopying()
protected OutputStream
getXmlOutputStream()
output stream to write XML object information tovoid
setBootstrapManager(BootstrapManager bootstrapManager)
protected void
setCustomProperties(ExportDescriptor exportDescriptor)
Override this in subclasses to add extra properties to the export descriptor.void
setSessionFactory5(org.hibernate.SessionFactory sessionFactory)
void
setSettingsManager(SettingsManager settingsManager)
void
setSpaceManager(SpaceManager spaceManager)
void
setUpgradeManager(UpgradeManager upgradeManager)
protected void
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
doExport, getContext, setContext
-
-
-
-
Field Detail
-
EXPORT_DESCRIPTOR_FILE_NAME
public static final String EXPORT_DESCRIPTOR_FILE_NAME
- See Also:
- Constant Field Values
-
ENTITIES_FILE_NAME
public static final String ENTITIES_FILE_NAME
- See Also:
- Constant Field Values
-
ATTACHMENTS_DIRECTORY
public static final String ATTACHMENTS_DIRECTORY
Directory into which attachments will be placed in the exported ZIP file- See Also:
- Constant Field Values
-
TEMPLATES_DIRECTORY
public static final String TEMPLATES_DIRECTORY
Directory into which template overrides will be placed in the exported ZIP file- See Also:
- Constant Field Values
-
sessionFactory5
protected org.hibernate.SessionFactory sessionFactory5
-
bootstrapManager
protected BootstrapManager bootstrapManager
-
spaceManager
protected SpaceManager spaceManager
-
-
Method Detail
-
getHandlesOfObjectsForExport
protected abstract List<TransientHibernateHandle> getHandlesOfObjectsForExport(HibernateObjectHandleTranslator translator, org.hibernate.Session session) throws ImportExportException
- Throws:
ImportExportException
-
setSessionFactory5
public void setSessionFactory5(org.hibernate.SessionFactory sessionFactory)
-
setBootstrapManager
public void setBootstrapManager(BootstrapManager bootstrapManager)
-
getObjectsExcludedFromExport
protected List<ConfluenceEntityObject> getObjectsExcludedFromExport() throws ImportExportException
Gets a list of actual objects (not handles) to exclude from export.- Throws:
ImportExportException
-
doExport
public String doExport(HibernateObjectHandleTranslator translator, com.atlassian.core.util.ProgressMeter progress) throws ImportExportException
- Throws:
ImportExportException
-
backupEverything
protected void backupEverything(HibernateObjectHandleTranslator translator, com.atlassian.core.util.ProgressMeter progress) throws ImportExportException
- Throws:
ImportExportException
-
writeBackupDescriptor
protected void writeBackupDescriptor() throws ImportExportException
- Throws:
ImportExportException
-
setCustomProperties
protected void setCustomProperties(ExportDescriptor exportDescriptor)
Override this in subclasses to add extra properties to the export descriptor.
-
getDescriptorOutputStream
protected OutputStream getDescriptorOutputStream() throws FileNotFoundException
- Throws:
FileNotFoundException
-
getXmlOutputStream
protected OutputStream getXmlOutputStream() throws IOException
output stream to write XML object information to- Returns:
- the XMLOutputStream
- Throws:
FileNotFoundException
IOException
-
getExportScope
protected ExportScope getExportScope()
-
getSourceTemplateDirForCopying
protected abstract List getSourceTemplateDirForCopying()
-
backupEntities
@Deprecated protected void backupEntities(HibernateObjectHandleTranslator translator, com.atlassian.core.util.ProgressMeter progress) throws ImportExportException
Deprecated.since 7.16.0 usecom.atlassian.confluence.impl.importexport.export.BackupDescriptorWriter
- Throws:
ImportExportException
-
setSettingsManager
public void setSettingsManager(SettingsManager settingsManager)
-
setSpaceManager
public void setSpaceManager(SpaceManager spaceManager)
-
setUpgradeManager
public void setUpgradeManager(UpgradeManager upgradeManager)
-
getSettingsManager
protected SettingsManager getSettingsManager()
-
-