Class DirectoryPersister
- java.lang.Object
-
- com.atlassian.confluence.impl.backuprestore.restore.persisters.DirectoryPersister
-
- All Implemented Interfaces:
EntityPersister
public class DirectoryPersister extends Object implements EntityPersister
PersistsDirectoryImpl. This entity has two collections which don't have their own entity classes, so we need generate records for them from the collection elements. 1) Set `allowedOperations` which references `cwd_directory_operation` table. 2) Map `attributes` which references `cwd_directory_attributes` table.- Since:
- 8.3.0
-
-
Constructor Summary
Constructors Constructor Description DirectoryPersister(ObjectPersister objectPersister, OperationRecordsGenerator operationRecordsGenerator, AttributeRecordsGenerator attributeRecordsGenerator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanAccept(ImportedObjectV2 importedObject)TODO do we need it?Collection<Class<?>>getSupportedClasses()Return a collection of entity classes that persister can persist.voidpersist(ImportedObjectV2 importedObject)Persists the object.longpersistNextChunkOfData()Request the persister to persist the next chunk of data.
-
-
-
Constructor Detail
-
DirectoryPersister
public DirectoryPersister(ObjectPersister objectPersister, OperationRecordsGenerator operationRecordsGenerator, AttributeRecordsGenerator attributeRecordsGenerator)
-
-
Method Detail
-
getSupportedClasses
public Collection<Class<?>> getSupportedClasses()
Description copied from interface:EntityPersisterReturn a collection of entity classes that persister can persist.- Specified by:
getSupportedClassesin interfaceEntityPersister
-
canAccept
public boolean canAccept(ImportedObjectV2 importedObject)
Description copied from interface:EntityPersisterTODO do we need it?- Specified by:
canAcceptin interfaceEntityPersister- Returns:
- true if the object can be persisted by the implementation.
-
persist
public void persist(ImportedObjectV2 importedObject) throws BackupRestoreException
Description copied from interface:EntityPersisterPersists the object. Can be processed asynchronously.- Specified by:
persistin interfaceEntityPersister- Parameters:
importedObject- object to persist.- Throws:
BackupRestoreException
-
persistNextChunkOfData
public long persistNextChunkOfData() throws BackupRestoreExceptionDescription copied from interface:EntityPersisterRequest the persister to persist the next chunk of data.- Specified by:
persistNextChunkOfDatain interfaceEntityPersister- Returns:
- number of processed objects. Zero means there are no more objects to persist.
- Throws:
BackupRestoreException
-
-