Project

General

Profile

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

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

    
9
import java.util.List;
10

    
11

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

    
16
    @RequestMapping(value = "/submitJobForValidation",method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE )
17
    @ResponseBody
18
    void submitJobForValidation(@RequestBody JobForValidation jobForValidation);
19

    
20
    @RequestMapping(value = "/reSubmitJobForValidation/",method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE )
21
    @ResponseBody
22
    void reSubmitJobForValidation(@RequestBody String jobId) throws JSONException;
23

    
24
    @RequestMapping(value = "/getRuleSets/{mode}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
25
    @ResponseBody
26
    List<RuleSet> getRuleSets(String mode);
27

    
28
    @RequestMapping(value = "/getSetsOfRepository" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
29
    @ResponseBody
30
    List<String> getSetsOfRepository(@RequestBody String url);
31

    
32

    
33

    
34

    
35
}
(10-10/11)