Package org.keycloak.models.map.group
Class MapGroupAdapter
java.lang.Object
org.keycloak.models.map.group.AbstractGroupModel<MapGroupEntity>
org.keycloak.models.map.group.MapGroupAdapter
- All Implemented Interfaces:
- GroupModel,- RoleMapperModel
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.keycloak.models.GroupModelGroupModel.GroupPathChangeEvent, GroupModel.GroupRemovedEvent, GroupModel.SearchableFields
- 
Field SummaryFields inherited from class org.keycloak.models.map.group.AbstractGroupModelentity, realm, sessionFields inherited from interface org.keycloak.models.GroupModelCOMPARE_BY_NAME
- 
Constructor SummaryConstructorsConstructorDescriptionMapGroupAdapter(KeycloakSession session, RealmModel realm, MapGroupEntity entity) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddChild(GroupModel subGroup) Automatically calls setParent() on the subGroupvoiddeleteRoleMapping(RoleModel role) Removes the given role mapping from this object.getAttributeStream(String name) Returns group attributes that match the given name as a stream.Returns stream of client roles that are directly set to this object for the given client.getFirstAttribute(String name) getId()getName()Returns stream of realm roles that are directly set to this object.Returns stream of all role (both realm all client) that are directly set to this object.voidGrants the given role to this object.booleanhasDirectRole(RoleModel role) Returnstrue, if this object is directly assigned the given role.booleanReturnstrueif this object is directly or indirectly assigned the given role,falseotherwise.voidremoveAttribute(String name) voidremoveChild(GroupModel subGroup) Automatically calls setParent() on the subGroupvoidsetAttribute(String name, List<String> values) voidvoidsetParent(GroupModel group) You must also call addChild on the parent group, addChild on RealmModel if there is no parent groupvoidsetSingleAttribute(String name, String value) Set single value of specified attribute.Methods inherited from class org.keycloak.models.map.group.AbstractGroupModelequals, hashCodeMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.models.GroupModelgetSubGroupsStream
- 
Constructor Details- 
MapGroupAdapter
 
- 
- 
Method Details- 
getId
- 
getName
- 
setName
- 
setSingleAttributeDescription copied from interface:GroupModelSet single value of specified attribute. Remove all other existing values
- 
setAttribute
- 
removeAttribute
- 
getFirstAttribute- Returns:
- null if there is not any value of specified attribute or first value otherwise. Don't throw exception if there are more values of the attribute
 
- 
getAttributeStreamDescription copied from interface:GroupModelReturns group attributes that match the given name as a stream.- 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.
 
- 
getAttributes
- 
getParent
- 
getParentId
- 
setParentDescription copied from interface:GroupModelYou must also call addChild on the parent group, addChild on RealmModel if there is no parent group
- 
addChildDescription copied from interface:GroupModelAutomatically calls setParent() on the subGroup
- 
removeChildDescription copied from interface:GroupModelAutomatically calls setParent() on the subGroup
- 
getRealmRoleMappingsStreamDescription copied from interface:RoleMapperModelReturns stream of realm roles that are directly set to this object.- Returns:
- Stream of RoleModel. Never returnsnull.
 
- 
getClientRoleMappingsStreamDescription copied from interface:RoleMapperModelReturns stream of client roles that are directly set to this object for the given client.- Parameters:
- app-- ClientModelClient to get the roles for.
- Returns:
- Stream of RoleModel. Never returnsnull.
 
- 
hasDirectRoleDescription copied from interface:RoleMapperModelReturnstrue, if this object is directly assigned the given role.- Parameters:
- role- the role
- Returns:
- see description
- See Also:
 
- 
hasRoleDescription copied from interface:RoleMapperModelReturnstrueif this object is directly or indirectly assigned the given role,falseotherwise.For example, trueis returned for hasRole(R) if:- R is directly assigned to this object
- R is indirectly assigned to this object via composites
- R is not assigned to this object but this object belongs to a group G which is assigned the role R
- R is not assigned to this object but this object belongs to a group G, and G belongs to group H which is assigned the role R
 - Returns:
- see description
- See Also:
 
- 
grantRoleDescription copied from interface:RoleMapperModelGrants the given role to this object.
- 
getRoleMappingsStreamDescription copied from interface:RoleMapperModelReturns stream of all role (both realm all client) that are directly set to this object.- Returns:
- Stream of RoleModel. Never returnsnull.
 
- 
deleteRoleMappingDescription copied from interface:RoleMapperModelRemoves the given role mapping from this object.- Parameters:
- role- Role to remove
 
 
-