Interface ServerToolProvider

    • Method Detail

      • tryGetPackageVersion

        @NotNull
        GetPackageVersionResult tryGetPackageVersion​(@NotNull
                                                     File toolPackage)
        Retrieve tool version if given package has valid tool package format.
        Parameters:
        toolPackage - Package to inspect.
        Returns:
        Version of the tool or GetPackageVersionResult.error(String) if package format is unknown / invalid.
      • fetchToolPackage

        @NotNull
        File fetchToolPackage​(@NotNull
                              ToolVersion toolVersion,
                              @NotNull
                              File targetDirectory)
                       throws ToolException
        Fetch tool package version to the targetDirectory.
        Returns:
        Path to the fetched file.
        Throws:
        ToolException - if error occurs
      • unpackToolPackage

        void unpackToolPackage​(@NotNull
                               File toolPackage,
                               @NotNull
                               File targetDirectory)
                        throws ToolException
        Unpack valid tool package to the target directory. Form directory layout to use later on the agent.
        Parameters:
        toolPackage - file with the tool package
        targetDirectory - existing empty directory
        Throws:
        ToolException - if error occurs
      • getBundledToolVersions

        @NotNull
        Collection<InstalledToolVersion> getBundledToolVersions()
        Get collection of bundled tool versions which are included into the TeamCity distribution.

        Note that some bundled tools are downloaded by TeamCity after the server startup. The list of such tools can be obtained via {@link this#getDownloadableBundledToolVersions()}

        Returns:
        Collection of bundled tool versions that are included into the TeamCity distribution.
      • getDownloadableBundledToolVersions

        @NotNull
        Collection<? extends ToolVersion> getDownloadableBundledToolVersions()
        Get a collection of bundled tool versions which are NOT included into the TeamCity disctibution and downloaded and installed after the first TeamCity server startup.

        Important: the implementations should ensure that no network requests or any other IO or CPU intensive operations are made. These versions should be cached and returned instantly.

        Returns:
        A collection of downloadable bundled tool versions wich are not included into the TeamCity distribution.
      • getDefaultBundledVersionId

        @Nullable
        String getDefaultBundledVersionId()
        Get id of bundled version which should be used as default if default version is not specified explicitly.
        Returns:
        Default version id from set of bundled versions if exists or Null to use latest bundled version.
      • normalizeToolPackageName

        @NotNull
        String normalizeToolPackageName​(@NotNull
                                        String toolPackageName)