Package org.keycloak.models
Interface GroupModel.Streams
-
- All Superinterfaces:
GroupModel,RoleMapperModel,RoleMapperModel.Streams
- Enclosing interface:
- GroupModel
public static interface GroupModel.Streams extends GroupModel, RoleMapperModel.Streams
TheGroupModel.Streamsinterface makes all collection-based methods inGroupModeldefault 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:
getAttributein 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:GroupModelReturns group attributes that match the given name as a stream.- Specified by:
getAttributeStreamin interfaceGroupModel- Parameters:
name-StringName 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:
getSubGroupsin interfaceGroupModel
-
getSubGroupsStream
Stream<GroupModel> getSubGroupsStream()
Description copied from interface:GroupModelReturns all sub groups for the parent group as a stream.- Specified by:
getSubGroupsStreamin interfaceGroupModel- Returns:
- Stream of
GroupModel. Never returnsnull.
-
-