com.atlassian.bamboo.upgrade
Class UpgradeManagerImpl

java.lang.Object
  extended by com.atlassian.bamboo.upgrade.AbstractUpgradeManager
      extended by com.atlassian.bamboo.upgrade.UpgradeManagerImpl
All Implemented Interfaces:
UpgradeManager

public class UpgradeManagerImpl
extends AbstractUpgradeManager


Field Summary
 
Fields inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeManager
applicationBuildNumberComparator, applicationConfig, fileName, newBuildNumber, textProvider, upgradeTasks, upgradeUtilityBean, xPathExpression
 
Constructor Summary
  UpgradeManagerImpl(com.atlassian.config.ApplicationConfiguration applicationConfig, java.lang.String fileName)
           
protected UpgradeManagerImpl(com.atlassian.config.ApplicationConfiguration applicationConfig, java.lang.String newBuildNumber, java.lang.String fileName)
           
 
Method Summary
protected  void classifyUpgradeTask(java.lang.String bambooBuildNumber, UpgradeTask task)
           
 java.util.List<java.lang.String> doUpgrade(boolean partOfSetup)
          Method to fire off the upgrade process
 boolean needUpgrade()
          Determines whether we need to run the upgrade or not.
protected  void populateRelevantUpgrades(java.lang.String buildNumberLo, java.lang.String buildNumberHi)
           
 void setBuildResultsIndexer(BuildResultsIndexer buildResultsIndexer)
           
 void setSystemStatisticsBean(SystemStatisticsBean systemStatisticsBean)
           
 
Methods inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeManager
createUpgradeTask, createUpgradeTasks, getBuildNumber, getUpgradeDocument, getUpgradeTasks, isFullReindexWhenUpgradesFinish, runUpgradeTask, setBuildNumber, setFullReindexWhenUpgradesFinish, setTextProvider, setUpgradeUtilityBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpgradeManagerImpl

public UpgradeManagerImpl(com.atlassian.config.ApplicationConfiguration applicationConfig,
                          java.lang.String fileName)

UpgradeManagerImpl

protected UpgradeManagerImpl(com.atlassian.config.ApplicationConfiguration applicationConfig,
                             java.lang.String newBuildNumber,
                             java.lang.String fileName)
Method Detail

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
Overrides:
needUpgrade in class AbstractUpgradeManager
Returns:
boolean whether the build was successful or not

doUpgrade

@NotNull
public java.util.List<java.lang.String> doUpgrade(boolean partOfSetup)
                                           throws java.lang.Exception
Description copied from interface: UpgradeManager
Method to fire off the upgrade process

Parameters:
partOfSetup - - whether or not the upgrade is being run as part of the setup
Returns:
Collection a string collection of error messages. Collection not empty denotes error occurred on upgrade
Throws:
java.lang.Exception

populateRelevantUpgrades

protected void populateRelevantUpgrades(@NotNull
                                        java.lang.String buildNumberLo,
                                        @NotNull
                                        java.lang.String buildNumberHi)
                                 throws com.atlassian.upgrade.UpgradeException
Overrides:
populateRelevantUpgrades in class AbstractUpgradeManager
Throws:
com.atlassian.upgrade.UpgradeException

classifyUpgradeTask

protected void classifyUpgradeTask(@NotNull
                                   java.lang.String bambooBuildNumber,
                                   @NotNull
                                   UpgradeTask task)
                            throws com.atlassian.upgrade.UpgradeException
Overrides:
classifyUpgradeTask in class AbstractUpgradeManager
Throws:
com.atlassian.upgrade.UpgradeException

setBuildResultsIndexer

public void setBuildResultsIndexer(BuildResultsIndexer buildResultsIndexer)

setSystemStatisticsBean

public void setSystemStatisticsBean(SystemStatisticsBean systemStatisticsBean)


Copyright © 2012 Atlassian. All Rights Reserved.