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 ObjectThis controller adds additional subresource methods to allow connecting scripts with processes
-
-
Constructor Summary
Constructors Constructor Description ScriptProcessesController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>>startProcess(String scriptName, List<org.springframework.web.multipart.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 nameorg.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>>startProcessInvalidMimeType(String scriptName)
-
-
-
Method Detail
-
startProcess
@RequestMapping(method=POST, consumes="multipart/form-data") @PreAuthorize("hasAuthority(\'AUTHENTICATED\')") public org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> startProcess(@PathVariable(name="name") String scriptName, @RequestParam(name="file",required=false) List<org.springframework.web.multipart.MultipartFile> files) throws ExceptionThis 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 org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> startProcessInvalidMimeType(@PathVariable(name="name") String scriptName) throws Exception- Throws:
Exception
-
-