Class TaskAdminController
java.lang.Object
org.tailormap.api.controller.admin.TaskAdminController
Admin controller for controlling the task scheduler. Not to be used to create new tasks, adding
tasks belongs in the domain of the specific controller or Spring Data REST API as that requires
specific configuration information.
-
Constructor Summary
ConstructorDescriptionTaskAdminController
(org.quartz.Scheduler scheduler, TaskManagerService taskManagerService, SearchIndexRepository searchIndexRepository) -
Method Summary
-
Constructor Details
-
TaskAdminController
public TaskAdminController(@Autowired org.quartz.Scheduler scheduler, @Autowired TaskManagerService taskManagerService, @Autowired SearchIndexRepository searchIndexRepository)
-
-
Method Details
-
list
@GetMapping(path="${tailormap-api.admin.base-path}/tasks", produces="application/json") public org.springframework.http.ResponseEntity<Object> list(@RequestParam(required=false) String type) throws org.springframework.web.server.ResponseStatusException - Throws:
org.springframework.web.server.ResponseStatusException
-
details
@GetMapping(path="${tailormap-api.admin.base-path}/tasks/{type}/{uuid}", produces="application/json") public org.springframework.http.ResponseEntity<Object> details(@PathVariable TaskType type, @PathVariable UUID uuid) throws org.springframework.web.server.ResponseStatusException - Throws:
org.springframework.web.server.ResponseStatusException
-
startTask
@PutMapping(path="${tailormap-api.admin.base-path}/tasks/{type}/{uuid}/start", produces="application/json") public org.springframework.http.ResponseEntity<Object> startTask(@PathVariable TaskType type, @PathVariable UUID uuid) throws org.springframework.web.server.ResponseStatusException - Throws:
org.springframework.web.server.ResponseStatusException
-
stopTask
@PutMapping(path="${tailormap-api.admin.base-path}/tasks/{type}/{uuid}/stop", produces="application/json") public org.springframework.http.ResponseEntity<Object> stopTask(@PathVariable TaskType type, @PathVariable UUID uuid) throws org.springframework.web.server.ResponseStatusException - Throws:
org.springframework.web.server.ResponseStatusException
-
delete
@DeleteMapping(path="${tailormap-api.admin.base-path}/tasks/{type}/{uuid}", produces="application/json") public org.springframework.http.ResponseEntity<Object> delete(@PathVariable TaskType type, @PathVariable UUID uuid) throws org.springframework.web.server.ResponseStatusException - Throws:
org.springframework.web.server.ResponseStatusException
-