Interface RoleResource
-
@Path("/role") public interface RoleResource
Resource for management of roles
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RoleResponse
create(RoleModel role)
Create new rolejavax.ws.rs.core.Response
delete(String id)
Delete a roleRoleResponse
get(String id)
Get existing roleRolePermResponse
getPerm(String id)
Get role permissionsRoleListResponse
list(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
RoleResponse
update(String id, RoleModel role)
Update a roleRolePermResponse
updatePerm(String id, RolePermissionsModel updatedPerms)
Update role permissions
-
-
-
Method Detail
-
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
@PUT RoleResponse create(RoleModel role) throws Exception
Create new role- Parameters:
role
- role- Returns:
- response containing created role
- Throws:
Exception
-
get
@GET @Path("/{id}") RoleResponse get(@PathParam("id") String id) throws Exception
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 @Path("/{id}/perm") RolePermResponse getPerm(@PathParam("id") String id) throws Exception
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
-
-