Package de.dlr.proseo.planner.rest
Klasse JobControllerImpl
java.lang.Object
de.dlr.proseo.planner.rest.JobControllerImpl
- Alle implementierten Schnittstellen:
JobController
Spring MVC controller for the prosEO planner; implements the services required to plan and handle jobs.
This class manages the endpoints for job management, including retrieval, creation, modification, and cancellation of jobs.
- Autor:
- Ernst Melchinger
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungorg.springframework.http.ResponseEntity
<RestJob> Cancel a job by job idorg.springframework.http.ResponseEntity
<String> Retrieves the number of jobs by order ID and state.org.springframework.http.ResponseEntity
<RestJob> Get a job by job idgetJobs
(String state, Long orderId, Long recordFrom, Long recordTo, Boolean logs, String[] orderBy, org.springframework.http.HttpHeaders httpHeaders) Retrieves a list of jobs based on provided filtering criteria.org.springframework.http.ResponseEntity
<RestJobGraph> graphJobSteps
(String jobId, org.springframework.http.HttpHeaders httpHeaders) Create a graph of job step dependencies within a joborg.springframework.http.ResponseEntity
<RestJob> Resume the job with job idorg.springframework.http.ResponseEntity
<RestJob> Retry a job by job idorg.springframework.http.ResponseEntity
<RestJob> suspendJob
(String jobId, Boolean forceP, org.springframework.http.HttpHeaders httpHeaders) Suspend a job by job id
-
Konstruktordetails
-
JobControllerImpl
public JobControllerImpl()
-
-
Methodendetails
-
getJobs
@Transactional(isolation=REPEATABLE_READ, readOnly=true) public org.springframework.http.ResponseEntity<List<RestJob>> getJobs(String state, Long orderId, Long recordFrom, Long recordTo, Boolean logs, String[] orderBy, org.springframework.http.HttpHeaders httpHeaders) Retrieves a list of jobs based on provided filtering criteria.- Angegeben von:
getJobs
in SchnittstelleJobController
- Parameter:
state
- The job state to filter by (optional).orderId
- The order ID to filter by (optional).recordFrom
- First record of filtered and ordered result to return (optional; mandatory if "recordTo" is given).recordTo
- Last record of filtered and ordered result to return (optional).logs
- Indicates whether to include logs in the response.orderBy
- An array of strings containing a column name and an optional sort direction (ASC/DESC), separated by white space.httpHeaders
- HTTP headers.- Gibt zurück:
- A ResponseEntity containing a list of JSON objects describing jobs.
-
countJobs
@Transactional(isolation=REPEATABLE_READ, readOnly=true) public org.springframework.http.ResponseEntity<String> countJobs(String state, Long orderId, org.springframework.http.HttpHeaders httpHeaders) Retrieves the number of jobs by order ID and state.- Angegeben von:
countJobs
in SchnittstelleJobController
- Parameter:
state
- State of jobs.orderId
- Order ID of jobs.httpHeaders
- HTTP headers.- Gibt zurück:
- The number of jobs as a string.
-
getJob
@Transactional(isolation=REPEATABLE_READ) public org.springframework.http.ResponseEntity<RestJob> getJob(String jobId, org.springframework.http.HttpHeaders httpHeaders) Get a job by job id- Angegeben von:
getJob
in SchnittstelleJobController
- Parameter:
jobId
-
-
graphJobSteps
@Transactional(isolation=REPEATABLE_READ, readOnly=true) public org.springframework.http.ResponseEntity<RestJobGraph> graphJobSteps(String jobId, org.springframework.http.HttpHeaders httpHeaders) Create a graph of job step dependencies within a job- Angegeben von:
graphJobSteps
in SchnittstelleJobController
- Parameter:
jobId
-
-
resumeJob
public org.springframework.http.ResponseEntity<RestJob> resumeJob(String jobId, org.springframework.http.HttpHeaders httpHeaders) Resume the job with job id- Angegeben von:
resumeJob
in SchnittstelleJobController
- Parameter:
jobId
-
-
cancelJob
public org.springframework.http.ResponseEntity<RestJob> cancelJob(String jobId, org.springframework.http.HttpHeaders httpHeaders) Cancel a job by job id- Angegeben von:
cancelJob
in SchnittstelleJobController
- Parameter:
jobId
-
-
suspendJob
public org.springframework.http.ResponseEntity<RestJob> suspendJob(String jobId, Boolean forceP, org.springframework.http.HttpHeaders httpHeaders) Suspend a job by job id- Angegeben von:
suspendJob
in SchnittstelleJobController
- Parameter:
jobId
-force
- If true, kill job, otherwise wait until end of job
-
retryJob
public org.springframework.http.ResponseEntity<RestJob> retryJob(String id, org.springframework.http.HttpHeaders httpHeaders) Retry a job by job id- Angegeben von:
retryJob
in SchnittstelleJobController
- Parameter:
jobId
-
-