public abstract class AbstractUpgradeManager extends Object implements UpgradeManager
Modifier and Type | Field and Description |
---|---|
protected com.atlassian.config.ApplicationConfiguration |
applicationConfig |
protected Comparator<String> |
buildNumberComparator |
protected String |
fileName |
protected String |
newBuildNumber |
protected com.opensymphony.xwork2.TextProvider |
textProvider |
protected SortedMap<String,UpgradeTask> |
upgradeTasks |
protected UpgradeUtilityBean |
upgradeUtilityBean |
protected String |
xPathExpression |
Modifier | Constructor and Description |
---|---|
protected |
AbstractUpgradeManager(com.atlassian.config.ApplicationConfiguration applicationConfig,
String newBuildNumber,
String fileName,
String xPathExpression) |
Modifier and Type | Method and Description |
---|---|
protected void |
classifyUpgradeTask(String bambooBuildNumber,
UpgradeTask task) |
protected SortedMap<String,UpgradeTask> |
createTasks(String xPathExpression,
String installationBuildNumber,
String upgradeBuildNumber) |
UpgradeTask |
createUpgradeTask(String className) |
String |
getBuildNumber()
This gets the pre-build number
|
protected org.dom4j.Document |
getUpgradeDocument() |
SortedMap<String,UpgradeTask> |
getUpgradeTasks()
Gets a map of upgrade tasks which need to run.
|
boolean |
needUpgrade()
Determines whether we need to run the upgrade or not.
|
protected void |
populateRelevantUpgrades(String buildNumberLo,
String buildNumberHi) |
protected String |
runUpgradeTask(UpgradeTask task,
List<String> errors) |
protected void |
setBuildNumber(String buildNumber) |
void |
setTextProvider(com.opensymphony.xwork2.TextProvider textProvider) |
void |
setUpgradeUtilityBean(UpgradeUtilityBean upgradeUtilityBean) |
protected boolean |
shouldRunTask(org.dom4j.Element element,
String installationBuildNumber,
String upgradeBuildNumber) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doUpgrade
protected final Comparator<String> buildNumberComparator
protected final String newBuildNumber
protected final String fileName
protected final String xPathExpression
protected final SortedMap<String,UpgradeTask> upgradeTasks
protected final com.atlassian.config.ApplicationConfiguration applicationConfig
protected UpgradeUtilityBean upgradeUtilityBean
protected com.opensymphony.xwork2.TextProvider textProvider
public boolean needUpgrade()
UpgradeManager
needUpgrade
in interface UpgradeManager
boolean
whether the build was successful or not@NotNull public String getBuildNumber()
UpgradeManager
getBuildNumber
in interface UpgradeManager
protected void setBuildNumber(@NotNull String buildNumber) throws com.atlassian.config.ConfigurationException
com.atlassian.config.ConfigurationException
protected void populateRelevantUpgrades(@NotNull String buildNumberLo, @NotNull String buildNumberHi) throws UpgradeException
UpgradeException
protected void classifyUpgradeTask(@NotNull String bambooBuildNumber, @NotNull UpgradeTask task) throws UpgradeException
UpgradeException
protected SortedMap<String,UpgradeTask> createTasks(@NotNull String xPathExpression, @NotNull String installationBuildNumber, @NotNull String upgradeBuildNumber) throws UpgradeException
UpgradeException
public UpgradeTask createUpgradeTask(String className) throws UpgradeException
UpgradeException
protected org.dom4j.Document getUpgradeDocument() throws org.dom4j.DocumentException
org.dom4j.DocumentException
protected String runUpgradeTask(@NotNull UpgradeTask task, @NotNull List<String> errors)
protected boolean shouldRunTask(@NotNull org.dom4j.Element element, @NotNull String installationBuildNumber, @NotNull String upgradeBuildNumber)
public SortedMap<String,UpgradeTask> getUpgradeTasks()
SortedMap
map of upgrade tasks, keys are the string representations
of the build number.public void setUpgradeUtilityBean(UpgradeUtilityBean upgradeUtilityBean)
public void setTextProvider(com.opensymphony.xwork2.TextProvider textProvider)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.