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.
|
GitLabChecker(@NotNull java.net.URL 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.Optional<Update> |
check(@NotNull java.lang.String currentVersion,
boolean checkForPreReleases)
Check whether an update/newer version is available for the given version.
|
java.util.List<java.lang.String> |
getAssetsDownloadUrls(@NotNull java.lang.String requestedVersion)
Deprecated.
The aim of VersionChecker is not to browse a given repository, but to check for availability of updates,
and if an update is available, work from there. See
check(String, boolean) which returns an instance of
Update. This provides everything you need. |
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, isUpdateAvailable, 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(@NotNull
@NotNull java.net.URL repositoryUrl)
repositoryUrl - URL. 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/releasespublic GitLabChecker refresh() throws java.io.IOException
refresh in class VersionCheckerjava.io.IOException - Exception thrown if setRepository() encounters an error.public java.util.Optional<Update> check(@NotNull @NotNull java.lang.String currentVersion, boolean checkForPreReleases)
true for checkForPreReleases.check in class VersionCheckercurrentVersion - String. The current version of the app.checkForPreReleases - Boolean. false if you do not want to check for PreReleases. true
if you want to check for PreReleases as well.Update-instance, wrapped in an Optional, contianing information about the available update.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.@Deprecated
public java.util.List<java.lang.String> getAssetsDownloadUrls(@NotNull
@NotNull java.lang.String requestedVersion)
check(String, boolean) which returns an instance of
Update. This provides everything you need.getAssetsDownloadUrls in class VersionCheckerrequestedVersion - String. The version you want to retrieve the asset download URLs for.