Class UploadJob

java.lang.Object
io.goobi.viewer.model.job.upload.UploadJob
All Implemented Interfaces:
Serializable

@Entity public class UploadJob extends Object implements Serializable
Represents an asynchronous file upload job with its status, progress, and associated record identifier.
See Also:
  • Field Details

    • status

      protected JobStatus status
    • message

      protected String message
      Error messages, etc.
    • processId

      protected Integer processId
      Assigned Goobi workflow process ID.
    • pi

      protected String pi
    • title

      protected String title
      Title field.
    • description

      protected String description
      Description field.
  • Constructor Details

    • UploadJob

      public UploadJob()
  • Method Details

    • postJobRequest

      public static Response postJobRequest(String url, AbstractTaskManagerRequest body) throws IOException
      Throws:
      IOException
    • createProcess

      public void createProcess() throws UploadException
      Throws:
      UploadException
    • uploadFiles

      public void uploadFiles() throws IOException
      Throws:
      IOException
    • uploadFile

      public void uploadFile(File file) throws IOException
      Parameters:
      file - file to upload to the Goobi workflow process
      Throws:
      IOException
    • updateStatus

      public boolean updateStatus() throws IndexUnreachableException, PresentationException
      Returns:
      true if status changed; false otherwise
      Throws:
      PresentationException
      IndexUnreachableException
    • isOnline

      public boolean isOnline()
      Returns:
      true if status is READY; false otherwise
    • getRecordUrl

      public String getRecordUrl()
      Returns:
      PI resolver URL for pi
    • getId

      public Long getId()
      Getter for the field id.
      Returns:
      the database primary key of this upload job
    • setId

      public void setId(Long id)
      Setter for the field id.
      Parameters:
      id - the database primary key to set
    • getDateCreated

      public LocalDateTime getDateCreated()
    • setDateCreated

      public void setDateCreated(LocalDateTime dateCreated)
    • getCreatorId

      public Long getCreatorId()
    • setCreatorId

      public void setCreatorId(Long creatorId)
    • getEmail

      public String getEmail()
    • setEmail

      public void setEmail(String email)
    • getStatus

      public JobStatus getStatus()
      Getter for the field status.
      Returns:
      the current processing status of this upload job
    • setStatus

      public void setStatus(JobStatus status)
      Setter for the field status.
      Parameters:
      status - the current processing status of this upload job
    • getMessage

      public String getMessage()
      Getter for the field message.
      Returns:
      the status or error message describing the current processing state
    • setMessage

      public void setMessage(String message)
      Setter for the field message.
      Parameters:
      message - the status or error message describing the current processing state
    • getPi

      public String getPi()
      Getter for the field pi.
      Returns:
      the persistent identifier of the record associated with this upload job
    • setPi

      public void setPi(String pi)
      Setter for the field pi.
      Parameters:
      pi - the persistent identifier of the record associated with this upload job
    • getProcessId

      public Integer getProcessId()
    • setProcessId

      public void setProcessId(Integer processId)
    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String title)
    • getDescription

      public String getDescription()
      Getter for the field description.
      Returns:
      the human-readable description of this upload job
    • setDescription

      public void setDescription(String description)
      Setter for the field description.
      Parameters:
      description - the human-readable description of this upload job
    • isConsent

      public boolean isConsent()
    • setConsent

      public void setConsent(boolean consent)
    • getFiles

      public List<Part> getFiles()
    • setFiles

      public void setFiles(List<Part> files)
    • toString

      public String toString()
      Overrides:
      toString in class Object