+ private Job.Parameters toJobParameters(Object jobData) {
+ String json = gson.toJson(jobData);
+ return gson.fromJson(json, Job.Parameters.class);
+ }
+
+ @GetMapping(path = JOB_URL, produces = MediaType.APPLICATION_JSON_VALUE)
+ @Operation(summary = "Get all jobs", description = "Returns all info jobs, can be used for trouble shooting")
+ @ApiResponse(responseCode = "200", //
+ description = "Information jobs", //
+ content = @Content(array = @ArraySchema(schema = @Schema(implementation = ProducerJobInfo.class)))) //
+ public ResponseEntity<Object> getJobs() {
+
+ Collection<ProducerJobInfo> producerJobs = new ArrayList<>();
+ for (Job j : this.jobs.getAll()) {
+ producerJobs.add(new ProducerJobInfo(null, j.getId(), j.getType().getId(), j.getCallbackUrl(), j.getOwner(),
+ j.getLastUpdated()));
+ }
+ return new ResponseEntity<>(gson.toJson(producerJobs), HttpStatus.OK);
+ }
+