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)
protected
UpgradeManagerImpl(@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 void
classifyUpgradeTask(@NotNull String bambooBuildNumber, @NotNull UpgradeTask task)
@NotNull List<String>
doUpgrade(boolean partOfSetup)
Method to fire off the upgrade processboolean
needUpgrade()
Determines whether we need to run the upgrade or not.protected void
populateRelevantUpgrades(@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:UpgradeManager
Determines whether we need to run the upgrade or not.- Specified by:
needUpgrade
in interfaceUpgradeManager
- Overrides:
needUpgrade
in classAbstractUpgradeManager
- Returns:
boolean
whether the upgrade is needed
-
doUpgrade
@NotNull public @NotNull List<String> doUpgrade(boolean partOfSetup) throws Exception
Description copied from interface:UpgradeManager
Method 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:
populateRelevantUpgrades
in classAbstractUpgradeManager
- Throws:
UpgradeException
-
classifyUpgradeTask
protected void classifyUpgradeTask(@NotNull @NotNull String bambooBuildNumber, @NotNull @NotNull UpgradeTask task) throws UpgradeException
- Overrides:
classifyUpgradeTask
in classAbstractUpgradeManager
- Throws:
UpgradeException
-
-