@InjectableComponent public class DefaultBuildVersionRegistry extends Object implements BuildVersionRegistry
BuildVersionRegistry.BuildVersion
Constructor and Description |
---|
DefaultBuildVersionRegistry(BuildUtilsInfo buildUtilsInfo) |
Modifier and Type | Method and Description |
---|---|
BuildVersionRegistry.BuildVersion |
getBuildNumberForVersion(String targetVersion)
Takes a version string and attempts to resolve it to a released (or unreleased during development) build number of JIRA.
|
BuildVersionRegistry.BuildVersion |
getVersionForBuildNumber(int buildNumber)
Takes a build number and attempts to resolve it to a released (or unreleased during development) version of JIRA.
|
BuildVersionRegistry.BuildVersion |
getVersionForBuildNumber(String targetBuildNumber)
Takes a build number and attempts to resolve it to a released (or unreleased during development) version of JIRA.
|
public DefaultBuildVersionRegistry(BuildUtilsInfo buildUtilsInfo)
public BuildVersionRegistry.BuildVersion getVersionForBuildNumber(int buildNumber)
BuildVersionRegistry
Takes a build number and attempts to resolve it to a released (or unreleased during development) version of JIRA. If the build number does not directly correspond to a released version of JIRA, we attempt to infer the version by searching for the next known build number above the input.
For example, if the build number is 207
, the version returned would be 3.8
, as it
has a build number of 209
. In this case, the resulting BuildVersionRegistry.BuildVersion
object will have a build
number corresponding to the target build number and not the input build number, as the target build number is the
official number against that version.
If the input build number is higher than any known build number, we return the currently running version of JIRA.
getVersionForBuildNumber
in interface BuildVersionRegistry
buildNumber
- the build number to look uppublic BuildVersionRegistry.BuildVersion getVersionForBuildNumber(String targetBuildNumber)
BuildVersionRegistry
Takes a build number and attempts to resolve it to a released (or unreleased during development) version of JIRA. If the build number does not directly correspond to a released version of JIRA, we attempt to infer the version by searching for the next known build number above the input.
For example, if the build number is 207
, the version returned would be 3.8
, as it
has a build number of 209
. In this case, the resulting BuildVersionRegistry.BuildVersion
object will have a build
number corresponding to the target build number and not the input build number, as the target build number is the
official number against that version.
If the input build number is higher than any known build number, we return the currently running version of JIRA.
getVersionForBuildNumber
in interface BuildVersionRegistry
targetBuildNumber
- the build number to look up; must be not null and parseable to an integer.public BuildVersionRegistry.BuildVersion getBuildNumberForVersion(@Nonnull String targetVersion)
BuildVersionRegistry
Takes a version string and attempts to resolve it to a released (or unreleased during development) build number of JIRA. If the version string does not directly correspond to a released build number, return MAX_INT
getBuildNumberForVersion
in interface BuildVersionRegistry
targetVersion
- the version string to look up (e.g. 6.0.5
); must be not null.Copyright © 2002-2019 Atlassian. All Rights Reserved.