Class KitResolver


  • public abstract class KitResolver
    extends Object
    The KitResolver implementation will resolve the appropriate coordinates of the Terracotta installation

    We rely on the Java SPI in order to dynamically load the appropriate implementation according to the type (KIT or SAG based) and the license (OSS or EE).

    Author:
    Aurelien Broszniowski
    • Constructor Detail

      • KitResolver

        public KitResolver()
    • Method Detail

      • resolveLocalInstallerPath

        public abstract Path resolveLocalInstallerPath​(Version version,
                                                       LicenseType licenseType,
                                                       PackageType packageType)
        Resolves the installer path on the local machine. This will allow Angela to call the installer and do a local install.
        Parameters:
        version - Version
        licenseType - LicenseType
        packageType - PackageType
        Returns:
        path of the installer on the local machine
      • createLocalInstallFromInstaller

        public abstract void createLocalInstallFromInstaller​(Version version,
                                                             PackageType packageType,
                                                             License license,
                                                             Path localInstallerPath,
                                                             Path rootInstallationPath,
                                                             TerracottaCommandLineEnvironment env)
        Uses the local installer and create a Terracotta install on the local machine.
        Parameters:
        version - Version
        packageType - PackageType
        license - License
        localInstallerPath - path of the installer on the local machine
        rootInstallationPath - directory where installs are stored for caching
      • resolveKitInstallationPath

        public abstract Path resolveKitInstallationPath​(Version version,
                                                        PackageType packageType,
                                                        Path localInstallerPath,
                                                        Path rootInstallationPath)
        Resolves the root of the local Terracotta install path.
        Parameters:
        version - Version
        packageType - PackageType
        localInstallerPath - path of the installer on the local machine
        rootInstallationPath - directory where installs are stored for caching
        Returns:
      • supports

        public abstract boolean supports​(LicenseType licenseType)
        Verifies if the LicenseType is supported by the KitResolver implementation.
        Parameters:
        licenseType - LicenseType
        Returns:
        true if the LicenseType is supported
      • downloadLocalInstaller

        public void downloadLocalInstaller​(Version version,
                                           LicenseType licenseType,
                                           PackageType packageType,
                                           Path localInstallerFile)
        Downloads the installer on the local machine
        Parameters:
        version - Version
        licenseType - LicenseType
        packageType - PackageType
        localInstallerFile - path of the installer on the local machine
      • download

        protected void download​(URL url,
                                Path dest)