Revision 49960
Added by Panagiotis Kanakakis over 6 years ago
RepositoryApi.java | ||
---|---|---|
3 | 3 |
import eu.dnetlib.domain.data.Repository; |
4 | 4 |
import eu.dnetlib.domain.data.RepositoryInterface; |
5 | 5 |
import eu.dnetlib.repo.manager.shared.*; |
6 |
import io.swagger.annotations.Api; |
|
6 | 7 |
import org.json.JSONException; |
7 | 8 |
import org.springframework.http.MediaType; |
8 | 9 |
import org.springframework.web.bind.annotation.*; |
... | ... | |
10 | 11 |
import java.util.List; |
11 | 12 |
import java.util.Map; |
12 | 13 |
|
14 |
|
|
13 | 15 |
@RestController |
14 | 16 |
@RequestMapping(value = "/repository") |
15 | 17 |
public interface RepositoryApi { |
... | ... | |
62 | 64 |
@RequestMapping(value = "/addRepository", method = RequestMethod.POST, |
63 | 65 |
consumes = MediaType.APPLICATION_JSON_VALUE) |
64 | 66 |
@ResponseBody |
65 |
void addRepository(Repository repository) throws JSONException;
|
|
67 |
void addRepository(@RequestBody String params) throws Exception;
|
|
66 | 68 |
|
67 | 69 |
@RequestMapping(value = "/deleteInterface", method = RequestMethod.DELETE) |
68 | 70 |
@ResponseBody |
... | ... | |
71 | 73 |
@RequestMapping(value = "/addInterface", method = RequestMethod.POST, |
72 | 74 |
consumes = MediaType.APPLICATION_JSON_VALUE) |
73 | 75 |
@ResponseBody |
74 |
RepositoryInterface addRepositoryInterface(RepositoryInterface repositoryInterface) throws JSONException; |
|
76 |
RepositoryInterface addRepositoryInterface(Repository repository,RepositoryInterface repositoryInterface) throws JSONException;
|
|
75 | 77 |
|
76 | 78 |
@RequestMapping(value = "/getDnetCountries", method = RequestMethod.GET, |
77 | 79 |
produces = MediaType.APPLICATION_JSON_VALUE) |
Also available in: Unified diff
1. Change storeRepository method
2. Update converter of repository interface with extra fields.