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:
UpgradeManager, org.springframework.context.ApplicationContextAware

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


Field Summary
 
Fields inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeManager
applicationBuildNumberComparator, applicationConfig, fileName, newBuildNumber, upgradeTasks, 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()
           
 void setApplicationContext(org.springframework.context.ApplicationContext appContext)
           
 void setFullReindexWhenUpgradesFinish(boolean fullReindexWhenUpgradesFinish)
          Marks that the UpgradeManger should do a full reindex when all upgrades have finished successfully
 
Methods inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeManager
classifyUpgradeTask, getBuildNumber, getUpgradeDocument, getUpgradeTasks, needUpgrade, populateRelevantUpgrades, runUpgradeTask, setBuildNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

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()
Specified by:
isFullReindexWhenUpgradesFinish in interface UpgradeManager

setFullReindexWhenUpgradesFinish

public void setFullReindexWhenUpgradesFinish(boolean fullReindexWhenUpgradesFinish)
Description copied from interface: UpgradeManager
Marks that the UpgradeManger should do a full reindex when all upgrades have finished successfully

Specified by:
setFullReindexWhenUpgradesFinish in interface UpgradeManager

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 © 2010 Atlassian. All Rights Reserved.