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.StreamsUserModel.RequiredAction, UserModel.Streams, UserModel.UserRemovedEventCREATED_TIMESTAMP_ATTRIBUTE, EMAIL_ATTRIBUTE, EMAIL_VERIFIED_ATTRIBUTE, ENABLED_ATTRIBUTE, FIRST_NAME_ATTRIBUTE, LAST_NAME_ATTRIBUTE, realm, session, storageId, storageProviderModelCOMPARE_BY_USERNAME, 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, setSingleAttributegetEmail, getFirstName, getLastName, setEmail, setFirstName, setLastName, toStringclone, 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 AbstractUserAdapterFederatedStoragepublic 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 AbstractUserAdapterFederatedStoragepublic 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()
AbstractUserAdapterFederatedStoragegetGroups in interface UserModelgetGroups in interface UserModel.StreamsgetGroups in class AbstractUserAdapterFederatedStoragepublic Stream<GroupModel> getGroupsStream()
UserModelgetGroupsStream in interface UserModelgetGroupsStream in interface UserModel.StreamsStream of groups.public boolean isMemberOf(GroupModel group)
isMemberOf in interface UserModelisMemberOf in class AbstractUserAdapterFederatedStoragepublic Set<RoleModel> getRealmRoleMappings()
AbstractUserAdapterFederatedStoragegetRealmRoleMappings in interface RoleMapperModelgetRealmRoleMappings in interface RoleMapperModel.StreamsgetRealmRoleMappings in class AbstractUserAdapterFederatedStoragepublic Stream<RoleModel> getRealmRoleMappingsStream()
RoleMapperModelgetRealmRoleMappingsStream in interface RoleMapperModelgetRealmRoleMappingsStream in interface RoleMapperModel.StreamsRoleModelpublic Set<RoleModel> getClientRoleMappings(ClientModel app)
AbstractUserAdapterFederatedStoragegetClientRoleMappings in interface RoleMapperModelgetClientRoleMappings in interface RoleMapperModel.StreamsgetClientRoleMappings in class AbstractUserAdapterFederatedStorageapp - Client to get the roles forpublic Stream<RoleModel> getClientRoleMappingsStream(ClientModel app)
RoleMapperModelgetClientRoleMappingsStream in interface RoleMapperModelgetClientRoleMappingsStream in interface RoleMapperModel.Streamsapp - Client to get the roles forRoleModelpublic Set<RoleModel> getRoleMappings()
AbstractUserAdapterFederatedStoragegetRoleMappings in interface RoleMapperModelgetRoleMappings in interface RoleMapperModel.StreamsgetRoleMappings in class AbstractUserAdapterFederatedStoragepublic Stream<RoleModel> getRoleMappingsStream()
RoleMapperModelgetRoleMappingsStream in interface RoleMapperModelgetRoleMappingsStream in interface RoleMapperModel.StreamsRoleModelpublic 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 AbstractUserAdapterFederatedStorageCopyright © 2021 JBoss by Red Hat. All rights reserved.