forked from DSpace/DSpace
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copy clean UploadableStep to modules server
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
dspace/modules/server/src/main/java/org/dspace/app/rest/submit/UploadableStep.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
|
||
} |