Interface RoleResource
@Path("/role")
public interface RoleResource
Resource for management of roles
-
Method Summary
Modifier and TypeMethodDescriptionCreate new rolejakarta.ws.rs.core.ResponseDelete a roleGet existing roleGet role permissionslist(FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging, PermsParameterBean perms) Get list of roles.
The result can be filtered byidnamedescriptionand sorted byidnamedescriptionUpdate a roleupdatePerm(String id, RolePermissionsModel updatedPerms) Update role permissions
-
Method Details
-
list
@GET RoleListResponse list(@BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms) throws Exception Get list of roles.
The result can be filtered byidnamedescription
idnamedescription
- Parameters:
filter- filter parameterssorting- sorting parameterspaging- paging parametersperms- permissions parameters- Returns:
- list response
- Throws:
Exception
-
create
Create new role- Parameters:
role- role- Returns:
- response containing created role
- Throws:
Exception
-
get
Get existing role- Parameters:
id- role ID- Returns:
- response containing the role
- Throws:
Exception
-
update
@POST @Path("/{id}") RoleResponse update(@PathParam("id") String id, RoleModel role) throws Exception Update a role- Parameters:
id- role IDrole- updated role data- Returns:
- response containing the updated role
- Throws:
Exception
-
delete
@DELETE @Path("/{id}") jakarta.ws.rs.core.Response delete(@PathParam("id") String id) throws Exception Delete a role- Parameters:
id- role ID- Returns:
- empty response
- Throws:
Exception
-
getPerm
Get role permissions- Parameters:
id- role ID- Returns:
- role permissions
- Throws:
Exception
-
updatePerm
@POST @Path("/{id}/perm") RolePermResponse updatePerm(@PathParam("id") String id, RolePermissionsModel updatedPerms) throws Exception Update role permissions- Parameters:
id- role IDupdatedPerms- permissions- Returns:
- updated permissions
- Throws:
Exception
-