public abstract class GoogleStorageSource extends Object implements ExternalBinarySource
| Constructor and Description |
|---|
GoogleStorageSource(String storageUrl,
HttpClient httpClient) |
GoogleStorageSource(String storageUrl,
String urlToLatestRelease,
HttpClient httpClient) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
getExpectedKeyRegex(String requiredVersion,
String directory)
It is expected that this abstract method should return a regex that represents a key of an expected binary/file
stored in the google storage.
|
ExternalBinary |
getLatestRelease()
Retrieves information about the latest release of binary and returns an instance of
ExternalBinary that
represents the latest release. |
ExternalBinary |
getReleaseForVersion(String requiredVersion)
Retrieves information about a binary release with the desired version and returns an instance of
ExternalBinary that represents the found release. |
public GoogleStorageSource(String storageUrl, HttpClient httpClient)
storageUrl - An url to a google storage from which information about releases should be retrieved frompublic GoogleStorageSource(String storageUrl, String urlToLatestRelease, HttpClient httpClient)
storageUrl - An url to a google storage from which information about releases should be retrieved fromurlToLatestRelease - An url where a version of the latest release could be retrieved frompublic 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 requiredVersion) throws Exception
ExternalBinarySourceExternalBinary that represents the found release.getReleaseForVersion in interface ExternalBinarySourcerequiredVersion - A version of a binary release that should be retrieved.ExternalBinary that contains information about a binary release with the desired version.Exceptionprotected abstract String getExpectedKeyRegex(String requiredVersion, String directory)
directory_name + / + file_name. Keys are visible on
the root of the google storage url (without index.html suffix)requiredVersion - The required version set using method getReleaseForVersion(java.lang.String),
or otherwise nulldirectory - The directory for the current binary the regex is being matched againstCopyright © 2017 JBoss by Red Hat. All rights reserved.