com.atlassian.crowd.migration
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XML_ROOT
public static final String XML_ROOT
- See Also:
- Constant Field Values
CROWD_XML_VERSION
public static final String CROWD_XML_VERSION
- See Also:
- Constant Field Values
CROWD_XML_DATE
public static final String CROWD_XML_DATE
- See Also:
- Constant Field Values
CROWD_XML_BUILD_NUMBER
public static final String CROWD_XML_BUILD_NUMBER
- See Also:
- Constant Field Values
CROWD_XML_BUILD_DATE
public static final String CROWD_XML_BUILD_DATE
- See Also:
- Constant Field Values
OPTION_RESET_DOMAIN
public static final String OPTION_RESET_DOMAIN
- See Also:
- Constant Field Values
XmlMigrationManagerImpl
public XmlMigrationManagerImpl()
exportXml
public long exportXml(String path,
Map options)
throws ExportException
- 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.
importXml
public long importXml(String path)
throws ImportException
- 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.
clearCaches
protected void clearCaches()
flushAndClearHibernateSession
protected void flushAndClearHibernateSession()
cleanDatabase
protected void cleanDatabase()
resetIdentifierGenerators
protected void resetIdentifierGenerators()
throws ImportException
- Reset Hibernate incremental ID generators so we don't get ID collisions after a
restore.
- Throws:
ImportException
- if some hibernate error prevents us doing the reset
setSessionFactory
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
setCacheManager
public void setCacheManager(net.sf.ehcache.CacheManager cacheManager)
setResetableHiLoGeneratorHelper
public void setResetableHiLoGeneratorHelper(com.atlassian.hibernate.extras.ResetableHiLoGeneratorHelper resetableHiLoGeneratorHelper)
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)
setCrowdApplicationPasswordManager
public void setCrowdApplicationPasswordManager(CrowdApplicationPasswordManager crowdApplicationPasswordManager)
setServletContext
public void setServletContext(javax.servlet.ServletContext servletContext)
- Specified by:
setServletContext
in interface org.springframework.web.context.ServletContextAware
setI18nHelper
public void setI18nHelper(I18nHelper i18nHelper)
setVerificationManager
public void setVerificationManager(VerificationManager verificationManager)
Copyright © 2012 Atlassian. All Rights Reserved.