Package org.bonitasoft.web.client
Interface BonitaClient
-
- All Superinterfaces:
ApiProvider
public interface BonitaClient extends ApiProvider
A Bonita client that communicate via http request with a Bonita running instance.
-
-
Field Summary
Fields Modifier and Type Field Description static StringADMIN_PROFILE_NAMEstatic StringDEFAULT_TENANT_IDstatic StringUSER_PROFILE_NAME
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description ApplicationServiceapplications()Return the application APIBdmServicebdm()Return the BDM APIstatic <T extends BonitaClientBuilder<T>>
BonitaClientBuilder<T>builder(String url)Create a client builder for the given bonita URLStringgetUrl()The Bonita target url (ie.StringgetVersion()The targeted Bonita versionbooleanisPlatformUpAndRunning()Return true if platform is upSessionlogin(String username, String password)Perform client authentication.Sessionlogin(String username, String password, String tenant)Perform client authentication.voidlogout()Logout the current uservoidlogoutSilent()Logout the current user (with no exceptions)ProcessServiceprocesses()Return the process APISystemServicesystem()Return the system tenant APIUserServiceusers()Return the user API-
Methods inherited from interface org.bonitasoft.web.client.feign.ApiProvider
get
-
-
-
-
Field Detail
-
DEFAULT_TENANT_ID
static final String DEFAULT_TENANT_ID
- See Also:
- Constant Field Values
-
USER_PROFILE_NAME
static final String USER_PROFILE_NAME
- See Also:
- Constant Field Values
-
ADMIN_PROFILE_NAME
static final String ADMIN_PROFILE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
builder
static <T extends BonitaClientBuilder<T>> BonitaClientBuilder<T> builder(String url)
Create a client builder for the given bonita URL- Parameters:
url- the bonita instance url- Returns:
- a builder instance
-
login
Session login(String username, String password)
Perform client authentication. Authentication will be stored internally to be used for the future requests
Account tenant default to 1- Parameters:
username- Account usernamepassword- Account password- Returns:
- A session with the authenticated user info
- Throws:
UnauthorizedException- if authentication failed
-
login
Session login(String username, String password, String tenant)
Perform client authentication. Authentication will be stored internally to be used for the future requests- Parameters:
username- Account usernamepassword- Account passwordtenant- Account tenant- Returns:
- A session with the authenticated user info
- Throws:
UnauthorizedException- if authentication failed
-
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 tenant API- Returns:
-
-