1
|
package eu.dnetlib.repo.manager.service.controllers;
|
2
|
|
3
|
import eu.dnetlib.repo.manager.service.shared.BrokerException;
|
4
|
import eu.dnetlib.repo.manager.service.shared.broker.BrowseEntry;
|
5
|
import eu.dnetlib.repo.manager.service.shared.broker.DatasourcesBroker;
|
6
|
import eu.dnetlib.repo.manager.service.shared.broker.EventsPage;
|
7
|
import org.json.JSONException;
|
8
|
import org.springframework.http.MediaType;
|
9
|
import org.springframework.web.bind.annotation.RequestBody;
|
10
|
import org.springframework.web.bind.annotation.RequestMapping;
|
11
|
import org.springframework.web.bind.annotation.RequestMethod;
|
12
|
import org.springframework.web.bind.annotation.RestController;
|
13
|
|
14
|
import java.util.List;
|
15
|
|
16
|
@RestController
|
17
|
@RequestMapping(value = "/broker")
|
18
|
public interface BrokerApi {
|
19
|
|
20
|
@RequestMapping(value = "/getDatasourcesOfUser" , method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
|
21
|
DatasourcesBroker getDatasourcesOfUser(@RequestBody String params) throws BrokerException, JSONException;
|
22
|
|
23
|
@RequestMapping(value = "/getTopicsForDatasource/{datasourceName}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
24
|
List<BrowseEntry> getTopicsForDatasource(String datasourceName) throws BrokerException;
|
25
|
|
26
|
@RequestMapping(value = "/advancedShowEvents" , method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
|
27
|
EventsPage advancedShowEvents(@RequestBody String params) throws BrokerException, JSONException;
|
28
|
}
|