Interface DownloadApiFactory

    • Method Detail

      • createDownloadManifest

        DownloadManifest createDownloadManifest()
        Creates a new manifest instance for use with the DownloadService.
        Returns:
        An empty manifest.
      • createDownloadFile

        DownloadFile createDownloadFile​(java.util.Optional<java.lang.Long> size,
                                        java.net.URI binaryURI,
                                        java.util.Map<java.lang.String,​java.lang.Object> parameters)
        Creates a new instance for use with a DownloadTargetProcessor.
        Parameters:
        size - The size, in bytes, of the file.
        binaryURI - URI to the file's binary data.
        parameters - Additional data to include with the file.
        Returns:
        An initialized instance that uses the provided values.
      • createFailedDownloadFile

        DownloadFile createFailedDownloadFile​(java.lang.String failureReason,
                                              java.util.Map<java.lang.String,​java.lang.Object> parameters)
        Creates a representation of a failed download file.
        Parameters:
        failureReason - The reason this download file should be considered failed.
        parameters - Additional data to include with the file.
        Returns:
        An initialized instance that uses the provided values.
      • createDownloadTarget

        DownloadTarget createDownloadTarget​(java.lang.String targetType,
                                            java.util.Map<java.lang.String,​java.lang.Object> parameters)
        Creates a new instance for use with a DownloadManifest.
        Parameters:
        targetType - The target's DownloadTarget.getType() value.
        parameters - Parameters to be retrieved using the target's getParameter() methods.
        Returns:
        An initialized target instance that uses the provided values.