Class RoleAdapter
java.lang.Object
org.keycloak.models.cache.infinispan.RoleAdapter
- All Implemented Interfaces:
RoleModel
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.models.RoleModel
RoleModel.RoleNameChangeEvent, RoleModel.SearchableFields
-
Field Summary
Modifier and TypeFieldDescriptionprotected CachedRole
protected RealmCacheSession
protected boolean
protected RealmModel
protected RoleModel
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCompositeRole
(RoleModel role) boolean
getAttributeStream
(String name) Returns all role's attributes that match the given name as a stream.Returns all composite roles as a stream.getCompositesStream
(String search, Integer first, Integer max) Returns a paginated stream of composite roles ofthis
role that contain given string in its name.protected void
getFirstAttribute
(String name) getId()
getName()
int
hashCode()
boolean
void
boolean
boolean
protected boolean
void
removeAttribute
(String name) void
removeCompositeRole
(RoleModel role) void
setAttribute
(String name, List<String> values) void
setDescription
(String description) void
void
setSingleAttribute
(String name, String value)
-
Field Details
-
updated
-
cached
-
cacheSession
-
realm
-
composites
-
invalidated
protected boolean invalidated
-
-
Constructor Details
-
RoleAdapter
-
-
Method Details
-
getDelegateForUpdate
protected void getDelegateForUpdate() -
invalidate
public void invalidate() -
isUpdated
protected boolean isUpdated() -
getName
-
getDescription
- Specified by:
getDescription
in interfaceRoleModel
-
setDescription
- Specified by:
setDescription
in interfaceRoleModel
-
getId
-
setName
-
isComposite
public boolean isComposite()- Specified by:
isComposite
in interfaceRoleModel
-
addCompositeRole
- Specified by:
addCompositeRole
in interfaceRoleModel
-
removeCompositeRole
- Specified by:
removeCompositeRole
in interfaceRoleModel
-
getCompositesStream
Description copied from interface:RoleModel
Returns all composite roles as a stream.- Specified by:
getCompositesStream
in interfaceRoleModel
- Returns:
- Stream of
RoleModel
. Never returnsnull
.
-
getCompositesStream
Description copied from interface:RoleModel
Returns a paginated stream of composite roles ofthis
role that contain given string in its name.- Specified by:
getCompositesStream
in interfaceRoleModel
- Parameters:
search
- Case-insensitive search stringfirst
- Index of the first result to return. Ignored if negative ornull
.max
- Maximum number of results to return. Ignored if negative ornull
.- Returns:
- A stream of requested roles ordered by the role name
-
isClientRole
public boolean isClientRole()- Specified by:
isClientRole
in interfaceRoleModel
-
getContainerId
- Specified by:
getContainerId
in interfaceRoleModel
-
getContainer
- Specified by:
getContainer
in interfaceRoleModel
-
hasRole
-
setSingleAttribute
- Specified by:
setSingleAttribute
in interfaceRoleModel
-
setAttribute
- Specified by:
setAttribute
in interfaceRoleModel
-
removeAttribute
- Specified by:
removeAttribute
in interfaceRoleModel
-
getFirstAttribute
- Specified by:
getFirstAttribute
in interfaceRoleModel
-
getAttributeStream
Description copied from interface:RoleModel
Returns all role's attributes that match the given name as a stream.- Specified by:
getAttributeStream
in interfaceRoleModel
- Parameters:
name
-String
Name of an attribute to be used as a filter.- Returns:
- Stream of
String
. Never returnsnull
.
-
getAttributes
- Specified by:
getAttributes
in interfaceRoleModel
-
equals
-
hashCode
public int hashCode()
-