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
ConstructorsModifierConstructorDescriptionUpgradeManagerImpl(@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
Modifier and TypeMethodDescriptionprotected voidclassifyUpgradeTask(@NotNull String bambooBuildNumber, @NotNull UpgradeTask task) doUpgrade(boolean partOfSetup) Method to fire off the upgrade processbooleanDetermines 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 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:UpgradeManagerDetermines whether we need to run the upgrade or not.- Specified by:
needUpgradein interfaceUpgradeManager- Overrides:
needUpgradein classAbstractUpgradeManager- Returns:
-
whether the upgrade is needed
invalid reference
boolean
-
doUpgrade
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
-