public abstract class GoogleStorageSource extends Object implements ExternalBinarySource
Constructor and Description |
---|
GoogleStorageSource(String storageUrl) |
GoogleStorageSource(String storageUrl,
String urlToLatestRelease) |
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)
storageUrl
- An url to a google storage from which information about releases should be retrieved frompublic ExternalBinary getLatestRelease() throws Exception
ExternalBinarySource
ExternalBinary
that
represents the latest release.getLatestRelease
in interface ExternalBinarySource
ExternalBinary
that contains information about the latest release of the binary.Exception
- If anything bad happenspublic ExternalBinary getReleaseForVersion(String requiredVersion) throws Exception
ExternalBinarySource
ExternalBinary
that represents the found release.getReleaseForVersion
in interface ExternalBinarySource
requiredVersion
- A version of a binary release that should be retrieved.ExternalBinary
that contains information about a binary release with the desired version.Exception
protected 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.