Package com.atlassian.bamboo.upgrade
Class UpgradeManagerImpl
java.lang.Object
com.atlassian.bamboo.upgrade.AbstractUpgradeManager
com.atlassian.bamboo.upgrade.UpgradeManagerImpl
- All Implemented Interfaces:
UpgradeManager
-
Field Summary
Fields inherited from class com.atlassian.bamboo.upgrade.AbstractUpgradeManager
applicationConfig, bootstrapManager, buildNumberComparator, fileName, newBuildNumber, oldBuildNumber, textProvider, upgradeTasks, upgradeUtilityBean, xPathExpression
-
Constructor Summary
ModifierConstructorDescriptionUpgradeManagerImpl
(@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
Modifier and TypeMethodDescriptionprotected void
classifyUpgradeTask
(@NotNull String bambooBuildNumber, @NotNull UpgradeTask task) doUpgrade
(boolean partOfSetup) Method to fire off the upgrade processboolean
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 Details
-
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 Details
-
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
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
-