Project

General

Profile

« Previous | Next » 

Revision 57155

Implementing summaries for collection, usage and broker

View differences:

RepositoryServiceImpl.java
290 290

  
291 291

  
292 292
    @Override
293
    public List<AggregationDetails> getRepositoryAggregations(String id) throws JSONException {
293
    public List<AggregationDetails> getRepositoryAggregations(String id, int size) throws JSONException {
294 294

  
295 295
        LOGGER.debug("Retreiving aggregations for repository with id : " + id );
296 296
        UriComponents uriComponents = searchDatasource("0","100");
......
308 308
            aggregationHistory.addAll(Converter.getAggregationHistoryFromJson(repository.getJSONArray("datasourceInfo").getJSONObject(0)));
309 309
            return aggregationHistory.size() == 0? aggregationHistory : aggregationHistory.stream()
310 310
                                                    .sorted(Comparator.comparing(AggregationDetails::getDate).reversed())
311
                                                    .limit(20)
311
                                                    .limit(size)
312 312
                                                    .collect(Collectors.toList());
313 313
        } catch (JSONException e) {
314 314
            LOGGER.debug("Exception on getRepositoryAggregations" , e);

Also available in: Unified diff