Package de.dlr.proseo.planner.rest
Class JobstepControllerImpl
java.lang.Object
de.dlr.proseo.planner.rest.JobstepControllerImpl
- All Implemented Interfaces:
JobstepController
Spring MVC controller for the prosEO planner; implements the services required to plan and handle job steps.
- Author:
- Ernst Melchinger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<RestJobStep> cancelJobStep(String jobstepId, org.springframework.http.HttpHeaders httpHeaders) Cancel a production planner job step identified by name or idorg.springframework.http.ResponseEntity<RestJobStep> getJobStep(String name, org.springframework.http.HttpHeaders httpHeaders) Get production planner job step identified by name or idorg.springframework.http.ResponseEntity<String> getJobStepLog(String name, org.springframework.http.HttpHeaders httpHeaders) Get production planner job step log string by name or idorg.springframework.http.ResponseEntity<List<RestJobStep>> getJobSteps(Status status, String mission, Long last, org.springframework.http.HttpHeaders httpHeaders) Retrieves a list of job steps based on the provided status, mission, and optional last parameter.org.springframework.http.ResponseEntity<RestJobStep> resumeJobStep(String jobstepId, org.springframework.http.HttpHeaders httpHeaders) Resume a production planner job step identified by name or idorg.springframework.http.ResponseEntity<RestJobStep> retryJobStep(String jobstepId, org.springframework.http.HttpHeaders httpHeaders) Retry a production planner job step identified by name or idorg.springframework.http.ResponseEntity<RestJobStep> suspendJobStep(String jobstepId, Boolean forceP, org.springframework.http.HttpHeaders httpHeaders) Cancel a production planner job step identified by name or id.
-
Constructor Details
-
JobstepControllerImpl
public JobstepControllerImpl()
-
-
Method Details
-
getJobSteps
@Transactional(isolation=REPEATABLE_READ, readOnly=true) public org.springframework.http.ResponseEntity<List<RestJobStep>> getJobSteps(Status status, String mission, Long last, org.springframework.http.HttpHeaders httpHeaders) Retrieves a list of job steps based on the provided status, mission, and optional last parameter.- Specified by:
getJobStepsin interfaceJobstepController- Parameters:
status- The status of the job steps to retrieve.mission- The mission code for which the job steps are retrieved. If null or blank, uses the mission from security context.last- An optional parameter indicating the index of the last job step retrieved.httpHeaders- HttpHeaders object containing HTTP headers for the response.- Returns:
- ResponseEntity containing a list of REST representations of the retrieved job steps.
-
getJobStep
public org.springframework.http.ResponseEntity<RestJobStep> getJobStep(String name, org.springframework.http.HttpHeaders httpHeaders) Get production planner job step identified by name or id- Specified by:
getJobStepin interfaceJobstepController- Parameters:
name- The name or id of the job step to retrievehttpHeaders- HttpHeaders object containing HTTP headers for the response.- Returns:
- ResponseEntity containing the RestJobStep object
-
getJobStepLog
public org.springframework.http.ResponseEntity<String> getJobStepLog(String name, org.springframework.http.HttpHeaders httpHeaders) Get production planner job step log string by name or id- Specified by:
getJobStepLogin interfaceJobstepController- Parameters:
name- The name or id of the job step to retrieve the log forhttpHeaders- HttpHeaders object containing HTTP headers for the response.- Returns:
- ResponseEntity containing the log string
-
resumeJobStep
public org.springframework.http.ResponseEntity<RestJobStep> resumeJobStep(String jobstepId, org.springframework.http.HttpHeaders httpHeaders) Resume a production planner job step identified by name or id- Specified by:
resumeJobStepin interfaceJobstepController- Parameters:
jobstepId- The id of the job step to resumehttpHeaders- HttpHeaders object containing HTTP headers for the response.- Returns:
- ResponseEntity containing the resumed RestJobStep object
-
cancelJobStep
public org.springframework.http.ResponseEntity<RestJobStep> cancelJobStep(String jobstepId, org.springframework.http.HttpHeaders httpHeaders) Cancel a production planner job step identified by name or id- Specified by:
cancelJobStepin interfaceJobstepController- Parameters:
jobstepId- The id of the job step to cancelhttpHeaders- HttpHeaders object containing HTTP headers for the response.- Returns:
- ResponseEntity containing the canceled RestJobStep object
-
suspendJobStep
public org.springframework.http.ResponseEntity<RestJobStep> suspendJobStep(String jobstepId, Boolean forceP, org.springframework.http.HttpHeaders httpHeaders) Cancel a production planner job step identified by name or id. Kill the job step if force equals true, otherwise wait until end of Kubernetes job.- Specified by:
suspendJobStepin interfaceJobstepController- Parameters:
jobstepId- The id of the job step to suspendforceP- Whether to force suspension or nothttpHeaders- HttpHeaders object containing HTTP headers for the response.- Returns:
- ResponseEntity containing the suspended RestJobStep object
-
retryJobStep
public org.springframework.http.ResponseEntity<RestJobStep> retryJobStep(String jobstepId, org.springframework.http.HttpHeaders httpHeaders) Retry a production planner job step identified by name or id- Specified by:
retryJobStepin interfaceJobstepController- Parameters:
jobstepId- The id of the job step to retryhttpHeaders- HttpHeaders object containing HTTP headers for the response.- Returns:
- ResponseEntity containing the retried RestJobStep object
-