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 String
ENTITIES_FILE_NAME
static String
EXPORT_DESCRIPTOR_FILE_NAME
-
Constructor Summary
Constructors Constructor Description XmlBackupContainerWriter(File outputFile, ArchiveWriter archiveWriter, AttachmentDataFileSystemInternals localAttachmentDataFileSystem, PluginDataWriter pluginWriter)
XmlBackupContainerWriter(File outputFile, ArchiveWriter archiveWriter, AttachmentDataFileSystemInternals localAttachmentDataFileSystem, PluginDataWriter pluginWriter, Instant currentTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttachments(Collection<AttachmentInfo> attachments)
void
addDescriptionProperty(String name, String value)
void
addPluginModuleData(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 Descriptorsvoid
close()
File
getOutputFile()
void
writeObjects(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, AttachmentDataFileSystemInternals localAttachmentDataFileSystem, PluginDataWriter pluginWriter) throws BackupRestoreException
- Throws:
BackupRestoreException
-
XmlBackupContainerWriter
public XmlBackupContainerWriter(File outputFile, ArchiveWriter archiveWriter, AttachmentDataFileSystemInternals localAttachmentDataFileSystem, PluginDataWriter pluginWriter, Instant currentTime) throws BackupRestoreException
- Throws:
BackupRestoreException
-
-
Method Detail
-
writeObjects
public void writeObjects(Collection<EntityObjectReadyForExport> objects) throws BackupRestoreException
- Specified by:
writeObjects
in interfaceBackupContainerWriter
- Throws:
BackupRestoreException
-
addAttachments
public void addAttachments(Collection<AttachmentInfo> attachments) throws BackupRestoreException
- Specified by:
addAttachments
in interfaceBackupContainerWriter
- Throws:
BackupRestoreException
-
addDescriptionProperty
public void addDescriptionProperty(String name, String value) throws BackupRestoreException
- Specified by:
addDescriptionProperty
in 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:
addPluginModuleData
in interfaceBackupContainerWriter
- Parameters:
moduleDescriptors
-- Throws:
BackupRestoreException
-
close
public void close() throws BackupRestoreException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceBackupContainerWriter
- Throws:
BackupRestoreException
-
getOutputFile
public File getOutputFile()
- Specified by:
getOutputFile
in interfaceBackupContainerWriter
- Returns:
- the generated output file.
-
-