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 protectedBootstrapUpgradeManagerImpl(@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 UpgradeTaskcreateUpgradeTask(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.xmlvoidsetApplicationContext(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:BootstrapUpgradeManagerRun upgrade task that have to be run after hot swap import or setup-with-import.- Specified by:
runUpgradesForHotswapImportin interfaceBootstrapUpgradeManager- Throws:
Exception
-
doUpgrade
@NotNull public @NotNull List<String> doUpgrade(boolean partOfSetup) throws Exception
Description copied from interface:UpgradeManagerMethod to fire off the upgrade process- Specified by:
doUpgradein 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:BootstrapUpgradeManagerRuns validation tests defined in upgrades.xml- Specified by:
runValidationTasksin interfaceBootstrapUpgradeManager- Returns:
Lista 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:
createUpgradeTaskin classAbstractUpgradeManager- Throws:
UpgradeException
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext appContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
-