Revision 50862
Added by Panagiotis Kanakakis about 6 years ago
BrokerApi.java | ||
---|---|---|
4 | 4 |
import eu.dnetlib.repo.manager.shared.Term; |
5 | 5 |
import eu.dnetlib.repo.manager.shared.broker.*; |
6 | 6 |
import io.swagger.annotations.Api; |
7 |
import io.swagger.annotations.ApiParam; |
|
8 | 7 |
import org.json.JSONException; |
9 | 8 |
import org.springframework.http.MediaType; |
10 | 9 |
import org.springframework.web.bind.annotation.*; |
... | ... | |
18 | 17 |
@Api(description = "Broker API", tags = {"broker"}) |
19 | 18 |
public interface BrokerApi { |
20 | 19 |
|
21 |
@RequestMapping(value = "/getDatasourcesOfUser" , method = RequestMethod.POST, |
|
22 |
produces = MediaType.APPLICATION_JSON_VALUE) |
|
23 |
@ResponseBody |
|
24 |
DatasourcesBroker getDatasourcesOfUser(String user,String includeShared,String includeByOthers) throws BrokerException, JSONException; |
|
20 |
@RequestMapping(value = "/getDatasourcesOfUser" , method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE) |
|
21 |
DatasourcesBroker getDatasourcesOfUser(@RequestBody String params) throws BrokerException, JSONException; |
|
25 | 22 |
|
26 |
@RequestMapping(value = "/getTopicsForDatasource/{datasourceName}" , method = RequestMethod.GET, |
|
27 |
produces = MediaType.APPLICATION_JSON_VALUE) |
|
28 |
@ResponseBody |
|
23 |
@RequestMapping(value = "/getTopicsForDatasource/{datasourceName}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE) |
|
29 | 24 |
List<BrowseEntry> getTopicsForDatasource(String datasourceName) throws BrokerException; |
30 | 25 |
|
31 |
@RequestMapping(value = "/advancedShowEvents/{page}/{size}" , method = RequestMethod.POST, |
|
32 |
produces = MediaType.APPLICATION_JSON_VALUE) |
|
33 |
@ResponseBody |
|
34 |
EventsPage advancedShowEvents(String page, |
|
35 |
String size, |
|
36 |
AdvQueryObject advQueryObject) throws BrokerException, JSONException ,IOException; |
|
26 |
@RequestMapping(value = "/advancedShowEvents" , method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE) |
|
27 |
EventsPage advancedShowEvents(@RequestBody String params) throws BrokerException, JSONException ,IOException; |
|
37 | 28 |
|
38 |
@RequestMapping(value = "/showEvents/{datasourceName}/{topic}/{page}" , method = RequestMethod.GET, |
|
39 |
produces = MediaType.APPLICATION_JSON_VALUE) |
|
40 |
@ResponseBody |
|
41 |
EventsPage showEvents(String datasourceName, |
|
42 |
String topic, |
|
43 |
String page, |
|
44 |
String size) throws BrokerException, JSONException; |
|
29 |
@RequestMapping(value = "/showEvents" , method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE) |
|
30 |
EventsPage showEvents(@RequestBody String params) throws BrokerException, JSONException; |
|
45 | 31 |
|
46 |
@RequestMapping(value = "/getSimpleSubscriptionsOfUser/{userEmail}" , method = RequestMethod.GET, |
|
47 |
produces = MediaType.APPLICATION_JSON_VALUE) |
|
32 |
@RequestMapping(value = "/getSimpleSubscriptionsOfUser/{userEmail}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE) |
|
48 | 33 |
@ResponseBody |
49 | 34 |
Map<String, List<SimpleSubscriptionDesc>> getSimpleSubscriptionsOfUser(String userEmail) throws BrokerException; |
50 | 35 |
|
51 |
@RequestMapping(value = "/subscribe" , method = RequestMethod.POST,consumes = MediaType.APPLICATION_JSON_VALUE, |
|
52 |
produces = MediaType.APPLICATION_JSON_VALUE) |
|
36 |
@RequestMapping(value = "/subscribe" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE) |
|
53 | 37 |
@ResponseBody |
54 |
Subscription subscribe(OpenaireSubscription obj) throws BrokerException; |
|
38 |
Subscription subscribe(@RequestBody OpenaireSubscription obj) throws BrokerException;
|
|
55 | 39 |
|
56 |
@RequestMapping(value = "/unsubscribe/{subscriptionId}" , method = RequestMethod.POST,consumes = MediaType.APPLICATION_JSON_VALUE, |
|
57 |
produces = MediaType.APPLICATION_JSON_VALUE) |
|
40 |
@RequestMapping(value = "/unsubscribe/{subscriptionId}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE) |
|
58 | 41 |
@ResponseBody |
59 | 42 |
void unsubscribe(String subscriptionId) throws BrokerException; |
60 | 43 |
|
61 | 44 |
@RequestMapping(value = "/getSubscription/{subscriptionId}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE) |
62 | 45 |
@ResponseBody |
63 |
Subscription getSubscription(String subscriptionId) throws BrokerException; |
|
46 |
Subscription getSubscription(@PathVariable("subscriptionId") String subscriptionId) throws BrokerException;
|
|
64 | 47 |
|
65 | 48 |
|
66 | 49 |
@RequestMapping(value = "/getDnetTopics" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE) |
Also available in: Unified diff
Moving branch folders to trunk.