ListPlugins: Add support for pagination with start/limit options
Feature: Issue 6499 Change-Id: I8b6e080abbe3bd7401d505f89e71271365629c6a
This commit is contained in:
@@ -33,6 +33,8 @@ public interface Plugins {
|
||||
|
||||
abstract class ListRequest {
|
||||
private boolean all;
|
||||
private int limit;
|
||||
private int start;
|
||||
|
||||
public List<PluginInfo> get() throws RestApiException {
|
||||
Map<String, PluginInfo> map = getAsMap();
|
||||
@@ -53,6 +55,24 @@ public interface Plugins {
|
||||
public boolean getAll() {
|
||||
return all;
|
||||
}
|
||||
|
||||
public ListRequest limit(int limit) {
|
||||
this.limit = limit;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public ListRequest start(int start) {
|
||||
this.start = start;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getStart() {
|
||||
return start;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user