public static interface UserGroupMembershipFederatedStorage.Streams extends UserGroupMembershipFederatedStorage
UserGroupMembershipFederatedStorage.Streams
interface makes all collection-based methods in UserGroupMembershipFederatedStorage
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.UserGroupMembershipFederatedStorage.Streams
Modifier and Type | Method and 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 given
group in the specified realm . |
joinGroup, leaveGroup
default Set<GroupModel> getGroups(RealmModel realm, String userId)
getGroups
in interface UserGroupMembershipFederatedStorage
Stream<GroupModel> getGroupsStream(RealmModel realm, String userId)
UserGroupMembershipFederatedStorage
getGroupsStream
in interface UserGroupMembershipFederatedStorage
realm
- a reference to the realm.userId
- the user identifier.Stream
of groups.default List<String> getMembership(RealmModel realm, GroupModel group, int firstResult, int max)
getMembership
in interface UserGroupMembershipFederatedStorage
Stream<String> getMembershipStream(RealmModel realm, GroupModel group, Integer firstResult, Integer max)
UserGroupMembershipFederatedStorage
group
in the specified realm
.getMembershipStream
in interface UserGroupMembershipFederatedStorage
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 or null
.max
- maximum number of results to return. Ignored if negative or null
.Stream
of federated user ids that are members of the group in the realm.Copyright © 2021 JBoss by Red Hat. All rights reserved.