Package org.dspace.app.rest.submit
Interface DataProcessingStep
-
- All Superinterfaces:
RestProcessingStep
- All Known Implementing Classes:
AbstractProcessingStep,AccessConditionStep,CCLicenseStep,CollectionStep,DescribeStep,LicenseStep,UploadStep
public interface DataProcessingStep extends RestProcessingStep
Interface for the submission steps to populate sections in the in progress submission and react to patch requests.- Author:
- Luigi Andrea Pascarelli (luigiandrea.pascarelli at 4science.it), Andrea Bollini (andrea.bollini at 4science.it)
-
-
Field Summary
Fields Modifier and Type Field Description static StringACCESS_CONDITION_POLICY_STEP_OPERATION_ENTRYstatic StringACCESS_CONDITION_STEP_OPERATION_ENTRYstatic StringCCLICENSE_STEP_OPERATION_ENTRYstatic StringCOLLECTION_STEP_OPERATION_ENTRYstatic StringDESCRIBE_STEP_METADATA_OPERATION_ENTRYstatic StringLICENSE_STEP_OPERATION_ENTRYstatic StringUPLOAD_STEP_ACCESSCONDITIONS_OPERATION_ENTRYstatic StringUPLOAD_STEP_METADATA_OPERATION_ENTRYstatic StringUPLOAD_STEP_METADATA_PATHstatic StringUPLOAD_STEP_MOVE_OPERATION_ENTRYstatic StringUPLOAD_STEP_REMOVE_OPERATION_ENTRY
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voiddoPatchProcessing(Context context, javax.servlet.http.HttpServletRequest currentRequest, InProgressSubmission source, Operation op, SubmissionStepConfig stepConf)Method to react to a patch request against the step managed section data<T extends Serializable>
TgetData(SubmissionService submissionService, InProgressSubmission obj, SubmissionStepConfig config)Method to expose data in the a dedicated section of the in progress submission.default List<ErrorRest>validate(SubmissionService submissionService, InProgressSubmission obj, SubmissionStepConfig config)The method will expose the list of validation errors identified by the step.
-
-
-
Field Detail
-
DESCRIBE_STEP_METADATA_OPERATION_ENTRY
static final String DESCRIBE_STEP_METADATA_OPERATION_ENTRY
- See Also:
- Constant Field Values
-
COLLECTION_STEP_OPERATION_ENTRY
static final String COLLECTION_STEP_OPERATION_ENTRY
- See Also:
- Constant Field Values
-
UPLOAD_STEP_METADATA_OPERATION_ENTRY
static final String UPLOAD_STEP_METADATA_OPERATION_ENTRY
- See Also:
- Constant Field Values
-
UPLOAD_STEP_REMOVE_OPERATION_ENTRY
static final String UPLOAD_STEP_REMOVE_OPERATION_ENTRY
- See Also:
- Constant Field Values
-
UPLOAD_STEP_MOVE_OPERATION_ENTRY
static final String UPLOAD_STEP_MOVE_OPERATION_ENTRY
- See Also:
- Constant Field Values
-
UPLOAD_STEP_ACCESSCONDITIONS_OPERATION_ENTRY
static final String UPLOAD_STEP_ACCESSCONDITIONS_OPERATION_ENTRY
- See Also:
- Constant Field Values
-
LICENSE_STEP_OPERATION_ENTRY
static final String LICENSE_STEP_OPERATION_ENTRY
- See Also:
- Constant Field Values
-
CCLICENSE_STEP_OPERATION_ENTRY
static final String CCLICENSE_STEP_OPERATION_ENTRY
- See Also:
- Constant Field Values
-
ACCESS_CONDITION_STEP_OPERATION_ENTRY
static final String ACCESS_CONDITION_STEP_OPERATION_ENTRY
- See Also:
- Constant Field Values
-
ACCESS_CONDITION_POLICY_STEP_OPERATION_ENTRY
static final String ACCESS_CONDITION_POLICY_STEP_OPERATION_ENTRY
- See Also:
- Constant Field Values
-
UPLOAD_STEP_METADATA_PATH
static final String UPLOAD_STEP_METADATA_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getData
<T extends Serializable> T getData(SubmissionService submissionService, InProgressSubmission obj, SubmissionStepConfig config) throws Exception
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- 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
-
validate
default List<ErrorRest> validate(SubmissionService submissionService, InProgressSubmission obj, SubmissionStepConfig config) throws Exception
The method will expose the list of validation errors identified by the step. The default implementation will found aValidationspring bean in the context with the same name that the step id- Parameters:
submissionService-obj-config-- Returns:
- Throws:
Exception
-
doPatchProcessing
void doPatchProcessing(Context context, javax.servlet.http.HttpServletRequest currentRequest, InProgressSubmission source, Operation op, SubmissionStepConfig stepConf) throws Exception
Method to react to a patch request against the step managed section data- Parameters:
context- the DSpace contextcurrentRequest- the http requestsource- the in progress submissionop- the json patch operation- Throws:
Exception
-
-