public class RoleByIdResource extends RoleResource
| Modifier and Type | Field and Description |
|---|---|
protected static org.jboss.logging.Logger |
logger |
| Constructor and Description |
|---|
RoleByIdResource(RealmModel realm,
RealmAuth auth) |
| Modifier and Type | Method and Description |
|---|---|
void |
addComposites(String id,
List<RoleRepresentation> roles)
Make this role a composite role by associating some child roles to it.
|
void |
deleteComposites(String id,
List<RoleRepresentation> roles)
Remove the listed set of roles from this role's composite
|
void |
deleteRole(String id)
Delete this role
|
Set<RoleRepresentation> |
getApplicationRoleComposites(String id,
String appName)
Return a set of application-level roles for a specific app that are in the role's composite
|
Set<RoleRepresentation> |
getRealmRoleComposites(String id)
Return a set of realm-level roles that are in the role's composite
|
RoleRepresentation |
getRole(String id)
Get a specific role's representation
|
Set<RoleRepresentation> |
getRoleComposites(String id)
If this role is a composite, return a set of its children
|
protected RoleModel |
getRoleModel(String id) |
void |
updateRole(String id,
RoleRepresentation rep)
Update this role
|
addComposites, deleteComposites, deleteRole, getApplicationRoleComposites, getRealmRoleComposites, getRole, getRoleComposites, updateRolepublic RoleByIdResource(RealmModel realm, RealmAuth auth)
@Path(value="{role-id}")
@GET
@Produces(value="application/json")
public RoleRepresentation getRole(@PathParam(value="role-id")
String id)
id - id of role@Path(value="{role-id}")
@DELETE
public void deleteRole(@PathParam(value="role-id")
String id)
id - id of role@Path(value="{role-id}")
@PUT
@Consumes(value="application/json")
public void updateRole(@PathParam(value="role-id")
String id,
RoleRepresentation rep)
id - id of rolerep - @Path(value="{role-id}/composites")
@POST
@Consumes(value="application/json")
public void addComposites(@PathParam(value="role-id")
String id,
List<RoleRepresentation> roles)
id - roles - @Path(value="{role-id}/composites")
@GET
@Produces(value="application/json")
public Set<RoleRepresentation> getRoleComposites(@PathParam(value="role-id")
String id)
id - @Path(value="{role-id}/composites/realm")
@GET
@Produces(value="application/json")
public Set<RoleRepresentation> getRealmRoleComposites(@PathParam(value="role-id")
String id)
id - @Path(value="{role-id}/composites/applications/{app}")
@GET
@Produces(value="application/json")
public Set<RoleRepresentation> getApplicationRoleComposites(@PathParam(value="role-id")
String id,
@PathParam(value="app")
String appName)
id - appName - @Path(value="{role-id}/composites")
@DELETE
@Consumes(value="application/json")
public void deleteComposites(@PathParam(value="role-id")
String id,
List<RoleRepresentation> roles)
id - roles - Copyright © 2014. All Rights Reserved.