Class SiteRestoreIdMapper
- java.lang.Object
-
- com.atlassian.confluence.impl.backuprestore.restore.idmapping.AbstractIdMapper
-
- com.atlassian.confluence.impl.backuprestore.restore.idmapping.SiteRestoreIdMapper
-
- All Implemented Interfaces:
IdMapper
public class SiteRestoreIdMapper extends AbstractIdMapper
Responsible for keeping id mappings between the xml ids and the database ids during site restore. During site restore xml id is saved as database id, so we don't generate any new ids here and just return the same value.- Since:
- 8.1.0
-
-
Field Summary
-
Fields inherited from class com.atlassian.confluence.impl.backuprestore.restore.idmapping.AbstractIdMapper
persistedObjectsRegister
-
-
Constructor Summary
Constructors Constructor Description SiteRestoreIdMapper(PersistedObjectsRegister persistedObjectsRegister)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getDatabaseId(Class<?> clazz, Object xmlId)
Returns the database id related to the xml id or null if the database id was not generated before.Collection<ImportedObjectV2>
prepareObjectsToBePersisted(ExportableEntityInfo entityInfo, Collection<ImportedObjectV2> importedObjects)
Prepares records to be inserted to the database.-
Methods inherited from class com.atlassian.confluence.impl.backuprestore.restore.idmapping.AbstractIdMapper
fixContentEntityObjectClass, getAllNotSatisfiedDependencies, isPersistedXmlId, markObjectsAsPersisted
-
-
-
-
Constructor Detail
-
SiteRestoreIdMapper
public SiteRestoreIdMapper(PersistedObjectsRegister persistedObjectsRegister)
-
-
Method Detail
-
getDatabaseId
public Object getDatabaseId(Class<?> clazz, Object xmlId)
Description copied from interface:IdMapper
Returns the database id related to the xml id or null if the database id was not generated before.
-
prepareObjectsToBePersisted
public Collection<ImportedObjectV2> prepareObjectsToBePersisted(ExportableEntityInfo entityInfo, Collection<ImportedObjectV2> importedObjects)
Description copied from interface:IdMapper
Prepares records to be inserted to the database. During space restore it will replace all ids with new one.- Parameters:
entityInfo
- entity info of persisted objectsimportedObjects
- Objects that should be persisted- Returns:
- Returns objects which are ready to be persisted
-
-