Class RoleHandler

java.lang.Object
org.opendaylight.aaa.shiro.idm.RoleHandler

@Path("/v1/roles") public class RoleHandler extends Object
REST application used to manipulate the H2 database roles table. The REST endpoint is /auth/v1/roles.

A wrapper script called idmtool is provided to manipulate AAA data.

Author:
[email protected]
  • Constructor Details

  • Method Details

    • getRoles

      @GET @Produces("application/json") public javax.ws.rs.core.Response getRoles()
      Extracts all roles.
      Returns:
      A response with all roles in the H2 database, or internal error if one is encountered
    • getRole

      @GET @Path("/{id}") @Produces("application/json") public javax.ws.rs.core.Response getRole(@PathParam("id") String id)
      Extract a specific role identified by id.
      Parameters:
      id - the String id for the role
      Returns:
      A response with the role identified by id, or internal error if one is encountered
    • createRole

      @POST @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response createRole(@Context javax.ws.rs.core.UriInfo info, Role role)
      Creates a role.
      Parameters:
      info - passed from Jersey
      role - the role JSON payload
      Returns:
      A response stating success or failure of role creation, or internal error if one is encountered
    • putRole

      @PUT @Path("/{id}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response putRole(@Context javax.ws.rs.core.UriInfo info, Role role, @PathParam("id") String id)
      Updates a specific role identified by id.
      Parameters:
      info - passed from Jersey
      role - the role JSON payload
      id - the String id for the role
      Returns:
      A response stating success or failure of role update, or internal error if one occurs
    • deleteRole

      @DELETE @Path("/{id}") public javax.ws.rs.core.Response deleteRole(@Context javax.ws.rs.core.UriInfo info, @PathParam("id") String id)
      Delete a role.
      Parameters:
      info - passed from Jersey
      id - the String id for the role
      Returns:
      A response stating success or failure of user deletion, or internal error if one occurs