org.keycloak.admin.client.resource

## Interface RoleResource

-     public interface RoleResource

  Author:
    rodrigo.sasaki@icarros.com.br

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addComposites(List<RoleRepresentation> rolesToAdd)`
    `void` | `deleteComposites(List<RoleRepresentation> rolesToRemove)`
    `Set<RoleRepresentation>` | `getClientRoleComposites(String clientUuid)`
    `ManagementPermissionReference` | `getPermissions()` Returns indicator if the fine grain permissions are enabled or not.
    `Set<RoleRepresentation>` | `getRealmRoleComposites()`
    `Set<RoleRepresentation>` | `getRoleComposites()`
    `Set<GroupRepresentation>` | `getRoleGroupMembers()` Get role groups Returns groups that have the given role
    `Set<GroupRepresentation>` | `getRoleGroupMembers(Integer firstResult, Integer maxResults)` Get role groups Returns groups that have the given role, paginated according to the query parameters
    `Set<UserRepresentation>` | `getRoleUserMembers()` Get role members Returns users that have the given role
    `Set<UserRepresentation>` | `getRoleUserMembers(Integer firstResult, Integer maxResults)` Get role members Returns users that have the given role, paginated according to the query parameters
    `void` | `remove()`
    `ManagementPermissionReference` | `setPermissions(ManagementPermissionRepresentation status)` Enables or disables the fine grain permissions feature.
    `RoleRepresentation` | `toRepresentation()`
    `void` | `update(RoleRepresentation roleRepresentation)`

- - ### Method Detail

    - #### setPermissions

          @PUT
           @Path(value="/management/permissions")
           @Consumes(value="application/json")
           @Produces(value="application/json")
          ManagementPermissionReference setPermissions(ManagementPermissionRepresentation status)

      Enables or disables the fine grain permissions feature. Returns the updated status of the server in the `ManagementPermissionReference`.
      Parameters:
        `status` - status request to apply
      Returns:
        permission reference indicating the updated status

    - #### getPermissions

          @GET
           @Path(value="/management/permissions")
           @Produces(value="application/json")
          ManagementPermissionReference getPermissions()

      Returns indicator if the fine grain permissions are enabled or not.
      Returns:
        current representation of the permissions feature

    - #### toRepresentation

          @GET
           @Produces(value="application/json")
          RoleRepresentation toRepresentation()

    - #### update

          @PUT
           @Consumes(value="application/json")
          void update(RoleRepresentation roleRepresentation)

    - #### remove

          @DELETE
          void remove()

    - #### getRoleComposites

          @GET
           @Path(value="composites")
           @Produces(value="application/json")
          Set<RoleRepresentation> getRoleComposites()

    - #### getRealmRoleComposites

          @GET
           @Path(value="composites/realm")
           @Produces(value="application/json")
          Set<RoleRepresentation> getRealmRoleComposites()

    - #### getClientRoleComposites

          @GET
           @Path(value="composites/clients/{clientUuid}")
           @Produces(value="application/json")
          Set<RoleRepresentation> getClientRoleComposites(@PathParam(value="clientUuid")
                                                                                                                                                    String clientUuid)

    - #### addComposites

          @POST
           @Path(value="composites")
           @Consumes(value="application/json")
          void addComposites(List<RoleRepresentation> rolesToAdd)

    - #### deleteComposites

          @DELETE
           @Path(value="composites")
           @Consumes(value="application/json")
          void deleteComposites(List<RoleRepresentation> rolesToRemove)

    - #### getRoleUserMembers

          @GET
           @Path(value="users")
           @Produces(value="application/json")
          Set<UserRepresentation> getRoleUserMembers()

      Get role members

      Returns users that have the given role
      Returns:
        a list of users with the given role

    - #### getRoleUserMembers

          @GET
           @Path(value="users")
           @Produces(value="application/json")
          Set<UserRepresentation> getRoleUserMembers(@QueryParam(value="first")
                                                                                                                     Integer firstResult,
                                                                                                                     @QueryParam(value="max")
                                                                                                                     Integer maxResults)

      Get role members

      Returns users that have the given role, paginated according to the query parameters
      Parameters:
        `firstResult` - Pagination offset
        `maxResults` - Pagination size
      Returns:
        a list of users with the given role

    - #### getRoleGroupMembers

          @GET
           @Path(value="groups")
           @Produces(value="application/json")
          Set<GroupRepresentation> getRoleGroupMembers()

      Get role groups

      Returns groups that have the given role
      Returns:
        a list of groups with the given role

    - #### getRoleGroupMembers

          @GET
           @Path(value="groups")
           @Produces(value="application/json")
          Set<GroupRepresentation> getRoleGroupMembers(@QueryParam(value="first")
                                                                                                                        Integer firstResult,
                                                                                                                        @QueryParam(value="max")
                                                                                                                        Integer maxResults)

      Get role groups

      Returns groups that have the given role, paginated according to the query parameters
      Parameters:
        `firstResult` - Pagination offset
        `maxResults` - Pagination size
      Returns:
        a list of groups with the given role

Copyright © 2020 JBoss by Red Hat. All rights reserved.