Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,26 @@ public HttpResponse<byte[]> applicationPackage(ApplicationId id, boolean latestD

/** Returns the tenants in this system. */
public Set<TenantName> tenants() {
return toTenants(send(request(HttpRequest.newBuilder(tenantsPath())
.timeout(Duration.ofSeconds(20)),
GET)));
return tenants(false);
}

/** Returns the tenants in this system that has applications. */
public Set<TenantName> tenantsWithApplications() {
return tenants(true);
}

/**
* Returns the tenants in this system.
*
* @param tenantsWithApplications if true, only return tenants with applications
*
*/
public Set<TenantName> tenants(boolean tenantsWithApplications) {
return toTenants(send(request(HttpRequest.newBuilder(withQuery(tenantsPath(),
"withApplications",
String.valueOf(tenantsWithApplications)))
.timeout(Duration.ofSeconds(20)),
GET)));
}

/** Returns the applications for the given tenant. */
Expand Down