Package com.atlassian.bamboo.upgrade
Class UpgradeManagerImpl
- java.lang.Object
-
- com.atlassian.bamboo.upgrade.AbstractUpgradeManager
-
- 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
applicationConfig, bootstrapManager, buildNumberComparator, fileName, newBuildNumber, oldBuildNumber, textProvider, upgradeTasks, upgradeUtilityBean, xPathExpression
-
-
Constructor Summary
Constructors Modifier Constructor Description UpgradeManagerImpl(@NotNull com.atlassian.config.ApplicationConfiguration applicationConfig, @NotNull BandanaItemDao bandanaItemDao, @NotNull BambooTransactionHibernateTemplate transactionTemplate, @NotNull BootstrapManager bootstrapManager, @NotNull String fileName)protectedUpgradeManagerImpl(@NotNull com.atlassian.config.ApplicationConfiguration applicationConfig, @NotNull BandanaItemDao bandanaItemDao, @NotNull BambooTransactionHibernateTemplate transactionTemplate, @NotNull BootstrapManager bootstrapManager, @NotNull String newBuildNumber, @NotNull String fileName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclassifyUpgradeTask(@NotNull String bambooBuildNumber, @NotNull UpgradeTask task)@NotNull List<String>doUpgrade(boolean partOfSetup)Method to fire off the upgrade processbooleanneedUpgrade()Determines whether we need to run the upgrade or not.protected voidpopulateRelevantUpgrades(@NotNull String buildNumberLo, @NotNull String buildNumberHi)-
Methods inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeManager
createTasks, createUpgradeTask, forEachTask, getBuildNumber, getDescription, getOldBuildNumber, getUpgradeDocument, getUpgradeTasks, runUpgradeTask, setTextProvider, setUpgradeUtilityBean, shouldRunTask
-
-
-
-
Constructor Detail
-
UpgradeManagerImpl
public UpgradeManagerImpl(@NotNull @NotNull com.atlassian.config.ApplicationConfiguration applicationConfig, @NotNull @NotNull BandanaItemDao bandanaItemDao, @NotNull @NotNull BambooTransactionHibernateTemplate transactionTemplate, @NotNull @NotNull BootstrapManager bootstrapManager, @NotNull @NotNull String fileName)
-
UpgradeManagerImpl
protected UpgradeManagerImpl(@NotNull @NotNull com.atlassian.config.ApplicationConfiguration applicationConfig, @NotNull @NotNull BandanaItemDao bandanaItemDao, @NotNull @NotNull BambooTransactionHibernateTemplate transactionTemplate, @NotNull @NotNull BootstrapManager bootstrapManager, @NotNull @NotNull String newBuildNumber, @NotNull @NotNull String fileName)
-
-
Method Detail
-
needUpgrade
public boolean needUpgrade()
Description copied from interface:UpgradeManagerDetermines whether we need to run the upgrade or not.- Specified by:
needUpgradein interfaceUpgradeManager- Overrides:
needUpgradein classAbstractUpgradeManager- Returns:
booleanwhether the upgrade is needed
-
doUpgrade
@NotNull public @NotNull List<String> doUpgrade(boolean partOfSetup) throws Exception
Description copied from interface:UpgradeManagerMethod to fire off the upgrade process- 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
-
populateRelevantUpgrades
protected void populateRelevantUpgrades(@NotNull @NotNull String buildNumberLo, @NotNull @NotNull String buildNumberHi) throws UpgradeException- Overrides:
populateRelevantUpgradesin classAbstractUpgradeManager- Throws:
UpgradeException
-
classifyUpgradeTask
protected void classifyUpgradeTask(@NotNull @NotNull String bambooBuildNumber, @NotNull @NotNull UpgradeTask task) throws UpgradeException- Overrides:
classifyUpgradeTaskin classAbstractUpgradeManager- Throws:
UpgradeException
-
-