Package io.goobi.viewer.model.job.mq
Class DownloadExternalResourceHandler
java.lang.Object
io.goobi.viewer.model.job.mq.DownloadExternalResourceHandler
- All Implemented Interfaces:
MessageHandler<MessageStatus>
public class DownloadExternalResourceHandler
extends Object
implements MessageHandler<MessageStatus>
Message handler that downloads external resource files (e.g. ZIP archives) from a remote URI and stores them in the local data repository.
Download progress is tracked and made available via the application-scoped storage bean.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncall(ViewerMessage message, MessageQueueManager queueManager) Call this method to execute the ticket.static ViewerMessagecreateMessage(String pi, String url, String urlTemplate) getDownloadedFiles(String pi, String downloadUrl, String downloadId) voidsetStorageBean(ApplicationBean storageBean) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.goobi.viewer.controller.mq.MessageHandler
call, onStartup
-
Field Details
-
ALLOWED_FILE_EXTENSIONS
-
-
Constructor Details
-
DownloadExternalResourceHandler
public DownloadExternalResourceHandler()
-
-
Method Details
-
call
Description copied from interface:MessageHandlerCall this method to execute the ticket.- Specified by:
callin interfaceMessageHandler<MessageStatus>- Parameters:
message- The ticket to handlequeueManager- reference to to manage the queue- Returns:
- V
-
getDownloadedFiles
public List<Path> getDownloadedFiles(String pi, String downloadUrl, String downloadId) throws PresentationException, IndexUnreachableException -
getMessageHandlerName
- Specified by:
getMessageHandlerNamein interfaceMessageHandler<MessageStatus>
-
createMessage
-
getStorageBean
-
setStorageBean
-