Class XmlBackupContainerWriter
- java.lang.Object
 - 
- com.atlassian.confluence.impl.backuprestore.backup.container.XmlBackupContainerWriter
 
 
- 
- All Implemented Interfaces:
 BackupContainerWriter,AutoCloseable
public class XmlBackupContainerWriter extends Object implements BackupContainerWriter
This class is used to create a zip container with XML formatted backup files.- Since:
 - 7.20.0
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static StringENTITIES_FILE_NAMEstatic StringEXPORT_DESCRIPTOR_FILE_NAME 
- 
Constructor Summary
Constructors Constructor Description XmlBackupContainerWriter(File outputFile, ArchiveWriter archiveWriter, AttachmentDataFileSystem attachmentDataFileSystem, PluginDataWriter pluginWriter, AttachmentDaoInternal attachmentDaoInternal)XmlBackupContainerWriter(File outputFile, ArchiveWriter archiveWriter, AttachmentDataFileSystem attachmentDataFileSystem, PluginDataWriter pluginWriter, AttachmentDaoInternal attachmentDaoInternal, Instant currentTime) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttachments(Collection<AttachmentInfo> attachments)voidaddDescriptionProperty(String name, String value)voidaddPluginModuleData(List<? extends com.atlassian.plugin.ModuleDescriptor<BackupRestoreProvider>> moduleDescriptors)Create the data file for a specific plugin module into the backup zip file using the module Descriptorsstatic StringcalculatePathInZip(Long containerId, Long originalAttachmentId, Integer attachmentVersion)voidclose()FilegetOutputFile()voidwriteObjects(Collection<EntityObjectReadyForExport> objects) 
 - 
 
- 
- 
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
 
 
 - 
 
- 
Constructor Detail
- 
XmlBackupContainerWriter
public XmlBackupContainerWriter(File outputFile, ArchiveWriter archiveWriter, AttachmentDataFileSystem attachmentDataFileSystem, PluginDataWriter pluginWriter, AttachmentDaoInternal attachmentDaoInternal) throws BackupRestoreException
- Throws:
 BackupRestoreException
 
- 
XmlBackupContainerWriter
public XmlBackupContainerWriter(File outputFile, ArchiveWriter archiveWriter, AttachmentDataFileSystem attachmentDataFileSystem, PluginDataWriter pluginWriter, AttachmentDaoInternal attachmentDaoInternal, Instant currentTime) throws BackupRestoreException
- Throws:
 BackupRestoreException
 
 - 
 
- 
Method Detail
- 
writeObjects
public void writeObjects(Collection<EntityObjectReadyForExport> objects) throws BackupRestoreException
- Specified by:
 writeObjectsin interfaceBackupContainerWriter- Throws:
 BackupRestoreException
 
- 
addAttachments
public void addAttachments(Collection<AttachmentInfo> attachments)
- Specified by:
 addAttachmentsin interfaceBackupContainerWriter
 
- 
calculatePathInZip
public static String calculatePathInZip(Long containerId, Long originalAttachmentId, Integer attachmentVersion)
 
- 
addDescriptionProperty
public void addDescriptionProperty(String name, String value) throws BackupRestoreException
- Specified by:
 addDescriptionPropertyin interfaceBackupContainerWriter- Throws:
 BackupRestoreException
 
- 
addPluginModuleData
public void addPluginModuleData(List<? extends com.atlassian.plugin.ModuleDescriptor<BackupRestoreProvider>> moduleDescriptors) throws BackupRestoreException
Create the data file for a specific plugin module into the backup zip file using the module Descriptors- Specified by:
 addPluginModuleDatain interfaceBackupContainerWriter- Parameters:
 moduleDescriptors-- Throws:
 BackupRestoreException
 
- 
close
public void close() throws BackupRestoreException- Specified by:
 closein interfaceAutoCloseable- Specified by:
 closein interfaceBackupContainerWriter- Throws:
 BackupRestoreException
 
- 
getOutputFile
public File getOutputFile()
- Specified by:
 getOutputFilein interfaceBackupContainerWriter- Returns:
 - the generated output file.
 
 
 - 
 
 -