public class RoleContainerResource extends RoleResource
Modifier and Type | Field and Description |
---|---|
protected RoleContainerModel |
roleContainer |
Constructor and Description |
---|
RoleContainerResource(javax.ws.rs.core.UriInfo uriInfo,
RealmModel realm,
RealmAuth auth,
RoleContainerModel roleContainer,
AdminEventBuilder adminEvent) |
Modifier and Type | Method and Description |
---|---|
void |
addComposites(String roleName,
List<RoleRepresentation> roles)
Add a composite to the role
|
javax.ws.rs.core.Response |
createRole(RoleRepresentation rep)
Create a new role for the realm or client
|
void |
deleteComposites(String roleName,
List<RoleRepresentation> roles)
Remove roles from the role's composite
|
void |
deleteRole(String roleName)
Delete a role by name
|
Set<RoleRepresentation> |
getClientRoleComposites(javax.ws.rs.core.UriInfo uriInfo,
String roleName,
String client)
An app-level roles for the specified app for the role's composite
|
Set<RoleRepresentation> |
getRealmRoleComposites(String roleName)
Get realm-level roles of the role's composite
|
RoleRepresentation |
getRole(String roleName)
Get a role by name
|
Set<RoleRepresentation> |
getRoleComposites(String roleName)
Get composites of the role
|
List<RoleRepresentation> |
getRoles()
Get all roles for the realm or client
|
javax.ws.rs.core.Response |
updateRole(String roleName,
RoleRepresentation rep)
Update a role by name
|
addComposites, deleteComposites, deleteRole, getClientRoleComposites, getRealmRoleComposites, getRole, getRoleComposites, updateRole
protected RoleContainerModel roleContainer
public RoleContainerResource(javax.ws.rs.core.UriInfo uriInfo, RealmModel realm, RealmAuth auth, RoleContainerModel roleContainer, AdminEventBuilder adminEvent)
@GET @Produces(value="application/json") public List<RoleRepresentation> getRoles()
@POST @Consumes(value="application/json") public javax.ws.rs.core.Response createRole(RoleRepresentation rep)
rep
- @Path(value="{role-name}") @GET @Produces(value="application/json") public RoleRepresentation getRole(@PathParam(value="role-name") String roleName)
roleName
- role's name (not id!)@Path(value="{role-name}") @DELETE public void deleteRole(@PathParam(value="role-name") String roleName)
roleName
- role's name (not id!)@Path(value="{role-name}") @PUT @Consumes(value="application/json") public javax.ws.rs.core.Response updateRole(@PathParam(value="role-name") String roleName, RoleRepresentation rep)
roleName
- role's name (not id!)rep
- @Path(value="{role-name}/composites") @POST @Consumes(value="application/json") public void addComposites(@PathParam(value="role-name") String roleName, List<RoleRepresentation> roles)
roleName
- role's name (not id!)roles
- @Path(value="{role-name}/composites") @GET @Produces(value="application/json") public Set<RoleRepresentation> getRoleComposites(@PathParam(value="role-name") String roleName)
roleName
- role's name (not id!)@Path(value="{role-name}/composites/realm") @GET @Produces(value="application/json") public Set<RoleRepresentation> getRealmRoleComposites(@PathParam(value="role-name") String roleName)
roleName
- role's name (not id!)@Path(value="{role-name}/composites/clients/{client}") @GET @Produces(value="application/json") public Set<RoleRepresentation> getClientRoleComposites(@Context javax.ws.rs.core.UriInfo uriInfo, @PathParam(value="role-name") String roleName, @PathParam(value="client") String client)
roleName
- role's name (not id!)client
- @Path(value="{role-name}/composites") @DELETE @Consumes(value="application/json") public void deleteComposites(@PathParam(value="role-name") String roleName, List<RoleRepresentation> roles)
roleName
- role's name (not id!)roles
- roles to removeCopyright © 2016 JBoss by Red Hat. All rights reserved.