org.keycloak.storage.ldap.mappers.membership.group

## Class GroupLDAPStorageMapperFactory

- java.lang.Object
- - org.keycloak.storage.ldap.mappers.AbstractLDAPStorageMapperFactory
  - - org.keycloak.storage.ldap.mappers.membership.group.GroupLDAPStorageMapperFactory

- All Implemented Interfaces:
    ComponentFactory<LDAPStorageMapper,LDAPStorageMapper>, SubComponentFactory<LDAPStorageMapper,LDAPStorageMapper>, ConfiguredProvider, ProviderFactory<LDAPStorageMapper>, LDAPStorageMapperFactory<LDAPStorageMapper>

      public class GroupLDAPStorageMapperFactory
      extends AbstractLDAPStorageMapperFactory

  Author:
    Marek Posolda

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static List<ProviderConfigProperty>` | `configProperties`
    `protected static List<String>` | `MEMBERSHIP_TYPES`
    `protected static List<String>` | `MODES`
    `protected static List<String>` | `NO_IMPORT_MODES`
    `static String` | `PROVIDER_ID`
    `protected static Map<String,UserRolesRetrieveStrategy>` | `userGroupsStrategies`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GroupLDAPStorageMapperFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected AbstractLDAPStorageMapper` | `createMapper(ComponentModel mapperModel, LDAPStorageProvider federationProvider)`
    `List<ProviderConfigProperty>` | `getConfigProperties()`
    `List<ProviderConfigProperty>` | `getConfigProperties(RealmModel realm, ComponentModel parent)`
    `String` | `getHelpText()`
    `String` | `getId()` This is the name of the provider and will be showed in the admin console as an option.
    `Map<String,Object>` | `getTypeMetadata()` This is metadata about this component type.
    `protected UserRolesRetrieveStrategy` | `getUserGroupsRetrieveStrategy(String strategyKey)`
    `void` | `onCreate(KeycloakSession session, RealmModel realm, ComponentModel model)` Called when UserStorageProviderModel is created.
    `void` | `onParentUpdate(RealmModel realm, UserStorageProviderModel oldParent, UserStorageProviderModel newParent, ComponentModel mapperModel)`
    `void` | `onUpdate(KeycloakSession session, RealmModel realm, ComponentModel oldModel, ComponentModel newModel)` Called after the component is updated.
    `void` | `validateConfiguration(KeycloakSession session, RealmModel realm, ComponentModel config)` Called before a component is created or updated.

    - ### Methods inherited from class org.keycloak.storage.ldap.mappers.AbstractLDAPStorageMapperFactory

      `checkMandatoryConfigAttribute, close, create, createConfigProperty, init, postInit`

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

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

    - ### Methods inherited from interface org.keycloak.component.SubComponentFactory

      `getTypeMetadata`

    - ### Methods inherited from interface org.keycloak.component.ComponentFactory

      `create, getCommonProviderConfigProperties, preRemove`

    - ### Methods inherited from interface org.keycloak.provider.ProviderFactory

      `order`

- - ### Field Detail

    - #### PROVIDER_ID

          public static final String PROVIDER_ID

      See Also:
        Constant Field Values

    - #### configProperties

          protected static final List<ProviderConfigProperty> configProperties

    - #### userGroupsStrategies

          protected static final Map<String,UserRolesRetrieveStrategy> userGroupsStrategies

    - #### MEMBERSHIP_TYPES

          protected static final List<String> MEMBERSHIP_TYPES

    - #### MODES

          protected static final List<String> MODES

    - #### NO_IMPORT_MODES

          protected static final List<String> NO_IMPORT_MODES

  - ### Constructor Detail

    - #### GroupLDAPStorageMapperFactory

          public GroupLDAPStorageMapperFactory()

  - ### Method Detail

    - #### getHelpText

          public String getHelpText()

    - #### getConfigProperties

          public List<ProviderConfigProperty> getConfigProperties()

    - #### getId

          public String getId()

      Description copied from interface: `LDAPStorageMapperFactory`
      This is the name of the provider and will be showed in the admin console as an option.

    - #### getTypeMetadata

          public Map<String,Object> getTypeMetadata()

      Description copied from interface: `ComponentFactory`
      This is metadata about this component type. Its really configuration information about the component type and not an individual instance
      Specified by:
        `getTypeMetadata` in interface `ComponentFactory<LDAPStorageMapper,LDAPStorageMapper>`
      Overrides:
        `getTypeMetadata` in class `AbstractLDAPStorageMapperFactory`
      Returns:

    - #### onParentUpdate

          public void onParentUpdate(RealmModel realm,
                                     UserStorageProviderModel oldParent,
                                     UserStorageProviderModel newParent,
                                     ComponentModel mapperModel)

    - #### onCreate

          public void onCreate(KeycloakSession session,
                               RealmModel realm,
                               ComponentModel model)

      Description copied from interface: `LDAPStorageMapperFactory`
      Called when UserStorageProviderModel is created. This allows you to do initialization of any additional configuration you need to add. For example, you may be introspecting a database or ldap schema to automatically create mappings.

    - #### onUpdate

          public void onUpdate(KeycloakSession session,
                               RealmModel realm,
                               ComponentModel oldModel,
                               ComponentModel newModel)

      Description copied from interface: `ComponentFactory`
      Called after the component is updated.
        `oldModel` - old saved model
        `newModel` - new configuration

    - #### getConfigProperties

          public List<ProviderConfigProperty> getConfigProperties(RealmModel realm,
                                                                  ComponentModel parent)

    - #### validateConfiguration

          public void validateConfiguration(KeycloakSession session,
                                            RealmModel realm,
                                            ComponentModel config)
                                     throws ComponentValidationException

      Description copied from interface: `ComponentFactory`
      Called before a component is created or updated. Allows you to validate the configuration
      Throws:
        `ComponentValidationException`

    - #### createMapper

          protected AbstractLDAPStorageMapper createMapper(ComponentModel mapperModel,
                                                           LDAPStorageProvider federationProvider)

      Specified by:
        `createMapper` in class `AbstractLDAPStorageMapperFactory`

    - #### getUserGroupsRetrieveStrategy

          protected UserRolesRetrieveStrategy getUserGroupsRetrieveStrategy(String strategyKey)

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