public class MockBuildUtilsInfo extends Object implements BuildUtilsInfo
Constructor and Description |
---|
MockBuildUtilsInfo() |
Modifier and Type | Method and Description |
---|---|
int |
getApplicationBuildNumber()
Gets the build number of this JIRA install.
|
String |
getApplinksVersion()
Returns the version of AppLinks that JIRA ships with.
|
String |
getBuildInformation()
Gets a build information summary as a String.
|
String |
getBuildPartnerName()
Gets the partner name of this JIRA build
|
String |
getBuildProperty(String key) |
String |
getCommitId()
Returns the id of the SCM commit that was used to make this build of JIRA.
|
Date |
getCurrentBuildDate()
Gets the date this version of JIRA was built on.
|
String |
getCurrentBuildNumber()
Gets the current build number of JIRA.
|
int |
getDatabaseBuildNumber()
Gets the build number of the database that this JIRA instance points to.
|
String |
getDocVersion()
Return the version used for JIRA documentation.
|
String |
getGuavaOsgiVersion() |
String |
getLuceneVersion()
Returns the version of Apache Lucene included in JIRA.
|
String |
getMinimumUpgradableBuildNumber()
Gets the minimal build number that JIRA can upgrade from
|
String |
getMinimumUpgradableVersion()
Get the minimum version of JIRA that can be upgraded to this instance version.
|
String |
getSalVersion()
Returns the version of Atlassian SAL that JIRA exports into OSGI-land.
|
String |
getSvnRevision()
Returns the SCM commit id that was used to make this build of JIRA.
|
Collection<Locale> |
getUnavailableLocales() |
String |
getVersion()
Gets the current version of JIRA
|
int[] |
getVersionNumbers()
Gets the numerical components of the version.
|
boolean |
isBeta()
Returns whether the current version is a beta (i.e.
|
boolean |
isMilestone()
Returns whether the current version is a milestone (i.e.
|
boolean |
isRc()
Returns whether the current version is a release candidate (i.e.
|
boolean |
isSnapshot()
Returns whether the current version is a snapshot (i.e.
|
MockBuildUtilsInfo |
setBuildDate(Date date) |
MockBuildUtilsInfo |
setBuildInformation(String info) |
MockBuildUtilsInfo |
setCurrentBuildNumber(String number) |
MockBuildUtilsInfo |
setDocVersion(String docVersion) |
MockBuildUtilsInfo |
setVersion(String version) |
MockBuildUtilsInfo |
withApplicationBuildNumber(int applicationBuildNumber) |
public String getVersion()
BuildUtilsInfo
getVersion
in interface BuildUtilsInfo
public MockBuildUtilsInfo setVersion(String version)
public String getDocVersion()
BuildUtilsInfo
This is the version that JIRA uses when generating links to its externally hosted documentation.
getDocVersion
in interface BuildUtilsInfo
public MockBuildUtilsInfo setDocVersion(String docVersion)
public MockBuildUtilsInfo setBuildDate(Date date)
public int[] getVersionNumbers()
BuildUtilsInfo
"5.0"
gives [5, 0, 0]"5.0.1"
gives [5, 0, 1]"5.0-beta1"
gives [5, 0, 0]"5.0.1-SNAPSHOT"
gives [5, 0, 1]The returned array is guaranteed to have at least 3 elements. Any non-numeric suffix in getVersion() is ignored.
A simple way to use this information is with Guava's Ints.lexicographicalComparator()
:
int[] v510 = {5, 1, 0}; if (Ints.lexicographicalComparator().compare(buildUtils.getVersionNumbers(), v510) >= 0 ) { ...
getVersionNumbers
in interface BuildUtilsInfo
public String getCurrentBuildNumber()
BuildUtilsInfo
This is the same value as BuildUtilsInfo.getApplicationBuildNumber()
except it is returned as a String.
getCurrentBuildNumber
in interface BuildUtilsInfo
BuildUtilsInfo.getDatabaseBuildNumber()
,
BuildUtilsInfo.getApplicationBuildNumber()
public MockBuildUtilsInfo setCurrentBuildNumber(String number)
public int getApplicationBuildNumber()
BuildUtilsInfo
That is, the build number of the currently running installation files. The DB also stores a build number.
getApplicationBuildNumber
in interface BuildUtilsInfo
BuildUtilsInfo.getDatabaseBuildNumber()
public MockBuildUtilsInfo withApplicationBuildNumber(int applicationBuildNumber)
public int getDatabaseBuildNumber()
BuildUtilsInfo
Under normal circumstances this will be the same as the build number of the JIRA installation. However, when you first upgrade a JIRA database or import data exported from an older JIRA, the existing database will start on the previous build number. JIRA will then run "Upgrade Tasks" to update the data in the DB.
getDatabaseBuildNumber
in interface BuildUtilsInfo
BuildUtilsInfo.getCurrentBuildNumber()
public String getMinimumUpgradableBuildNumber()
BuildUtilsInfo
getMinimumUpgradableBuildNumber
in interface BuildUtilsInfo
public Date getCurrentBuildDate()
BuildUtilsInfo
getCurrentBuildDate
in interface BuildUtilsInfo
public String getBuildPartnerName()
BuildUtilsInfo
getBuildPartnerName
in interface BuildUtilsInfo
public String getBuildInformation()
BuildUtilsInfo
getBuildInformation
in interface BuildUtilsInfo
public MockBuildUtilsInfo setBuildInformation(String info)
public String getSvnRevision()
BuildUtilsInfo
getSvnRevision
in interface BuildUtilsInfo
public String getCommitId()
BuildUtilsInfo
getCommitId
in interface BuildUtilsInfo
public String getMinimumUpgradableVersion()
BuildUtilsInfo
getMinimumUpgradableVersion
in interface BuildUtilsInfo
public Collection<Locale> getUnavailableLocales()
getUnavailableLocales
in interface BuildUtilsInfo
public String getSalVersion()
BuildUtilsInfo
getSalVersion
in interface BuildUtilsInfo
public String getApplinksVersion()
BuildUtilsInfo
getApplinksVersion
in interface BuildUtilsInfo
public String getLuceneVersion()
BuildUtilsInfo
This will be the version used to export the lucene packages to the OSGI container.
getLuceneVersion
in interface BuildUtilsInfo
public String getGuavaOsgiVersion()
getGuavaOsgiVersion
in interface BuildUtilsInfo
public String getBuildProperty(String key)
getBuildProperty
in interface BuildUtilsInfo
public boolean isBeta()
BuildUtilsInfo
isBeta
in interface BuildUtilsInfo
public boolean isRc()
BuildUtilsInfo
isRc
in interface BuildUtilsInfo
public boolean isSnapshot()
BuildUtilsInfo
isSnapshot
in interface BuildUtilsInfo
public boolean isMilestone()
BuildUtilsInfo
isMilestone
in interface BuildUtilsInfo
Copyright © 2002-2017 Atlassian. All Rights Reserved.