public abstract class MapRoleAdapter<K> extends AbstractRoleModel<MapRoleEntity<K>> implements RoleModel
RoleModel.SearchableFields
entity, realm, session
Constructor and Description |
---|
MapRoleAdapter(KeycloakSession session,
RealmModel realm,
MapRoleEntity<K> entity) |
Modifier and Type | Method and Description |
---|---|
void |
addCompositeRole(RoleModel role) |
Map<String,List<String>> |
getAttributes() |
Stream<String> |
getAttributeStream(String name)
Returns all role's attributes that match the given name as a stream.
|
Stream<RoleModel> |
getCompositesStream()
Returns all composite roles as a stream.
|
RoleContainerModel |
getContainer() |
String |
getContainerId() |
String |
getDescription() |
String |
getName() |
boolean |
hasRole(RoleModel role) |
boolean |
isClientRole() |
boolean |
isComposite() |
void |
removeAttribute(String name) |
void |
removeCompositeRole(RoleModel role) |
void |
setAttribute(String name,
List<String> values) |
void |
setDescription(String description) |
void |
setName(String name) |
void |
setSingleAttribute(String name,
String value) |
String |
toString() |
equals, hashCode
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAttribute, getComposites, getFirstAttribute, getId
public MapRoleAdapter(KeycloakSession session, RealmModel realm, MapRoleEntity<K> entity)
public String getDescription()
getDescription
in interface RoleModel
public void setDescription(String description)
setDescription
in interface RoleModel
public boolean isComposite()
isComposite
in interface RoleModel
public Stream<RoleModel> getCompositesStream()
RoleModel
getCompositesStream
in interface RoleModel
RoleModel
. Never returns null
.public void addCompositeRole(RoleModel role)
addCompositeRole
in interface RoleModel
public void removeCompositeRole(RoleModel role)
removeCompositeRole
in interface RoleModel
public boolean isClientRole()
isClientRole
in interface RoleModel
public String getContainerId()
getContainerId
in interface RoleModel
public RoleContainerModel getContainer()
getContainer
in interface RoleModel
public void setAttribute(String name, List<String> values)
setAttribute
in interface RoleModel
public void setSingleAttribute(String name, String value)
setSingleAttribute
in interface RoleModel
public void removeAttribute(String name)
removeAttribute
in interface RoleModel
public Map<String,List<String>> getAttributes()
getAttributes
in interface RoleModel
public Stream<String> getAttributeStream(String name)
RoleModel
getAttributeStream
in interface RoleModel
name
- String
Name of an attribute to be used as a filter.String
. Never returns null
.Copyright © 2021 JBoss by Red Hat. All rights reserved.