Package org.dspace.app.rest
Class ScriptProcessesController
java.lang.Object
org.dspace.app.rest.ScriptProcessesController
@RestController
@RequestMapping("/api/system/scripts/{name}/processes")
public class ScriptProcessesController
extends Object
This controller adds additional subresource methods to allow connecting scripts with processes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionResponseEntity<org.springframework.hateoas.RepresentationModel<?>>startProcess(String scriptName, List<MultipartFile> files) This method can be called by sending a POST request to the system/scripts/{name}/processes endpoint This will start a process for the script that matches the given nameResponseEntity<org.springframework.hateoas.RepresentationModel<?>>startProcessInvalidMimeType(String scriptName)
-
Constructor Details
-
ScriptProcessesController
public ScriptProcessesController()
-
-
Method Details
-
startProcess
@RequestMapping(method=POST, consumes="multipart/form-data") @PreAuthorize("hasAuthority(\'AUTHENTICATED\')") public ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> startProcess(@PathVariable(name="name") String scriptName, @RequestParam(name="file",required=false) List<MultipartFile> files) throws Exception This method can be called by sending a POST request to the system/scripts/{name}/processes endpoint This will start a process for the script that matches the given name- Parameters:
scriptName- The name of the script that we want to start a process forfiles- (Optional) any files that need to be passed to the script for it to run- Returns:
- The ProcessResource object for the created process
- Throws:
Exception- If something goes wrong
-
startProcessInvalidMimeType
@RequestMapping(method=POST, consumes="!multipart/form-data") @PreAuthorize("hasAuthority(\'AUTHENTICATED\')") public ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> startProcessInvalidMimeType(@PathVariable(name="name") String scriptName) throws Exception - Throws:
Exception
-