public class RoleAdapter extends Object implements RoleModel
RoleModel.SearchableFields
Modifier and Type | Field and Description |
---|---|
protected CachedRole |
cached |
protected RealmCacheSession |
cacheSession |
protected Set<RoleModel> |
composites |
protected boolean |
invalidated |
protected RealmModel |
realm |
protected RoleModel |
updated |
Constructor and Description |
---|
RoleAdapter(CachedRole cached,
RealmCacheSession session,
RealmModel realm) |
Modifier and Type | Method and Description |
---|---|
void |
addCompositeRole(RoleModel role) |
boolean |
equals(Object o) |
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() |
protected void |
getDelegateForUpdate() |
String |
getDescription() |
String |
getFirstAttribute(String name) |
String |
getId() |
String |
getName() |
int |
hashCode() |
boolean |
hasRole(RoleModel role) |
void |
invalidate() |
boolean |
isClientRole() |
boolean |
isComposite() |
protected boolean |
isUpdated() |
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) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getAttribute, getComposites
protected RoleModel updated
protected CachedRole cached
protected RealmCacheSession cacheSession
protected RealmModel realm
protected boolean invalidated
public RoleAdapter(CachedRole cached, RealmCacheSession session, RealmModel realm)
protected void getDelegateForUpdate()
public void invalidate()
protected boolean isUpdated()
public String getDescription()
getDescription
in interface RoleModel
public void setDescription(String description)
setDescription
in interface RoleModel
public boolean isComposite()
isComposite
in interface RoleModel
public void addCompositeRole(RoleModel role)
addCompositeRole
in interface RoleModel
public void removeCompositeRole(RoleModel role)
removeCompositeRole
in interface RoleModel
public Stream<RoleModel> getCompositesStream()
RoleModel
getCompositesStream
in interface RoleModel
RoleModel
. Never returns null
.public boolean isClientRole()
isClientRole
in interface RoleModel
public String getContainerId()
getContainerId
in interface RoleModel
public RoleContainerModel getContainer()
getContainer
in interface RoleModel
public void setSingleAttribute(String name, String value)
setSingleAttribute
in interface RoleModel
public void setAttribute(String name, List<String> values)
setAttribute
in interface RoleModel
public void removeAttribute(String name)
removeAttribute
in interface RoleModel
public String getFirstAttribute(String name)
getFirstAttribute
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
.public Map<String,List<String>> getAttributes()
getAttributes
in interface RoleModel
Copyright © 2021 JBoss by Red Hat. All rights reserved.