Class PolarisDownloadUtility
- java.lang.Object
-
- com.synopsys.integration.polaris.common.cli.PolarisDownloadUtility
-
public class PolarisDownloadUtility extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Integer
DEFAULT_POLARIS_TIMEOUT
static java.lang.String
LINUX_DOWNLOAD_URL_FORMAT
static java.lang.String
MAC_ARM_DOWNLOAD_URL_FORMAT
static java.lang.String
MAC_DOWNLOAD_URL_FORMAT
static java.lang.String
POLARIS_CLI_INSTALL_DIRECTORY
static java.lang.String
VERSION_FILENAME
static java.lang.String
WINDOWS_DOWNLOAD_URL_FORMAT
-
Constructor Summary
Constructors Constructor Description PolarisDownloadUtility(com.synopsys.integration.log.IntLogger logger, com.synopsys.integration.util.OperatingSystemType operatingSystemType, com.synopsys.integration.rest.client.IntHttpClient intHttpClient, com.synopsys.integration.util.CleanupZipExpander cleanupZipExpander, com.synopsys.integration.rest.HttpUrl polarisServerUrl, java.io.File downloadTargetDirectory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PolarisDownloadUtility
defaultUtility(com.synopsys.integration.log.IntLogger logger, com.synopsys.integration.rest.HttpUrl polarisServerUrl, com.synopsys.integration.rest.proxy.ProxyInfo proxyInfo, java.io.File downloadTargetDirectory)
static PolarisDownloadUtility
defaultUtilityNoProxy(com.synopsys.integration.log.IntLogger logger, com.synopsys.integration.rest.HttpUrl polarisServerUrl, java.io.File downloadTargetDirectory)
java.lang.String
getDownloadUrlFormat()
java.io.File
getOrCreateVersionFile()
java.util.Optional<java.io.File>
getOrDownloadPolarisCliBin()
java.util.Optional<java.io.File>
getOrDownloadPolarisCliBin(java.io.File versionFile, java.lang.String downloadUrlFormat)
java.util.Optional<java.lang.String>
getOrDownloadPolarisCliExecutable()
The Polaris CLI will be downloaded if it has not previously been downloaded or if it has been updated on the server.java.util.Optional<java.lang.String>
getOrDownloadPolarisCliHome()
-
-
-
Field Detail
-
DEFAULT_POLARIS_TIMEOUT
public static final java.lang.Integer DEFAULT_POLARIS_TIMEOUT
-
LINUX_DOWNLOAD_URL_FORMAT
public static final java.lang.String LINUX_DOWNLOAD_URL_FORMAT
- See Also:
- Constant Field Values
-
WINDOWS_DOWNLOAD_URL_FORMAT
public static final java.lang.String WINDOWS_DOWNLOAD_URL_FORMAT
- See Also:
- Constant Field Values
-
MAC_DOWNLOAD_URL_FORMAT
public static final java.lang.String MAC_DOWNLOAD_URL_FORMAT
- See Also:
- Constant Field Values
-
MAC_ARM_DOWNLOAD_URL_FORMAT
public static final java.lang.String MAC_ARM_DOWNLOAD_URL_FORMAT
- See Also:
- Constant Field Values
-
POLARIS_CLI_INSTALL_DIRECTORY
public static final java.lang.String POLARIS_CLI_INSTALL_DIRECTORY
- See Also:
- Constant Field Values
-
VERSION_FILENAME
public static final java.lang.String VERSION_FILENAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PolarisDownloadUtility
public PolarisDownloadUtility(com.synopsys.integration.log.IntLogger logger, com.synopsys.integration.util.OperatingSystemType operatingSystemType, com.synopsys.integration.rest.client.IntHttpClient intHttpClient, com.synopsys.integration.util.CleanupZipExpander cleanupZipExpander, com.synopsys.integration.rest.HttpUrl polarisServerUrl, java.io.File downloadTargetDirectory)
-
-
Method Detail
-
defaultUtility
public static PolarisDownloadUtility defaultUtility(com.synopsys.integration.log.IntLogger logger, com.synopsys.integration.rest.HttpUrl polarisServerUrl, com.synopsys.integration.rest.proxy.ProxyInfo proxyInfo, java.io.File downloadTargetDirectory)
-
defaultUtilityNoProxy
public static PolarisDownloadUtility defaultUtilityNoProxy(com.synopsys.integration.log.IntLogger logger, com.synopsys.integration.rest.HttpUrl polarisServerUrl, java.io.File downloadTargetDirectory)
-
getOrDownloadPolarisCliExecutable
public java.util.Optional<java.lang.String> getOrDownloadPolarisCliExecutable()
The Polaris CLI will be downloaded if it has not previously been downloaded or if it has been updated on the server. The absolute path to the swip_cli executable will be returned if it was downloaded or found successfully, otherwise an Optional.empty will be returned and the log will contain details concerning the failure.
-
getOrDownloadPolarisCliBin
public java.util.Optional<java.io.File> getOrDownloadPolarisCliBin()
-
getOrDownloadPolarisCliBin
public java.util.Optional<java.io.File> getOrDownloadPolarisCliBin(java.io.File versionFile, java.lang.String downloadUrlFormat)
-
getOrDownloadPolarisCliHome
public java.util.Optional<java.lang.String> getOrDownloadPolarisCliHome()
-
getOrCreateVersionFile
public java.io.File getOrCreateVersionFile() throws java.io.IOException
- Throws:
java.io.IOException
-
getDownloadUrlFormat
public java.lang.String getDownloadUrlFormat()
-
-