Package org.keycloak.models
Interface UserModel.Streams
-
- All Superinterfaces:
RoleMapperModel,RoleMapperModel.Streams,UserModel
- All Known Subinterfaces:
CachedUserModel.Streams
- All Known Implementing Classes:
AbstractUserAdapter.Streams,AbstractUserAdapterFederatedStorage.Streams,UserModelDefaultMethods.Streams,UserModelDelegate
- Enclosing interface:
- UserModel
public static interface UserModel.Streams extends UserModel, RoleMapperModel.Streams
TheUserModel.Streamsinterface makes all collection-based methods inUserModeldefault by providing implementations that delegate to theStream-based variants instead of the other way around. It allows for implementations to focus on theStream-based approach for processing sets of data and benefit from the potential memory and performance optimizations of that approach.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.models.RoleMapperModel
RoleMapperModel.Streams
-
Nested classes/interfaces inherited from interface org.keycloak.models.UserModel
UserModel.RequiredAction, UserModel.SearchableFields, UserModel.Streams, UserModel.UserRemovedEvent
-
-
Field Summary
-
Fields inherited from interface org.keycloak.models.UserModel
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default List<String>getAttribute(String name)Stream<String>getAttributeStream(String name)Obtains all values associated with the specified attribute name.default Set<GroupModel>getGroups()Stream<GroupModel>getGroupsStream()Obtains the groups associated with the user.default Set<String>getRequiredActions()Stream<String>getRequiredActionsStream()Obtains the names of required actions associated with the user.-
Methods inherited from interface org.keycloak.models.RoleMapperModel
deleteRoleMapping, grantRole, hasDirectRole, hasRole
-
Methods inherited from interface org.keycloak.models.RoleMapperModel.Streams
getClientRoleMappings, getClientRoleMappingsStream, getRealmRoleMappings, getRealmRoleMappingsStream, getRoleMappings, getRoleMappingsStream
-
Methods inherited from interface org.keycloak.models.UserModel
addRequiredAction, addRequiredAction, getAttributes, getCreatedTimestamp, getEmail, getFederationLink, getFirstAttribute, getFirstName, getGroups, getGroups, getGroupsCount, getGroupsCountByNameContaining, getGroupsStream, getId, getLastName, getServiceAccountClientLink, getUsername, isEmailVerified, isEnabled, isMemberOf, joinGroup, leaveGroup, removeAttribute, removeRequiredAction, removeRequiredAction, setAttribute, setCreatedTimestamp, setEmail, setEmailVerified, setEnabled, setFederationLink, setFirstName, setLastName, setServiceAccountClientLink, setSingleAttribute, setUsername
-
-
-
-
Method Detail
-
getAttribute
default List<String> getAttribute(String name)
- Specified by:
getAttributein interfaceUserModel- Returns:
- list of all attribute values or empty list if there are not any values. Never return null
-
getAttributeStream
Stream<String> getAttributeStream(String name)
Description copied from interface:UserModelObtains all values associated with the specified attribute name.- Specified by:
getAttributeStreamin interfaceUserModel- Parameters:
name- the name of the attribute.- Returns:
- a non-null
Streamof attribute values.
-
getRequiredActions
default Set<String> getRequiredActions()
- Specified by:
getRequiredActionsin interfaceUserModel
-
getRequiredActionsStream
Stream<String> getRequiredActionsStream()
Description copied from interface:UserModelObtains the names of required actions associated with the user.- Specified by:
getRequiredActionsStreamin interfaceUserModel- Returns:
- a non-null
Streamof required action names.
-
getGroups
default Set<GroupModel> getGroups()
-
getGroupsStream
Stream<GroupModel> getGroupsStream()
Description copied from interface:UserModelObtains the groups associated with the user.- Specified by:
getGroupsStreamin interfaceUserModel- Returns:
- a non-null
Streamof groups.
-
-