public abstract class XmlStorageSource extends Object implements ExternalBinarySource
| Modifier and Type | Field and Description |
|---|---|
protected String |
fileName |
protected String |
nodeName |
protected String |
urlToLatestRelease |
| Constructor and Description |
|---|
XmlStorageSource(String storageUrl,
HttpClient httpClient) |
XmlStorageSource(String storageUrl,
String urlToLatestRelease,
HttpClient httpClient) |
XmlStorageSource(String nodeName,
String fileName,
String storageUrl,
String urlToLatestRelease,
HttpClient httpClient) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getContentOfFirstElement(Element element,
String tagName) |
protected NodeList |
getDriverEntries(Document doc) |
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 xml storage.
|
protected String |
getExpectedKeyRegex(String requiredVersion,
String directory,
Architecture architecture) |
protected String |
getLastModified(Element element) |
ExternalBinary |
getLatestRelease()
Retrieves information about the latest release of binary and returns an instance of
ExternalBinary that
represents the latest release. |
protected ExternalBinary |
getLatestRelease(String charset) |
protected String |
getLocation(Element element) |
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. |
ExternalBinary |
getReleaseForVersion(String requiredVersion,
Architecture architecture) |
protected String |
getVersion(String versionUrl,
String charset) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFileNameRegexToDownload, getFileNameRegexToDownloadprotected String nodeName
protected String fileName
protected String urlToLatestRelease
public XmlStorageSource(String nodeName, String fileName, String storageUrl, String urlToLatestRelease, HttpClient httpClient)
public XmlStorageSource(String storageUrl, HttpClient httpClient)
storageUrl - An url to a xml storage from which information about releases should be retrieved frompublic XmlStorageSource(String storageUrl, String urlToLatestRelease, HttpClient httpClient)
storageUrl - An url to a xml 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 happensprotected ExternalBinary getLatestRelease(String charset) throws Exception
Exceptionprotected String getVersion(String versionUrl, String charset) throws IOException
IOExceptionpublic 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.Exceptionpublic ExternalBinary getReleaseForVersion(String requiredVersion, Architecture architecture) throws Exception
getReleaseForVersion in interface ExternalBinarySourceExceptionprotected abstract String getExpectedKeyRegex(String requiredVersion, String directory)
directory_name + / + file_name.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 againstprotected String getExpectedKeyRegex(String requiredVersion, String directory, Architecture architecture)
Copyright © 2021 JBoss by Red Hat. All rights reserved.