Class ContentEntityDatabaseDataExporter
- java.lang.Object
-
- com.atlassian.confluence.impl.backuprestore.backup.exporters.ContentEntityDatabaseDataExporter
-
- All Implemented Interfaces:
Exporter,Subscriber
public class ContentEntityDatabaseDataExporter extends Object implements Exporter, Subscriber
Responsible for exporting all content entitity objects. It starts with the current versions first and then continues with historical versions.- Since:
- 7.20.0
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTENT_IDS
-
Constructor Summary
Constructors Constructor Description ContentEntityDatabaseDataExporter(DatabaseExporterHelper databaseExporterHelper, boolean keepCollectionsForContentProperties, ContentPropertyDataExporter contentPropertyDataExporter, Converter databaseDataConverter)Creates an instance of content entity exporter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExportableEntityInfogetEntityInfo()Returns default entity info for persister.ExportableEntityInfogetEntityInfo(Class<?> exportedClass)Returns default entity info for the particular class.Collection<Class<?>>getWatchingEntityClasses()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 Detail
-
CONTENT_IDS
public static final String CONTENT_IDS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ContentEntityDatabaseDataExporter
public ContentEntityDatabaseDataExporter(DatabaseExporterHelper databaseExporterHelper, boolean keepCollectionsForContentProperties, ContentPropertyDataExporter contentPropertyDataExporter, Converter databaseDataConverter)
Creates an instance of content entity exporter.- Parameters:
databaseExporterHelper- just helper containing set of useful functions allowing to retrieve data from the DB.keepCollectionsForContentProperties- set to true when it has to generate data in legacy format (with a collection of references to Content Properties).contentPropertyDataExporter- reference to content property exporter (used for legacy format only)
-
-
Method Detail
-
getWatchingEntityClasses
public Collection<Class<?>> 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
-
getEntityInfo
public ExportableEntityInfo 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
public ExportableEntityInfo getEntityInfo(Class<?> exportedClass)
Description copied from interface:ExporterReturns default entity info for the particular class.- Specified by:
getEntityInfoin interfaceExporter
-
onMonitoredObjectsExport
public void onMonitoredObjectsExport(Class<?> exportedClass, Collection<Object> idList)
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
-
-