org.keycloak.storage.ldap

## Class ReadonlyLDAPUserModelDelegate

- java.lang.Object
- - org.keycloak.models.utils.UserModelDelegate
  - - org.keycloak.storage.ldap.ReadonlyLDAPUserModelDelegate

- All Implemented Interfaces:
    RoleMapperModel, RoleMapperModel.Streams, UserModel, UserModel.Streams

      public class ReadonlyLDAPUserModelDelegate
      extends UserModelDelegate

  Will be good to get rid of this class and use ReadOnlyUserModelDelegate, but it can't be done now due the backwards compatibility. See KEYCLOAK-15139 as an example
  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.keycloak.models.UserModel

      `UserModel.RequiredAction, UserModel.Streams, UserModel.UserRemovedEvent`

  - ### Field Summary

    - ### Fields inherited from class org.keycloak.models.utils.UserModelDelegate

      `delegate`

    - ### Fields inherited from interface org.keycloak.models.UserModel

      `COMPARE_BY_USERNAME, EMAIL, EMAIL_VERIFIED, ENABLED, EXACT, FIRST_NAME, GROUPS, IDP_ALIAS, IDP_USER_ID, INCLUDE_SERVICE_ACCOUNT, LAST_NAME, LOCALE, SEARCH, USERNAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReadonlyLDAPUserModelDelegate(UserModel delegate)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `removeAttribute(String name)`
    `void` | `setAttribute(String name, List<String> values)`
    `void` | `setEmail(String email)` Sets email for this user.
    `void` | `setFirstName(String first)`
    `void` | `setLastName(String lastName)`
    `void` | `setSingleAttribute(String name, String value)` Set single value of specified attribute.
    `void` | `setUsername(String username)` Sets username for this user.

    - ### Methods inherited from class org.keycloak.models.utils.UserModelDelegate

      `addRequiredAction, addRequiredAction, deleteRoleMapping, equals, getAttributes, getAttributeStream, getClientRoleMappingsStream, getCreatedTimestamp, getDelegate, getEmail, getFederationLink, getFirstAttribute, getFirstName, getGroupsStream, getId, getLastName, getRealmRoleMappingsStream, getRequiredActionsStream, getRoleMappingsStream, getServiceAccountClientLink, getUsername, grantRole, hashCode, hasRole, isEmailVerified, isEnabled, isMemberOf, joinGroup, leaveGroup, removeRequiredAction, removeRequiredAction, setCreatedTimestamp, setEmailVerified, setEnabled, setFederationLink, setServiceAccountClientLink`

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

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

    - ### Methods inherited from interface org.keycloak.models.UserModel.Streams

      `getAttribute, getGroups, getRequiredActions`

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

      `getGroups, getGroups, getGroupsCount, getGroupsCountByNameContaining, getGroupsStream`

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

      `getClientRoleMappings, getRealmRoleMappings, getRoleMappings`

- - ### Constructor Detail

    - #### ReadonlyLDAPUserModelDelegate

          public ReadonlyLDAPUserModelDelegate(UserModel delegate)

  - ### Method Detail

    - #### setUsername

          public void setUsername(String username)

      Description copied from interface: `UserModel`
      Sets username for this user. No default method here to allow Abstract subclasses where the username is provided in a different manner
      Specified by:
        `setUsername` in interface `UserModel`
      Overrides:
        `setUsername` in class `UserModelDelegate`
      Parameters:
        `username` - username string

    - #### setLastName

          public void setLastName(String lastName)

      Specified by:
        `setLastName` in interface `UserModel`
      Overrides:
        `setLastName` in class `UserModelDelegate`

    - #### setFirstName

          public void setFirstName(String first)

      Specified by:
        `setFirstName` in interface `UserModel`
      Overrides:
        `setFirstName` in class `UserModelDelegate`

    - #### setEmail

          public void setEmail(String email)

      Description copied from interface: `UserModel`
      Sets email for this user.
      Specified by:
        `setEmail` in interface `UserModel`
      Overrides:
        `setEmail` in class `UserModelDelegate`
      Parameters:
        `email` - the email

    - #### setSingleAttribute

          public void setSingleAttribute(String name,
                                         String value)

      Description copied from interface: `UserModel`
      Set single value of specified attribute. Remove all other existing values of this attribute
      Specified by:
        `setSingleAttribute` in interface `UserModel`
      Overrides:
        `setSingleAttribute` in class `UserModelDelegate`

    - #### setAttribute

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

      Specified by:
        `setAttribute` in interface `UserModel`
      Overrides:
        `setAttribute` in class `UserModelDelegate`

    - #### removeAttribute

          public void removeAttribute(String name)

      Specified by:
        `removeAttribute` in interface `UserModel`
      Overrides:
        `removeAttribute` in class `UserModelDelegate`

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