Package org.keycloak.models
Interface GroupModel
- 
- All Superinterfaces:
- RoleMapperModel
 - All Known Subinterfaces:
- GroupModel.Streams
 - All Known Implementing Classes:
- AbstractGroupModel,- GroupAdapter,- GroupAdapter,- MapGroupAdapter
 
 public interface GroupModel extends RoleMapperModel - Version:
- $Revision: 1 $
- Author:
- Bill Burke
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceGroupModel.GroupPathChangeEventstatic interfaceGroupModel.GroupRemovedEventstatic classGroupModel.SearchableFieldsstatic interfaceGroupModel.StreamsDeprecated.This interface is no longer necessary, collection-based methods were removed from the parent interface and therefore the parent interface can be used directly
 - 
Field SummaryFields Modifier and Type Field Description static Comparator<GroupModel>COMPARE_BY_NAME
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddChild(GroupModel subGroup)Automatically calls setParent() on the subGroupMap<String,List<String>>getAttributes()Stream<String>getAttributeStream(String name)Returns group attributes that match the given name as a stream.StringgetFirstAttribute(String name)StringgetId()StringgetName()GroupModelgetParent()StringgetParentId()Stream<GroupModel>getSubGroupsStream()Returns all sub groups for the parent group as a stream.voidremoveAttribute(String name)voidremoveChild(GroupModel subGroup)Automatically calls setParent() on the subGroupvoidsetAttribute(String name, List<String> values)voidsetName(String name)voidsetParent(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 interface org.keycloak.models.RoleMapperModeldeleteRoleMapping, getClientRoleMappingsStream, getRealmRoleMappingsStream, getRoleMappingsStream, grantRole, hasDirectRole, hasRole
 
- 
 
- 
- 
- 
Field Detail- 
COMPARE_BY_NAMEstatic final Comparator<GroupModel> COMPARE_BY_NAME 
 
- 
 - 
Method Detail- 
getIdString getId() 
 - 
getNameString getName() 
 - 
setNamevoid setName(String name) 
 - 
setSingleAttributevoid setSingleAttribute(String name, String value) Set single value of specified attribute. Remove all other existing values- Parameters:
- name-
- value-
 
 - 
removeAttributevoid removeAttribute(String name) 
 - 
getFirstAttributeString getFirstAttribute(String name) - Parameters:
- name-
- 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
 
 - 
getAttributeStreamStream<String> getAttributeStream(String name) Returns 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.
 
 - 
getParentGroupModel getParent() 
 - 
getParentIdString getParentId() 
 - 
getSubGroupsStreamStream<GroupModel> getSubGroupsStream() Returns all sub groups for the parent group as a stream.- Returns:
- Stream of GroupModel. Never returnsnull.
 
 - 
setParentvoid setParent(GroupModel group) You must also call addChild on the parent group, addChild on RealmModel if there is no parent group- Parameters:
- group-
 
 - 
addChildvoid addChild(GroupModel subGroup) Automatically calls setParent() on the subGroup- Parameters:
- subGroup-
 
 - 
removeChildvoid removeChild(GroupModel subGroup) Automatically calls setParent() on the subGroup- Parameters:
- subGroup-
 
 
- 
 
-