com.atlassian.crowd.manager.upgrade
Class UpgradeManagerImpl

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

public class UpgradeManagerImpl
extends java.lang.Object
implements UpgradeManager


Constructor Summary
UpgradeManagerImpl()
           
 
Method Summary
 java.util.Collection<java.lang.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()
           
 java.util.List<UpgradeTask> getRequiredUpgrades()
           
 java.util.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(java.util.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 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.