Class ClientScopeAdapter
java.lang.Object
org.keycloak.models.cache.infinispan.ClientScopeAdapter
- All Implemented Interfaces:
ClientScopeModel
,OrderedModel
,ProtocolMapperContainerModel
,ScopeContainerModel
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.models.ClientScopeModel
ClientScopeModel.ClientScopeRemovedEvent
Nested classes/interfaces inherited from interface org.keycloak.models.OrderedModel
OrderedModel.OrderedModelComparator<OM extends OrderedModel>
-
Field Summary
Modifier and TypeFieldDescriptionprotected CachedClientScope
protected RealmModel
protected RealmCacheSession
protected boolean
protected ClientScopeModel
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
ConstructorDescriptionClientScopeAdapter
(RealmModel cachedRealm, CachedClientScope cached, RealmCacheSession cacheSession) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addScopeMapping
(RoleModel role) void
deleteScopeMapping
(RoleModel role) boolean
getAttribute
(String name) getId()
getName()
getProtocolMapperByName
(String protocol, String name) Returns protocol mappers as a stream.getRealm()
From the scope mappings returned byScopeContainerModel.getScopeMappingsStream()
returns only those that belong to the realm that owns this scope container.Returns scope mappings for this scope container as a stream.boolean
hasDirectScope
(RoleModel role) Returnstrue
, if this object has the given role directly in its scope.int
hashCode()
boolean
Returnstrue
, if this object has the given role directly or indirectly in its scope,false
otherwise.void
protected boolean
void
removeAttribute
(String name) void
removeProtocolMapper
(ProtocolMapperModel mapping) void
setAttribute
(String name, String value) void
setDescription
(String description) void
void
setProtocol
(String protocol) toString()
void
updateProtocolMapper
(ProtocolMapperModel mapping) 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 Details
-
cacheSession
-
cachedRealm
-
updated
-
cached
-
invalidated
protected boolean invalidated
-
-
Constructor Details
-
ClientScopeAdapter
public ClientScopeAdapter(RealmModel cachedRealm, CachedClientScope cached, RealmCacheSession cacheSession)
-
-
Method Details
-
invalidate
public void invalidate() -
isUpdated
protected boolean isUpdated() -
getId
- Specified by:
getId
in interfaceClientScopeModel
-
getRealm
- Specified by:
getRealm
in interfaceClientScopeModel
-
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
- Specified by:
addProtocolMapper
in interfaceProtocolMapperContainerModel
-
removeProtocolMapper
- Specified by:
removeProtocolMapper
in interfaceProtocolMapperContainerModel
-
updateProtocolMapper
- Specified by:
updateProtocolMapper
in interfaceProtocolMapperContainerModel
-
getProtocolMapperById
- Specified by:
getProtocolMapperById
in interfaceProtocolMapperContainerModel
-
getProtocolMapperByName
- Specified by:
getProtocolMapperByName
in interfaceProtocolMapperContainerModel
-
getName
- Specified by:
getName
in interfaceClientScopeModel
-
setName
- Specified by:
setName
in interfaceClientScopeModel
-
getDescription
- Specified by:
getDescription
in interfaceClientScopeModel
-
setDescription
- Specified by:
setDescription
in interfaceClientScopeModel
-
getProtocol
- Specified by:
getProtocol
in interfaceClientScopeModel
-
setProtocol
- Specified by:
setProtocol
in interfaceClientScopeModel
-
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
- Specified by:
addScopeMapping
in interfaceScopeContainerModel
-
deleteScopeMapping
- Specified by:
deleteScopeMapping
in interfaceScopeContainerModel
-
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
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:
-
hasScope
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:
-
setAttribute
- Specified by:
setAttribute
in interfaceClientScopeModel
-
removeAttribute
- Specified by:
removeAttribute
in interfaceClientScopeModel
-
getAttribute
- Specified by:
getAttribute
in interfaceClientScopeModel
-
getAttributes
- Specified by:
getAttributes
in interfaceClientScopeModel
-
equals
-
hashCode
public int hashCode() -
toString
-