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
FieldsModifier and TypeFieldDescriptionstatic final StringConstants.static final StringPath related to Roles.List of Roles.Fields inherited from class com.dtsx.astra.sdk.AbstractApiClient
environment, observers, token -
Constructor Summary
ConstructorsConstructorDescriptionRolesClient(String token) As immutable object use builder to initiate the object.RolesClient(String token, AstraEnvironment env) As immutable object use builder to initiate the object. -
Method Summary
Modifier and TypeMethodDescriptioncreate(RoleDefinition cr) Create a new role.voidDelete a role from its id.booleanCheck 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.Provide a service Name.voidupdate(String roleId, RoleDefinition cr) Update an existing role.Methods inherited from class com.dtsx.astra.sdk.AbstractApiClient
assertHttpCodeAccepted, DELETE, GET, getHttpClient, getOperationName, 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:
token- authenticated tokenenv- define target environment to be used
-
-
Method Details
-
getServiceName
Provide a service Name.- Specified by:
getServiceNamein classAbstractApiClient- Returns:
- service name
-
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
-