org.keycloak.storage.ldap.mappers.membership

## Enum LDAPGroupMapperMode

- java.lang.Object
- - java.lang.Enum<LDAPGroupMapperMode>
  - - org.keycloak.storage.ldap.mappers.membership.LDAPGroupMapperMode

- All Implemented Interfaces:
    Serializable, Comparable<LDAPGroupMapperMode>

      public enum LDAPGroupMapperMode
      extends Enum<LDAPGroupMapperMode>

  Author:
    Marek Posolda

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `IMPORT` Read-only LDAP mode.
    `LDAP_ONLY` All role mappings are retrieved from LDAP and saved into LDAP
    `READ_ONLY` Read-only LDAP mode.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static LDAPGroupMapperMode` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static LDAPGroupMapperMode[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### LDAP_ONLY

          public static final LDAPGroupMapperMode LDAP_ONLY

      All role mappings are retrieved from LDAP and saved into LDAP

    - #### IMPORT

          public static final LDAPGroupMapperMode IMPORT

      Read-only LDAP mode. Role mappings are retrieved from LDAP for particular user just at the time when he is imported and then they are saved to local keycloak DB. Then all role mappings are always retrieved from keycloak DB, never from LDAP. Creating or deleting of role mapping is propagated only to DB. This is read-only mode LDAP mode and it's good for performance, but when user is put to some role directly in LDAP, it won't be seen by Keycloak

    - #### READ_ONLY

          public static final LDAPGroupMapperMode READ_ONLY

      Read-only LDAP mode. Role mappings are retrieved from both LDAP and DB and merged together. New role grants are not saved to LDAP but to DB. Deleting role mappings, which is mapped to LDAP, will throw an error.

  - ### Method Detail

    - #### values

          public static LDAPGroupMapperMode[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (LDAPGroupMapperMode c : LDAPGroupMapperMode.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static LDAPGroupMapperMode valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

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