ListPlugins: Add support for filtering with prefix/substring/regex

Feature: Issue 6499
Change-Id: I7e54595dad56fc6a5e34bea55adee341077ad1fa
This commit is contained in:
David Pursehouse
2017-07-27 22:14:38 +01:00
parent 7f577a908c
commit 68d975b496
5 changed files with 212 additions and 5 deletions

View File

@@ -35,6 +35,9 @@ public interface Plugins {
private boolean all;
private int limit;
private int start;
private String substring;
private String prefix;
private String regex;
public List<PluginInfo> get() throws RestApiException {
Map<String, PluginInfo> map = getAsMap();
@@ -73,6 +76,33 @@ public interface Plugins {
public int getStart() {
return start;
}
public ListRequest substring(String substring) {
this.substring = substring;
return this;
}
public String getSubstring() {
return substring;
}
public ListRequest prefix(String prefix) {
this.prefix = prefix;
return this;
}
public String getPrefix() {
return prefix;
}
public ListRequest regex(String regex) {
this.regex = regex;
return this;
}
public String getRegex() {
return regex;
}
}
/**