Class AttachmentsPersister
- java.lang.Object
-
- com.atlassian.confluence.impl.backuprestore.restore.persisters.AttachmentsPersister
-
-
Constructor Summary
Constructors Constructor Description AttachmentsPersister(AttachmentDataFileSystem attachmentDataFileSystem, AttachmentDaoInternal attachmentDao, IdMapper idMapper, Callable<ZipFile> zipFile, Boolean backupAttachments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
persist(Map<ExportableEntityInfo,Collection<ImportedObjectV2>> objectsToPersistGroupedByClass)
Persists attachment files in the attachments' storage (e.g.boolean
shouldPersist(Map<ExportableEntityInfo,Collection<ImportedObjectV2>> objectsWithDatabaseIdsByClass)
Checks if this persister should be executed.
-
-
-
Constructor Detail
-
AttachmentsPersister
public AttachmentsPersister(AttachmentDataFileSystem attachmentDataFileSystem, AttachmentDaoInternal attachmentDao, IdMapper idMapper, Callable<ZipFile> zipFile, Boolean backupAttachments)
-
-
Method Detail
-
shouldPersist
public boolean shouldPersist(Map<ExportableEntityInfo,Collection<ImportedObjectV2>> objectsWithDatabaseIdsByClass)
Checks if this persister should be executed.- Specified by:
shouldPersist
in interfacePersister
- Parameters:
objectsWithDatabaseIdsByClass
- - objects to persist.- Returns:
- true if any attachment found AND the backupAttachments exportDescriptor property is true
-
persist
public void persist(Map<ExportableEntityInfo,Collection<ImportedObjectV2>> objectsToPersistGroupedByClass) throws BackupRestoreException
Persists attachment files in the attachments' storage (e.g. file system).- Specified by:
persist
in interfacePersister
- Parameters:
objectsToPersistGroupedByClass
- - objects to persist- Throws:
BackupRestoreException
- - thrown if it cannot access any attachment files in the archive.
-
-