@Path(value="/roles") @Consumes(value="application/json") @Produces(value="application/json") public class RolesResource extends RestResource
objectMapper, userService| Constructor and Description |
|---|
RolesResource(RoleService roleService) |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
addMember(String rolename,
String username,
String body) |
javax.ws.rs.core.Response |
create(RoleResponse roleResponse) |
void |
delete(String name) |
RoleMembershipResponse |
getMembers(String name) |
RolesResponse |
listAll() |
RoleResponse |
read(String name) |
javax.ws.rs.core.Response |
removeMember(String rolename,
String username) |
RoleResponse |
update(String name,
RoleResponse role) |
checkAnyPermission, checkPermission, checkPermission, getCurrentUser, getSubject, getUriBuilderToSelf, isAnyPermitted, isAnyPermitted, isPermitted, isPermitted, setPrettyPrint@Inject public RolesResource(RoleService roleService)
@GET public RolesResponse listAll() throws NotFoundException
NotFoundException@GET
@Path(value="{rolename}")
public RoleResponse read(@PathParam(value="rolename")
String name)
throws NotFoundException
NotFoundException@POST
public javax.ws.rs.core.Response create(@NotNull
RoleResponse roleResponse)
@PUT
@Path(value="{rolename}")
public RoleResponse update(@PathParam(value="rolename")
String name,
RoleResponse role)
throws NotFoundException
NotFoundException@DELETE
@Path(value="{rolename}")
public void delete(@PathParam(value="rolename")
String name)
throws NotFoundException
NotFoundException@GET
@Path(value="{rolename}/members")
public RoleMembershipResponse getMembers(@PathParam(value="rolename")
String name)
throws NotFoundException
NotFoundException@PUT
@Path(value="{rolename}/members/{username}")
public javax.ws.rs.core.Response addMember(@PathParam(value="rolename")
String rolename,
@PathParam(value="username")
String username,
String body)
throws NotFoundException
NotFoundException@DELETE
@Path(value="{rolename}/members/{username}")
public javax.ws.rs.core.Response removeMember(@PathParam(value="rolename")
String rolename,
@PathParam(value="username")
String username)
throws NotFoundException
NotFoundExceptionCopyright © 2012-2016 Graylog, Inc.. All Rights Reserved.