Package org.radarbase.management.client
Class MPClient
-
- All Implemented Interfaces:
public final class MPClient
Client for the ManagementPortal REST API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
MPClient.Config
-
Field Summary
Fields Modifier and Type Field Description private Flow<OAuth2AccessToken>
token
private final HttpClient
httpClient
-
Constructor Summary
Constructors Constructor Description MPClient(MPClient.Config config)
-
Method Summary
Modifier and Type Method Description final Flow<OAuth2AccessToken>
getToken()
final Unit
setToken(Flow<OAuth2AccessToken> token)
final HttpClient
getHttpClient()
final List<MPOrganization>
requestOrganizations(Integer page, Integer size)
Request list of organizations from ManagementPortal final List<MPProject>
requestProjects(Integer page, Integer size)
Request list of projects from ManagementPortal. final List<MPSubject>
requestSubjects(String projectId, Integer page, Integer size)
Request list of subjects from ManagementPortal project. final List<MPOAuthClient>
requestClients(Integer page, Integer size)
Request list of OAuth 2.0 clients from ManagementPortal. final <T extends Any> T
request(Function1<HttpRequestBuilder, Unit> block)
final String
requestText(Function1<HttpRequestBuilder, Unit> block)
final MPClient
config(Function1<MPClient.Config, Unit> config)
-
-
Constructor Detail
-
MPClient
MPClient(MPClient.Config config)
-
-
Method Detail
-
getToken
final Flow<OAuth2AccessToken> getToken()
-
getHttpClient
final HttpClient getHttpClient()
-
requestOrganizations
final List<MPOrganization> requestOrganizations(Integer page, Integer size)
Request list of organizations from ManagementPortal
-
requestProjects
final List<MPProject> requestProjects(Integer page, Integer size)
Request list of projects from ManagementPortal.
-
requestSubjects
final List<MPSubject> requestSubjects(String projectId, Integer page, Integer size)
Request list of subjects from ManagementPortal project. The projectId is the name that the project is identified by.
-
requestClients
final List<MPOAuthClient> requestClients(Integer page, Integer size)
Request list of OAuth 2.0 clients from ManagementPortal.
-
requestText
final String requestText(Function1<HttpRequestBuilder, Unit> block)
-
config
final MPClient config(Function1<MPClient.Config, Unit> config)
-
-
-
-