Class Importer

java.lang.Object
com.atlassian.confluence.importexport.Importer
Direct Known Subclasses:
BackupImporter

@Deprecated public abstract class Importer extends Object
Deprecated.
since 7.17.0. Use BackupRestoreManager instead
An importer is a single-use object for performing an import with a given ImportContext.

Subclasses must implement the doImportInternal() method to perform the actual import, and may optionally override preImport() and postImportAndCleanUp() to do additional processing.

See Also:
  • Field Details

    • context

      protected ImportContext context
      Deprecated.
    • sessionFactory

      protected org.hibernate.SessionFactory sessionFactory
      Deprecated.
  • Constructor Details

    • Importer

      public Importer()
      Deprecated.
  • Method Details

    • setContext

      public final void setContext(ImportContext context)
      Deprecated.
    • setSessionFactory

      public final void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
      Deprecated.
    • setPostImportTasks

      public final void setPostImportTasks(List<PostImportTask> postImportTasks)
      Deprecated.
    • setEventPublisher

      public final void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
      Deprecated.
    • doImport

      public final ImportProcessorSummary doImport() throws ImportExportException
      Deprecated.
      Executes an import with this importer. Clients should not normally call this method directly, but instead use the ImportExportManager.

      After the import is complete, runs the post-import tasks, published a ImportFinishedEvent, and deletes the import working file.

      Throws:
      ImportExportException - if there was a problem during the import or any of the post-import tasks failed.
    • completeProgessMeter

      protected void completeProgessMeter()
      Deprecated.
    • preImport

      protected void preImport() throws ImportExportException
      Deprecated.
      Perform any special logic prior to the import starting. Default implementation does nothing.
      Throws:
      ImportExportException - if the import should be aborted
    • postImportAndCleanUp

      protected void postImportAndCleanUp() throws ImportExportException
      Deprecated.
      Perform any special logic after the import and post-import tasks are complete. This method will run even if the import fails. The default implementation does nothing.
      Throws:
      ImportExportException - if the import process should be aborted
    • doImportInternal

      protected abstract ImportProcessorSummary doImportInternal() throws ImportExportException
      Deprecated.
      Performs the actual import.
      Throws:
      ImportExportException - if there was a problem executing the import
      See Also:
    • publishEvent

      protected final void publishEvent(Object event)
      Deprecated.
      Publish an event to the rest of the system.
      Parameters:
      event - the event to publish
    • getEventPublisher

      protected com.atlassian.event.api.EventPublisher getEventPublisher()
      Deprecated.