com.atlassian.crowd.manager.upgrade
Class UpgradeManagerImpl

java.lang.Object
  extended by com.atlassian.crowd.manager.upgrade.UpgradeManagerImpl
All Implemented Interfaces:
UpgradeManager

@Transactional
public class UpgradeManagerImpl
extends Object
implements UpgradeManager


Constructor Summary
UpgradeManagerImpl()
           
 
Method Summary
 Collection<String> doUpgrade()
          Method to fire off the upgrade process
protected  void flushAndClearHibernate()
           
protected  int getApplicationBuildNumber()
           
 CrowdBootstrapManager getBootstrapManager()
           
 int getDataBuildNumber()
          This gets the pre-build number.
 PropertyManager getPropertyManager()
           
 List<UpgradeTask> getRequiredUpgrades()
           
 List<UpgradeTask> getUpgradeTasks()
           
 boolean needUpgrade()
          Determines whether we need to run the upgrade or not.
 void setBootstrapManager(CrowdBootstrapManager bootstrapManager)
           
 void setCacheManager(net.sf.ehcache.CacheManager cacheManager)
           
 void setPropertyManager(PropertyManager propertyManager)
           
 void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
           
 void setUpgradeTasks(List<UpgradeTask> upgradeTasks)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpgradeManagerImpl

public UpgradeManagerImpl()
Method Detail

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 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 Collection<String> doUpgrade()
                             throws 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:
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 List<UpgradeTask> getUpgradeTasks()

setUpgradeTasks

public void setUpgradeTasks(List<UpgradeTask> upgradeTasks)


Copyright © 2014 Atlassian. All Rights Reserved.