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.RequestBody;
8
import org.springframework.web.bind.annotation.RequestMapping;
9
import org.springframework.web.bind.annotation.RequestMethod;
10
import org.springframework.web.bind.annotation.RestController;
11

    
12
import java.util.List;
13

    
14

    
15
@RestController
16
@RequestMapping(value = "/validator")
17
public interface ValidatorApi {
18

    
19
    @RequestMapping(value = "/submitJobForValidation",method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE )
20
    void submitJobForValidation(@RequestBody JobForValidation jobForValidation);
21

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

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

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

    
31
}
(10-10/11)