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.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Builder for Manifest.
  • Method Summary

    Modifier and Type
    Method
    Description
    Set<org.apache.commons.lang3.tuple.Pair<URI,File>>
    Get the manifest entries.
    Get the set of URI s (source files) that were added to the manifest.
    Get the set of directories that contain all the target files.
    Get the set of files representing expected target location for files to be downloaded.
    getTargetLocation(URI sourceFileUri)
    Return the target location for a given source URI.
  • Method Details

    • getTargetFiles

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

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

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

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

      @Nullable File getTargetLocation(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