Skip to content

Commit

Permalink
copy clean UploadableStep to modules server
Browse files Browse the repository at this point in the history
  • Loading branch information
wwelling committed Jan 19, 2024
1 parent aca46b4 commit 67be235
Showing 1 changed file with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.app.rest.submit;

import java.io.IOException;

import org.dspace.app.rest.model.ErrorRest;
import org.dspace.app.util.SubmissionStepConfig;
import org.dspace.content.InProgressSubmission;
import org.dspace.core.Context;
import org.springframework.web.multipart.MultipartFile;

/**
* The interface for submission Steps that need to deal with file upload
*
* @author Luigi Andrea Pascarelli (luigiandrea.pascarelli at 4science.it)
* @author Andrea Bollini (andrea.bollini at 4science.it)
*/
public interface UploadableStep extends RestProcessingStep {

/**
* The method to implement to support upload of a file in the submission section (aka panel / step)
*
* @param context
* the dspace context
* @param submissionService
* the submission service
* @param stepConfig
* the configuration of the submission section
* @param wsi
* the inprogress submission
* @param 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
* @return the encountered error if any
* @throws IOException
*/
public ErrorRest upload(Context context, SubmissionService submissionService, SubmissionStepConfig stepConfig,
InProgressSubmission wsi, MultipartFile file) throws IOException;

}

0 comments on commit 67be235

Please sign in to comment.