Class SchedulerRestController
java.lang.Object
com.aquima.web.rest.v1.controller.SchedulerRestController
@ConditionalOnMissingBean(com.aquima.interactions.caseengine.client.CaseEngineClient.class)
@RestController
@RestApiContext
public class SchedulerRestController
extends Object
Responsible for handling Scheduler Maintenance specific requests.
- Since:
- 11.0
- Author:
- Voicu Moldovan
-
Constructor Summary
ConstructorsConstructorDescriptionSchedulerRestController
(com.aquima.interactions.process.dao.IProcessCaseDao processCaseDao, SchedulerRestService schedulerRestService) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<String> Retrieves all the application names and versions and for each pair [ApplicationName, ApplicationVersion] retrieves the corresponding ProcessEngine and calls cancelStartedTasks() methods on it.org.springframework.http.ResponseEntity
<String> updateApplicationId
(String currentApplicationId, Long caseId, Application newApplication) Updates application id for all cases and jobs matching the current application id (applicationName:applicationVersion) with new values.
-
Constructor Details
-
SchedulerRestController
@Autowired public SchedulerRestController(com.aquima.interactions.process.dao.IProcessCaseDao processCaseDao, SchedulerRestService schedulerRestService)
-
-
Method Details
-
cancelStartedTasks
@RequestMapping(value="/scheduler/maintenance/tasks/cancelStarted", method=PUT) @ResponseStatus(OK) @ResponseBody public org.springframework.http.ResponseEntity<String> cancelStartedTasks()Retrieves all the application names and versions and for each pair [ApplicationName, ApplicationVersion] retrieves the corresponding ProcessEngine and calls cancelStartedTasks() methods on it.- Returns:
- the result of the operation
-
updateApplicationId
@RequestMapping(value="/scheduler/maintenance/applications/{currentApplicationId}", method=PUT, consumes="application/json") @ResponseBody public org.springframework.http.ResponseEntity<String> updateApplicationId(@PathVariable(name="currentApplicationId") String currentApplicationId, @RequestParam(name="caseId",required=false) Long caseId, @RequestBody Application newApplication) Updates application id for all cases and jobs matching the current application id (applicationName:applicationVersion) with new values. If case id is specified, only that case with the corresponding jobs will be updated with the new values.- Parameters:
currentApplicationId
- Id of the current application.caseId
- Id of the case.newApplication
- the new application- Returns:
- the result of the operation
-