public class MapGroupAdapter extends AbstractGroupModel<MapGroupEntity>
GroupModel.GroupRemovedEvent, 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) |
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() |
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 GroupModel getParent()
public String getParentId()
public Stream<GroupModel> getSubGroupsStream()
public void setParent(GroupModel group)
GroupModelpublic void addChild(GroupModel subGroup)
GroupModelpublic void removeChild(GroupModel subGroup)
GroupModelpublic Stream<RoleModel> getRealmRoleMappingsStream()
RoleMapperModelRoleModelpublic Stream<RoleModel> getClientRoleMappingsStream(ClientModel app)
RoleMapperModelapp - Client to get the roles forRoleModelpublic 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()
RoleMapperModelRoleModelpublic void deleteRoleMapping(RoleModel role)
RoleMapperModelrole - Role to removeCopyright © 2021 JBoss by Red Hat. All rights reserved.