org.keycloak.models

## Interface UserModel.Streams

- All Superinterfaces:
    RoleMapperModel, RoleMapperModel.Streams, UserModel
  All Known Subinterfaces:
    CachedUserModel.Streams
  All Known Implementing Classes:
    AbstractUserAdapter.Streams, AbstractUserAdapterFederatedStorage.Streams, AbstractUserModel, GroupLDAPStorageMapper.LDAPGroupMappingsUserDelegate, InMemoryUserAdapter, LDAPWritesOnlyUserModelDelegate, MapUserAdapter, MSADLDSUserAccountControlStorageMapper.MSADUserModelDelegate, MSADUserAccountControlStorageMapper.MSADUserModelDelegate, ReadOnlyKerberosUserModelDelegate, ReadonlyLDAPUserModelDelegate, ReadonlySSSDUserModelDelegate, ReadOnlyUserModelDelegate, RoleLDAPStorageMapper.LDAPRoleMappingsUserDelegate, TxAwareLDAPUserModelDelegate, UpdateOnlyChangeUserModelDelegate, UserAdapter, UserAdapter, UserModelDefaultMethods.Streams, UserModelDelegate
  Enclosing interface:
    UserModel

      public static interface UserModel.Streams
      extends UserModel, RoleMapperModel.Streams

  The `UserModel.Streams` interface makes all collection-based methods in `UserModel` default by providing implementations that delegate to the `Stream`-based variants instead of the other way around.

  It allows for implementations to focus on the `Stream`-based approach for processing sets of data and benefit from the potential memory and performance optimizations of that approach.

- - ### Nested Class Summary

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

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

  - ### Field Summary

    - ### 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`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default List<String>` | `getAttribute(String name)`
    `Stream<String>` | `getAttributeStream(String name)` Obtains all values associated with the specified attribute name.
    `default Set<GroupModel>` | `getGroups()`
    `Stream<GroupModel>` | `getGroupsStream()` Obtains the groups associated with the user.
    `default Set<String>` | `getRequiredActions()`
    `Stream<String>` | `getRequiredActionsStream()` Obtains the names of required actions associated with the user.

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

      `addRequiredAction, addRequiredAction, getAttributes, getCreatedTimestamp, getEmail, getFederationLink, getFirstAttribute, getFirstName, getGroups, getGroups, getGroupsCount, getGroupsCountByNameContaining, getGroupsStream, getId, getLastName, getServiceAccountClientLink, getUsername, isEmailVerified, isEnabled, isMemberOf, joinGroup, leaveGroup, removeAttribute, removeRequiredAction, removeRequiredAction, setAttribute, setCreatedTimestamp, setEmail, setEmailVerified, setEnabled, setFederationLink, setFirstName, setLastName, setServiceAccountClientLink, setSingleAttribute, setUsername`

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

      `getClientRoleMappings, getClientRoleMappingsStream, getRealmRoleMappings, getRealmRoleMappingsStream, getRoleMappings, getRoleMappingsStream`

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

      `deleteRoleMapping, grantRole, hasRole`

- - ### Method Detail

    - #### getAttribute

          default List<String> getAttribute(String name)

      Specified by:
        `getAttribute` in interface `UserModel`
      Returns:
        list of all attribute values or empty list if there are not any values. Never return null

    - #### getAttributeStream

          Stream<String> getAttributeStream(String name)

      Description copied from interface: `UserModel`
      Obtains all values associated with the specified attribute name.
      Specified by:
        `getAttributeStream` in interface `UserModel`
      Parameters:
        `name` - the name of the attribute.
      Returns:
        a non-null `Stream` of attribute values.

    - #### getRequiredActions

          default Set<String> getRequiredActions()

      Specified by:
        `getRequiredActions` in interface `UserModel`

    - #### getRequiredActionsStream

          Stream<String> getRequiredActionsStream()

      Description copied from interface: `UserModel`
      Obtains the names of required actions associated with the user.
      Specified by:
        `getRequiredActionsStream` in interface `UserModel`
      Returns:
        a non-null `Stream` of required action names.

    - #### getGroups

          default Set<GroupModel> getGroups()

      Specified by:
        `getGroups` in interface `UserModel`

    - #### getGroupsStream

          Stream<GroupModel> getGroupsStream()

      Description copied from interface: `UserModel`
      Obtains the groups associated with the user.
      Specified by:
        `getGroupsStream` in interface `UserModel`
      Returns:
        a non-null `Stream` of groups.

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