Project

General

Profile

1
package eu.dnetlib.repo.manager.service;
2

    
3
import eu.dnetlib.repo.manager.shared.BrokerException;
4
import eu.dnetlib.repo.manager.shared.Term;
5
import eu.dnetlib.repo.manager.shared.broker.*;
6
import io.swagger.annotations.Api;
7
import org.json.JSONException;
8
import org.springframework.http.MediaType;
9
import org.springframework.http.ResponseEntity;
10
import org.springframework.web.bind.annotation.RequestMapping;
11
import org.springframework.web.bind.annotation.RequestMethod;
12
import org.springframework.web.bind.annotation.ResponseBody;
13
import org.springframework.web.bind.annotation.RestController;
14

    
15
import java.io.IOException;
16
import java.util.List;
17
import java.util.Map;
18

    
19

    
20
public interface BrokerApi {
21

    
22
    DatasourcesBroker getDatasourcesOfUser(String user, String includeShared, String includeByOthers) throws BrokerException, JSONException;
23

    
24
    List<BrowseEntry> getTopicsForDatasource(String datasourceName) throws BrokerException;
25

    
26
    EventsPage advancedShowEvents(String page,
27
                                  String size,
28
                                  AdvQueryObject advQueryObject) throws BrokerException, JSONException ,IOException;
29

    
30
    EventsPage showEvents(String datasourceName,
31
                          String topic,
32
                          String page,
33
                          String size) throws BrokerException, JSONException;
34

    
35
    Map<String, List<SimpleSubscriptionDesc>> getSimpleSubscriptionsOfUser(String userEmail) throws BrokerException;
36

    
37
    Subscription subscribe(OpenaireSubscription obj) throws BrokerException;
38

    
39
    ResponseEntity<Object> unsubscribe(String subscriptionId) throws BrokerException;
40

    
41
    Subscription getSubscription(String subscriptionId) throws BrokerException;
42

    
43
    Map<String, Term> getDnetTopics() throws BrokerException;
44

    
45
    EventsPage getNotificationsBySubscriptionId(String subscriptionId, String page, String size) throws BrokerException;
46

    
47
    Map<String, List<Subscription>> getSubscriptionsOfUser(String userEmail) throws BrokerException;
48
}
(1-1/19)