Class ClientScopeAdapter
- java.lang.Object
-
- org.keycloak.models.cache.infinispan.ClientScopeAdapter
-
- All Implemented Interfaces:
ClientScopeModel
,OrderedModel
,ProtocolMapperContainerModel
,ScopeContainerModel
public class ClientScopeAdapter extends Object implements ClientScopeModel
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.models.ClientScopeModel
ClientScopeModel.ClientScopeRemovedEvent, ClientScopeModel.SearchableFields
-
Nested classes/interfaces inherited from interface org.keycloak.models.OrderedModel
OrderedModel.OrderedModelComparator<OM extends OrderedModel>
-
-
Field Summary
Fields Modifier and Type Field Description protected CachedClientScope
cached
protected RealmModel
cachedRealm
protected RealmCacheSession
cacheSession
protected boolean
invalidated
protected ClientScopeModel
updated
-
Fields inherited from interface org.keycloak.models.ClientScopeModel
CONSENT_SCREEN_TEXT, DISPLAY_ON_CONSENT_SCREEN, DYNAMIC_SCOPE_REGEXP, GUI_ORDER, INCLUDE_IN_TOKEN_SCOPE, IS_DYNAMIC_SCOPE
-
-
Constructor Summary
Constructors Constructor Description ClientScopeAdapter(RealmModel cachedRealm, CachedClientScope cached, RealmCacheSession cacheSession)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.keycloak.models.ClientScopeModel
getConsentScreenText, getDynamicScopeRegexp, getGuiOrder, isDisplayOnConsentScreen, isDynamicScope, isIncludeInTokenScope, setConsentScreenText, setDisplayOnConsentScreen, setGuiOrder, setIncludeInTokenScope, setIsDynamicScope
-
-
-
-
Field Detail
-
cacheSession
protected RealmCacheSession cacheSession
-
cachedRealm
protected RealmModel cachedRealm
-
updated
protected ClientScopeModel updated
-
cached
protected CachedClientScope cached
-
invalidated
protected boolean invalidated
-
-
Constructor Detail
-
ClientScopeAdapter
public ClientScopeAdapter(RealmModel cachedRealm, CachedClientScope cached, RealmCacheSession cacheSession)
-
-
Method Detail
-
invalidate
public void invalidate()
-
isUpdated
protected boolean isUpdated()
-
getId
public String getId()
- Specified by:
getId
in interfaceClientScopeModel
-
getRealm
public RealmModel getRealm()
- Specified by:
getRealm
in interfaceClientScopeModel
-
getProtocolMappersStream
public Stream<ProtocolMapperModel> getProtocolMappersStream()
Description copied from interface:ProtocolMapperContainerModel
Returns protocol mappers as a stream.- Specified by:
getProtocolMappersStream
in interfaceProtocolMapperContainerModel
- Returns:
- Stream of protocol mapper. Never returns
null
.
-
addProtocolMapper
public ProtocolMapperModel addProtocolMapper(ProtocolMapperModel model)
- Specified by:
addProtocolMapper
in interfaceProtocolMapperContainerModel
-
removeProtocolMapper
public void removeProtocolMapper(ProtocolMapperModel mapping)
- Specified by:
removeProtocolMapper
in interfaceProtocolMapperContainerModel
-
updateProtocolMapper
public void updateProtocolMapper(ProtocolMapperModel mapping)
- Specified by:
updateProtocolMapper
in interfaceProtocolMapperContainerModel
-
getProtocolMapperById
public ProtocolMapperModel getProtocolMapperById(String id)
- Specified by:
getProtocolMapperById
in interfaceProtocolMapperContainerModel
-
getProtocolMapperByName
public ProtocolMapperModel getProtocolMapperByName(String protocol, String name)
- Specified by:
getProtocolMapperByName
in interfaceProtocolMapperContainerModel
-
getName
public String getName()
- Specified by:
getName
in interfaceClientScopeModel
-
setName
public void setName(String name)
- Specified by:
setName
in interfaceClientScopeModel
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceClientScopeModel
-
setDescription
public void setDescription(String description)
- Specified by:
setDescription
in interfaceClientScopeModel
-
getProtocol
public String getProtocol()
- Specified by:
getProtocol
in interfaceClientScopeModel
-
setProtocol
public void setProtocol(String protocol)
- Specified by:
setProtocol
in interfaceClientScopeModel
-
getScopeMappingsStream
public Stream<RoleModel> getScopeMappingsStream()
Description copied from interface:ScopeContainerModel
Returns scope mappings for this scope container as a stream.- Specified by:
getScopeMappingsStream
in interfaceScopeContainerModel
- Returns:
- Stream of
RoleModel
. Never returnsnull
.
-
addScopeMapping
public void addScopeMapping(RoleModel role)
- Specified by:
addScopeMapping
in interfaceScopeContainerModel
-
deleteScopeMapping
public void deleteScopeMapping(RoleModel role)
- Specified by:
deleteScopeMapping
in interfaceScopeContainerModel
-
getRealmScopeMappingsStream
public Stream<RoleModel> getRealmScopeMappingsStream()
Description copied from interface:ScopeContainerModel
From the scope mappings returned byScopeContainerModel.getScopeMappingsStream()
returns only those that belong to the realm that owns this scope container.- Specified by:
getRealmScopeMappingsStream
in interfaceScopeContainerModel
- Returns:
- stream of
RoleModel
. Never returnsnull
.
-
hasDirectScope
public boolean hasDirectScope(RoleModel role)
Description copied from interface:ScopeContainerModel
Returnstrue
, if this object has the given role directly in its scope.- Specified by:
hasDirectScope
in interfaceScopeContainerModel
- Parameters:
role
- the role- Returns:
- see description
- See Also:
if you want to check whether this object has the given role directly or indirectly in its scope
-
hasScope
public boolean hasScope(RoleModel role)
Description copied from interface:ScopeContainerModel
Returnstrue
, if this object has the given role directly or indirectly in its scope,false
otherwise.- Specified by:
hasScope
in interfaceScopeContainerModel
- Parameters:
role
- the role- Returns:
- see description
- See Also:
if you want to check if this object has the given role directly in its scope
-
setAttribute
public void setAttribute(String name, String value)
- Specified by:
setAttribute
in interfaceClientScopeModel
-
removeAttribute
public void removeAttribute(String name)
- Specified by:
removeAttribute
in interfaceClientScopeModel
-
getAttribute
public String getAttribute(String name)
- Specified by:
getAttribute
in interfaceClientScopeModel
-
getAttributes
public Map<String,String> getAttributes()
- Specified by:
getAttributes
in interfaceClientScopeModel
-
-