Class UpgradeManagerImpl

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

public class UpgradeManagerImpl extends Object implements UpgradeManager
  • Constructor Details

    • UpgradeManagerImpl

      public UpgradeManagerImpl(PropertyManager propertyManager, net.sf.ehcache.CacheManager cacheManager, CrowdBootstrapManager bootstrapManager, com.atlassian.beehive.ClusterLockService clusterLockService, List<UpgradeTask> upgradeTasks, org.springframework.transaction.PlatformTransactionManager transactionManager)
  • Method Details

    • 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.
    • getPropertyManager

      public PropertyManager getPropertyManager()
    • getUpgradeTasks

      public List<UpgradeTask> getUpgradeTasks()
    • getBootstrapManager

      public CrowdBootstrapManager getBootstrapManager()