Class XmlMigrationManagerImpl

java.lang.Object
com.atlassian.crowd.migration.XmlMigrationManagerImpl
All Implemented Interfaces:
XmlMigrationManager, org.springframework.beans.factory.Aware, org.springframework.web.context.ServletContextAware

public class XmlMigrationManagerImpl extends Object implements XmlMigrationManager, org.springframework.web.context.ServletContextAware
  • Field Details

  • Constructor Details

    • XmlMigrationManagerImpl

      public XmlMigrationManagerImpl()
  • Method Details

    • exportXml

      @Transactional public long exportXml(String path, Map<String,Object> options) throws ExportException, BackupOrRestoreAlreadyInProgressException
      Description copied from interface: XmlMigrationManager
      Exports the Crowd server's state to an XML file. This exports data from the Crowd database, crowd.cfg.xml and crowd.properties. The XML file will be a Crowd 2.x export, incompatible with Crowd 1.x.
      Specified by:
      exportXml in interface XmlMigrationManager
      Parameters:
      path - file path of export XML.
      options - export options.
      Returns:
      time taken to export (milliseconds).
      Throws:
      ExportException - something went wrong during the export.
      BackupOrRestoreAlreadyInProgressException - in case a backup or a restore is already in progress
    • importXml

      Description copied from interface: XmlMigrationManager
      Imports exported Crowd server state from an XML file. The XML file can be a Crowd 1.x export or a Crowd 2.x export.
      Specified by:
      importXml in interface XmlMigrationManager
      Parameters:
      path - file path of the XML backup to import.
      Returns:
      time taken to import (milliseconds).
      Throws:
      ImportException - something went wrong during the import.
      BackupOrRestoreAlreadyInProgressException - in case a backup or a restore is already in progress
    • runPostImportActions

      public void runPostImportActions(String path) throws ImportException
      Description copied from interface: XmlMigrationManager
      For testing purposes only. Called by the external process after restoring database state.
      Specified by:
      runPostImportActions in interface XmlMigrationManager
      Parameters:
      path - file path of the XML backup that was restored
      Throws:
      ImportException - something went wrong during post import actions
    • cleanDatabase

      protected void cleanDatabase() throws OperationFailedException
      Throws:
      OperationFailedException
    • setSessionFactory

      public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
    • setCacheManagers

      public void setCacheManagers(List<com.atlassian.cache.CacheManager> cacheManagers)
    • setResettableHiLoGeneratorResetter

      public void setResettableHiLoGeneratorResetter(ResettableHiLoGeneratorResetter resettableHiLoGeneratorResetter)
    • setUpgradeManager

      public void setUpgradeManager(UpgradeManager upgradeManager)
    • setEventPublisher

      public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
    • setXmlMigrator

      public void setXmlMigrator(XmlMigrator xmlMigrator)
    • setLegacyXmlMigrator

      public void setLegacyXmlMigrator(LegacyXmlMigrator legacyXmlMigrator)
    • setServletContext

      public void setServletContext(javax.servlet.ServletContext servletContext)
      Specified by:
      setServletContext in interface org.springframework.web.context.ServletContextAware
    • setVerificationManager

      public void setVerificationManager(VerificationManager verificationManager)
    • setLockService

      public void setLockService(com.atlassian.beehive.ClusterLockService lockService)
    • setSchemaHelper

      public void setSchemaHelper(SchemaHelper schemaHelper)
    • setConnectionProviderController

      public void setConnectionProviderController(ConnectionProviderController connectionProviderController)
    • setTransactionManager

      public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
    • setAuditLogContext

      public void setAuditLogContext(AuditLogContext auditLogContext)
    • setAuditLogMetadataResolver

      public void setAuditLogMetadataResolver(AuditLogMetadataResolver auditLogMetadataResolver)
    • setPluginUpgradeManagerSupplier

      public void setPluginUpgradeManagerSupplier(PluginUpgradeManagerSupplier pluginUpgradeManagerSupplier)
    • setI18nHelper

      public void setI18nHelper(I18nHelper i18nHelper)