public class MapGroupAdapter extends AbstractGroupModel<MapGroupEntity>
GroupModel.GroupRemovedEvent, GroupModel.Streams
entity, realm, session
COMPARE_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, hashCode
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getAttribute, getSubGroups
getClientRoleMappings, getRealmRoleMappings, getRoleMappings
public 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)
GroupModel
public void removeAttribute(String name)
public String getFirstAttribute(String name)
public GroupModel getParent()
public String getParentId()
public Stream<GroupModel> getSubGroupsStream()
public void setParent(GroupModel group)
GroupModel
public void addChild(GroupModel subGroup)
GroupModel
public void removeChild(GroupModel subGroup)
GroupModel
public Stream<RoleModel> getRealmRoleMappingsStream()
RoleMapperModel
RoleModel
public Stream<RoleModel> getClientRoleMappingsStream(ClientModel app)
RoleMapperModel
app
- Client to get the roles forRoleModel
public boolean hasRole(RoleModel role)
RoleMapperModel
true
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)
RoleMapperModel
public Stream<RoleModel> getRoleMappingsStream()
RoleMapperModel
RoleModel
public void deleteRoleMapping(RoleModel role)
RoleMapperModel
role
- Role to removeCopyright © 2020 JBoss by Red Hat. All rights reserved.