Interface RoleApi
-
public interface RoleApi
Contains all api operations for handling roles.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Role
addRole(AddRoleRequest addRoleRequest)
Adds a new role.Role
changeRole(ChangeRoleRequest changeRoleRequest)
Changes the role with the information that is present in the request.boolean
exists(UUID roleId)
Returns true if a role with given ID exists.PagedResponse<Role>
findRoles(FindRolesRequest request)
Returns the roles matching the given criteriaRole
getRole(UUID roleId)
Get the role with the given id.void
removeRole(UUID roleId)
Removes a role identified by given ID.
-
-
-
Method Detail
-
addRole
Role addRole(AddRoleRequest addRoleRequest)
Adds a new role.- Parameters:
addRoleRequest
- the properties of the role to be added- Returns:
- the newly added role
-
changeRole
Role changeRole(ChangeRoleRequest changeRoleRequest)
Changes the role with the information that is present in the request.- Parameters:
changeRoleRequest
- changes that to be performed on the role- Returns:
- the changed role
-
getRole
Role getRole(UUID roleId)
Get the role with the given id.- Parameters:
roleId
- the id of the role- Returns:
- the found role
-
exists
boolean exists(UUID roleId)
Returns true if a role with given ID exists.- Parameters:
roleId
- the ID of the role- Returns:
- true if a role with given ID exists,
false
otherwise
-
removeRole
void removeRole(UUID roleId)
Removes a role identified by given ID.- Parameters:
roleId
- theid
of the role to remove
-
findRoles
@SecurityAuditMethod(resultFormatter=PagedResponseFormatter.class) PagedResponse<Role> findRoles(FindRolesRequest request)
Returns the roles matching the given criteria- Parameters:
request
- the search criteria- Returns:
- a paged response of roles
-
-