public class RoleContainerResource extends RoleResource
Modifier and Type | Field and Description |
---|---|
protected RoleContainerModel |
roleContainer |
Constructor and Description |
---|
RoleContainerResource(RealmModel realm,
RealmAuth auth,
RoleContainerModel roleContainer) |
Modifier and Type | Method and Description |
---|---|
void |
addComposites(String roleName,
List<RoleRepresentation> roles)
Add a composite to this role
|
javax.ws.rs.core.Response |
createRole(javax.ws.rs.core.UriInfo uriInfo,
RoleRepresentation rep)
Create a new role for this realm or application
|
void |
deleteComposites(String roleName,
List<RoleRepresentation> roles)
Remove roles from this role's composite
|
void |
deleteRole(String roleName)
Delete a role by name
|
Set<RoleRepresentation> |
getApplicationByIdRoleComposites(String roleName,
String appId)
An app-level roles for a specific app for this role's composite
|
Set<RoleRepresentation> |
getApplicationRoleComposites(String roleName,
String appName)
An app-level roles for a specific app for this role's composite
|
Set<RoleRepresentation> |
getRealmRoleComposites(String roleName)
Get realm-level roles of this role's composite
|
RoleRepresentation |
getRole(String roleName)
Get a role by name
|
Set<RoleRepresentation> |
getRoleComposites(String roleName)
List composites of this role
|
List<RoleRepresentation> |
getRoles()
List all roles for this realm or application
|
javax.ws.rs.core.Response |
updateRole(String roleName,
RoleRepresentation rep)
Update a role by name
|
addComposites, deleteComposites, deleteRole, getApplicationRoleComposites, getRealmRoleComposites, getRole, getRoleComposites, updateRole
protected RoleContainerModel roleContainer
public RoleContainerResource(RealmModel realm, RealmAuth auth, RoleContainerModel roleContainer)
@GET @Produces(value="application/json") public List<RoleRepresentation> getRoles()
@POST @Consumes(value="application/json") public javax.ws.rs.core.Response createRole(@Context javax.ws.rs.core.UriInfo uriInfo, RoleRepresentation rep)
uriInfo
- 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/application/{app}") @GET @Produces(value="application/json") public Set<RoleRepresentation> getApplicationRoleComposites(@PathParam(value="role-name") String roleName, @PathParam(value="app") String appName)
roleName
- role's name (not id!)appName
- @Path(value="{role-name}/composites/application-by-id/{appId}") @GET @Produces(value="application/json") public Set<RoleRepresentation> getApplicationByIdRoleComposites(@PathParam(value="role-name") String roleName, @PathParam(value="appId") String appId)
roleName
- role's name (not id!)appId
- @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 © 2014. All Rights Reserved.