public class MapGroupAdapter extends AbstractGroupModel<MapGroupEntity>
GroupModel.GroupRemovedEvent, GroupModel.SearchableFields, GroupModel.Streamsentity, realm, sessionCOMPARE_BY_NAME| Constructor and Description |
|---|
MapGroupAdapter(KeycloakSession session,
RealmModel realm,
MapGroupEntity entity) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(GroupModel subGroup)
Automatically calls setParent() on the subGroup
|
void |
deleteRoleMapping(RoleModel role)
Removes the given role mapping from this object.
|
Map<String,List<String>> |
getAttributes() |
Stream<String> |
getAttributeStream(String name)
Returns group attributes that match the given name as a stream.
|
Stream<RoleModel> |
getClientRoleMappingsStream(ClientModel app)
Returns stream of client roles that are directly set to this object for the given client.
|
String |
getFirstAttribute(String name) |
String |
getId() |
String |
getName() |
GroupModel |
getParent() |
String |
getParentId() |
Stream<RoleModel> |
getRealmRoleMappingsStream()
Returns stream of realm roles that are directly set to this object.
|
Stream<RoleModel> |
getRoleMappingsStream()
Returns stream of all role (both realm all client) that are directly set to this object.
|
Stream<GroupModel> |
getSubGroupsStream()
Returns all sub groups for the parent group as a stream.
|
void |
grantRole(RoleModel role)
Grants the given role to this object.
|
boolean |
hasRole(RoleModel role)
Returns
true if this object is directly or indirectly assigned the given role, false otherwise. |
void |
removeAttribute(String name) |
void |
removeChild(GroupModel subGroup)
Automatically calls setParent() on the subGroup
|
void |
setAttribute(String name,
List<String> values) |
void |
setName(String name) |
void |
setParent(GroupModel group)
You must also call addChild on the parent group, addChild on RealmModel if there is no parent group
|
void |
setSingleAttribute(String name,
String value)
Set single value of specified attribute.
|
equals, hashCodeclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetAttribute, getSubGroupsgetClientRoleMappings, getRealmRoleMappings, getRoleMappingspublic MapGroupAdapter(KeycloakSession session, RealmModel realm, MapGroupEntity entity)
public String getId()
public String getName()
public void setName(String name)
public void setSingleAttribute(String name, String value)
GroupModelpublic void removeAttribute(String name)
public String getFirstAttribute(String name)
public Stream<String> getAttributeStream(String name)
GroupModelname - String Name of the attribute to be used as a filter.null.public GroupModel getParent()
public String getParentId()
public Stream<GroupModel> getSubGroupsStream()
GroupModelGroupModel. Never returns null.public void setParent(GroupModel group)
GroupModelpublic void addChild(GroupModel subGroup)
GroupModelpublic void removeChild(GroupModel subGroup)
GroupModelpublic Stream<RoleModel> getRealmRoleMappingsStream()
RoleMapperModelRoleModel. Never returns null.public Stream<RoleModel> getClientRoleMappingsStream(ClientModel app)
RoleMapperModelapp - ClientModel Client to get the roles for.RoleModel. Never returns null.public boolean hasRole(RoleModel role)
RoleMapperModeltrue if this object is directly or indirectly assigned the given role, false otherwise.
For example, true is returned for hasRole(R) if:
public void grantRole(RoleModel role)
RoleMapperModelpublic Stream<RoleModel> getRoleMappingsStream()
RoleMapperModelRoleModel. Never returns null.public void deleteRoleMapping(RoleModel role)
RoleMapperModelrole - Role to removeCopyright © 2021 JBoss by Red Hat. All rights reserved.