Interface RoleResource
@Path("/role")
public interface RoleResource
Resource for management of roles
-
Method Summary
Modifier and TypeMethodDescriptionCreate new rolejavax.ws.rs.core.Response
Delete a roleGet existing roleGet role permissionslist
(FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging, PermsParameterBean perms) Get list of roles.
The result can be filtered byid
name
description
and sorted byid
name
description
Update 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 byid
name
description
id
name
description
- 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}") javax.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
-