Project

General

Profile

« Previous | Next » 

Revision 49868

1. Broker api ready.
2. Piwi api ready.
3. Create repomanager.datasource bean.

View differences:

BrokerApi.java
1 1
package eu.dnetlib.repo.manager.service.controllers;
2 2

  
3 3
import eu.dnetlib.repo.manager.shared.BrokerException;
4
import eu.dnetlib.repo.manager.shared.broker.BrowseEntry;
5
import eu.dnetlib.repo.manager.shared.broker.DatasourcesBroker;
6
import eu.dnetlib.repo.manager.shared.broker.EventsPage;
4
import eu.dnetlib.repo.manager.shared.broker.*;
7 5
import org.json.JSONException;
8 6
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;
7
import org.springframework.web.bind.annotation.*;
13 8

  
9
import java.io.IOException;
14 10
import java.util.List;
11
import java.util.Map;
15 12

  
16 13
@RestController
17 14
@RequestMapping(value = "/broker")
......
24 21
    List<BrowseEntry> getTopicsForDatasource(String datasourceName) throws BrokerException;
25 22

  
26 23
    @RequestMapping(value = "/advancedShowEvents" , method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
27
    EventsPage advancedShowEvents(@RequestBody String params) throws BrokerException, JSONException;
24
    EventsPage advancedShowEvents(@RequestBody String params) throws BrokerException, JSONException ,IOException;
28 25

  
29 26
    @RequestMapping(value = "/showEvents" , method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
30
    EventsPage showEvents(String params) throws BrokerException, JSONException;
27
    EventsPage showEvents(@RequestBody String params) throws BrokerException, JSONException;
28

  
29
    @RequestMapping(value = "/getSubscriptionsOfUser/{userEmail}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
30
    @ResponseBody
31
    Map<String, List<SimpleSubscriptionDesc>> getSubscriptionsOfUser(String userEmail) throws BrokerException;
32

  
33
    @RequestMapping(value = "/subscribe" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
34
    @ResponseBody
35
    Subscription subscribe(@RequestBody OpenaireSubscription obj) throws BrokerException;
36

  
37
    @RequestMapping(value = "/unsubscribe/{subscriptionId}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
38
    @ResponseBody
39
    void unsubscribe(String subscriptionId) throws BrokerException;
40

  
41
    @RequestMapping(value = "/getSubscription/{subscriptionId}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
42
    @ResponseBody
43
    Subscription getSubscription(@PathVariable("subscriptionId") String subscriptionId) throws BrokerException;
31 44
}

Also available in: Unified diff