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.service.shared.JobsOfUser;
6
import org.json.JSONException;
7
import org.json.JSONObject;
8
import org.springframework.http.MediaType;
9
import org.springframework.web.bind.annotation.*;
10

    
11
import java.util.List;
12
import java.util.Map;
13

    
14
@RestController
15
@RequestMapping(value = "/monitor")
16
public interface MonitorApi {
17

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

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

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

    
41
}
(3-3/8)