Package org.terracotta.angela
Class KitResolver
- java.lang.Object
-
- org.terracotta.angela.KitResolver
-
public abstract class KitResolver extends Object
The KitResolver implementation will resolve the appropriate coordinates of the Terracotta installationWe 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 Summary
Constructors Constructor Description KitResolver()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidcreateLocalInstallFromInstaller(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.protected voiddownload(URL url, Path dest)voiddownloadLocalInstaller(Version version, LicenseType licenseType, PackageType packageType, Path localInstallerFile)Downloads the installer on the local machinevoidinit(PortAllocator portAllocator)abstract PathresolveKitInstallationPath(Version version, PackageType packageType, Path localInstallerPath, Path rootInstallationPath)Resolves the root of the local Terracotta install path.abstract URL[]resolveKitUrls(Version version, LicenseType licenseType, PackageType packageType)Resolves the Terracotta installation kit URL.abstract PathresolveLocalInstallerPath(Version version, LicenseType licenseType, PackageType packageType)Resolves the installer path on the local machine.abstract booleansupports(LicenseType licenseType)Verifies if theLicenseTypeis supported by the KitResolver implementation.
-
-
-
Method Detail
-
init
public void init(PortAllocator portAllocator)
-
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-VersionlicenseType-LicenseTypepackageType-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-VersionpackageType-PackageTypelicense-LicenselocalInstallerPath- path of the installer on the local machinerootInstallationPath- 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-VersionpackageType-PackageTypelocalInstallerPath- path of the installer on the local machinerootInstallationPath- directory where installs are stored for caching- Returns:
-
resolveKitUrls
public abstract URL[] resolveKitUrls(Version version, LicenseType licenseType, PackageType packageType)
Resolves the Terracotta installation kit URL.- Parameters:
version-VersionlicenseType-LicenseTypepackageType-PackageType- Returns:
- URL of the installation kit
-
supports
public abstract boolean supports(LicenseType licenseType)
Verifies if theLicenseTypeis 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-VersionlicenseType-LicenseTypepackageType-PackageTypelocalInstallerFile- path of the installer on the local machine
-
-