public interface

UpgradeManager

com.atlassian.jira.upgrade.UpgradeManager
Known Indirect Subclasses

Summary

Nested Classes
class UpgradeManager.Status Status of the upgrade process  
Public Methods
boolean areDelayedUpgradesRunning()
Returns true if a scheduled upgrade is in progress.
UpgradeManager.Status doUpgradeIfNeededAndAllowed(String backupPath, UpgradeManagerParams upgradeManagerParams)
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
RunDetails getLastUpgradeResult()
int getPendingDelayedUpgradeCount()
List<UpgradeHistoryItem> getUpgradeHistory()
boolean hasUpgradeTaskRun(Class<? extends UpgradeTask> clazz)
Return true if the upgrade task implemented in the parameter class has completed successfully..
@Nonnull UpgradeManager.Status scheduleDelayedUpgrades(int delayMins, boolean isAllowReindex)
Schedules the execution of delayed upgrades.

Public Methods

public boolean areDelayedUpgradesRunning ()

Returns true if a scheduled upgrade is in progress.

Returns
  • if a scheduled upgrade is in progress.

public UpgradeManager.Status doUpgradeIfNeededAndAllowed (String backupPath, UpgradeManagerParams upgradeManagerParams)

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
upgradeManagerParams contain information needed to upgrade process
Returns
  • status of the upgrade process
Throws
IllegalXMLCharactersException if backup was impossible due to invalid XML characters

public String getExportFilePath ()

Export path of the last backup performed by this manager

Returns
  • path to the last backup file

public RunDetails getLastUpgradeResult ()

public int getPendingDelayedUpgradeCount ()

Returns
  • the number of pending delayed upgrades.

public List<UpgradeHistoryItem> getUpgradeHistory ()

Returns
  • the history of upgrades performed on this instance of JIRA in reverse chronological order

public boolean hasUpgradeTaskRun (Class<? extends UpgradeTask> clazz)

Return true if the upgrade task implemented in the parameter class has completed successfully.. Note: We use the class as the parameter to help when tasks are refactored and reordered etc.

Parameters
clazz The Upgrade Task's implementing class.

@Nonnull public UpgradeManager.Status scheduleDelayedUpgrades (int delayMins, boolean isAllowReindex)

Schedules the execution of delayed upgrades.

Parameters
delayMins the amount of time in minutes to wait before executing the delayed upgrades.
isAllowReindex set this to true to allow any required reindex to be done.
Returns
  • the status of the upgrade process.