Class SpacePersister
- java.lang.Object
-
- com.atlassian.confluence.impl.backuprestore.restore.persisters.SpacePersister
-
- All Implemented Interfaces:
EntityPersister
public class SpacePersister extends Object implements EntityPersister
Persists space objects.- Since:
- 8.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static String
LOWER_KEY_PROPERTY_NAME
-
Constructor Summary
Constructors Constructor Description SpacePersister(ImportedObjectsStashFactory importedObjectsStashFactory, ObjectPersister objectPersister, IdMapper idMapper, DeferredActionsHolder deferredActionsHolder, DeferredActionsFactory deferredActionsFactory, PersisterHelper persisterHelper, OnObjectsProcessingHandler onObjectsProcessingHandler, Optional<Set<String>> allowedSpaceKeys)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canAccept(ImportedObjectV2 importedObject)
TODO do we need it?Collection<Class<?>>
getSupportedClasses()
Return a collection of entity classes that persister can persist.void
persist(ImportedObjectV2 importedObject)
Persists the object.long
persistNextChunkOfData()
Request the persister to persist the next chunk of data.
-
-
-
Field Detail
-
LOWER_KEY_PROPERTY_NAME
public static final String LOWER_KEY_PROPERTY_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SpacePersister
public SpacePersister(ImportedObjectsStashFactory importedObjectsStashFactory, ObjectPersister objectPersister, IdMapper idMapper, DeferredActionsHolder deferredActionsHolder, DeferredActionsFactory deferredActionsFactory, PersisterHelper persisterHelper, OnObjectsProcessingHandler onObjectsProcessingHandler, Optional<Set<String>> allowedSpaceKeys)
-
-
Method Detail
-
getSupportedClasses
public Collection<Class<?>> getSupportedClasses()
Description copied from interface:EntityPersister
Return a collection of entity classes that persister can persist.- Specified by:
getSupportedClasses
in interfaceEntityPersister
-
canAccept
public boolean canAccept(ImportedObjectV2 importedObject)
Description copied from interface:EntityPersister
TODO do we need it?- Specified by:
canAccept
in interfaceEntityPersister
- Returns:
- true if the object can be persisted by the implementation.
-
persist
public void persist(ImportedObjectV2 importedObject) throws BackupRestoreException
Description copied from interface:EntityPersister
Persists the object. Can be processed asynchronously.- Specified by:
persist
in interfaceEntityPersister
- Parameters:
importedObject
- object to persist.- Throws:
BackupRestoreException
-
persistNextChunkOfData
public long persistNextChunkOfData() throws BackupRestoreException
Description copied from interface:EntityPersister
Request the persister to persist the next chunk of data.- Specified by:
persistNextChunkOfData
in interfaceEntityPersister
- Returns:
- number of processed objects. Zero means there are no more objects to persist.
- Throws:
BackupRestoreException
-
-