org.keycloak.storage.federated

## Interface UserRoleMappingsFederatedStorage.Streams

- All Superinterfaces:
    UserRoleMappingsFederatedStorage
  All Known Subinterfaces:
    UserFederatedStorageProvider.Streams
  All Known Implementing Classes:
    JpaUserFederatedStorageProvider
  Enclosing interface:
    UserRoleMappingsFederatedStorage

      public static interface UserRoleMappingsFederatedStorage.Streams
      extends UserRoleMappingsFederatedStorage

  The `UserRoleMappingsFederatedStorage.Streams` interface makes all collection-based methods in `UserRoleMappingsFederatedStorage` 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.storage.federated.UserRoleMappingsFederatedStorage

      `UserRoleMappingsFederatedStorage.Streams`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default Set<RoleModel>` | `getRoleMappings(RealmModel realm, String userId)`
    `Stream<RoleModel>` | `getRoleMappingsStream(RealmModel realm, String userId)` Obtains the roles associated with the federated user identified by `userId`.

    - ### Methods inherited from interface org.keycloak.storage.federated.UserRoleMappingsFederatedStorage

      `deleteRoleMapping, grantRole`

- - ### Method Detail

    - #### getRoleMappings

          default Set<RoleModel> getRoleMappings(RealmModel realm,
                                                 String userId)

      Specified by:
        `getRoleMappings` in interface `UserRoleMappingsFederatedStorage`

    - #### getRoleMappingsStream

          Stream<RoleModel> getRoleMappingsStream(RealmModel realm,
                                                  String userId)

      Description copied from interface: `UserRoleMappingsFederatedStorage`
      Obtains the roles associated with the federated user identified by `userId`.
      Specified by:
        `getRoleMappingsStream` in interface `UserRoleMappingsFederatedStorage`
      Parameters:
        `realm` - a reference to the realm.
        `userId` - the user identifier.
      Returns:
        a non-null `Stream` of roles.

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