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 name
-
-
-
Method Detail
-
startProcess
@RequestMapping(method=POST) @PreAuthorize("hasAuthority(\'ADMIN\')") public org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> startProcess(@PathVariable(name="name") String scriptName, @RequestParam(name="file") 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 for- Returns:
- The ProcessResource object for the created process
- Throws:
Exception- If something goes wrong
-
-