public class

UpgradeManagerImpl

extends Object
implements Startable UpgradeManager
java.lang.Object
   ↳ com.atlassian.jira.upgrade.UpgradeManagerImpl

Summary

Public Constructors
UpgradeManagerImpl(JiraLicenseService jiraLicenseService, BuildUtilsInfo buildUtilsInfo, I18nHelper.BeanFactory i18HelperFactory, ApplicationProperties applicationProperties, BuildVersionRegistry buildVersionRegistry, EventPublisher eventPublisher, OfBizDelegator ofBizDelegator, IndexLifecycleManager indexManager, OutlookDateManager outlookDateManager, FeatureManager featureManager, DowngradeUtilsImpl downgradeUtilsInfo, ReindexMessageManager reindexMessageManager)
Public Methods
UpgradeManager.Status doSetupUpgrade()

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.

UpgradeManager.Status doUpgradeIfNeededAndAllowed(String backupPath, boolean setupMode)
Performs the upgrade if one is required and the license is not too old to proceed with the upgrade.
String getExportFilePath()
Export path of the last backup performed by this manager
List<UpgradeHistoryItem> getUpgradeHistory()
@EventListener void onClearCache(ClearCacheEvent event)
void reindex(Collection<String> errors)
void start()
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.
Protected Methods
AutoExport getAutoExport(String defaultBackupPath)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.extension.Startable
From interface com.atlassian.jira.upgrade.UpgradeManager

Public Constructors

public UpgradeManagerImpl (JiraLicenseService jiraLicenseService, BuildUtilsInfo buildUtilsInfo, I18nHelper.BeanFactory i18HelperFactory, ApplicationProperties applicationProperties, BuildVersionRegistry buildVersionRegistry, EventPublisher eventPublisher, OfBizDelegator ofBizDelegator, IndexLifecycleManager indexManager, OutlookDateManager outlookDateManager, FeatureManager featureManager, DowngradeUtilsImpl downgradeUtilsInfo, ReindexMessageManager reindexMessageManager)

Public Methods

public UpgradeManager.Status doSetupUpgrade ()

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.

Returns
  • status of the upgrade process

public UpgradeManager.Status doUpgradeIfNeededAndAllowed (String backupPath, boolean setupMode)

Performs the upgrade if one is required and the license is not too old to proceed with the upgrade.

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

public String getExportFilePath ()

Export path of the last backup performed by this manager

Returns
  • path to the last backup file

public List<UpgradeHistoryItem> getUpgradeHistory ()

@EventListener public void onClearCache (ClearCacheEvent event)

public void reindex (Collection<String> errors)

Throws
Exception

public void start ()

This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.

Throws
Exception

Protected Methods

protected AutoExport getAutoExport (String defaultBackupPath)