com.atlassian.crowd.manager.upgrade
Class UpgradeManagerImpl
java.lang.Object
com.atlassian.crowd.manager.upgrade.UpgradeManagerImpl
- All Implemented Interfaces:
- UpgradeManager
public class UpgradeManagerImpl
- extends java.lang.Object
- implements UpgradeManager
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UpgradeManagerImpl
public UpgradeManagerImpl()
getApplicationBuildNumber
protected int getApplicationBuildNumber()
- Returns:
- the build number of the currently executing version of Crowd.
The Crowd data will be upgraded to this version.
getDataBuildNumber
public int getDataBuildNumber()
- Description copied from interface:
UpgradeManager
- This gets the pre-build number. i.e The build number present in the database, BEFORE the upgrade
process has been run.
- Specified by:
getDataBuildNumber
in interface UpgradeManager
- Returns:
- the build number of the data in the database.
The Crowd data will be upgraded from this version.
getRequiredUpgrades
public java.util.List<UpgradeTask> getRequiredUpgrades()
- Specified by:
getRequiredUpgrades
in interface UpgradeManager
- Returns:
- list of upgrade tasks that are required to be executed (in order).
needUpgrade
public boolean needUpgrade()
- Description copied from interface:
UpgradeManager
- Determines whether we need to run the upgrade or not.
- Specified by:
needUpgrade
in interface UpgradeManager
- Returns:
boolean
whether the build was successful or not
doUpgrade
public java.util.Collection<java.lang.String> doUpgrade()
throws java.lang.Exception
- Description copied from interface:
UpgradeManager
- Method to fire off the upgrade process
- Specified by:
doUpgrade
in interface UpgradeManager
- Returns:
Collection
a string collection of error messages. Collection not empty
denotes error occurred on upgrade
- Throws:
java.lang.Exception
- error occurred during upgrade.
flushAndClearHibernate
protected void flushAndClearHibernate()
getPropertyManager
public PropertyManager getPropertyManager()
setPropertyManager
public void setPropertyManager(PropertyManager propertyManager)
getBootstrapManager
public CrowdBootstrapManager getBootstrapManager()
setBootstrapManager
public void setBootstrapManager(CrowdBootstrapManager bootstrapManager)
setSessionFactory
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
setCacheManager
public void setCacheManager(net.sf.ehcache.CacheManager cacheManager)
getUpgradeTasks
public java.util.List<UpgradeTask> getUpgradeTasks()
setUpgradeTasks
public void setUpgradeTasks(java.util.List<UpgradeTask> upgradeTasks)
Copyright © 2010 Atlassian. All Rights Reserved.