org.keycloak.models.utils

## Class UserModelDelegate

- java.lang.Object
- - org.keycloak.models.utils.UserModelDelegate

- All Implemented Interfaces:
    UserModel
  Direct Known Subclasses:
    ReadonlyLDAPUserModelDelegate, ReadonlyUserModelProxy, UnsyncedLDAPUserModelDelegate, WritableLDAPUserModelDelegate, WritableUserModelProxy

      public class UserModelDelegate
      extends Object
      implements UserModel

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

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

      `UserModel.RequiredAction`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected UserModel` | `delegate`

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

      `EMAIL, FIRST_NAME, LAST_NAME, USERNAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UserModelDelegate(UserModel delegate)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRequiredAction(UserModel.RequiredAction action)`
    `void` | `deleteRoleMapping(RoleModel role)`
    `Set<RoleModel>` | `getApplicationRoleMappings(ApplicationModel app)`
    `String` | `getAttribute(String name)`
    `Map<String,String>` | `getAttributes()`
    `List<UserCredentialValueModel>` | `getCredentialsDirectly()`
    `String` | `getEmail()`
    `String` | `getFederationLink()`
    `String` | `getFirstName()`
    `String` | `getId()`
    `String` | `getLastName()`
    `Set<RoleModel>` | `getRealmRoleMappings()`
    `Set<UserModel.RequiredAction>` | `getRequiredActions()`
    `Set<RoleModel>` | `getRoleMappings()`
    `String` | `getUsername()`
    `void` | `grantRole(RoleModel role)`
    `boolean` | `hasRole(RoleModel role)`
    `boolean` | `isEmailVerified()`
    `boolean` | `isEnabled()`
    `boolean` | `isTotp()`
    `void` | `removeAttribute(String name)`
    `void` | `removeRequiredAction(UserModel.RequiredAction action)`
    `void` | `setAttribute(String name, String value)`
    `void` | `setEmail(String email)`
    `void` | `setEmailVerified(boolean verified)`
    `void` | `setEnabled(boolean enabled)`
    `void` | `setFederationLink(String link)`
    `void` | `setFirstName(String firstName)`
    `void` | `setLastName(String lastName)`
    `void` | `setTotp(boolean totp)`
    `void` | `setUsername(String username)`
    `void` | `updateCredential(UserCredentialModel cred)`
    `void` | `updateCredentialDirectly(UserCredentialValueModel cred)`

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

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

- - ### Field Detail

    - #### delegate

          protected UserModel delegate

  - ### Constructor Detail

    - #### UserModelDelegate

          public UserModelDelegate(UserModel delegate)

  - ### Method Detail

    - #### getId

          public String getId()

      Specified by:
        `getId` in interface `UserModel`

    - #### getUsername

          public String getUsername()

      Specified by:
        `getUsername` in interface `UserModel`

    - #### setUsername

          public void setUsername(String username)

      Specified by:
        `setUsername` in interface `UserModel`

    - #### isEnabled

          public boolean isEnabled()

      Specified by:
        `isEnabled` in interface `UserModel`

    - #### isTotp

          public boolean isTotp()

      Specified by:
        `isTotp` in interface `UserModel`

    - #### setEnabled

          public void setEnabled(boolean enabled)

      Specified by:
        `setEnabled` in interface `UserModel`

    - #### setAttribute

          public void setAttribute(String name,
                          String value)

      Specified by:
        `setAttribute` in interface `UserModel`

    - #### removeAttribute

          public void removeAttribute(String name)

      Specified by:
        `removeAttribute` in interface `UserModel`

    - #### getAttribute

          public String getAttribute(String name)

      Specified by:
        `getAttribute` in interface `UserModel`

    - #### getAttributes

          public Map<String,String> getAttributes()

      Specified by:
        `getAttributes` in interface `UserModel`

    - #### getRequiredActions

          public Set<UserModel.RequiredAction> getRequiredActions()

      Specified by:
        `getRequiredActions` in interface `UserModel`

    - #### addRequiredAction

          public void addRequiredAction(UserModel.RequiredAction action)

      Specified by:
        `addRequiredAction` in interface `UserModel`

    - #### removeRequiredAction

          public void removeRequiredAction(UserModel.RequiredAction action)

      Specified by:
        `removeRequiredAction` in interface `UserModel`

    - #### getFirstName

          public String getFirstName()

      Specified by:
        `getFirstName` in interface `UserModel`

    - #### setFirstName

          public void setFirstName(String firstName)

      Specified by:
        `setFirstName` in interface `UserModel`

    - #### getLastName

          public String getLastName()

      Specified by:
        `getLastName` in interface `UserModel`

    - #### setLastName

          public void setLastName(String lastName)

      Specified by:
        `setLastName` in interface `UserModel`

    - #### getEmail

          public String getEmail()

      Specified by:
        `getEmail` in interface `UserModel`

    - #### setEmail

          public void setEmail(String email)

      Specified by:
        `setEmail` in interface `UserModel`

    - #### isEmailVerified

          public boolean isEmailVerified()

      Specified by:
        `isEmailVerified` in interface `UserModel`

    - #### setEmailVerified

          public void setEmailVerified(boolean verified)

      Specified by:
        `setEmailVerified` in interface `UserModel`

    - #### setTotp

          public void setTotp(boolean totp)

      Specified by:
        `setTotp` in interface `UserModel`

    - #### updateCredential

          public void updateCredential(UserCredentialModel cred)

      Specified by:
        `updateCredential` in interface `UserModel`

    - #### getCredentialsDirectly

          public List<UserCredentialValueModel> getCredentialsDirectly()

      Specified by:
        `getCredentialsDirectly` in interface `UserModel`

    - #### updateCredentialDirectly

          public void updateCredentialDirectly(UserCredentialValueModel cred)

      Specified by:
        `updateCredentialDirectly` in interface `UserModel`

    - #### getRealmRoleMappings

          public Set<RoleModel> getRealmRoleMappings()

      Specified by:
        `getRealmRoleMappings` in interface `UserModel`

    - #### getApplicationRoleMappings

          public Set<RoleModel> getApplicationRoleMappings(ApplicationModel app)

      Specified by:
        `getApplicationRoleMappings` in interface `UserModel`

    - #### hasRole

          public boolean hasRole(RoleModel role)

      Specified by:
        `hasRole` in interface `UserModel`

    - #### grantRole

          public void grantRole(RoleModel role)

      Specified by:
        `grantRole` in interface `UserModel`

    - #### getRoleMappings

          public Set<RoleModel> getRoleMappings()

      Specified by:
        `getRoleMappings` in interface `UserModel`

    - #### deleteRoleMapping

          public void deleteRoleMapping(RoleModel role)

      Specified by:
        `deleteRoleMapping` in interface `UserModel`

    - #### getFederationLink

          public String getFederationLink()

      Specified by:
        `getFederationLink` in interface `UserModel`

    - #### setFederationLink

          public void setFederationLink(String link)

      Specified by:
        `setFederationLink` in interface `UserModel`

Copyright © 2014. All Rights Reserved.