public class DefaultUpgradeManager extends AbstractUpgradeManager
MINIMUM_SUPPORTED_UPGRADE_BUILD_NUMBER, MINIMUM_SUPPORTED_UPGRADE_VERSION
Constructor and Description |
---|
DefaultUpgradeManager() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected void |
beforeUpgrade() |
void |
entireUpgradeFinished()
Called when all immediate and deferred upgrade actions have been performed *if* an upgrade was needed.
|
protected String |
getDatabaseBuildNumber() |
protected String |
getRealBuildNumber() |
protected void |
initialUpgradeFinished()
Update the pluginFrameworkDependent upgrade status based on whether there are any plugin framework dependent upgrade tasks
to run.
|
boolean |
needUpgrade()
This method has a side effect of putting an entry into the published cache indicating whether
an upgrade is required or not.
|
protected boolean |
permitDatabaseUpgrades()
If we are in a clustered setup, only one node should be allowed to perform upgrades that affect the database.
|
protected void |
postUpgrade() |
protected List<UpgradeError> |
runUpgradePrerequisites()
Runs all upgrade prerequisites.
|
protected void |
runUpgradeTasks(List<UpgradeTask> upgradeTasks) |
void |
setCacheManager(com.atlassian.cache.CacheManager cacheManager) |
void |
setClusterManager(ClusterManager clusterManager) |
void |
setCoreFeaturesManager(CoreFeaturesManager coreFeaturesManager) |
void |
setDatabaseBuildNumber()
Once installation is complete, we'll need to set the database build number in the database,
so that a subsequent startup of Confluence is able to check that the home directory build
number matches the database build number (see https://jira.atlassian.com/browse/CONF-13798).
|
protected void |
setDatabaseBuildNumber(String databaseBuildNumber)
Once the upgrade is complete, we'll need to set the new database build number in the database.
|
void |
setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher) |
void |
setLicenseService(LicenseService licenseService) |
void |
setLicenseValidator(LicenseValidator licenseValidator) |
void |
setRecoveryFileGenerator(RecoveryFileGenerator recoveryFileGenerator) |
void |
setSidManager(ConfluenceSidManager sidManager) |
void |
setUpgradeGate(UpgradeGate upgradeGate) |
void |
setVersionHistoryDao(VersionHistoryDao versionHistoryDao) |
configuredBuildNumberNewerThan, getAllUpgradeTasks, getAllUpgradeTasksInfo, getConfiguredBuildNumber, getErrors, getExportBuildNumber, getOldestSpaceImportAllowed, getPluginDependentUpgradeTasks, getPluginExportCompatibility, getPreSchemaUpgradeTasks, getSchemaUpgradeTasks, getUpgradeTasks, getUpgradeTasksToRun, isUpgraded, setApplicationConfig, setConfiguredBuildNumber, setPluginAccessor, setPluginDependentUpgradeTasks, setPreSchemaUpgradeTasks, setSchemaHelper, setSchemaUpgradeTasks, setUpgradeTasks, taskNewerThan, upgrade, upgradeStarted, upgradeTaskSucceeded
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class AbstractUpgradeManager
protected String getRealBuildNumber()
getRealBuildNumber
in class AbstractUpgradeManager
protected String getDatabaseBuildNumber()
getDatabaseBuildNumber
in class AbstractUpgradeManager
AbstractUpgradeManager.getConfiguredBuildNumber()
.protected List<UpgradeError> runUpgradePrerequisites()
AbstractUpgradeManager
runUpgradePrerequisites
in class AbstractUpgradeManager
public boolean needUpgrade()
needUpgrade
in interface UpgradeManager
needUpgrade
in class AbstractUpgradeManager
public void setDatabaseBuildNumber()
UpgradeManager
protected void setDatabaseBuildNumber(String databaseBuildNumber) throws Exception
AbstractUpgradeManager
setDatabaseBuildNumber
in class AbstractUpgradeManager
databaseBuildNumber
- The new database build numberException
- when there is any problem setting the database build numberprotected void beforeUpgrade()
beforeUpgrade
in class AbstractUpgradeManager
protected void postUpgrade()
postUpgrade
in class AbstractUpgradeManager
protected void initialUpgradeFinished() throws Exception
initialUpgradeFinished
in class AbstractUpgradeManager
Exception
- when setting the database or configuration build number failspublic void entireUpgradeFinished()
UpgradeManager
entireUpgradeFinished
in interface UpgradeManager
entireUpgradeFinished
in class AbstractUpgradeManager
protected boolean permitDatabaseUpgrades()
permitDatabaseUpgrades
in class AbstractUpgradeManager
protected void runUpgradeTasks(List<UpgradeTask> upgradeTasks) throws UpgradeException
runUpgradeTasks
in class AbstractUpgradeManager
UpgradeException
public void setCacheManager(com.atlassian.cache.CacheManager cacheManager)
public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
public void setVersionHistoryDao(VersionHistoryDao versionHistoryDao)
public void setClusterManager(ClusterManager clusterManager)
public void setSidManager(ConfluenceSidManager sidManager)
public void setUpgradeGate(UpgradeGate upgradeGate)
public void setCoreFeaturesManager(CoreFeaturesManager coreFeaturesManager)
public void setRecoveryFileGenerator(RecoveryFileGenerator recoveryFileGenerator)
public void setLicenseService(LicenseService licenseService)
public void setLicenseValidator(LicenseValidator licenseValidator)
Copyright © 2003–2016 Atlassian. All rights reserved.