Interface DownloadService.Manifest

  • Enclosing interface:
    DownloadService

    public static interface DownloadService.Manifest
    Manifest containing source (URIs) and their expected destination on disk after download. This abstraction is used by different services to set up the job working directory.

    Currently, source URIs must be unique. I.e. it is not possible to have a manifest with the same source URI and two or more target destinations.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Set<org.apache.commons.lang3.tuple.Pair<java.net.URI,​java.io.File>> getEntries()
      Get the manifest entries.
      java.util.Set<java.net.URI> getSourceFileUris()
      Get the set of URI s (source files) that were added to the manifest.
      java.util.Set<java.io.File> getTargetDirectories()
      Get the set of directories that contain all the target files.
      java.util.Set<java.io.File> getTargetFiles()
      Get the set of files representing expected target location for files to be downloaded.
      java.io.File getTargetLocation​(java.net.URI sourceFileUri)
      Return the target location for a given source URI.
    • Method Detail

      • getTargetFiles

        java.util.Set<java.io.File> getTargetFiles()
        Get the set of files representing expected target location for files to be downloaded.
        Returns:
        an immutable set of files objects
      • getTargetDirectories

        java.util.Set<java.io.File> getTargetDirectories()
        Get the set of directories that contain all the target files.
        Returns:
        an immutable set of file objects
      • getSourceFileUris

        java.util.Set<java.net.URI> getSourceFileUris()
        Get the set of URI s (source files) that were added to the manifest.
        Returns:
        an immutable set of URIs
      • getEntries

        java.util.Set<org.apache.commons.lang3.tuple.Pair<java.net.URI,​java.io.File>> getEntries()
        Get the manifest entries.
        Returns:
        an immutable set of entries in this manifest
      • getTargetLocation

        @Nullable
        java.io.File getTargetLocation​(java.net.URI sourceFileUri)
        Return the target location for a given source URI.
        Parameters:
        sourceFileUri - source file URI
        Returns:
        a File target, or null if the source is not in the manifest