Project

General

Profile

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

    
3
import eu.dnetlib.domain.functionality.validator.StoredJob;
4
import org.json.JSONException;
5
import org.json.JSONObject;
6
import org.springframework.http.MediaType;
7
import org.springframework.web.bind.annotation.*;
8

    
9
import java.util.List;
10
import java.util.Map;
11

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

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

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

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

    
38
}
(5-5/11)