Class ContentPropertiesPersister
java.lang.Object
com.atlassian.confluence.impl.backuprestore.restore.persisters.ContentPropertiesPersister
- All Implemented Interfaces:
EntityPersister
Persists contentProperties. Must be in stage after content persisting
We have to account for two use cases:
- The new format where we can just persist the content property directly
(this is ignoreCollections = true)
- The old format where contentID link is stored in the content object.
We must create a map for the old format from the content so we can then
manually insert the contentID field
- Since:
- 8.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionContentPropertiesPersister
(ObjectPersister objectPersister, ImportedObjectsStashFactory importedObjectsStashFactory, boolean ignoreCollections, PersisterHelper persisterHelper, IdMapper idMapper) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canAccept
(ImportedObjectV2 importedObject) TODO do we need it?Collection<Class<?>>
Return a collection of entity classes that persister can persist.void
persist
(ImportedObjectV2 importedObject) Persists the object.long
Request the persister to persist the next chunk of data.
-
Constructor Details
-
ContentPropertiesPersister
public ContentPropertiesPersister(ObjectPersister objectPersister, ImportedObjectsStashFactory importedObjectsStashFactory, boolean ignoreCollections, PersisterHelper persisterHelper, IdMapper idMapper)
-
-
Method Details
-
getSupportedClasses
Description copied from interface:EntityPersister
Return a collection of entity classes that persister can persist.- Specified by:
getSupportedClasses
in interfaceEntityPersister
-
canAccept
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
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
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
-