1 |
49362
|
panagiotis
|
package eu.dnetlib.repo.manager.service.controllers;
|
2 |
49236
|
panagiotis
|
|
3 |
|
|
import eu.dnetlib.domain.functionality.validator.JobForValidation;
|
4 |
|
|
import eu.dnetlib.domain.functionality.validator.RuleSet;
|
5 |
49362
|
panagiotis
|
import org.json.JSONException;
|
6 |
49236
|
panagiotis
|
import org.springframework.http.MediaType;
|
7 |
49378
|
panagiotis
|
import org.springframework.web.bind.annotation.*;
|
8 |
49236
|
panagiotis
|
|
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 |
49378
|
panagiotis
|
@ResponseBody
|
18 |
49236
|
panagiotis
|
void submitJobForValidation(@RequestBody JobForValidation jobForValidation);
|
19 |
|
|
|
20 |
|
|
@RequestMapping(value = "/reSubmitJobForValidation/",method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE )
|
21 |
49378
|
panagiotis
|
@ResponseBody
|
22 |
49362
|
panagiotis
|
void reSubmitJobForValidation(@RequestBody String jobId) throws JSONException;
|
23 |
49236
|
panagiotis
|
|
24 |
49410
|
panagiotis
|
@RequestMapping(value = "/getRuleSets/{mode}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
25 |
49378
|
panagiotis
|
@ResponseBody
|
26 |
49410
|
panagiotis
|
List<RuleSet> getRuleSets(String mode);
|
27 |
49236
|
panagiotis
|
|
28 |
49410
|
panagiotis
|
@RequestMapping(value = "/getSetsOfRepository" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
29 |
49378
|
panagiotis
|
@ResponseBody
|
30 |
49410
|
panagiotis
|
List<String> getSetsOfRepository(@RequestBody String url);
|
31 |
49236
|
panagiotis
|
|
32 |
49813
|
panagiotis
|
@RequestMapping(value = "/identifyRepository/{url}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
33 |
|
|
@ResponseBody
|
34 |
|
|
boolean identifyRepo(String url);
|
35 |
49410
|
panagiotis
|
|
36 |
49813
|
panagiotis
|
@RequestMapping(value = "/getRuleSet/{acronym}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
37 |
|
|
@ResponseBody
|
38 |
|
|
RuleSet getRuleSet(String acronym);
|
39 |
49410
|
panagiotis
|
|
40 |
49236
|
panagiotis
|
}
|