public class GitLabChecker extends VersionChecker
| Constructor and Description |
|---|
GitLabChecker(@NotNull java.lang.String repositoryUrl)
Constructs a GitLab checker with the given GitLab-URL to allow for version checks as well as version and URL
acquisition.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
allVersions()
Gather a list of all available versions for the given repository.
|
java.util.List<java.lang.String> |
getAssetsDownloadUrls(@NotNull java.lang.String requestedVersion)
Get the asset download URLs for a particular tag/version.
|
java.lang.String |
getDownloadUrl(@NotNull java.lang.String version)
Get the URL for the given release version.
|
java.lang.String |
latestVersion(boolean checkForPreRelease)
Get the latest regular release.
|
GitLabChecker |
refresh()
Refresh this GitLab-instance.
|
protected void |
setRepository()
Set the repository JsonNode, for the given
GITLAB_API-URL this GitLabChecker-instance was initialized
with, so we can retrieve information from it later on. |
checkForUpdate, compareSemantics, getAllVersions, getObjectMapper, getResponse, latestAlpha, latestBeta, setAllVersionspublic GitLabChecker(@NotNull
@NotNull java.lang.String repositoryUrl)
throws java.net.MalformedURLException
repositoryUrl - String. The full /api/v4-GitLab-repository-URL you want to check. Examples:https://gitlab.com/api/v4/projects/32677538/releaseshttps://git.griefed.de/api/v4/projects/63/releasesjava.net.MalformedURLException - Thrown if the resulting URL is malformed or otherwise invalid.public GitLabChecker refresh() throws java.io.IOException
refresh in class VersionCheckerjava.io.IOException - Exception thrown if setRepository() encounters an error.public java.util.List<java.lang.String> allVersions()
allVersions in class VersionCheckernull is returned.public java.lang.String latestVersion(boolean checkForPreRelease)
latestVersion in class VersionCheckercheckForPreRelease - Boolean. Whether to include alpha and beta releases for latest release versions.no_release is returned.public java.lang.String getDownloadUrl(@NotNull
@NotNull java.lang.String version)
getDownloadUrl in class VersionCheckerversion - String. The version for which to get the URL to.protected void setRepository()
throws java.io.IOException
GITLAB_API-URL this GitLabChecker-instance was initialized
with, so we can retrieve information from it later on.setRepository in class VersionCheckerjava.io.IOException - Thrown if the set repository can not be reached or the URL is malformed in any way.public java.util.List<java.lang.String> getAssetsDownloadUrls(@NotNull
@NotNull java.lang.String requestedVersion)
getAssetsDownloadUrls in class VersionCheckerrequestedVersion - String. The version you want to retrieve the asset download URLs for.