2017-12-07 18:57:12 +01:00
|
|
|
package eu.dnetlib.repo.manager.service.controllers;
|
|
|
|
|
|
|
|
import eu.dnetlib.api.functionality.ValidatorServiceException;
|
|
|
|
import eu.dnetlib.domain.functionality.validator.StoredJob;
|
|
|
|
import eu.dnetlib.repo.manager.shared.JobsOfUser;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import org.json.JSONException;
|
|
|
|
import org.springframework.http.MediaType;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
@RequestMapping(value = "/monitor")
|
|
|
|
@Api(description = "Monitor API", tags = {"monitor"})
|
|
|
|
public interface MonitorApi {
|
|
|
|
|
2018-02-22 12:23:56 +01:00
|
|
|
@RequestMapping(value = "/getJobsOfUser" , method = RequestMethod.GET,consumes = MediaType.APPLICATION_JSON_VALUE,
|
2017-12-07 18:57:12 +01:00
|
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
@ResponseBody
|
2018-02-22 12:23:56 +01:00
|
|
|
JobsOfUser getJobsOfUser(@RequestBody String user,
|
|
|
|
@RequestBody String jobType,
|
|
|
|
@RequestBody String offset,
|
|
|
|
@RequestBody String limit,
|
|
|
|
@RequestBody String dateFrom,
|
|
|
|
@RequestBody String dateTo,
|
|
|
|
@RequestBody String validationStatus,
|
|
|
|
@RequestBody String includeJobsTotal) throws JSONException, ValidatorServiceException;
|
2017-12-07 18:57:12 +01:00
|
|
|
|
|
|
|
@RequestMapping(value = "/getJobsOfUserPerValidationStatus" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
@ResponseBody
|
|
|
|
int getJobsOfUserPerValidationStatus(@RequestBody String user,
|
|
|
|
@RequestBody String jobType,
|
|
|
|
@RequestBody String validationStatus) throws JSONException;
|
|
|
|
|
|
|
|
@RequestMapping(value = "/getJobSummary" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
@ResponseBody
|
|
|
|
StoredJob getJobSummary(@RequestBody String jobId,
|
|
|
|
@RequestBody String groupBy) throws JSONException;
|
|
|
|
|
|
|
|
}
|