Projects#ListRequest: Allow to set "all" option

This will allow API callers to include hidden projects in the list
results.

This also adds test coverage of the corresponding option on the REST
endpoint.

Change-Id: I9301fd55000a757781b2a6aa8c9cacd3bb6207bc
This commit is contained in:
David Pursehouse
2017-11-15 20:14:16 +09:00
parent 87af2f259f
commit 59514e4cc8
3 changed files with 17 additions and 0 deletions

View File

@@ -92,6 +92,7 @@ public interface Projects {
private int limit;
private int start;
private boolean showTree;
private boolean all;
private FilterType type = FilterType.ALL;
public List<ProjectInfo> get() throws RestApiException {
@@ -152,6 +153,11 @@ public interface Projects {
return this;
}
public ListRequest withAll() {
this.all = true;
return this;
}
public boolean getDescription() {
return description;
}
@@ -187,6 +193,10 @@ public interface Projects {
public FilterType getFilterType() {
return type;
}
public boolean isAll() {
return all;
}
}
/**