Project

General

Profile

1
package eu.dnetlib.repo.manager.service.controllers;
2

    
3
import eu.dnetlib.api.functionality.ValidatorServiceException;
4
import eu.dnetlib.domain.functionality.validator.StoredJob;
5
import eu.dnetlib.repo.manager.shared.JobsOfUser;
6
import io.swagger.annotations.Api;
7
import org.json.JSONException;
8
import org.springframework.http.MediaType;
9
import org.springframework.web.bind.annotation.*;
10

    
11
@RestController
12
@RequestMapping(value = "/monitor")
13
@Api(description = "Monitor API",  tags = {"monitor"})
14
public interface MonitorApi {
15

    
16
    @RequestMapping(value = "/getJobsOfUser" , method = RequestMethod.GET,
17
            produces = MediaType.APPLICATION_JSON_VALUE)
18
    @ResponseBody
19
    JobsOfUser getJobsOfUser(String user,
20
                             String jobType,
21
                             String offset,
22
                             String limit,
23
                             String dateFrom,
24
                             String dateTo,
25
                             String validationStatus,
26
                             String includeJobsTotal) throws JSONException, ValidatorServiceException;
27

    
28
    @RequestMapping(value = "/getJobsOfUserPerValidationStatus" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
29
    @ResponseBody
30
    int getJobsOfUserPerValidationStatus(@RequestBody String user,
31
                                         @RequestBody String jobType,
32
                                         @RequestBody String validationStatus) throws JSONException;
33

    
34
    @RequestMapping(value = "/getJobSummary" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
35
    @ResponseBody
36
    StoredJob getJobSummary(@RequestBody String jobId,
37
                            @RequestBody String groupBy) throws JSONException;
38

    
39
}
(3-3/12)