com.atlassian.bamboo.upgrade
Class AbstractUpgradeManager
java.lang.Object
com.atlassian.bamboo.upgrade.AbstractUpgradeManager
- All Implemented Interfaces:
- UpgradeManager
- Direct Known Subclasses:
- BootstrapUpgradeManagerImpl, UpgradeManagerImpl
public abstract class AbstractUpgradeManager
- extends java.lang.Object
- implements UpgradeManager
Constructor Summary |
protected |
AbstractUpgradeManager(com.atlassian.config.ApplicationConfiguration applicationConfig,
java.lang.String newBuildNumber,
java.lang.String fileName,
java.lang.String xPathExpression)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
applicationBuildNumberComparator
protected final java.util.Comparator<java.lang.String> applicationBuildNumberComparator
newBuildNumber
protected final java.lang.String newBuildNumber
fileName
protected final java.lang.String fileName
xPathExpression
protected final java.lang.String xPathExpression
upgradeTasks
protected final java.util.SortedMap<java.lang.String,UpgradeTask> upgradeTasks
applicationConfig
protected final com.atlassian.config.ApplicationConfiguration applicationConfig
upgradeUtilityBean
protected UpgradeUtilityBean upgradeUtilityBean
textProvider
protected com.opensymphony.xwork.TextProvider textProvider
AbstractUpgradeManager
protected AbstractUpgradeManager(@NotNull
com.atlassian.config.ApplicationConfiguration applicationConfig,
@NotNull
java.lang.String newBuildNumber,
@NotNull
java.lang.String fileName,
@NotNull
java.lang.String xPathExpression)
needUpgrade
public boolean needUpgrade()
- Description copied from interface:
UpgradeManager
- Determines whether we need to run the upgrade or not.
- Specified by:
needUpgrade
in interface UpgradeManager
- Returns:
boolean
whether the build was successful or not
getBuildNumber
@NotNull
public java.lang.String getBuildNumber()
- Description copied from interface:
UpgradeManager
- This gets the pre-build number
- Specified by:
getBuildNumber
in interface UpgradeManager
- Returns:
- the current build number (in application config file)
setBuildNumber
protected void setBuildNumber(@NotNull
java.lang.String buildNumber)
throws com.atlassian.config.ConfigurationException
- Throws:
com.atlassian.config.ConfigurationException
isFullReindexWhenUpgradesFinish
public boolean isFullReindexWhenUpgradesFinish()
setFullReindexWhenUpgradesFinish
public void setFullReindexWhenUpgradesFinish(boolean fullReindexWhenUpgradesFinish)
throws com.atlassian.config.ConfigurationException
- Throws:
com.atlassian.config.ConfigurationException
populateRelevantUpgrades
protected void populateRelevantUpgrades(@NotNull
java.lang.String buildNumberLo,
@NotNull
java.lang.String buildNumberHi)
throws com.atlassian.upgrade.UpgradeException
- Throws:
com.atlassian.upgrade.UpgradeException
classifyUpgradeTask
protected void classifyUpgradeTask(@NotNull
java.lang.String bambooBuildNumber,
@NotNull
UpgradeTask task)
throws com.atlassian.upgrade.UpgradeException
- Throws:
com.atlassian.upgrade.UpgradeException
createUpgradeTasks
protected java.util.SortedMap<java.lang.String,UpgradeTask> createUpgradeTasks(@NotNull
java.lang.String xPathExpression,
@NotNull
java.lang.String buildNumberLo,
@NotNull
java.lang.String buildNumberHi)
throws com.atlassian.upgrade.UpgradeException
- Throws:
com.atlassian.upgrade.UpgradeException
createUpgradeTask
protected UpgradeTask createUpgradeTask(java.lang.String className)
throws com.atlassian.upgrade.UpgradeException
- Throws:
com.atlassian.upgrade.UpgradeException
getUpgradeDocument
protected org.dom4j.Document getUpgradeDocument()
throws org.dom4j.DocumentException
- Throws:
org.dom4j.DocumentException
runUpgradeTask
protected java.lang.String runUpgradeTask(@NotNull
UpgradeTask task,
@NotNull
java.util.List<java.lang.String> errors)
getUpgradeTasks
public java.util.SortedMap<java.lang.String,UpgradeTask> getUpgradeTasks()
- Gets a map of upgrade tasks which need to run.
- Returns:
SortedMap
map of upgrade tasks, keys are the string representations
of the build number.
setUpgradeUtilityBean
public void setUpgradeUtilityBean(UpgradeUtilityBean upgradeUtilityBean)
setTextProvider
public void setTextProvider(com.opensymphony.xwork.TextProvider textProvider)
Copyright © 2012 Atlassian. All Rights Reserved.