Package org.keycloak.models
Interface GroupModel.Streams
-
- All Superinterfaces:
GroupModel
,RoleMapperModel
,RoleMapperModel.Streams
- All Known Implementing Classes:
AbstractGroupModel
,GroupAdapter
,GroupAdapter
,MapGroupAdapter
- Enclosing interface:
- GroupModel
public static interface GroupModel.Streams extends GroupModel, RoleMapperModel.Streams
TheGroupModel.Streams
interface makes all collection-based methods inGroupModel
default 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.GroupModel
GroupModel.GroupRemovedEvent, GroupModel.SearchableFields, GroupModel.Streams
-
Nested classes/interfaces inherited from interface org.keycloak.models.RoleMapperModel
RoleMapperModel.Streams
-
-
Field Summary
-
Fields inherited from interface org.keycloak.models.GroupModel
COMPARE_BY_NAME
-
-
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)
Returns group attributes that match the given name as a stream.default Set<GroupModel>
getSubGroups()
Stream<GroupModel>
getSubGroupsStream()
Returns all sub groups for the parent group as a stream.-
Methods inherited from interface org.keycloak.models.GroupModel
addChild, getAttributes, getFirstAttribute, getId, getName, getParent, getParentId, removeAttribute, removeChild, setAttribute, setName, setParent, setSingleAttribute
-
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
-
-
-
-
Method Detail
-
getAttribute
default List<String> getAttribute(String name)
- Specified by:
getAttribute
in interfaceGroupModel
- 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:GroupModel
Returns group attributes that match the given name as a stream.- Specified by:
getAttributeStream
in interfaceGroupModel
- Parameters:
name
-String
Name of the attribute to be used as a filter.- Returns:
- Stream of all attribute values or empty stream if there are not any values. Never return
null
.
-
getSubGroups
default Set<GroupModel> getSubGroups()
- Specified by:
getSubGroups
in interfaceGroupModel
-
getSubGroupsStream
Stream<GroupModel> getSubGroupsStream()
Description copied from interface:GroupModel
Returns all sub groups for the parent group as a stream.- Specified by:
getSubGroupsStream
in interfaceGroupModel
- Returns:
- Stream of
GroupModel
. Never returnsnull
.
-
-