Class RoleAdapter
- java.lang.Object
- 
- org.keycloak.models.cache.infinispan.RoleAdapter
 
- 
- All Implemented Interfaces:
- RoleModel
 
 public class RoleAdapter extends Object implements RoleModel - Version:
- $Revision: 1 $
- Author:
- Bill Burke
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.keycloak.models.RoleModelRoleModel.RoleNameChangeEvent, RoleModel.SearchableFields
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected CachedRolecachedprotected RealmCacheSessioncacheSessionprotected Set<RoleModel>compositesprotected booleaninvalidatedprotected RealmModelrealmprotected RoleModelupdated
 - 
Constructor SummaryConstructors Constructor Description RoleAdapter(CachedRole cached, RealmCacheSession session, RealmModel realm)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCompositeRole(RoleModel role)booleanequals(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.Stream<RoleModel>getCompositesStream(String search, Integer first, Integer max)Returns a paginated stream of composite roles ofthisrole that contain given string in its name.RoleContainerModelgetContainer()StringgetContainerId()protected voidgetDelegateForUpdate()StringgetDescription()StringgetFirstAttribute(String name)StringgetId()StringgetName()inthashCode()booleanhasRole(RoleModel role)voidinvalidate()booleanisClientRole()booleanisComposite()protected booleanisUpdated()voidremoveAttribute(String name)voidremoveCompositeRole(RoleModel role)voidsetAttribute(String name, List<String> values)voidsetDescription(String description)voidsetName(String name)voidsetSingleAttribute(String name, String value)
 
- 
- 
- 
Field Detail- 
updatedprotected RoleModel updated 
 - 
cachedprotected CachedRole cached 
 - 
cacheSessionprotected RealmCacheSession cacheSession 
 - 
realmprotected RealmModel realm 
 - 
invalidatedprotected boolean invalidated 
 
- 
 - 
Constructor Detail- 
RoleAdapterpublic RoleAdapter(CachedRole cached, RealmCacheSession session, RealmModel realm) 
 
- 
 - 
Method Detail- 
getDelegateForUpdateprotected void getDelegateForUpdate() 
 - 
invalidatepublic void invalidate() 
 - 
isUpdatedprotected boolean isUpdated() 
 - 
getDescriptionpublic String getDescription() - Specified by:
- getDescriptionin interface- RoleModel
 
 - 
setDescriptionpublic void setDescription(String description) - Specified by:
- setDescriptionin interface- RoleModel
 
 - 
isCompositepublic boolean isComposite() - Specified by:
- isCompositein interface- RoleModel
 
 - 
addCompositeRolepublic void addCompositeRole(RoleModel role) - Specified by:
- addCompositeRolein interface- RoleModel
 
 - 
removeCompositeRolepublic void removeCompositeRole(RoleModel role) - Specified by:
- removeCompositeRolein interface- RoleModel
 
 - 
getCompositesStreampublic Stream<RoleModel> getCompositesStream() Description copied from interface:RoleModelReturns all composite roles as a stream.- Specified by:
- getCompositesStreamin interface- RoleModel
- Returns:
- Stream of RoleModel. Never returnsnull.
 
 - 
getCompositesStreampublic Stream<RoleModel> getCompositesStream(String search, Integer first, Integer max) Description copied from interface:RoleModelReturns a paginated stream of composite roles ofthisrole that contain given string in its name.- Specified by:
- getCompositesStreamin interface- RoleModel
- Parameters:
- search- Case-insensitive search string
- first- Index of the first result to return. Ignored if negative or- null.
- max- Maximum number of results to return. Ignored if negative or- null.
- Returns:
- A stream of requested roles ordered by the role name
 
 - 
isClientRolepublic boolean isClientRole() - Specified by:
- isClientRolein interface- RoleModel
 
 - 
getContainerIdpublic String getContainerId() - Specified by:
- getContainerIdin interface- RoleModel
 
 - 
getContainerpublic RoleContainerModel getContainer() - Specified by:
- getContainerin interface- RoleModel
 
 - 
setSingleAttributepublic void setSingleAttribute(String name, String value) - Specified by:
- setSingleAttributein interface- RoleModel
 
 - 
setAttributepublic void setAttribute(String name, List<String> values) - Specified by:
- setAttributein interface- RoleModel
 
 - 
removeAttributepublic void removeAttribute(String name) - Specified by:
- removeAttributein interface- RoleModel
 
 - 
getFirstAttributepublic String getFirstAttribute(String name) - Specified by:
- getFirstAttributein interface- RoleModel
 
 - 
getAttributeStreampublic Stream<String> getAttributeStream(String name) Description copied from interface:RoleModelReturns all role's attributes that match the given name as a stream.- Specified by:
- getAttributeStreamin interface- RoleModel
- Parameters:
- name-- StringName of an attribute to be used as a filter.
- Returns:
- Stream of String. Never returnsnull.
 
 - 
getAttributespublic Map<String,List<String>> getAttributes() - Specified by:
- getAttributesin interface- RoleModel
 
 
- 
 
-