Class ContentPropertyDataExporter
java.lang.Object
com.atlassian.confluence.impl.backuprestore.backup.exporters.ContentPropertyDataExporter
- All Implemented Interfaces:
Exporter,Subscriber
Extracts content property. Content property configuration is weird (Hibernate can't return reference to the
associated content), so we need to configure it manually.
- Since:
- 7.20.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionContentPropertyDataExporter(CommonDatabaseDataExporter exporter, boolean keepCollectionsForContentProperties) -
Method Summary
Modifier and TypeMethodDescriptionfindContentPropertiesForContentEntityObjects(Collection<?> contentEntityIds) Used for legacy format only because the normal pub/sub mechanism does not work in this case.Returns default entity info for persister.getEntityInfo(Class<?> exportedClass) Returns default entity info for the particular class.Collection<Class<?>>Return a collection of entity classes that subscriber will monitor the object export events.voidonMonitoredObjectsExport(Class<?> exportedClass, Collection<Object> idList) It is called when the collection of objects was exported.
-
Field Details
-
CONTENT_FIELD_NAME
- See Also:
-
-
Constructor Details
-
ContentPropertyDataExporter
public ContentPropertyDataExporter(CommonDatabaseDataExporter exporter, boolean keepCollectionsForContentProperties)
-
-
Method Details
-
getWatchingEntityClasses
Description copied from interface:SubscriberReturn a collection of entity classes that subscriber will monitor the object export events. This is called when DatabaseExporterHelper register subscribers for all exporters. See UseDatabaseExporterHelper.registerSubscriber(Subscriber)- Specified by:
getWatchingEntityClassesin interfaceSubscriber
-
onMonitoredObjectsExport
public void onMonitoredObjectsExport(Class<?> exportedClass, Collection<Object> idList) throws InterruptedException, BackupRestoreException Description copied from interface:SubscriberIt is called when the collection of objects was exported. This is called only for objects that this class is watching. SeegetWatchingEntityClasses()- Specified by:
onMonitoredObjectsExportin interfaceSubscriber- Parameters:
exportedClass- the exported classidList- the list of ids of exported objects- Throws:
InterruptedExceptionBackupRestoreException
-
getEntityInfo
Description copied from interface:ExporterReturns default entity info for persister. Will fail if the persister has to work with multiple hibernate entitites.- Specified by:
getEntityInfoin interfaceExporter
-
getEntityInfo
Description copied from interface:ExporterReturns default entity info for the particular class.- Specified by:
getEntityInfoin interfaceExporter
-
findContentPropertiesForContentEntityObjects
public Map<Long,List<EntityObjectReadyForExport>> findContentPropertiesForContentEntityObjects(Collection<?> contentEntityIds) Used for legacy format only because the normal pub/sub mechanism does not work in this case. This method is called directly by ContentEntityDatabaseDataExporter.- Parameters:
contentEntityIds- collection of content entity ids (we have to find all their content properties)- Returns:
- content properties map grouped by content id
-