Package com.atlassian.bamboo.upgrade
Class BootstrapUpgradeManagerImpl
- java.lang.Object
-
- com.atlassian.bamboo.upgrade.AbstractUpgradeManager
-
- com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl
-
- All Implemented Interfaces:
BootstrapUpgradeManager
,UpgradeManager
,org.springframework.beans.factory.Aware
,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
applicationConfig, bootstrapManager, buildNumberComparator, fileName, newBuildNumber, oldBuildNumber, textProvider, upgradeTasks, upgradeUtilityBean, xPathExpression
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BootstrapUpgradeManagerImpl(@NotNull com.atlassian.config.ApplicationConfiguration applicationConfig, @NotNull BootstrapUpgradeHelper bootstrapUpgradeHelper, @NotNull BootstrapManager bootstrapManager, @NotNull String newBuildNumber, @NotNull String fileName)
BootstrapUpgradeManagerImpl(@NotNull com.atlassian.config.ApplicationConfiguration applicationConfig, @NotNull BootstrapUpgradeHelper bootstrapUpgradeHelper, BootstrapManager bootstrapManager, @NotNull String fileName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UpgradeTask
createUpgradeTask(String className)
@NotNull List<String>
doUpgrade(boolean partOfSetup)
Method to fire off the upgrade processList<String>
runUpgradesForHotswapImport()
Run upgrade task that have to be run after hot swap import or setup-with-import.@NotNull List<String>
runValidationTasks()
Runs validation tests defined in upgrades.xmlvoid
setApplicationContext(org.springframework.context.ApplicationContext appContext)
-
Methods inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeManager
classifyUpgradeTask, createTasks, forEachTask, getBuildNumber, getDescription, getOldBuildNumber, getUpgradeDocument, getUpgradeTasks, needUpgrade, populateRelevantUpgrades, runUpgradeTask, setTextProvider, setUpgradeUtilityBean, shouldRunTask
-
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, getOldBuildNumber, needUpgrade
-
-
-
-
Constructor Detail
-
BootstrapUpgradeManagerImpl
public BootstrapUpgradeManagerImpl(@NotNull @NotNull com.atlassian.config.ApplicationConfiguration applicationConfig, @NotNull @NotNull BootstrapUpgradeHelper bootstrapUpgradeHelper, BootstrapManager bootstrapManager, @NotNull @NotNull String fileName)
-
BootstrapUpgradeManagerImpl
protected BootstrapUpgradeManagerImpl(@NotNull @NotNull com.atlassian.config.ApplicationConfiguration applicationConfig, @NotNull @NotNull BootstrapUpgradeHelper bootstrapUpgradeHelper, @NotNull @NotNull BootstrapManager bootstrapManager, @NotNull @NotNull String newBuildNumber, @NotNull @NotNull String fileName)
-
-
Method Detail
-
runUpgradesForHotswapImport
public List<String> runUpgradesForHotswapImport() throws Exception
Description copied from interface:BootstrapUpgradeManager
Run upgrade task that have to be run after hot swap import or setup-with-import.- Specified by:
runUpgradesForHotswapImport
in interfaceBootstrapUpgradeManager
- Throws:
Exception
-
doUpgrade
@NotNull public @NotNull List<String> doUpgrade(boolean partOfSetup) throws Exception
Description copied from interface:UpgradeManager
Method to fire off the upgrade process- Specified by:
doUpgrade
in interfaceUpgradeManager
- Parameters:
partOfSetup
- - whether or not the upgrade is being run as part of the setup- Returns:
- collection of error messages, not empty collection denotes error occurred on upgrade
- Throws:
Exception
-
runValidationTasks
@NotNull public @NotNull List<String> runValidationTasks() throws ValidationException
Description copied from interface:BootstrapUpgradeManager
Runs validation tests defined in upgrades.xml- Specified by:
runValidationTasks
in interfaceBootstrapUpgradeManager
- Returns:
List
a string list of error messages. Not empty list denotes error occurred in validation- Throws:
ValidationException
- when a critical error occurred and validation has been aborted
-
createUpgradeTask
public UpgradeTask createUpgradeTask(String className) throws UpgradeException
- Overrides:
createUpgradeTask
in classAbstractUpgradeManager
- Throws:
UpgradeException
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext appContext) throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
-