org.keycloak.services.resources.admin

## Class GroupResource

- java.lang.Object
- - org.keycloak.services.resources.admin.GroupResource

-     public class GroupResource
      extends Object

  Author:
    Bill Burke

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GroupResource(RealmModel realm, GroupModel group, KeycloakSession session, RealmAuth auth, AdminEventBuilder adminEvent)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `addChild(GroupRepresentation rep)` Set or create child.
    `void` | `deleteGroup()`
    `GroupRepresentation` | `getGroup()`
    `List<UserRepresentation>` | `getMembers(Integer firstResult, Integer maxResults)` Get users Returns a list of users, filtered according to query parameters
    `RoleMapperResource` | `getRoleMappings()`
    `void` | `updateGroup(GroupRepresentation rep)` Update group, ignores subgroups.
    `static void` | `updateGroup(GroupRepresentation rep, GroupModel model)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GroupResource

          public GroupResource(RealmModel realm,
                               GroupModel group,
                               KeycloakSession session,
                               RealmAuth auth,
                               AdminEventBuilder adminEvent)

  - ### Method Detail

    - #### getGroup

          @GET
           @Produces(value="application/json")
          public GroupRepresentation getGroup()

      Returns:

    - #### updateGroup

          @PUT
           @Consumes(value="application/json")
          public void updateGroup(GroupRepresentation rep)

      Update group, ignores subgroups.
      Parameters:
        `rep` -

    - #### deleteGroup

          @DELETE
          public void deleteGroup()

    - #### addChild

          @POST
           @Path(value="children")
           @Produces(value="application/json")
           @Consumes(value="application/json")
          public javax.ws.rs.core.Response addChild(GroupRepresentation rep)

      Set or create child. This will just set the parent if it exists. Create it and set the parent if the group doesn't exist.
      Parameters:
        `rep` -

    - #### updateGroup

          public static void updateGroup(GroupRepresentation rep,
                                         GroupModel model)

    - #### getRoleMappings

          @Path(value="role-mappings")
          public RoleMapperResource getRoleMappings()

    - #### getMembers

          @GET
           @Path(value="members")
           @Produces(value="application/json")
          public List<UserRepresentation> getMembers(@QueryParam(value="first")
                                                                                                                       Integer firstResult,
                                                                                                                       @QueryParam(value="max")
                                                                                                                       Integer maxResults)

      Get users Returns a list of users, filtered according to query parameters
      Parameters:
        `firstResult` - Pagination offset
        `maxResults` - Pagination size
      Returns:

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