Revision 57966
Added by Ioannis Diplas over 4 years ago
ValidatorController.java | ||
---|---|---|
43 | 43 |
return validatorService.submitJobForValidation(jobForValidation); |
44 | 44 |
} |
45 | 45 |
|
46 |
@RequestMapping(value = "/reSubmitJobForValidation/{email}/{jobId}",method = RequestMethod.POST,
|
|
46 |
@RequestMapping(value = "/reSubmitJobForValidation/{jobId}",method = RequestMethod.POST, |
|
47 | 47 |
consumes = MediaType.APPLICATION_JSON_VALUE, |
48 | 48 |
produces = MediaType.APPLICATION_JSON_VALUE) |
49 | 49 |
@ResponseBody |
50 | 50 |
@PreAuthorize("hasRole('ROLE_USER')") |
51 |
public ResponseEntity<Object> reSubmitJobForValidation(@PathVariable("email") String email, |
|
52 |
@PathVariable("jobId") String jobId) throws JSONException, ValidatorServiceException { |
|
53 |
email = ((OIDCAuthenticationToken) SecurityContextHolder.getContext().getAuthentication()).getUserInfo().getEmail(); |
|
54 |
return validatorService.reSubmitJobForValidation(email, jobId); |
|
51 |
public ResponseEntity<Object> reSubmitJobForValidation(@PathVariable("jobId") String jobId) throws JSONException, ValidatorServiceException { |
|
52 |
return validatorService.reSubmitJobForValidation(((OIDCAuthenticationToken) SecurityContextHolder.getContext().getAuthentication()).getUserInfo().getEmail(), jobId); |
|
55 | 53 |
} |
56 | 54 |
|
57 | 55 |
@RequestMapping(value = "/getRuleSets/{mode}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE) |
... | ... | |
81 | 79 |
@RequestMapping(value = "/getStoredJobsNew" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE) |
82 | 80 |
@ResponseBody |
83 | 81 |
@PreAuthorize("hasRole('ROLE_USER')") |
84 |
public List<StoredJob> getStoredJobsNew(@RequestParam("user") @ApiParam(value = "User email", required = true) String user, |
|
85 |
@RequestParam(value = "jobType", required = false) |
|
82 |
public List<StoredJob> getStoredJobsNew(@RequestParam(value = "jobType", required = false) |
|
86 | 83 |
@ApiParam(value = "Equals to filter job type on validation history page") String jobType, |
87 | 84 |
@RequestParam("offset") @ApiParam(value = "Page number", required = true) String offset, |
88 | 85 |
@RequestParam(value = "limit", required = false,defaultValue = "10") @ApiParam(value = "Null value") String limit, |
... | ... | |
90 | 87 |
@RequestParam(value = "dateTo", required = false) @ApiParam(value = "Null value") String dateTo, |
91 | 88 |
@RequestParam("validationStatus") @ApiParam(value = "Equals to filter validation jobs", required = true) String validationStatus |
92 | 89 |
) throws ValidatorServiceException { |
93 |
user = ((OIDCAuthenticationToken) SecurityContextHolder.getContext().getAuthentication()).getUserInfo().getEmail(); |
|
94 |
return validatorService.getStoredJobsNew(user, jobType, offset, limit, dateFrom, dateTo, validationStatus); |
|
90 |
return validatorService.getStoredJobsNew(((OIDCAuthenticationToken) SecurityContextHolder.getContext().getAuthentication()).getUserInfo().getEmail(), jobType, offset, limit, dateFrom, dateTo, validationStatus); |
|
95 | 91 |
} |
96 | 92 |
|
97 | 93 |
@RequestMapping(value = "/getStoredJobsTotalNumberNew" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE) |
Also available in: Unified diff
Clearing unnecessary "user" variables