com.atlassian.crowd.migration
Class XmlMigrationManagerImpl
java.lang.Object
com.atlassian.crowd.migration.XmlMigrationManagerImpl
- All Implemented Interfaces:
- XmlMigrationManager
public class XmlMigrationManagerImpl
- extends java.lang.Object
- implements XmlMigrationManager
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XML_ROOT
public static final java.lang.String XML_ROOT
- See Also:
- Constant Field Values
OPTION_RESET_DOMAIN
public static final java.lang.String OPTION_RESET_DOMAIN
- See Also:
- Constant Field Values
XmlMigrationManagerImpl
public XmlMigrationManagerImpl()
exportXml
public long exportXml(java.lang.String path,
java.util.Map options)
throws java.lang.Exception
- 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:
java.lang.Exception - something went wrong during the export.
importXml
public long importXml(java.lang.String path)
throws java.lang.Exception
- 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:
java.lang.Exception - something went wrong during the import.
clearCaches
protected void clearCaches()
flushAndClearHibernateSession
protected void flushAndClearHibernateSession()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
cleanDatabase
protected void cleanDatabase()
resetIdentifierGenerators
protected void resetIdentifierGenerators()
throws ImportExportException
- Reset Hibernate incremental ID generators so we don't get ID collisions after a
restore.
- Throws:
ImportExportException - if some hibernate error prevents us doing the reset
getSessionFactory
public org.hibernate.SessionFactory getSessionFactory()
setSessionFactory
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
getSchemaHelper
public SchemaHelper getSchemaHelper()
setSchemaHelper
public void setSchemaHelper(SchemaHelper schemaHelper)
getCacheManager
public net.sf.ehcache.CacheManager getCacheManager()
setCacheManager
public void setCacheManager(net.sf.ehcache.CacheManager cacheManager)
getResetableHiLoGeneratorHelper
public ResetableHiLoGeneratorHelper getResetableHiLoGeneratorHelper()
setResetableHiLoGeneratorHelper
public void setResetableHiLoGeneratorHelper(ResetableHiLoGeneratorHelper resetableHiLoGeneratorHelper)
getUpgradeManager
public UpgradeManager getUpgradeManager()
setUpgradeManager
public void setUpgradeManager(UpgradeManager upgradeManager)
setEventManager
public void setEventManager(com.atlassian.event.EventManager eventManager)
setXmlMigrator
public void setXmlMigrator(XmlMigrator xmlMigrator)
setLegacyXmlMigrator
public void setLegacyXmlMigrator(LegacyXmlMigrator legacyXmlMigrator)
setCrowdApplicationPasswordManager
public void setCrowdApplicationPasswordManager(CrowdApplicationPasswordManager crowdApplicationPasswordManager)
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.