org.keycloak.federation.ldap.mappers.membership.group

## Class GroupLDAPFederationMapper

- java.lang.Object
- - org.keycloak.federation.ldap.mappers.AbstractLDAPFederationMapper
  - - org.keycloak.federation.ldap.mappers.membership.group.GroupLDAPFederationMapper

- All Implemented Interfaces:
    CommonLDAPGroupMapper

      public class GroupLDAPFederationMapper
      extends AbstractLDAPFederationMapper
      implements CommonLDAPGroupMapper

  Author:
    Marek Posolda

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `GroupLDAPFederationMapper.LDAPGroupMappingsUserDelegate`

  - ### Field Summary

    - ### Fields inherited from class org.keycloak.federation.ldap.mappers.AbstractLDAPFederationMapper

      `ldapProvider, mapperModel, realm`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GroupLDAPFederationMapper(UserFederationMapperModel mapperModel, LDAPFederationProvider ldapProvider, RealmModel realm, GroupLDAPFederationMapperFactory factory)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addGroupMappingInLDAP(String groupName, LDAPObject ldapUser)`
    `void` | `beforeLDAPQuery(LDAPQuery query)`
    `LDAPQuery` | `createGroupQuery()`
    `LDAPObject` | `createLDAPGroup(String groupName, Map<String,Set<String>> additionalAttributes)`
    `LDAPQuery` | `createLDAPGroupQuery()`
    `void` | `deleteGroupMappingInLDAP(LDAPObject ldapUser, LDAPObject ldapGroup)`
    `protected GroupModel` | `findKcGroupByLDAPGroup(LDAPObject ldapGroup)`
    `protected GroupModel` | `findKcGroupOrSyncFromLDAP(LDAPObject ldapGroup, UserModel user)`
    `protected List<LDAPObject>` | `getAllLDAPGroups()`
    `CommonLDAPGroupMapperConfig` | `getConfig()`
    `List<UserModel>` | `getGroupMembers(GroupModel kcGroup, int firstResult, int maxResults)`
    `protected List<LDAPObject>` | `getLDAPGroupMappings(LDAPObject ldapUser)`
    `protected Set<LDAPDn>` | `getLDAPSubgroups(LDAPObject ldapGroup)`
    `LDAPObject` | `loadLDAPGroupByName(String groupName)`
    `void` | `onImportUserFromLDAP(LDAPObject ldapUser, UserModel user, boolean isCreate)`
    `void` | `onRegisterUserToLDAP(LDAPObject ldapUser, UserModel localUser)`
    `UserModel` | `proxy(LDAPObject ldapUser, UserModel delegate)`
    `UserFederationSyncResult` | `syncDataFromFederationProviderToKeycloak()`
    `UserFederationSyncResult` | `syncDataFromKeycloakToFederationProvider()`

    - ### Methods inherited from class org.keycloak.federation.ldap.mappers.AbstractLDAPFederationMapper

      `getLdapProvider, getRealm, onAuthenticationFailure, parseBooleanParameter`

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

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

- - ### Constructor Detail

    - #### GroupLDAPFederationMapper

          public GroupLDAPFederationMapper(UserFederationMapperModel mapperModel,
                                           LDAPFederationProvider ldapProvider,
                                           RealmModel realm,
                                           GroupLDAPFederationMapperFactory factory)

  - ### Method Detail

    - #### createLDAPGroupQuery

          public LDAPQuery createLDAPGroupQuery()

      Specified by:
        `createLDAPGroupQuery` in interface `CommonLDAPGroupMapper`

    - #### getConfig

          public CommonLDAPGroupMapperConfig getConfig()

      Specified by:
        `getConfig` in interface `CommonLDAPGroupMapper`

    - #### createGroupQuery

          public LDAPQuery createGroupQuery()

    - #### createLDAPGroup

          public LDAPObject createLDAPGroup(String groupName,
                                            Map<String,Set<String>> additionalAttributes)

    - #### loadLDAPGroupByName

          public LDAPObject loadLDAPGroupByName(String groupName)

    - #### getLDAPSubgroups

          protected Set<LDAPDn> getLDAPSubgroups(LDAPObject ldapGroup)

    - #### syncDataFromFederationProviderToKeycloak

          public UserFederationSyncResult syncDataFromFederationProviderToKeycloak()

      Overrides:
        `syncDataFromFederationProviderToKeycloak` in class `AbstractLDAPFederationMapper`
      See Also:
        `UserFederationMapper.syncDataFromFederationProviderToKeycloak(UserFederationMapperModel, UserFederationProvider, KeycloakSession, RealmModel)`

    - #### findKcGroupByLDAPGroup

          protected GroupModel findKcGroupByLDAPGroup(LDAPObject ldapGroup)

    - #### findKcGroupOrSyncFromLDAP

          protected GroupModel findKcGroupOrSyncFromLDAP(LDAPObject ldapGroup,
                                                         UserModel user)

    - #### getAllLDAPGroups

          protected List<LDAPObject> getAllLDAPGroups()

    - #### syncDataFromKeycloakToFederationProvider

          public UserFederationSyncResult syncDataFromKeycloakToFederationProvider()

      Overrides:
        `syncDataFromKeycloakToFederationProvider` in class `AbstractLDAPFederationMapper`
      See Also:
        `UserFederationMapper.syncDataFromKeycloakToFederationProvider(UserFederationMapperModel, UserFederationProvider, KeycloakSession, RealmModel)`

    - #### getGroupMembers

          public List<UserModel> getGroupMembers(GroupModel kcGroup,
                                                 int firstResult,
                                                 int maxResults)

      Overrides:
        `getGroupMembers` in class `AbstractLDAPFederationMapper`

    - #### addGroupMappingInLDAP

          public void addGroupMappingInLDAP(String groupName,
                                            LDAPObject ldapUser)

    - #### deleteGroupMappingInLDAP

          public void deleteGroupMappingInLDAP(LDAPObject ldapUser,
                                               LDAPObject ldapGroup)

    - #### getLDAPGroupMappings

          protected List<LDAPObject> getLDAPGroupMappings(LDAPObject ldapUser)

    - #### beforeLDAPQuery

          public void beforeLDAPQuery(LDAPQuery query)

      Specified by:
        `beforeLDAPQuery` in class `AbstractLDAPFederationMapper`
      See Also:
        `LDAPFederationMapper.beforeLDAPQuery(UserFederationMapperModel, LDAPQuery)`

    - #### proxy

          public UserModel proxy(LDAPObject ldapUser,
                                 UserModel delegate)

      Specified by:
        `proxy` in class `AbstractLDAPFederationMapper`
      See Also:
        `LDAPFederationMapper.proxy(UserFederationMapperModel, LDAPFederationProvider, LDAPObject, UserModel, RealmModel)`

    - #### onRegisterUserToLDAP

          public void onRegisterUserToLDAP(LDAPObject ldapUser,
                                           UserModel localUser)

      Specified by:
        `onRegisterUserToLDAP` in class `AbstractLDAPFederationMapper`
      See Also:
        `LDAPFederationMapper.onRegisterUserToLDAP(UserFederationMapperModel, LDAPFederationProvider, LDAPObject, UserModel, RealmModel)`

    - #### onImportUserFromLDAP

          public void onImportUserFromLDAP(LDAPObject ldapUser,
                                           UserModel user,
                                           boolean isCreate)

      Specified by:
        `onImportUserFromLDAP` in class `AbstractLDAPFederationMapper`
      See Also:
        `LDAPFederationMapper.onImportUserFromLDAP(UserFederationMapperModel, LDAPFederationProvider, LDAPObject, UserModel, RealmModel, boolean)`

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