public final class GerritVersionChecker extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GerritVersionChecker.Feature
The feature version we want to compare the current Gerrit version with.
|
Modifier and Type | Method and Description |
---|---|
static GerritVersionNumber |
createVersionNumber(String version)
Creates a new VersionNumber from the response of the gerrit server.
|
static boolean |
isCorrectVersion(GerritVersionChecker.Feature feature,
String serverName)
Tells us if we are running the correct version for a particular feature.
|
static boolean |
isCorrectVersion(GerritVersionChecker.Feature feature,
String serverName,
boolean excludeSnapshotVersions)
Tells us if we are running the correct version for a particular feature.
|
static boolean |
isCorrectVersion(GerritVersionNumber gerritVersion,
GerritVersionChecker.Feature feature)
Tells us if we are running the correct version for a particular feature.
|
static boolean |
isCorrectVersion(GerritVersionNumber gerritVersion,
GerritVersionChecker.Feature feature,
boolean excludeSnapshotVersions)
Tells us if we are running the correct version for a particular feature.
|
public static boolean isCorrectVersion(GerritVersionChecker.Feature feature, String serverName)
feature
- the feature we want to check.serverName
- the name of the Gerrit server.public static boolean isCorrectVersion(GerritVersionChecker.Feature feature, String serverName, boolean excludeSnapshotVersions)
feature
- the feature we want to check.serverName
- the name of the Gerrit server.excludeSnapshotVersions
- exclude snapshot versions from feature checks.public static boolean isCorrectVersion(GerritVersionNumber gerritVersion, GerritVersionChecker.Feature feature, boolean excludeSnapshotVersions)
gerritVersion
- the version of Gerrit we are running.feature
- the feature we want to check.excludeSnapshotVersions
- exclude snapshots from feature check.public static boolean isCorrectVersion(GerritVersionNumber gerritVersion, GerritVersionChecker.Feature feature)
gerritVersion
- the version of Gerrit we are running.feature
- the feature we want to check.public static GerritVersionNumber createVersionNumber(String version)
version
- the version as a String.Copyright © 2016–2017. All rights reserved.