public abstract class GitHubSource extends Object implements ExternalBinarySource
| Modifier and Type | Field and Description |
|---|---|
static String |
AUTHORIZATION_HEADER_KEY |
static String |
BASIC_AUTHORIZATION_HEADER_VALUE_PREFIX |
static String |
GITHUB_TOKEN_PROPERTY |
static String |
GITHUB_USERNAME_PROPERTY |
| Constructor and Description |
|---|
GitHubSource(String organization,
String project,
HttpClient httpClient,
GitHubLastUpdateCache gitHubLastUpdateCache) |
GitHubSource(String organization,
String project,
HttpClient httpClient,
GitHubLastUpdateCache gitHubLastUpdateCache,
org.openqa.selenium.remote.DesiredCapabilities capabilities) |
| Modifier and Type | Method and Description |
|---|---|
protected ZonedDateTime |
extractModificationDate(HttpClient.Response response) |
protected String |
findReleaseBinaryUrl(com.google.gson.JsonObject releaseObject,
String version) |
protected GitHubLastUpdateCache |
getCache() |
protected com.google.gson.Gson |
getGson() |
ExternalBinary |
getLatestRelease()
Retrieves information about the latest release of binary and returns an instance of
ExternalBinary that
represents the latest release. |
protected String |
getProjectUrl() |
ExternalBinary |
getReleaseForVersion(String version)
Retrieves information about a binary release with the desired version and returns an instance of
ExternalBinary that represents the found release. |
protected String |
getUniqueKey() |
protected Map<String,String> |
lastModificationHeader() |
protected HttpClient.Response |
sentGetRequestWithPagination(String url,
int pageNumber,
Map<String,String> headers) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFileNameRegexToDownload, getFileNameRegexToDownload, getReleaseForVersionpublic static final String GITHUB_USERNAME_PROPERTY
public static final String GITHUB_TOKEN_PROPERTY
public static final String AUTHORIZATION_HEADER_KEY
public static final String BASIC_AUTHORIZATION_HEADER_VALUE_PREFIX
public GitHubSource(String organization, String project, HttpClient httpClient, GitHubLastUpdateCache gitHubLastUpdateCache)
public GitHubSource(String organization, String project, HttpClient httpClient, GitHubLastUpdateCache gitHubLastUpdateCache, org.openqa.selenium.remote.DesiredCapabilities capabilities)
public ExternalBinary getLatestRelease() throws Exception
ExternalBinarySourceExternalBinary that
represents the latest release.getLatestRelease in interface ExternalBinarySourceExternalBinary that contains information about the latest release of the binary.Exception - If anything bad happensprotected ZonedDateTime extractModificationDate(HttpClient.Response response)
public ExternalBinary getReleaseForVersion(String version) throws Exception
ExternalBinarySourceExternalBinary that represents the found release.getReleaseForVersion in interface ExternalBinarySourceversion - A version of a binary release that should be retrieved.ExternalBinary that contains information about a binary release with the desired
version.Exceptionprotected String findReleaseBinaryUrl(com.google.gson.JsonObject releaseObject, String version) throws Exception
Exceptionprotected HttpClient.Response sentGetRequestWithPagination(String url, int pageNumber, Map<String,String> headers) throws Exception
Exceptionprotected String getProjectUrl()
protected com.google.gson.Gson getGson()
protected String getUniqueKey()
protected GitHubLastUpdateCache getCache()
Copyright © 2021 JBoss by Red Hat. All rights reserved.