Package com.dtsx.astra.sdk.org
Class RolesClient
java.lang.Object
com.dtsx.astra.sdk.AbstractApiClient
com.dtsx.astra.sdk.org.RolesClient
Group roles operations.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Constants.static final String
Path related to Roles.List of Roles.Fields inherited from class com.dtsx.astra.sdk.AbstractApiClient
environment, token
-
Constructor Summary
ConstructorDescriptionRolesClient
(String token) As immutable object use builder to initiate the object.RolesClient
(String token, ApiLocator.AstraEnvironment env) As immutable object use builder to initiate the object. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(RoleDefinition cr) Create a new role.void
Delete a role from its id.boolean
Check if a role is presentfind
(DefaultRoles role) Retrieve a suer from his email.Retrieve role information from its id.findAll()
List roles in a Organizations.findByName
(String roleName) Retrieve a suer from his email.get
(DefaultRoles role) Access the role if exist or exception.Access the role if exist or exception.Access the role if exist or exception.void
update
(String roleId, RoleDefinition cr) Update an existing role.Methods inherited from class com.dtsx.astra.sdk.AbstractApiClient
assertHttpCodeAccepted, DELETE, GET, getHttpClient, getToken, HEAD, PATCH, POST, POST, PUT
-
Field Details
-
PATH_ORGANIZATIONS
Constants.- See Also:
-
PATH_ROLES
Path related to Roles.- See Also:
-
TYPE_LIST_ROLES
List of Roles.
-
-
Constructor Details
-
RolesClient
As immutable object use builder to initiate the object.- Parameters:
token
- authenticated token
-
RolesClient
As immutable object use builder to initiate the object.- Parameters:
env
- define target environment to be usedtoken
- authenticated token
-
-
Method Details
-
findAll
List roles in a Organizations.- Returns:
- list of roles in target organization.
-
find
Retrieve role information from its id.- Parameters:
roleId
- role identifier- Returns:
- role information
-
get
Access the role if exist or exception.- Parameters:
roleId
- role identifier- Returns:
- role
-
find
Retrieve a suer from his email.- Parameters:
role
- role name- Returns:
- user iif exist
-
get
Access the role if exist or exception.- Parameters:
role
- current role- Returns:
- role
-
findByName
Retrieve a suer from his email.- Parameters:
roleName
- role name- Returns:
- user iif exist
-
getByName
Access the role if exist or exception.- Parameters:
roleName
- role name- Returns:
- role
-
create
Create a new role.- Parameters:
cr
- new role request- Returns:
- new role created
-
exist
Check if a role is present- Parameters:
roleId
- role identifier- Returns:
- if current role with id exist
-
delete
Delete a role from its id.- Parameters:
roleId
- role identifier
-
update
Update an existing role.- Parameters:
roleId
- role identifiercr
- role definition
-