com.atlassian.bamboo.upgrade
Class BootstrapUpgradeManagerImpl

java.lang.Object
  extended by com.atlassian.bamboo.upgrade.AbstractUpgradeManager
      extended by com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl
All Implemented Interfaces:
BootstrapUpgradeManager, UpgradeManager, org.springframework.context.ApplicationContextAware

public class BootstrapUpgradeManagerImpl
extends AbstractUpgradeManager
implements BootstrapUpgradeManager, org.springframework.context.ApplicationContextAware


Field Summary
 
Fields inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeManager
applicationBuildNumberComparator, applicationConfig, fileName, newBuildNumber, textProvider, upgradeTasks, upgradeUtilityBean, xPathExpression
 
Constructor Summary
  BootstrapUpgradeManagerImpl(com.atlassian.config.ApplicationConfiguration applicationConfig, java.lang.String fileName)
           
protected BootstrapUpgradeManagerImpl(com.atlassian.config.ApplicationConfiguration applicationConfig, java.lang.String newBuildNumber, java.lang.String fileName)
           
 
Method Summary
protected  UpgradeTask createUpgradeTask(java.lang.String className)
           
 java.util.List<java.lang.String> doUpgrade(boolean partOfSetup)
          Method to fire off the upgrade process
 boolean isFullReindexWhenUpgradesFinish()
           
 java.util.List<java.lang.String> runValidationTests()
          Runs validation tests defined in upgrades.xml
 void setApplicationContext(org.springframework.context.ApplicationContext appContext)
           
 void setFullReindexWhenUpgradesFinish(boolean fullReindexWhenUpgradesFinish)
           
 
Methods inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeManager
classifyUpgradeTask, createUpgradeTasks, getBuildNumber, getUpgradeDocument, getUpgradeTasks, needUpgrade, populateRelevantUpgrades, runUpgradeTask, setBuildNumber, setTextProvider, setUpgradeUtilityBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.upgrade.UpgradeManager
getBuildNumber, needUpgrade
 

Constructor Detail

BootstrapUpgradeManagerImpl

public BootstrapUpgradeManagerImpl(@NotNull
                                   com.atlassian.config.ApplicationConfiguration applicationConfig,
                                   @NotNull
                                   java.lang.String fileName)

BootstrapUpgradeManagerImpl

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

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

Specified by:
doUpgrade in interface UpgradeManager
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

runValidationTests

@NotNull
public java.util.List<java.lang.String> runValidationTests()
                                                    throws java.lang.Exception
Description copied from interface: BootstrapUpgradeManager
Runs validation tests defined in upgrades.xml

Specified by:
runValidationTests in interface BootstrapUpgradeManager
Returns:
Collection a string collection of error messages. Collection not empty denotes error occurred on validation
Throws:
java.lang.Exception

createUpgradeTask

protected UpgradeTask createUpgradeTask(java.lang.String className)
                                 throws com.atlassian.upgrade.UpgradeException
Overrides:
createUpgradeTask in class AbstractUpgradeManager
Throws:
com.atlassian.upgrade.UpgradeException

isFullReindexWhenUpgradesFinish

public boolean isFullReindexWhenUpgradesFinish()
Overrides:
isFullReindexWhenUpgradesFinish in class AbstractUpgradeManager

setFullReindexWhenUpgradesFinish

public void setFullReindexWhenUpgradesFinish(boolean fullReindexWhenUpgradesFinish)
Overrides:
setFullReindexWhenUpgradesFinish in class AbstractUpgradeManager

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext appContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.