public abstract static class AbstractUserAdapter.Streams extends AbstractUserAdapter implements UserModel.Streams
AbstractUserAdapter.Streams class extends the AbstractUserAdapter abstract class and implements
the UserModel.Streams interface, allowing subclasses to focus on the implementation of the Stream-based
query methods and providing default implementations for the collections-based variants that delegate to their
Stream counterparts.AbstractUserAdapter.StreamsUserModel.RequiredAction, UserModel.SearchableFields, UserModel.Streams, UserModel.UserRemovedEventcreated, realm, session, storageId, storageProviderModelCOMPARE_BY_USERNAME, DISABLED_REASON, EMAIL, EMAIL_VERIFIED, ENABLED, EXACT, FIRST_NAME, GROUPS, IDP_ALIAS, IDP_USER_ID, INCLUDE_SERVICE_ACCOUNT, LAST_NAME, LOCALE, SEARCH, USERNAME| Constructor and Description |
|---|
Streams(KeycloakSession session,
RealmModel realm,
ComponentModel storageProviderModel) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAttribute(String name) |
Stream<String> |
getAttributeStream(String name)
Obtains all values associated with the specified attribute name.
|
Set<RoleModel> |
getClientRoleMappings(ClientModel app)
Returns set of client roles that are directly set to this object for the given client.
|
Stream<RoleModel> |
getClientRoleMappingsStream(ClientModel app)
Returns stream of client roles that are directly set to this object for the given client.
|
Set<GroupModel> |
getGroups() |
Stream<GroupModel> |
getGroupsStream()
Obtains the groups associated with the user.
|
Set<RoleModel> |
getRealmRoleMappings()
Returns set of realm roles that are directly set to this object.
|
Stream<RoleModel> |
getRealmRoleMappingsStream()
Returns stream of realm roles that are directly set to this object.
|
Set<String> |
getRequiredActions() |
Stream<String> |
getRequiredActionsStream()
Obtains the names of required actions associated with the user.
|
Set<RoleModel> |
getRoleMappings()
Returns set of all role (both realm all client) that are directly set to this object.
|
Stream<RoleModel> |
getRoleMappingsStream()
Returns stream of all role (both realm all client) that are directly set to this object.
|
boolean |
hasRole(RoleModel role)
Returns
true if this object is directly or indirectly assigned the given role, false otherwise. |
boolean |
isMemberOf(GroupModel group) |
addRequiredAction, addRequiredAction, appendDefaultGroups, appendDefaultRolesToRoleMappings, deleteRoleMapping, equals, getAttributes, getCreatedTimestamp, getEmail, getFederationLink, getFirstAttribute, getFirstName, getGroupsInternal, getId, getLastName, getRoleMappingsInternal, getServiceAccountClientLink, grantRole, hashCode, isEmailVerified, isEnabled, joinGroup, leaveGroup, removeAttribute, removeRequiredAction, removeRequiredAction, setAttribute, setCreatedTimestamp, setEmail, setEmailVerified, setEnabled, setFederationLink, setFirstName, setLastName, setServiceAccountClientLink, setSingleAttribute, setUsernametoStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddRequiredAction, addRequiredAction, getAttributes, getCreatedTimestamp, getEmail, getFederationLink, getFirstAttribute, getFirstName, getGroups, getGroups, getGroupsCount, getGroupsCountByNameContaining, getGroupsStream, getId, getLastName, getServiceAccountClientLink, getUsername, isEmailVerified, isEnabled, joinGroup, leaveGroup, removeAttribute, removeRequiredAction, removeRequiredAction, setAttribute, setCreatedTimestamp, setEmail, setEmailVerified, setEnabled, setFederationLink, setFirstName, setLastName, setServiceAccountClientLink, setSingleAttribute, setUsernamedeleteRoleMapping, grantRolepublic Streams(KeycloakSession session, RealmModel realm, ComponentModel storageProviderModel)
public Set<String> getRequiredActions()
getRequiredActions in interface UserModelgetRequiredActions in interface UserModel.StreamsgetRequiredActions in class AbstractUserAdapterpublic Stream<String> getRequiredActionsStream()
UserModelgetRequiredActionsStream in interface UserModelgetRequiredActionsStream in interface UserModel.StreamsStream of required action names.public List<String> getAttribute(String name)
getAttribute in interface UserModelgetAttribute in interface UserModel.StreamsgetAttribute in class AbstractUserAdapterpublic Stream<String> getAttributeStream(String name)
UserModelgetAttributeStream in interface UserModelgetAttributeStream in interface UserModel.Streamsname - the name of the attribute.Stream of attribute values.public Set<GroupModel> getGroups()
getGroups in interface UserModelgetGroups in interface UserModel.StreamsgetGroups in class AbstractUserAdapterpublic Stream<GroupModel> getGroupsStream()
UserModelgetGroupsStream in interface UserModelgetGroupsStream in interface UserModel.StreamsStream of groups.public boolean isMemberOf(GroupModel group)
isMemberOf in interface UserModelisMemberOf in class AbstractUserAdapterpublic Set<RoleModel> getRealmRoleMappings()
RoleMapperModelgetRealmRoleMappings in interface RoleMapperModelgetRealmRoleMappings in interface RoleMapperModel.StreamsgetRealmRoleMappings in class AbstractUserAdapterpublic Stream<RoleModel> getRealmRoleMappingsStream()
RoleMapperModelgetRealmRoleMappingsStream in interface RoleMapperModelgetRealmRoleMappingsStream in interface RoleMapperModel.StreamsRoleModel. Never returns null.public Set<RoleModel> getClientRoleMappings(ClientModel app)
RoleMapperModelgetClientRoleMappings in interface RoleMapperModelgetClientRoleMappings in interface RoleMapperModel.StreamsgetClientRoleMappings in class AbstractUserAdapterapp - Client to get the roles forpublic Stream<RoleModel> getClientRoleMappingsStream(ClientModel app)
RoleMapperModelgetClientRoleMappingsStream in interface RoleMapperModelgetClientRoleMappingsStream in interface RoleMapperModel.Streamsapp - ClientModel Client to get the roles for.RoleModel. Never returns null.public Set<RoleModel> getRoleMappings()
RoleMapperModelgetRoleMappings in interface RoleMapperModelgetRoleMappings in interface RoleMapperModel.StreamsgetRoleMappings in class AbstractUserAdapterpublic Stream<RoleModel> getRoleMappingsStream()
RoleMapperModelgetRoleMappingsStream in interface RoleMapperModelgetRoleMappingsStream in interface RoleMapperModel.StreamsRoleModel. Never returns null.public boolean hasRole(RoleModel role)
RoleMapperModeltrue if this object is directly or indirectly assigned the given role, false otherwise.
For example, true is returned for hasRole(R) if:
hasRole in interface RoleMapperModelhasRole in class AbstractUserAdapterCopyright © 2021 JBoss by Red Hat. All rights reserved.