public abstract class GitHubSource extends Object implements ExternalBinarySource
| Constructor and Description |
|---|
GitHubSource(String organization,
String project,
HttpClient httpClient,
GitHubLastUpdateCache gitHubLastUpdateCache) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
getExpectedFileNameRegex(String version)
It is expected that this abstract method should return a regex that represents an expected file name
of the release asset.
|
ExternalBinary |
getLatestRelease()
Retrieves information about the latest release of binary and returns an instance of
ExternalBinary that
represents the latest release. |
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. |
public GitHubSource(String organization, String project, HttpClient httpClient, GitHubLastUpdateCache gitHubLastUpdateCache)
organization - GitHub organization/user name the project belongs toproject - GitHub project nameprotected abstract String getExpectedFileNameRegex(String version)
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 happenspublic 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.ExceptionCopyright © 2017 JBoss by Red Hat. All rights reserved.