Package org.dspace.app.rest.submit.step
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)
-
-
Field Summary
Fields Modifier and Type Field Description static StringUPLOAD_STEP_METADATA_SECTION-
Fields inherited from class org.dspace.app.rest.submit.AbstractProcessingStep
authorizeService, bitstreamFormatService, bitstreamService, bundleService, collectionService, configurationService, itemService, metadataFieldService, workspaceItemService
-
Fields inherited from interface org.dspace.app.rest.submit.DataProcessingStep
CCLICENSE_STEP_OPERATION_ENTRY, COLLECTION_STEP_OPERATION_ENTRY, DESCRIBE_STEP_METADATA_OPERATION_ENTRY, LICENSE_STEP_OPERATION_ENTRY, UPLOAD_STEP_ACCESSCONDITIONS_OPERATION_ENTRY, UPLOAD_STEP_METADATA_OPERATION_ENTRY, UPLOAD_STEP_METADATA_PATH, UPLOAD_STEP_MOVE_OPERATION_ENTRY, UPLOAD_STEP_REMOVE_OPERATION_ENTRY
-
-
Constructor Summary
Constructors Constructor Description UploadStep()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoPatchProcessing(org.dspace.core.Context context, javax.servlet.http.HttpServletRequest currentRequest, org.dspace.content.InProgressSubmission source, Operation op, org.dspace.app.util.SubmissionStepConfig stepConf)Method to react to a patch request against the step managed section dataDataUploadgetData(SubmissionService submissionService, org.dspace.content.InProgressSubmission obj, org.dspace.app.util.SubmissionStepConfig config)Method to expose data in the a dedicated section of the in progress submission.ErrorRestupload(org.dspace.core.Context context, SubmissionService submissionService, org.dspace.app.util.SubmissionStepConfig stepConfig, org.dspace.content.InProgressSubmission wsi, org.springframework.web.multipart.MultipartFile file)The method to implement to support upload of a file in the submission section (aka panel / step)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.dspace.app.rest.submit.DataProcessingStep
validate
-
-
-
-
Field Detail
-
UPLOAD_STEP_METADATA_SECTION
public static final String UPLOAD_STEP_METADATA_SECTION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getData
public DataUpload getData(SubmissionService submissionService, org.dspace.content.InProgressSubmission obj, org.dspace.app.util.SubmissionStepConfig config) throws Exception
Description copied from interface:DataProcessingStepMethod 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:
getDatain interfaceDataProcessingStep- Parameters:
submissionService- the submission serviceobj- the in progress submissionconfig- the submission step configuration- Returns:
- the serializable object to include in the step generated section
- Throws:
Exception
-
doPatchProcessing
public void doPatchProcessing(org.dspace.core.Context context, javax.servlet.http.HttpServletRequest currentRequest, org.dspace.content.InProgressSubmission source, Operation op, org.dspace.app.util.SubmissionStepConfig stepConf) throws ExceptionDescription copied from interface:DataProcessingStepMethod to react to a patch request against the step managed section data- Specified by:
doPatchProcessingin interfaceDataProcessingStep- Parameters:
context- the DSpace contextcurrentRequest- the http requestsource- the in progress submissionop- the json patch operation- Throws:
Exception
-
upload
public ErrorRest upload(org.dspace.core.Context context, SubmissionService submissionService, org.dspace.app.util.SubmissionStepConfig stepConfig, org.dspace.content.InProgressSubmission wsi, org.springframework.web.multipart.MultipartFile file)
Description copied from interface:UploadableStepThe method to implement to support upload of a file in the submission section (aka panel / step)- Specified by:
uploadin interfaceUploadableStep- Parameters:
context- the dspace contextsubmissionService- the submission servicestepConfig- the configuration of the submission sectionwsi- the inprogress submissionfile- 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
-
-