Revision 49362
Added by Panagiotis Kanakakis over 6 years ago
BrokerApiImpl.java | ||
---|---|---|
1 |
package eu.dnetlib.repo.manager.service.rest;
|
|
1 |
package eu.dnetlib.repo.manager.service.controllers;
|
|
2 | 2 |
|
3 | 3 |
|
4 | 4 |
import com.fasterxml.jackson.databind.ObjectMapper; |
... | ... | |
10 | 10 |
import eu.dnetlib.repo.manager.service.shared.broker.BrowseEntry; |
11 | 11 |
import eu.dnetlib.repo.manager.service.shared.broker.DatasourcesBroker; |
12 | 12 |
import eu.dnetlib.repo.manager.service.shared.broker.EventsPage; |
13 |
import org.json.JSONException; |
|
13 | 14 |
import org.json.JSONObject; |
14 | 15 |
import org.springframework.beans.factory.annotation.Autowired; |
15 | 16 |
import org.springframework.beans.factory.annotation.Value; |
... | ... | |
38 | 39 |
private String openairePath; |
39 | 40 |
|
40 | 41 |
@Override |
41 |
public DatasourcesBroker getDatasourcesOfUser(String params) { |
|
42 |
public DatasourcesBroker getDatasourcesOfUser(String params) throws JSONException {
|
|
42 | 43 |
JSONObject json_params = new JSONObject(params); |
43 | 44 |
DatasourcesBroker ret = new DatasourcesBroker(); |
44 | 45 |
|
... | ... | |
89 | 90 |
} |
90 | 91 |
|
91 | 92 |
@Override |
92 |
public EventsPage advancedShowEvents(String params) throws BrokerException { |
|
93 |
public EventsPage advancedShowEvents(String params) throws BrokerException, JSONException {
|
|
93 | 94 |
JSONObject json_params = new JSONObject(params); |
94 | 95 |
|
95 | 96 |
long page = json_params.getLong("page"); |
... | ... | |
162 | 163 |
|
163 | 164 |
|
164 | 165 |
|
165 |
private List<Repository> getRepositoriesOfUser(String userEmail){ |
|
166 |
private List<Repository> getRepositoriesOfUser(String userEmail) throws JSONException {
|
|
166 | 167 |
|
167 | 168 |
int page = 1; |
168 | 169 |
int size = 10; |
Also available in: Unified diff
Configuration