Class BodyContentPersister
java.lang.Object
com.atlassian.confluence.impl.backuprestore.restore.persisters.BodyContentPersister
- All Implemented Interfaces:
EntityPersister
Persists BodyContent entities. When user is mentioned on a page or a comment it's id is embedded into the
body of BodyContent record. During space import we generate new ids for all imported records and ids mentioned
in body will become invalid. During bodycontent restore we need to replace user ids with new one.
This persister is only made with space restore
-
Constructor Summary
ConstructorsConstructorDescriptionBodyContentPersister(ImportedObjectsStashFactory importedObjectsStashFactory, ObjectPersister databasePersister, PersisterHelper persisterHelper, IdMapper idMapper, ContentUserKeyExtractor contentUserKeyExtractor, PatternBasedContentUserKeyUpdater patternBasedContentUserKeyUpdater) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanAccept(ImportedObjectV2 importedObject) TODO do we need it?Collection<Class<?>> Return a collection of entity classes that persister can persist.protected voidlogInformationAboutNotPersistedObject(ImportedObjectV2 importedObject, Exception e) voidpersist(ImportedObjectV2 importedObject) Persists the object.longRequest the persister to persist the next chunk of data.
-
Constructor Details
-
BodyContentPersister
public BodyContentPersister(ImportedObjectsStashFactory importedObjectsStashFactory, ObjectPersister databasePersister, PersisterHelper persisterHelper, IdMapper idMapper, ContentUserKeyExtractor contentUserKeyExtractor, PatternBasedContentUserKeyUpdater patternBasedContentUserKeyUpdater)
-
-
Method Details
-
getSupportedClasses
Description copied from interface:EntityPersisterReturn a collection of entity classes that persister can persist.- Specified by:
getSupportedClassesin interfaceEntityPersister
-
canAccept
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
Description copied from interface:EntityPersisterPersists the object. Can be processed asynchronously.- Specified by:
persistin interfaceEntityPersister- Parameters:
importedObject- object to persist.- Throws:
BackupRestoreException
-
persistNextChunkOfData
Description 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
-
logInformationAboutNotPersistedObject
-