com.atlassian.jira.upgrade
Class UpgradeManagerImpl
java.lang.Object
com.atlassian.jira.upgrade.UpgradeManagerImpl
- All Implemented Interfaces:
- Startable, UpgradeManager
public class UpgradeManagerImpl
- extends Object
- implements UpgradeManager, Startable
Constructor Summary |
UpgradeManagerImpl(JiraLicenseService jiraLicenseService,
BuildUtilsInfo buildUtilsInfo,
I18nHelper.BeanFactory i18HelperFactory,
ApplicationProperties applicationProperties,
BuildVersionRegistry buildVersionRegistry,
com.atlassian.event.api.EventPublisher eventPublisher,
OfBizDelegator ofBizDelegator,
IndexLifecycleManager indexManager,
OutlookDateManager outlookDateManager,
FeatureManager featureManager,
DowngradeUtilsImpl downgradeUtilsInfo,
ReindexMessageManager reindexMessageManager)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UpgradeManagerImpl
public UpgradeManagerImpl(JiraLicenseService jiraLicenseService,
BuildUtilsInfo buildUtilsInfo,
I18nHelper.BeanFactory i18HelperFactory,
ApplicationProperties applicationProperties,
BuildVersionRegistry buildVersionRegistry,
com.atlassian.event.api.EventPublisher eventPublisher,
OfBizDelegator ofBizDelegator,
IndexLifecycleManager indexManager,
OutlookDateManager outlookDateManager,
FeatureManager featureManager,
DowngradeUtilsImpl downgradeUtilsInfo,
ReindexMessageManager reindexMessageManager)
start
public void start()
throws Exception
- Description copied from interface:
Startable
- This method wil be called after the plugin system is fully initialised and all components added to the
dependency injection framework.
- Specified by:
start
in interface Startable
- Throws:
Exception
- Allows implementations to throw an Exception.
onClearCache
@EventListener
public void onClearCache(ClearCacheEvent event)
doUpgradeIfNeededAndAllowed
public UpgradeManager.Status doUpgradeIfNeededAndAllowed(@Nullable
String backupPath,
boolean setupMode)
throws IllegalXMLCharactersException
- Description copied from interface:
UpgradeManager
- Performs the upgrade if one is required and the license is not too old to proceed with the upgrade.
- Specified by:
doUpgradeIfNeededAndAllowed
in interface UpgradeManager
- Parameters:
backupPath
- - a path to the default location of the export, may be null
, in which case no auto
export will be performed
- Returns:
- status of the upgrade process
- Throws:
IllegalXMLCharactersException
- if backup was impossible due to invalid XML
characters
getAutoExport
protected AutoExport getAutoExport(String defaultBackupPath)
doSetupUpgrade
public UpgradeManager.Status doSetupUpgrade()
- Description copied from interface:
UpgradeManager
-
Performs any upgrades that may be needed as a result of the Setup procedure of JIRA
Get the set of setupUpgradeNumbers which are to be performed for this setup.
Iterate over these numbers and if either of the standard, professional or enterprise upgrade maps contains an
UpgradeTask
with this number then do the upgrade
If errors are found, it will cancel the upgrade, and return the list of errors.
For each upgrade that happens successfully, it will increment the build number in the database, so that if one
fails, you do not have to repeat all the upgrades that have already run.
If there are no errors from the upgrade, the build number in the database is incremented to the current build
number. This is because there may be no upgrades for a particular version & needUpgrade() checks build no in
database.
- Specified by:
doSetupUpgrade
in interface UpgradeManager
- Returns:
- status of the upgrade process
getExportFilePath
public String getExportFilePath()
- Description copied from interface:
UpgradeManager
- Export path of the last backup performed by this manager
- Specified by:
getExportFilePath
in interface UpgradeManager
- Returns:
- path to the last backup file
getUpgradeHistory
public List<UpgradeHistoryItem> getUpgradeHistory()
- Specified by:
getUpgradeHistory
in interface UpgradeManager
- Returns:
- the history of upgrades performed on this instance of JIRA in reverse chronological order
reindex
public void reindex(Collection<String> errors)
throws Exception
- Throws:
Exception
Copyright © 2002-2014 Atlassian. All Rights Reserved.