Class PolarisDownloadUtility


  • public class PolarisDownloadUtility
    extends java.lang.Object
    • 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
      • 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()