Class DownloadJobTools

java.lang.Object
io.goobi.viewer.model.job.download.DownloadJobTools

public final class DownloadJobTools extends Object
  • Method Details

    • removeJobsForRecord

      public static int removeJobsForRecord(String pi) throws DAOException
      Delete all jobs and associated files for the given record identifier.
      Parameters:
      pi - Record identifier
      Returns:
      Number of removed jobs
      Throws:
      DAOException
    • cleanupExpiredDownloads

      @Deprecated(since="24.10") public static int cleanupExpiredDownloads() throws DAOException

      cleanupExpiredDownloads.

      Returns:
      a int.
      Throws:
      DAOException - if any.
    • getDownloadFileStatic

      public static File getDownloadFileStatic(String identifier, String type, String extension)

      getDownloadFileStatic.

      Parameters:
      identifier - the identifier of the download
      type - either "pdf" or "epub"
      extension - a String object.
      Returns:
      The Download location file, ending with ".pdf" or ".epub" depending on type
      Throws:
      IllegalArgumentException - If the hash is null, empty or blank, or if the type is not "epub" or "pdf"