Class DownloadJob
java.lang.Object
io.goobi.viewer.model.job.download.DownloadJob
- Direct Known Subclasses:
EpubDownloadJob,PdfDownloadJob
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate()abstract voidbooleanstatic DownloadJobfrom(ViewerMessage message) abstract Stringabstract Stringabstract PathgetPath()getPi()protected PathCreate path to a temporary file to which the data is written.getTimeToLive.abstract StringgetType()booleanisExpired.booleanisLocked()booleannotifyObserver(String email, JobStatus status, URI downloadUri) notifyObservers.boolean
-
Constructor Details
-
DownloadJob
-
DownloadJob
-
-
Method Details
-
getFilename
-
getPath
-
getType
-
getPi
-
getTempPath
Create path to a temporary file to which the data is written. Only after completion is the file moved to #getPath()- Returns:
- a path
-
create
public void create() throws PresentationException, IOException, IndexUnreachableException, RecordNotFoundException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException- Throws:
PresentationExceptionIOExceptionIndexUnreachableExceptionRecordNotFoundExceptionde.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
-
create
public abstract void create(Dataset work) throws IOException, PresentationException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException - Throws:
IOExceptionPresentationExceptionde.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
-
createLock
- Throws:
IOException
-
releaseLock
- Throws:
IOException
-
isLocked
- Throws:
IOException
-
notifyObserver
public boolean notifyObserver(String email, JobStatus status, URI downloadUri) throws UnsupportedEncodingException, jakarta.mail.MessagingException notifyObservers.
- Parameters:
email-status- aJobStatusobject.downloadUri- the URI under which the download is made available- Returns:
- a boolean.
- Throws:
UnsupportedEncodingException- if any.jakarta.mail.MessagingException- if any.
-
getExirationTime
- Throws:
IOException
-
getTimeToLive
getTimeToLive.
- Returns:
- a
Stringobject.
-
isExpired
public boolean isExpired()isExpired.
- Returns:
- a boolean.
-
from
- Throws:
IllegalArgumentException
-
getMimeType
-