public abstract static class AbstractUserAdapterFederatedStorage.Streams extends AbstractUserAdapterFederatedStorage implements UserModel.Streams
AbstractUserAdapterFederatedStorage.Streams
class extends the AbstractUserAdapterFederatedStorage
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.AbstractUserAdapterFederatedStorage.Streams
UserModel.RequiredAction, UserModel.SearchableFields, UserModel.Streams, UserModel.UserRemovedEvent
CREATED_TIMESTAMP_ATTRIBUTE, EMAIL_ATTRIBUTE, EMAIL_VERIFIED_ATTRIBUTE, ENABLED_ATTRIBUTE, FIRST_NAME_ATTRIBUTE, LAST_NAME_ATTRIBUTE, realm, session, storageId, storageProviderModel
COMPARE_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)
Gets role mappings from federated storage and automatically appends default roles.
|
Stream<RoleModel> |
getClientRoleMappingsStream(ClientModel app)
Returns stream of client roles that are directly set to this object for the given client.
|
Set<GroupModel> |
getGroups()
Gets groups from federated storage and automatically appends default groups of realm.
|
Stream<GroupModel> |
getGroupsStream()
Obtains the groups associated with the user.
|
Set<RoleModel> |
getRealmRoleMappings()
Gets role mappings from federated storage and automatically appends default roles.
|
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()
Gets role mappings from federated storage and automatically appends default roles.
|
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, getFederatedRoleMappings, getFederatedStorage, getFederationLink, getFirstAttribute, getGroupsInternal, getId, getRoleMappingsInternal, getServiceAccountClientLink, grantRole, hashCode, isEmailVerified, isEnabled, joinGroup, leaveGroup, mapAttribute, removeAttribute, removeRequiredAction, removeRequiredAction, setAttribute, setCreatedTimestamp, setEmailVerified, setEnabled, setFederationLink, setServiceAccountClientLink, setSingleAttribute
getEmail, getFirstName, getLastName, setEmail, setFirstName, setLastName, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addRequiredAction, 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, setUsername
deleteRoleMapping, grantRole
public Streams(KeycloakSession session, RealmModel realm, ComponentModel storageProviderModel)
public Set<String> getRequiredActions()
getRequiredActions
in interface UserModel
getRequiredActions
in interface UserModel.Streams
getRequiredActions
in class AbstractUserAdapterFederatedStorage
public Stream<String> getRequiredActionsStream()
UserModel
getRequiredActionsStream
in interface UserModel
getRequiredActionsStream
in interface UserModel.Streams
Stream
of required action names.public List<String> getAttribute(String name)
getAttribute
in interface UserModel
getAttribute
in interface UserModel.Streams
getAttribute
in class AbstractUserAdapterFederatedStorage
public Stream<String> getAttributeStream(String name)
UserModel
getAttributeStream
in interface UserModel
getAttributeStream
in interface UserModel.Streams
name
- the name of the attribute.Stream
of attribute values.public Set<GroupModel> getGroups()
AbstractUserAdapterFederatedStorage
getGroups
in interface UserModel
getGroups
in interface UserModel.Streams
getGroups
in class AbstractUserAdapterFederatedStorage
public Stream<GroupModel> getGroupsStream()
UserModel
getGroupsStream
in interface UserModel
getGroupsStream
in interface UserModel.Streams
Stream
of groups.public boolean isMemberOf(GroupModel group)
isMemberOf
in interface UserModel
isMemberOf
in class AbstractUserAdapterFederatedStorage
public Set<RoleModel> getRealmRoleMappings()
AbstractUserAdapterFederatedStorage
getRealmRoleMappings
in interface RoleMapperModel
getRealmRoleMappings
in interface RoleMapperModel.Streams
getRealmRoleMappings
in class AbstractUserAdapterFederatedStorage
public Stream<RoleModel> getRealmRoleMappingsStream()
RoleMapperModel
getRealmRoleMappingsStream
in interface RoleMapperModel
getRealmRoleMappingsStream
in interface RoleMapperModel.Streams
RoleModel
. Never returns null
.public Set<RoleModel> getClientRoleMappings(ClientModel app)
AbstractUserAdapterFederatedStorage
getClientRoleMappings
in interface RoleMapperModel
getClientRoleMappings
in interface RoleMapperModel.Streams
getClientRoleMappings
in class AbstractUserAdapterFederatedStorage
app
- Client to get the roles forpublic Stream<RoleModel> getClientRoleMappingsStream(ClientModel app)
RoleMapperModel
getClientRoleMappingsStream
in interface RoleMapperModel
getClientRoleMappingsStream
in interface RoleMapperModel.Streams
app
- ClientModel
Client to get the roles for.RoleModel
. Never returns null
.public Set<RoleModel> getRoleMappings()
AbstractUserAdapterFederatedStorage
getRoleMappings
in interface RoleMapperModel
getRoleMappings
in interface RoleMapperModel.Streams
getRoleMappings
in class AbstractUserAdapterFederatedStorage
public Stream<RoleModel> getRoleMappingsStream()
RoleMapperModel
getRoleMappingsStream
in interface RoleMapperModel
getRoleMappingsStream
in interface RoleMapperModel.Streams
RoleModel
. Never returns null
.public boolean hasRole(RoleModel role)
RoleMapperModel
true
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 RoleMapperModel
hasRole
in class AbstractUserAdapterFederatedStorage
Copyright © 2021 JBoss by Red Hat. All rights reserved.