public static interface UserProvider.Streams extends UserProvider, UserQueryProvider.Streams, UserLookupProvider.Streams
UserProvider.Streams
interface makes all collection-based methods in UserProvider
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.UserProvider.Streams
Modifier and Type | Method and Description |
---|---|
default List<UserConsentModel> |
getConsents(RealmModel realm,
String userId) |
Stream<UserConsentModel> |
getConsentsStream(RealmModel realm,
String userId)
Obtains the consents associated with the user identified by the specified
userId . |
default Set<FederatedIdentityModel> |
getFederatedIdentities(UserModel user,
RealmModel realm) |
Stream<FederatedIdentityModel> |
getFederatedIdentitiesStream(RealmModel realm,
UserModel user)
Obtains the federated identities of the specified user.
|
FederatedIdentityModel |
getFederatedIdentity(RealmModel realm,
UserModel user,
String socialProvider)
Returns details of the association between the user and the socialProvider.
|
default FederatedIdentityModel |
getFederatedIdentity(UserModel user,
String socialProvider,
RealmModel realm) |
default UserModel |
getUserByFederatedIdentity(FederatedIdentityModel socialLink,
RealmModel realm) |
UserModel |
getUserByFederatedIdentity(RealmModel realm,
FederatedIdentityModel socialLink)
Returns a userModel that corresponds to the given socialLink.
|
default List<UserModel> |
getUsers(RealmModel realm,
boolean includeServiceAccounts) |
default List<UserModel> |
getUsers(RealmModel realm,
int firstResult,
int maxResults,
boolean includeServiceAccounts) |
default Stream<UserModel> |
getUsersStream(RealmModel realm,
boolean includeServiceAccounts)
Obtains the users associated with the specified realm.
|
Stream<UserModel> |
getUsersStream(RealmModel realm,
Integer firstResult,
Integer maxResults,
boolean includeServiceAccounts)
Obtains the users associated with the specified realm.
|
addConsent, addFederatedIdentity, addUser, close, getConsentByClient, getNotBeforeOfUser, getServiceAccount, preRemove, preRemove, preRemove, preRemove, preRemove, preRemove, preRemove, preRemove, removeFederatedIdentity, removeImportedUsers, revokeConsentForClient, setNotBeforeForUser, unlinkUsers, updateConsent, updateFederatedIdentity
addUser, removeUser
grantToAllUsers
getGroupMembers, getGroupMembers, getGroupMembersStream, getGroupMembersStream, getUsers, getUsers, getUsersCount, getUsersCount, getUsersCount, getUsersCount, getUsersCount, getUsersCount, getUsersCount, getUsersCount, getUsersStream, getUsersStream, searchForUser, searchForUser, searchForUser, searchForUser, searchForUserByUserAttribute, searchForUserByUserAttributeStream, searchForUserStream, searchForUserStream, searchForUserStream, searchForUserStream
countUsersInGroups, getRoleMembers, getRoleMembers, getRoleMembersStream, getRoleMembersStream, getUsersCount, getUsersCount, getUsersCount
getUserByEmail, getUserByEmail, getUserById, getUserById, getUserByUsername, getUserByUsername
FederatedIdentityModel getFederatedIdentity(RealmModel realm, UserModel user, String socialProvider)
UserProvider
getFederatedIdentity
in interface UserProvider
realm
- a reference to the realmuser
- the user modelsocialProvider
- the id of the identity providernull
if no association existsdefault FederatedIdentityModel getFederatedIdentity(UserModel user, String socialProvider, RealmModel realm)
getFederatedIdentity
in interface UserProvider
UserModel getUserByFederatedIdentity(RealmModel realm, FederatedIdentityModel socialLink)
UserProvider
getUserByFederatedIdentity
in interface UserProvider
realm
- a reference to the realmsocialLink
- the socialLinknull
if no such user existsdefault UserModel getUserByFederatedIdentity(FederatedIdentityModel socialLink, RealmModel realm)
getUserByFederatedIdentity
in interface UserProvider
default Set<FederatedIdentityModel> getFederatedIdentities(UserModel user, RealmModel realm)
getFederatedIdentities
in interface UserProvider
Stream<FederatedIdentityModel> getFederatedIdentitiesStream(RealmModel realm, UserModel user)
UserProvider
getFederatedIdentitiesStream
in interface UserProvider
realm
- a reference to the realm.user
- the reference to the user.Stream
of federated identities associated with the user.default List<UserConsentModel> getConsents(RealmModel realm, String userId)
getConsents
in interface UserProvider
Stream<UserConsentModel> getConsentsStream(RealmModel realm, String userId)
UserProvider
userId
.getConsentsStream
in interface UserProvider
realm
- a reference to the realm.userId
- the user identifier.Stream
of consents associated with the user.default List<UserModel> getUsers(RealmModel realm, boolean includeServiceAccounts)
getUsers
in interface UserProvider
default Stream<UserModel> getUsersStream(RealmModel realm, boolean includeServiceAccounts)
UserProvider
getUsersStream
in interface UserProvider
realm
- a reference to the realm being used for the search.includeServiceAccounts
- true
if service accounts should be included in the result; false
otherwise.Stream
of users associated withe the realm.default List<UserModel> getUsers(RealmModel realm, int firstResult, int maxResults, boolean includeServiceAccounts)
getUsers
in interface UserProvider
Stream<UserModel> getUsersStream(RealmModel realm, Integer firstResult, Integer maxResults, boolean includeServiceAccounts)
UserProvider
getUsersStream
in interface UserProvider
realm
- a reference to the realm being used for the search.firstResult
- first result to return. Ignored if negative, zero, or null
.maxResults
- maximum number of results to return. Ignored if negative or null
.includeServiceAccounts
- true
if service accounts should be included in the result; false
otherwise.Stream
of users associated withe the realm.Copyright © 2021 JBoss by Red Hat. All rights reserved.