Class DefaultUpgradeConstraints

java.lang.Object
com.atlassian.jira.upgrade.DefaultUpgradeConstraints
All Implemented Interfaces:
UpgradeConstraints

public class DefaultUpgradeConstraints extends Object implements UpgradeConstraints
Allows to run every upgrade task (this needs to be fixed as it should only be allowed to run upgrade task up to current build number) and returns BuildUtilsInfo.getApplicationBuildNumber() as a target database number.
Since:
v7
  • Constructor Details

    • DefaultUpgradeConstraints

      @Inject public DefaultUpgradeConstraints(BuildUtilsInfo buildUtilsInfo)
  • Method Details

    • getTargetDatabaseBuildNumber

      public int getTargetDatabaseBuildNumber()
      Description copied from interface: UpgradeConstraints
      Gets the target number of database that should be set once all upgrade tasks are run.
      Specified by:
      getTargetDatabaseBuildNumber in interface UpgradeConstraints
      Returns:
      target number of database.
    • shouldRunTask

      public boolean shouldRunTask(String upgradeTaskNumber)
      Description copied from interface: UpgradeConstraints
      Checks if given upgrade task number should be run by upgrade manager.
      Specified by:
      shouldRunTask in interface UpgradeConstraints
      Parameters:
      upgradeTaskNumber - number of upgrade task
      Returns:
      true if task should be run, false otherwise.