Class UploadStep

java.lang.Object
org.dspace.app.rest.submit.AbstractProcessingStep
org.dspace.app.rest.submit.step.UploadStep
All Implemented Interfaces:
DataProcessingStep, RestProcessingStep, UploadableStep

public class UploadStep extends AbstractProcessingStep implements UploadableStep
Upload step for DSpace Spring Rest. Expose information about the bitstream uploaded for the in progress submission.
Author:
Luigi Andrea Pascarelli (luigiandrea.pascarelli at 4science.it)
  • Constructor Details

    • UploadStep

      public UploadStep()
  • Method Details

    • getData

      public DataUpload getData(SubmissionService submissionService, InProgressSubmission obj, SubmissionStepConfig config) throws Exception
      Description copied from interface: DataProcessingStep
      Method to expose data in the a dedicated section of the in progress submission. The step needs to return a serializable object that will be included in a section with the name (id) assigned to the step in the item-submission.xml file
      Specified by:
      getData in interface DataProcessingStep
      Parameters:
      submissionService - the submission service
      obj - the in progress submission
      config - the submission step configuration
      Returns:
      the serializable object to include in the step generated section
      Throws:
      Exception
    • doPatchProcessing

      public void doPatchProcessing(Context context, jakarta.servlet.http.HttpServletRequest currentRequest, InProgressSubmission source, Operation op, SubmissionStepConfig stepConf) throws Exception
      Description copied from interface: DataProcessingStep
      Method to react to a patch request against the step managed section data
      Specified by:
      doPatchProcessing in interface DataProcessingStep
      Parameters:
      context - the DSpace context
      currentRequest - the http request
      source - the in progress submission
      op - the json patch operation
      Throws:
      Exception
    • upload

      public ErrorRest upload(Context context, SubmissionService submissionService, SubmissionStepConfig stepConfig, InProgressSubmission wsi, MultipartFile file)
      Description copied from interface: UploadableStep
      The method to implement to support upload of a file in the submission section (aka panel / step)
      Specified by:
      upload in interface UploadableStep
      Parameters:
      context - the dspace context
      submissionService - the submission service
      stepConfig - the configuration of the submission section
      wsi - the inprogress submission
      file - the multipart file, please note that it is a complex object containing additional information other than just the binary such as the filename and the mimetype
      Returns:
      the encountered error if any