Package io.goobi.viewer.model.job.upload
Class UploadJob
java.lang.Object
io.goobi.viewer.model.job.upload.UploadJob
- All Implemented Interfaces:
Serializable
Represents an asynchronous file upload job with its status, progress, and associated record identifier.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidGetter for the fielddescription.getEmail()getFiles()getId()Getter for the fieldid.Getter for the fieldmessage.getPi()Getter for the fieldpi.Getter for the fieldstatus.getTitle()booleanbooleanisOnline()static ResponsepostJobRequest(String url, AbstractTaskManagerRequest body) voidsetConsent(boolean consent) voidsetCreatorId(Long creatorId) voidsetDateCreated(LocalDateTime dateCreated) voidsetDescription(String description) Setter for the fielddescription.voidvoidvoidSetter for the fieldid.voidsetMessage(String message) Setter for the fieldmessage.voidSetter for the fieldpi.voidsetProcessId(Integer processId) voidSetter for the fieldstatus.voidtoString()booleanvoiduploadFile(File file) void
-
Field Details
-
status
-
message
Error messages, etc. -
processId
Assigned Goobi workflow process ID. -
pi
-
title
Title field. -
description
Description field.
-
-
Constructor Details
-
UploadJob
public UploadJob()
-
-
Method Details
-
postJobRequest
public static Response postJobRequest(String url, AbstractTaskManagerRequest body) throws IOException - Throws:
IOException
-
createProcess
- Throws:
UploadException
-
uploadFiles
- Throws:
IOException
-
uploadFile
- Parameters:
file- file to upload to the Goobi workflow process- Throws:
IOException
-
updateStatus
- Returns:
- true if status changed; false otherwise
- Throws:
PresentationExceptionIndexUnreachableException
-
isOnline
public boolean isOnline()- Returns:
- true if status is READY; false otherwise
-
getRecordUrl
- Returns:
- PI resolver URL for pi
-
getId
Getter for the fieldid.- Returns:
- the database primary key of this upload job
-
setId
Setter for the fieldid.- Parameters:
id- the database primary key to set
-
getDateCreated
-
setDateCreated
-
getCreatorId
-
setCreatorId
-
getEmail
-
setEmail
-
getStatus
Getter for the fieldstatus.- Returns:
- the current processing status of this upload job
-
setStatus
Setter for the fieldstatus.- Parameters:
status- the current processing status of this upload job
-
getMessage
Getter for the fieldmessage.- Returns:
- the status or error message describing the current processing state
-
setMessage
Setter for the fieldmessage.- Parameters:
message- the status or error message describing the current processing state
-
getPi
Getter for the fieldpi.- Returns:
- the persistent identifier of the record associated with this upload job
-
setPi
Setter for the fieldpi.- Parameters:
pi- the persistent identifier of the record associated with this upload job
-
getProcessId
-
setProcessId
-
getTitle
-
setTitle
-
getDescription
Getter for the fielddescription.- Returns:
- the human-readable description of this upload job
-
setDescription
Setter for the fielddescription.- Parameters:
description- the human-readable description of this upload job
-
isConsent
public boolean isConsent() -
setConsent
public void setConsent(boolean consent) -
getFiles
-
setFiles
-
toString
-