1 |
49362
|
panagiotis
|
package eu.dnetlib.repo.manager.service.controllers;
|
2 |
49236
|
panagiotis
|
|
3 |
|
|
import eu.dnetlib.domain.data.Repository;
|
4 |
|
|
import eu.dnetlib.domain.data.RepositoryInterface;
|
5 |
49763
|
panagiotis
|
import eu.dnetlib.repo.manager.shared.*;
|
6 |
49960
|
panagiotis
|
import io.swagger.annotations.Api;
|
7 |
49362
|
panagiotis
|
import org.json.JSONException;
|
8 |
49236
|
panagiotis
|
import org.springframework.http.MediaType;
|
9 |
49813
|
panagiotis
|
import org.springframework.web.bind.annotation.*;
|
10 |
|
|
|
11 |
49236
|
panagiotis
|
import java.util.List;
|
12 |
49790
|
panagiotis
|
import java.util.Map;
|
13 |
49236
|
panagiotis
|
|
14 |
49960
|
panagiotis
|
|
15 |
49236
|
panagiotis
|
@RestController
|
16 |
|
|
@RequestMapping(value = "/repository")
|
17 |
|
|
public interface RepositoryApi {
|
18 |
|
|
|
19 |
49763
|
panagiotis
|
|
20 |
|
|
@RequestMapping(value = "/testAggregations", method = RequestMethod.GET,
|
21 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
22 |
|
|
@ResponseBody
|
23 |
49935
|
panagiotis
|
List<String> testAggregations() throws JSONException;
|
24 |
49763
|
panagiotis
|
|
25 |
49236
|
panagiotis
|
@RequestMapping(value = "/getCountries", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
26 |
49378
|
panagiotis
|
@ResponseBody
|
27 |
|
|
Country[] getCountries() ;
|
28 |
49236
|
panagiotis
|
|
29 |
49898
|
panagiotis
|
@RequestMapping(value = "/getRepositoriesByCountry/{country}/{mode}", method = RequestMethod.GET,
|
30 |
49236
|
panagiotis
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
31 |
49378
|
panagiotis
|
@ResponseBody
|
32 |
49790
|
panagiotis
|
List<Repository> getRepositoriesByCountry(String country,String mode) throws JSONException;
|
33 |
49236
|
panagiotis
|
|
34 |
|
|
@RequestMapping(value = "/getRepositoriesOfUser/{userEmail}/{page}/{size}")
|
35 |
49378
|
panagiotis
|
@ResponseBody
|
36 |
49763
|
panagiotis
|
List<Repository> getRepositoriesOfUser(String userEmail,
|
37 |
|
|
String page,
|
38 |
|
|
String size) throws JSONException;
|
39 |
49236
|
panagiotis
|
|
40 |
|
|
@RequestMapping(value = "/getRepositoryById/{id}", method = RequestMethod.GET,
|
41 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
42 |
49378
|
panagiotis
|
@ResponseBody
|
43 |
49362
|
panagiotis
|
Repository getRepositoryById(String id) throws JSONException;
|
44 |
49236
|
panagiotis
|
|
45 |
49763
|
panagiotis
|
|
46 |
|
|
@RequestMapping(value = "/getRepositoryAggregations/{id}", method = RequestMethod.GET,
|
47 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
48 |
|
|
@ResponseBody
|
49 |
|
|
Aggregations getRepositoryAggregations(String id) throws JSONException;
|
50 |
|
|
|
51 |
|
|
|
52 |
49236
|
panagiotis
|
@RequestMapping(value = "/getRepositoriesByName/{name}/{page}/{size}/", method = RequestMethod.GET,
|
53 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
54 |
49378
|
panagiotis
|
@ResponseBody
|
55 |
49236
|
panagiotis
|
List<Repository> getRepositoriesByName(String name,
|
56 |
49763
|
panagiotis
|
String page,
|
57 |
|
|
String size) throws JSONException;
|
58 |
49236
|
panagiotis
|
|
59 |
|
|
@RequestMapping(value = "/getRepositoryInterface/{id}", method = RequestMethod.GET,
|
60 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
61 |
49378
|
panagiotis
|
@ResponseBody
|
62 |
49988
|
panagiotis
|
List<RepositoryInterface> getRepositoryInterface(String id) throws JSONException;
|
63 |
49236
|
panagiotis
|
|
64 |
|
|
@RequestMapping(value = "/addRepository", method = RequestMethod.POST,
|
65 |
|
|
consumes = MediaType.APPLICATION_JSON_VALUE)
|
66 |
49378
|
panagiotis
|
@ResponseBody
|
67 |
49975
|
panagiotis
|
void addRepository( String params) throws Exception;
|
68 |
49236
|
panagiotis
|
|
69 |
49813
|
panagiotis
|
@RequestMapping(value = "/deleteInterface", method = RequestMethod.DELETE)
|
70 |
|
|
@ResponseBody
|
71 |
|
|
void deleteRepositoryInterface(String id);
|
72 |
|
|
|
73 |
49236
|
panagiotis
|
@RequestMapping(value = "/addInterface", method = RequestMethod.POST,
|
74 |
|
|
consumes = MediaType.APPLICATION_JSON_VALUE)
|
75 |
49378
|
panagiotis
|
@ResponseBody
|
76 |
49963
|
panagiotis
|
RepositoryInterface addRepositoryInterface(String params) throws JSONException;
|
77 |
49236
|
panagiotis
|
|
78 |
|
|
@RequestMapping(value = "/getDnetCountries", method = RequestMethod.GET,
|
79 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
80 |
49378
|
panagiotis
|
@ResponseBody
|
81 |
49236
|
panagiotis
|
List<String> getDnetCountries();
|
82 |
|
|
|
83 |
|
|
@RequestMapping(value = "/getTypologies", method = RequestMethod.GET,
|
84 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
85 |
49378
|
panagiotis
|
@ResponseBody
|
86 |
49236
|
panagiotis
|
List<String> getTypologies();
|
87 |
|
|
|
88 |
|
|
@RequestMapping(value = "/getTimezones", method = RequestMethod.GET,
|
89 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
90 |
49378
|
panagiotis
|
@ResponseBody
|
91 |
49763
|
panagiotis
|
List<Timezone> getTimezones();
|
92 |
49236
|
panagiotis
|
|
93 |
|
|
@RequestMapping(value = "/updateManagedStatus", method = RequestMethod.POST,
|
94 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
95 |
49378
|
panagiotis
|
@ResponseBody
|
96 |
49763
|
panagiotis
|
String updateManagedStatus(String id, String managed);
|
97 |
49236
|
panagiotis
|
|
98 |
|
|
@RequestMapping(value = "/updateEnglishName", method = RequestMethod.POST,
|
99 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
100 |
49378
|
panagiotis
|
@ResponseBody
|
101 |
49763
|
panagiotis
|
String updateEnglishName(String id, String englishName);
|
102 |
49236
|
panagiotis
|
|
103 |
|
|
@RequestMapping(value = "/updateLatitude", method = RequestMethod.POST,
|
104 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
105 |
49378
|
panagiotis
|
@ResponseBody
|
106 |
49763
|
panagiotis
|
String updateLatitude(String id, String latitude);
|
107 |
49236
|
panagiotis
|
|
108 |
|
|
@RequestMapping(value = "/updateLongitude", method = RequestMethod.POST,
|
109 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
110 |
49378
|
panagiotis
|
@ResponseBody
|
111 |
49763
|
panagiotis
|
String updateLongitude(String id, String longitude);
|
112 |
49236
|
panagiotis
|
|
113 |
|
|
@RequestMapping(value = "/updateOfficialName", method = RequestMethod.POST,
|
114 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
115 |
49378
|
panagiotis
|
@ResponseBody
|
116 |
49763
|
panagiotis
|
String updateOfficialName(String id, String officialName);
|
117 |
49236
|
panagiotis
|
|
118 |
49898
|
panagiotis
|
@RequestMapping(value = "/updateTimezone", method = RequestMethod.POST,
|
119 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
120 |
|
|
@ResponseBody
|
121 |
|
|
String updateTimezone(String id, String timezone);
|
122 |
|
|
|
123 |
|
|
@RequestMapping(value = "/updateTypology", method = RequestMethod.POST,
|
124 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
125 |
|
|
@ResponseBody
|
126 |
|
|
String updateTypology(String id, String typology);
|
127 |
|
|
|
128 |
49931
|
panagiotis
|
@RequestMapping(value = "/updateLogoUrl", method = RequestMethod.POST,
|
129 |
49898
|
panagiotis
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
130 |
|
|
@ResponseBody
|
131 |
|
|
String updateLogoUrl(String id, String logoUrl);
|
132 |
|
|
|
133 |
49988
|
panagiotis
|
@RequestMapping(value = "/updatePlatform", method = RequestMethod.POST,
|
134 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
135 |
|
|
@ResponseBody
|
136 |
|
|
String updatePlatform(String id, String platform);
|
137 |
49898
|
panagiotis
|
|
138 |
49988
|
panagiotis
|
|
139 |
49770
|
panagiotis
|
@RequestMapping(value = "/getUrlsOfUserRepos/{user_email}/{page}/{size}/",method = RequestMethod.GET,
|
140 |
49236
|
panagiotis
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
141 |
49378
|
panagiotis
|
@ResponseBody
|
142 |
49763
|
panagiotis
|
List<String> getUrlsOfUserRepos(String user_email,
|
143 |
|
|
String page,
|
144 |
|
|
String size) throws JSONException;
|
145 |
49236
|
panagiotis
|
|
146 |
49450
|
panagiotis
|
@RequestMapping(value = "/getDatasourceVocabularies/{mode}",method = RequestMethod.GET,
|
147 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
148 |
|
|
@ResponseBody
|
149 |
|
|
List<String> getDatasourceVocabularies(String mode);
|
150 |
49431
|
panagiotis
|
|
151 |
49790
|
panagiotis
|
@RequestMapping(value = "/getCompatibilityClasses/{mode}",method = RequestMethod.GET,
|
152 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
153 |
|
|
@ResponseBody
|
154 |
|
|
Map<String, String> getCompatibilityClasses(String mode);
|
155 |
49431
|
panagiotis
|
|
156 |
49790
|
panagiotis
|
@RequestMapping(value = "/getDatasourceClasses/{mode}",method = RequestMethod.GET,
|
157 |
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
158 |
|
|
@ResponseBody
|
159 |
|
|
Map<String, String> getDatasourceClasses(String mode);
|
160 |
49450
|
panagiotis
|
|
161 |
|
|
|
162 |
49898
|
panagiotis
|
String getCountryName(String countryCode);
|
163 |
49236
|
panagiotis
|
}
|