Class Downloader

  • All Implemented Interfaces:

    
    public final class Downloader
    
                        

    The class to download source code. The signatures of public functions in this class define the library API.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Downloader(DownloaderConfiguration config)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

      • Downloader

        Downloader(DownloaderConfiguration config)
    • Method Detail

      • download

         final Provenance download(Package pkg, File outputDirectory, Boolean dryRun)

        Download the source code of the package to the outputDirectory. If dryRun is true, no actual download happens but the source code is only checked to be available. A Provenance is returned on success or a DownloadException is thrown in case of failure.

      • downloadFromVcs

        @JvmOverloads() final RepositoryProvenance downloadFromVcs(Package pkg, File outputDirectory, Boolean recursive, Boolean dryRun)

        Download the source code of the package to the outputDirectory using its VCS information. If recursive is true, any nested repositories (like Git submodules or Mercurial subrepositories) are downloaded, too. If dryRun is true, no actual download happens but the source code is only checked to be available. A RepositoryProvenance is returned on success or a DownloadException is thrown in case of failure.

      • downloadFromVcs

        @JvmOverloads() final RepositoryProvenance downloadFromVcs(Package pkg, File outputDirectory, Boolean recursive)

        Download the source code of the package to the outputDirectory using its VCS information. If recursive is true, any nested repositories (like Git submodules or Mercurial subrepositories) are downloaded, too. If dryRun is true, no actual download happens but the source code is only checked to be available. A RepositoryProvenance is returned on success or a DownloadException is thrown in case of failure.

      • downloadFromVcs

        @JvmOverloads() final RepositoryProvenance downloadFromVcs(Package pkg, File outputDirectory)

        Download the source code of the package to the outputDirectory using its VCS information. If recursive is true, any nested repositories (like Git submodules or Mercurial subrepositories) are downloaded, too. If dryRun is true, no actual download happens but the source code is only checked to be available. A RepositoryProvenance is returned on success or a DownloadException is thrown in case of failure.