Class XmlBackupContainerWriter
java.lang.Object
com.atlassian.confluence.impl.backuprestore.backup.container.XmlBackupContainerWriter
- All Implemented Interfaces:
BackupContainerWriter
,AutoCloseable
This class is used to create a zip container with XML formatted backup files.
- Since:
- 7.20.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionXmlBackupContainerWriter
(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
Modifier and TypeMethodDescriptionvoid
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 Descriptorsstatic String
calculatePathInZip
(Long containerId, Long originalAttachmentId, Integer attachmentVersion) void
close()
void
writeObjects
(Collection<EntityObjectReadyForExport> objects)
-
Field Details
-
EXPORT_DESCRIPTOR_FILE_NAME
- See Also:
-
ENTITIES_FILE_NAME
- See Also:
-
-
Constructor Details
-
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 Details
-
writeObjects
public void writeObjects(Collection<EntityObjectReadyForExport> objects) throws BackupRestoreException - Specified by:
writeObjects
in interfaceBackupContainerWriter
- Throws:
BackupRestoreException
-
addAttachments
- Specified by:
addAttachments
in interfaceBackupContainerWriter
-
calculatePathInZip
-
addDescriptionProperty
- 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
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceBackupContainerWriter
- Throws:
BackupRestoreException
-
getOutputFile
- Specified by:
getOutputFile
in interfaceBackupContainerWriter
- Returns:
- the generated output file.
-