Package io.goobi.viewer.managedbeans
Class DownloadBean
java.lang.Object
io.goobi.viewer.managedbeans.DownloadBean
- All Implemented Interfaces:
Serializable
JSF backing bean for managing file download requests from the viewer, tracking download status and links.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidcreatePDFDownloadJob(String pi, String logId, String usePdfSource, String configVariant) voiddownloadFileAction.Getter for the fielddownloadIdentifier.getEmail()Getter for the fieldmessage.intgetQueuePosition.openDownloadAction.voidreset()reset.voidsetDownloadIdentifier(String downloadIdentifier) Setter for the fielddownloadIdentifier.void
-
Field Details
-
request
-
-
Constructor Details
-
DownloadBean
public DownloadBean()
-
-
Method Details
-
reset
public void reset()reset. -
openDownloadAction
public String openDownloadAction() throws DAOException, PresentationException, RecordNotFoundExceptionopenDownloadAction.- Returns:
- the message ID of the located download job
- Throws:
DAOException- if any.PresentationExceptionRecordNotFoundException
-
getQueuePosition
public int getQueuePosition()getQueuePosition.- Returns:
- a int
-
getMessage
Getter for the fieldmessage.- Returns:
- the ViewerMessage associated with the current download job
-
downloadFileAction
downloadFileAction.- Throws:
IOException- if any.DownloadException- if any.
-
getDownloadIdentifier
Getter for the fielddownloadIdentifier.- Returns:
- the identifier used to locate and serve the requested download resource
-
getEmail
-
setEmail
-
setDownloadIdentifier
Setter for the fielddownloadIdentifier.- Parameters:
downloadIdentifier- the persistent identifier of the record whose download job is being managed
-
createDownloadJob
public void createDownloadJob(String type, String pi, String logId, String usePdfSource, String configVariant) throws com.fasterxml.jackson.core.JsonProcessingException, DAOException, URISyntaxException - Throws:
com.fasterxml.jackson.core.JsonProcessingExceptionDAOExceptionURISyntaxException
-
createEpubDownloadJob
public void createEpubDownloadJob(String pi) throws DAOException, URISyntaxException, com.fasterxml.jackson.core.JsonProcessingException - Throws:
DAOExceptionURISyntaxExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
createPDFDownloadJob
public void createPDFDownloadJob(String pi, String logId, String usePdfSource, String configVariant) throws DAOException, URISyntaxException, com.fasterxml.jackson.core.JsonProcessingException - Throws:
DAOExceptionURISyntaxExceptioncom.fasterxml.jackson.core.JsonProcessingException
-