public interface UserQueryProvider
| Modifier and Type | Interface and Description |
|---|---|
static interface |
UserQueryProvider.Streams
The
UserQueryProvider.Streams interface makes all collection-based methods in UserQueryProvider default by
providing implementations that delegate to the Stream-based variants instead of the other way around. |
| Modifier and Type | Method and Description |
|---|---|
static int |
countUsersInGroups(Stream<UserModel> users,
Set<String> groupIds)
Returns the number of users from the given list of users that are in at
least one of the groups given in the groups set.
|
List<UserModel> |
getGroupMembers(RealmModel realm,
GroupModel group)
Deprecated.
Use
getGroupMembersStream instead. |
List<UserModel> |
getGroupMembers(RealmModel realm,
GroupModel group,
int firstResult,
int maxResults)
Deprecated.
Use
getGroupMembersStream instead. |
default Stream<UserModel> |
getGroupMembersStream(RealmModel realm,
GroupModel group)
Obtains users that belong to a specific group.
|
default Stream<UserModel> |
getGroupMembersStream(RealmModel realm,
GroupModel group,
Integer firstResult,
Integer maxResults)
Obtains users that belong to a specific group.
|
default List<UserModel> |
getRoleMembers(RealmModel realm,
RoleModel role)
Deprecated.
Use
getRoleMembersStream instead. |
default List<UserModel> |
getRoleMembers(RealmModel realm,
RoleModel role,
int firstResult,
int maxResults)
Deprecated.
Use
getRoleMembersStream instead. |
default Stream<UserModel> |
getRoleMembersStream(RealmModel realm,
RoleModel role)
Obtains users that have the specified role.
|
default Stream<UserModel> |
getRoleMembersStream(RealmModel realm,
RoleModel role,
Integer firstResult,
Integer maxResults)
Searches for users that have the specified role.
|
List<UserModel> |
getUsers(RealmModel realm)
Deprecated.
Use
getUsersStream instead. |
List<UserModel> |
getUsers(RealmModel realm,
int firstResult,
int maxResults)
Deprecated.
Use
getUsersStream instead. |
default int |
getUsersCount(Map<String,String> params,
RealmModel realm)
Returns the number of users that match the given filter parameters.
|
default int |
getUsersCount(Map<String,String> params,
RealmModel realm,
Set<String> groupIds)
Returns the number of users that match the given filter parameters and is in
at least one of the given groups.
|
int |
getUsersCount(RealmModel realm)
Returns the number of users, without consider any service account.
|
default int |
getUsersCount(RealmModel realm,
boolean includeServiceAccount)
Returns the number of users.
|
default int |
getUsersCount(RealmModel realm,
Set<String> groupIds)
Returns the number of users that are in at least one of the groups
given.
|
default int |
getUsersCount(String search,
RealmModel realm)
Returns the number of users that match the given criteria.
|
default int |
getUsersCount(String search,
RealmModel realm,
Set<String> groupIds)
Returns the number of users that match the given criteria and are in
at least one of the groups given.
|
default Stream<UserModel> |
getUsersStream(RealmModel realm)
Searches all users in the realm.
|
default Stream<UserModel> |
getUsersStream(RealmModel realm,
int firstResult,
int maxResults)
Searches all users in the realm, starting from the
firstResult and containing at most maxResults. |
List<UserModel> |
searchForUser(Map<String,String> params,
RealmModel realm)
Deprecated.
Use
searchForUserStream instead. |
List<UserModel> |
searchForUser(Map<String,String> params,
RealmModel realm,
int firstResult,
int maxResults)
Deprecated.
Use
searchForUserStream instead. |
List<UserModel> |
searchForUser(String search,
RealmModel realm)
Deprecated.
Use
searchForUserStream instead. |
List<UserModel> |
searchForUser(String search,
RealmModel realm,
int firstResult,
int maxResults)
Deprecated.
Use
searchForUserStream instead. |
List<UserModel> |
searchForUserByUserAttribute(String attrName,
String attrValue,
RealmModel realm)
Deprecated.
Use
searchForUserByUserAttributeStream
instead. |
default Stream<UserModel> |
searchForUserByUserAttributeStream(String attrName,
String attrValue,
RealmModel realm)
Searches for users that have a specific attribute with a specific value.
|
default Stream<UserModel> |
searchForUserStream(Map<String,String> params,
RealmModel realm)
Searches for user by parameter.
|
default Stream<UserModel> |
searchForUserStream(Map<String,String> params,
RealmModel realm,
Integer firstResult,
Integer maxResults)
Searches for user by parameter.
|
default Stream<UserModel> |
searchForUserStream(String search,
RealmModel realm)
Searches for users with username, email or first + last name that is like search string.
|
default Stream<UserModel> |
searchForUserStream(String search,
RealmModel realm,
Integer firstResult,
Integer maxResults)
Searches for users with username, email or first + last name that is like search string.
|
int getUsersCount(RealmModel realm)
realm - the realmdefault int getUsersCount(RealmModel realm, Set<String> groupIds)
realm - the realmgroupIds - set of groups id to check fordefault int getUsersCount(String search, RealmModel realm)
search - search criteriarealm - the realmdefault int getUsersCount(String search, RealmModel realm, Set<String> groupIds)
search - search criteriarealm - the realmgroupIds - set of groups to check fordefault int getUsersCount(Map<String,String> params, RealmModel realm)
params - filter parametersrealm - the realmdefault int getUsersCount(Map<String,String> params, RealmModel realm, Set<String> groupIds)
params - filter parametersrealm - the realmgroupIds - set if groups to check forstatic int countUsersInGroups(Stream<UserModel> users, Set<String> groupIds)
users - list of users to checkgroupIds - id of groups that should be checked fordefault int getUsersCount(RealmModel realm, boolean includeServiceAccount)
realm - the realmincludeServiceAccount - if true, the number of users will also include service accounts. Otherwise, only the number of users.@Deprecated List<UserModel> getUsers(RealmModel realm)
getUsersStream instead.default Stream<UserModel> getUsersStream(RealmModel realm)
realm - a reference to the realm.Stream of users.@Deprecated List<UserModel> getUsers(RealmModel realm, int firstResult, int maxResults)
getUsersStream instead.default Stream<UserModel> getUsersStream(RealmModel realm, int firstResult, int maxResults)
firstResult and containing at most maxResults.realm - a reference to the realm.firstResult - first result to return. Ignored if negative.maxResults - maximum number of results to return. Ignored if negative.Stream of users.@Deprecated List<UserModel> searchForUser(String search, RealmModel realm)
searchForUserStream instead.search - realm - default Stream<UserModel> searchForUserStream(String search, RealmModel realm)
search - case sensitive search string.realm - a reference to the realm.Stream of users that match the search string.@Deprecated List<UserModel> searchForUser(String search, RealmModel realm, int firstResult, int maxResults)
searchForUserStream instead.search - realm - firstResult - maxResults - default Stream<UserModel> searchForUserStream(String search, RealmModel realm, Integer firstResult, Integer maxResults)
search - case sensitive search string.realm - a reference to the realm.firstResult - first result to return. Ignored if negative.maxResults - maximum number of results to return. Ignored if negative.Stream of users that match the search criteria.@Deprecated List<UserModel> searchForUser(Map<String,String> params, RealmModel realm)
searchForUserStream instead.params - realm - default Stream<UserModel> searchForUserStream(Map<String,String> params, RealmModel realm)
params - a map containing the search parameters.realm - a reference to the realm.Stream of users that match the search parameters.@Deprecated List<UserModel> searchForUser(Map<String,String> params, RealmModel realm, int firstResult, int maxResults)
searchForUserStream instead.params - realm - firstResult - maxResults - default Stream<UserModel> searchForUserStream(Map<String,String> params, RealmModel realm, Integer firstResult, Integer maxResults)
params - a map containing the search parameters.realm - a reference to the realm.firstResult - first result to return. Ignored if negative.maxResults - maximum number of results to return. Ignored if negative.Stream of users that match the search criteria.@Deprecated List<UserModel> getGroupMembers(RealmModel realm, GroupModel group)
getGroupMembersStream instead.realm - group - UserFederatedStorageProviderdefault Stream<UserModel> getGroupMembersStream(RealmModel realm, GroupModel group)
UserFederatedStorageProvider
as this is done automatically.realm - a reference to the realm.group - a reference to the group.Stream of users that belong to the group.UserFederatedStorageProvider@Deprecated List<UserModel> getGroupMembers(RealmModel realm, GroupModel group, int firstResult, int maxResults)
getGroupMembersStream instead.realm - group - firstResult - maxResults - UserFederatedStorageProviderdefault Stream<UserModel> getGroupMembersStream(RealmModel realm, GroupModel group, Integer firstResult, Integer maxResults)
UserFederatedStorageProvider
as this is done automatically.realm - a reference to the realm.group - a reference to the group.firstResult - first result to return. Ignored if negative.maxResults - maximum number of results to return. Ignored if negative.Stream of users that belong to the group.UserFederatedStorageProvider@Deprecated default List<UserModel> getRoleMembers(RealmModel realm, RoleModel role)
getRoleMembersStream instead.realm - role - default Stream<UserModel> getRoleMembersStream(RealmModel realm, RoleModel role)
realm - a reference to the realm.role - a reference to the role.Stream of users that have the specified role.@Deprecated default List<UserModel> getRoleMembers(RealmModel realm, RoleModel role, int firstResult, int maxResults)
getRoleMembersStream instead.role - firstResult - maxResults - default Stream<UserModel> getRoleMembersStream(RealmModel realm, RoleModel role, Integer firstResult, Integer maxResults)
realm - a reference to the realm.role - a reference to the role.firstResult - first result to return. Ignored if negative.maxResults - maximum number of results to return. Ignored if negative.Stream of users that have the specified role.@Deprecated List<UserModel> searchForUserByUserAttribute(String attrName, String attrValue, RealmModel realm)
searchForUserByUserAttributeStream
instead.attrName - attrValue - realm - UserFederatedStorageProviderdefault Stream<UserModel> searchForUserByUserAttributeStream(String attrName, String attrValue, RealmModel realm)
UserFederatedStorageProvider as this is done automatically.attrName - the attribute name.attrValue - the attribute value.realm - a reference to the realm.Stream of users that match the search criteria.UserFederatedStorageProviderCopyright © 2021 JBoss by Red Hat. All rights reserved.