Class MapClientScopeAdapter
- java.lang.Object
-
- org.keycloak.models.map.clientscope.AbstractClientScopeModel<MapClientScopeEntity>
-
- org.keycloak.models.map.clientscope.MapClientScopeAdapter
-
- All Implemented Interfaces:
ClientScopeModel
,OrderedModel
,ProtocolMapperContainerModel
,ScopeContainerModel
public class MapClientScopeAdapter extends AbstractClientScopeModel<MapClientScopeEntity> implements ClientScopeModel
-
-
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 inherited from class org.keycloak.models.map.clientscope.AbstractClientScopeModel
entity, realm, session
-
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 MapClientScopeAdapter(KeycloakSession session, RealmModel realm, MapClientScopeEntity entity)
-
Method Summary
-
Methods inherited from class org.keycloak.models.map.clientscope.AbstractClientScopeModel
equals, hashCode
-
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
-
Methods inherited from interface org.keycloak.models.ScopeContainerModel
hasDirectScope
-
-
-
-
Constructor Detail
-
MapClientScopeAdapter
public MapClientScopeAdapter(KeycloakSession session, RealmModel realm, MapClientScopeEntity entity)
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getId
in interfaceClientScopeModel
-
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
-
getRealm
public RealmModel getRealm()
- Specified by:
getRealm
in interfaceClientScopeModel
-
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
-
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
-
getScopeMappingsStream
public Stream<RoleModel> getScopeMappingsStream()
Scopes mappings- Specified by:
getScopeMappingsStream
in interfaceScopeContainerModel
- Returns:
- Stream of
RoleModel
. Never returnsnull
.
-
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
.
-
addScopeMapping
public void addScopeMapping(RoleModel role)
- Specified by:
addScopeMapping
in interfaceScopeContainerModel
-
deleteScopeMapping
public void deleteScopeMapping(RoleModel role)
- Specified by:
deleteScopeMapping
in interfaceScopeContainerModel
-
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
-
-