public class DowngradeUtil extends Object
This is used in two separate places:
| Constructor and Description |
|---|
DowngradeUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canDowngrade(List<UpgradeHistoryDTO> upgradeHistoryItems,
int targetBuildNumber)
Given a list of all upgrade History items, determine if a Downgrade should be successful.
|
static List<Integer> |
findDowngradeTasksToRun(List<UpgradeHistoryDTO> upgradeHistoryItems,
int targetBuildNumber)
Finds downgrade tasks that are needed to be run in order to downgrade version of JIRA to targetBuildNumber.
|
static ReindexRequirement |
getReindexRequirement(ApplicationProperties applicationProperties) |
static Map<Integer,DowngradeTask> |
loadDowngradeTasks()
Reads a downgrade XML file to get a list of all the downgrades specified in this file.
|
static void |
setReindexRequirement(ApplicationProperties applicationProperties,
ReindexRequirement reindexRequirement) |
static void |
verifyTasksExist(List<Integer> downgradeTaskNumbers,
Map<Integer,DowngradeTask> downgradeTaskMap)
Given a list of all downgrade tasks to run, and a Map of Tasks we have, verify that all required tasks are known.
|
public static boolean canDowngrade(List<UpgradeHistoryDTO> upgradeHistoryItems, int targetBuildNumber)
upgradeHistoryItems - History of upgrades that have already run (usually comes from an import file)targetBuildNumber - target build number@Nonnull public static List<Integer> findDowngradeTasksToRun(List<UpgradeHistoryDTO> upgradeHistoryItems, int targetBuildNumber) throws DowngradeException
upgradeHistoryItems - History of upgrades that have already run (usually comes from an import file)targetBuildNumber - build number to downgrade toDowngradeExceptionpublic static Map<Integer,DowngradeTask> loadDowngradeTasks() throws DowngradeException
DowngradeExceptionpublic static void verifyTasksExist(List<Integer> downgradeTaskNumbers, Map<Integer,DowngradeTask> downgradeTaskMap) throws MissingDowngradeTaskException
downgradeTaskNumbers - the upgrade task build numbers that we need to revert with an explicit downgrade taskdowngradeTaskMap - map of known Downgrade tasks by build numberMissingDowngradeTaskException - if there are upgrade tasks that we can't revert@Nonnull public static ReindexRequirement getReindexRequirement(ApplicationProperties applicationProperties)
public static void setReindexRequirement(ApplicationProperties applicationProperties, ReindexRequirement reindexRequirement)
Copyright © 2002-2024 Atlassian. All Rights Reserved.