org.keycloak.models

## Interface GroupModel

- All Superinterfaces:
    RoleMapperModel
  All Known Implementing Classes:
    GroupAdapter, GroupAdapter, GroupAdapter

      public interface GroupModel
      extends RoleMapperModel

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addChild(GroupModel subGroup)` Automatically calls setParent() on the subGroup
    `List<String>` | `getAttribute(String name)`
    `Map<String,List<String>>` | `getAttributes()`
    `String` | `getFirstAttribute(String name)`
    `String` | `getId()`
    `String` | `getName()`
    `GroupModel` | `getParent()`
    `String` | `getParentId()`
    `Set<GroupModel>` | `getSubGroups()`
    `void` | `removeAttribute(String name)`
    `void` | `removeChild(GroupModel subGroup)` Automatically calls setParent() on the subGroup
    `void` | `setAttribute(String name, List<String> values)`
    `void` | `setName(String name)`
    `void` | `setParent(GroupModel group)` You must also call addChild on the parent group, addChild on RealmModel if there is no parent group
    `void` | `setSingleAttribute(String name, String value)` Set single value of specified attribute.

    - ### Methods inherited from interface org.keycloak.models.RoleMapperModel

      `deleteRoleMapping, getClientRoleMappings, getRealmRoleMappings, getRoleMappings, grantRole, hasRole`

- - ### Method Detail

    - #### getId

          String getId()

    - #### getName

          String getName()

    - #### setName

          void setName(String name)

    - #### setSingleAttribute

          void setSingleAttribute(String name,
                                  String value)

      Set single value of specified attribute. Remove all other existing values
      Parameters:
        `name` -
        `value` -

    - #### setAttribute

          void setAttribute(String name,
                            List<String> values)

    - #### removeAttribute

          void removeAttribute(String name)

    - #### getFirstAttribute

          String getFirstAttribute(String name)

      Parameters:
        `name` -
      Returns:
        null if there is not any value of specified attribute or first value otherwise. Don't throw exception if there are more values of the attribute

    - #### getAttribute

          List<String> getAttribute(String name)

      Parameters:
        `name` -
      Returns:
        list of all attribute values or empty list if there are not any values. Never return null

    - #### getAttributes

          Map<String,List<String>> getAttributes()

    - #### getParent

          GroupModel getParent()

    - #### getParentId

          String getParentId()

    - #### getSubGroups

          Set<GroupModel> getSubGroups()

    - #### setParent

          void setParent(GroupModel group)

      You must also call addChild on the parent group, addChild on RealmModel if there is no parent group
      Parameters:
        `group` -

    - #### addChild

          void addChild(GroupModel subGroup)

      Automatically calls setParent() on the subGroup
      Parameters:
        `subGroup` -

    - #### removeChild

          void removeChild(GroupModel subGroup)

      Automatically calls setParent() on the subGroup
      Parameters:
        `subGroup` -

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