Package org.keycloak.storage.federated
Interface UserGroupMembershipFederatedStorage.Streams
-
- All Superinterfaces:
UserGroupMembershipFederatedStorage
- All Known Subinterfaces:
UserFederatedStorageProvider.Streams
- All Known Implementing Classes:
JpaUserFederatedStorageProvider
- Enclosing interface:
- UserGroupMembershipFederatedStorage
public static interface UserGroupMembershipFederatedStorage.Streams extends UserGroupMembershipFederatedStorage
TheUserGroupMembershipFederatedStorage.Streams
interface makes all collection-based methods inUserGroupMembershipFederatedStorage
default by providing implementations that delegate to theStream
-based variants instead of the other way around. It allows for implementations to focus on theStream
-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.UserGroupMembershipFederatedStorage
UserGroupMembershipFederatedStorage.Streams
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Set<GroupModel>
getGroups(RealmModel realm, String userId)
Stream<GroupModel>
getGroupsStream(RealmModel realm, String userId)
Obtains the groups associated with the federated user.default List<String>
getMembership(RealmModel realm, GroupModel group, int firstResult, int max)
Stream<String>
getMembershipStream(RealmModel realm, GroupModel group, Integer firstResult, Integer max)
Obtains the federated users that are members of the givengroup
in the specifiedrealm
.-
Methods inherited from interface org.keycloak.storage.federated.UserGroupMembershipFederatedStorage
joinGroup, leaveGroup
-
-
-
-
Method Detail
-
getGroups
default Set<GroupModel> getGroups(RealmModel realm, String userId)
- Specified by:
getGroups
in interfaceUserGroupMembershipFederatedStorage
-
getGroupsStream
Stream<GroupModel> getGroupsStream(RealmModel realm, String userId)
Description copied from interface:UserGroupMembershipFederatedStorage
Obtains the groups associated with the federated user.- Specified by:
getGroupsStream
in interfaceUserGroupMembershipFederatedStorage
- Parameters:
realm
- a reference to the realm.userId
- the user identifier.- Returns:
- a non-null
Stream
of groups.
-
getMembership
default List<String> getMembership(RealmModel realm, GroupModel group, int firstResult, int max)
- Specified by:
getMembership
in interfaceUserGroupMembershipFederatedStorage
-
getMembershipStream
Stream<String> getMembershipStream(RealmModel realm, GroupModel group, Integer firstResult, Integer max)
Description copied from interface:UserGroupMembershipFederatedStorage
Obtains the federated users that are members of the givengroup
in the specifiedrealm
.- Specified by:
getMembershipStream
in interfaceUserGroupMembershipFederatedStorage
- Parameters:
realm
- a reference to the realm.group
- a reference to the group whose federated members are being searched.firstResult
- first result to return. Ignored if negative ornull
.max
- maximum number of results to return. Ignored if negative ornull
.- Returns:
- a non-null
Stream
of federated user ids that are members of the group in the realm.
-
-