Package org.bonitasoft.web.client
Interface BonitaClient
- All Superinterfaces:
ApiProvider
A Bonita client that communicate via http request with a Bonita running instance.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturn the application APIbdm()Return the BDM APIstatic <T extends BonitaClientBuilder<T>>
BonitaClientBuilder<T>Create a client builder for the given bonita URLgetUrl()The Bonita target url (ie. http://localhost:8080/bonita/)The targeted Bonita versionbooleanReturn true if platform is upPerform client authentication.voidlogout()Logout the current uservoidLogout the current user (with no exceptions)Return the process APIvoidsetBearerToken(String token) Set Bearer authorization header token Can be used to pass an Oauth2 access token when Bonita is configured for SSO with OpenID Connectsystem()Return the system serviceusers()Return the user APIMethods inherited from interface org.bonitasoft.web.client.feign.ApiProvider
get
-
Field Details
-
USER_PROFILE_NAME
- See Also:
-
ADMIN_PROFILE_NAME
- See Also:
-
-
Method Details
-
builder
Create a client builder for the given bonita URL- Parameters:
url- the bonita instance url- Returns:
- a builder instance
-
login
Perform client authentication. Authentication will be stored internally to be used for the future requests- Parameters:
username- Account usernamepassword- Account password- Returns:
- A session with the authenticated user info
- Throws:
UnauthorizedException- if authentication failed
-
setBearerToken
Set Bearer authorization header token Can be used to pass an Oauth2 access token when Bonita is configured for SSO with OpenID Connect- Parameters:
token- the bearer token (Oauth2 access token)
-
logout
void logout()Logout the current user -
logoutSilent
void logoutSilent()Logout the current user (with no exceptions) -
isPlatformUpAndRunning
boolean isPlatformUpAndRunning()Return true if platform is up- Returns:
-
getUrl
String getUrl()The Bonita target url (ie. http://localhost:8080/bonita/)- Returns:
-
getVersion
String getVersion()The targeted Bonita version- Returns:
-
applications
ApplicationService applications()Return the application API- Returns:
-
bdm
BdmService bdm()Return the BDM API- Returns:
-
users
UserService users()Return the user API- Returns:
-
processes
ProcessService processes()Return the process API- Returns:
-
system
SystemService system()Return the system service- Returns:
-