Revision 49770
Added by Panagiotis Kanakakis over 6 years ago
RepositoryApiImpl.java | ||
---|---|---|
44 | 44 |
|
45 | 45 |
@PostConstruct |
46 | 46 |
private void init(){ |
47 |
LOGGER.debug("Initialization method of repository api!"); |
|
48 |
|
|
47 | 49 |
restTemplate = new RestTemplate(); |
48 | 50 |
restTemplate.getMessageConverters().add(new MappingJackson2HttpMessageConverter()); |
49 | 51 |
|
... | ... | |
161 | 163 |
@PathVariable("page") String page, |
162 | 164 |
@PathVariable("size") String size) throws JSONException { |
163 | 165 |
|
166 |
LOGGER.debug("Retreiving repositories of user : " + userEmail + " with params: " + baseAddress + "-" + page + "/" + size); |
|
164 | 167 |
UriComponents uriComponents = UriComponentsBuilder |
165 | 168 |
.fromHttpUrl(baseAddress + "/ds/search/email/") |
166 | 169 |
.path("/{page}/{size}/") |
167 | 170 |
.queryParam("contactemail",userEmail) |
168 | 171 |
.build().expand(page,size).encode(); |
169 |
|
|
172 |
|
|
173 |
LOGGER.debug("URI -> " + uriComponents.toUri()); |
|
170 | 174 |
String rs = restTemplate.getForObject(uriComponents.toUri(), String.class); |
175 |
LOGGER.debug("Repositories are : " + rs); |
|
171 | 176 |
return Converter.jsonToRepositoryList(new JSONArray(rs)); |
172 | 177 |
} |
173 | 178 |
|
... | ... | |
248 | 253 |
|
249 | 254 |
@Override |
250 | 255 |
public List<String> getDnetCountries() { |
256 |
LOGGER.debug("Getting dnet-countries!"); |
|
251 | 257 |
return Converter.readFile("countries.txt"); |
252 | 258 |
} |
253 | 259 |
|
Also available in: Unified diff
1. Logger messages.
2. Change configuration for application properties file