Package org.keycloak.models.jpa
Class ClientScopeAdapter
java.lang.Object
org.keycloak.models.jpa.ClientScopeAdapter
- All Implemented Interfaces:
ClientScopeModel,JpaModel<ClientScopeEntity>,OrderedModel,ProtocolMapperContainerModel,ScopeContainerModel
public class ClientScopeAdapter
extends Object
implements ClientScopeModel, JpaModel<ClientScopeEntity>
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.models.ClientScopeModel
ClientScopeModel.ClientScopeCreatedEvent, ClientScopeModel.ClientScopeRemovedEventNested classes/interfaces inherited from interface org.keycloak.models.OrderedModel
OrderedModel.OrderedModelComparator<OM extends OrderedModel> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jakarta.persistence.EntityManagerprotected ClientScopeEntityprotected RealmModelprotected KeycloakSessionFields 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, VALUE_SEPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionClientScopeAdapter(RealmModel realm, jakarta.persistence.EntityManager em, KeycloakSession session, ClientScopeEntity entity) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddScopeMapping(RoleModel role) voiddeleteScopeMapping(RoleModel role) protected ProtocolMapperModelentityToModel(ProtocolMapperEntity entity) booleangetAttribute(String name) getId()getName()getProtocolMapperByName(String protocol, String name) protected ProtocolMapperEntityprotected ProtocolMapperEntitygetProtocolMapperEntityByName(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.inthashCode()booleanReturnstrue, if this object has the given role directly or indirectly in its scope,falseotherwise.voidremoveAttribute(String name) voidremoveProtocolMapper(ProtocolMapperModel mapping) voidsetAttribute(String name, String value) voidsetDescription(String description) voidvoidsetProtocol(String protocol) static ClientScopeEntitytoClientScopeEntity(ClientScopeModel model, jakarta.persistence.EntityManager em) toString()voidupdateProtocolMapper(ProtocolMapperModel mapping) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.keycloak.models.ClientScopeModel
getConsentScreenText, getDynamicScopeRegexp, getGuiOrder, isDisplayOnConsentScreen, isDynamicScope, isIncludeInTokenScope, setConsentScreenText, setDisplayOnConsentScreen, setGuiOrder, setIncludeInTokenScope, setIsDynamicScopeMethods inherited from interface org.keycloak.models.ScopeContainerModel
hasDirectScope
-
Field Details
-
session
-
realm
-
em
protected jakarta.persistence.EntityManager em -
entity
-
-
Constructor Details
-
ClientScopeAdapter
public ClientScopeAdapter(RealmModel realm, jakarta.persistence.EntityManager em, KeycloakSession session, ClientScopeEntity entity)
-
-
Method Details
-
getEntity
- Specified by:
getEntityin interfaceJpaModel<ClientScopeEntity>
-
getId
- Specified by:
getIdin interfaceClientScopeModel
-
getRealm
- Specified by:
getRealmin interfaceClientScopeModel
-
getName
- Specified by:
getNamein interfaceClientScopeModel
-
setName
- Specified by:
setNamein interfaceClientScopeModel
-
getDescription
- Specified by:
getDescriptionin interfaceClientScopeModel
-
setDescription
- Specified by:
setDescriptionin interfaceClientScopeModel
-
getProtocol
- Specified by:
getProtocolin interfaceClientScopeModel
-
setProtocol
- Specified by:
setProtocolin interfaceClientScopeModel
-
getProtocolMappersStream
Description copied from interface:ProtocolMapperContainerModelReturns protocol mappers as a stream.- Specified by:
getProtocolMappersStreamin interfaceProtocolMapperContainerModel- Returns:
- Stream of protocol mapper. Never returns
null.
-
addProtocolMapper
- Specified by:
addProtocolMapperin interfaceProtocolMapperContainerModel
-
getProtocolMapperEntity
-
getProtocolMapperEntityByName
-
removeProtocolMapper
- Specified by:
removeProtocolMapperin interfaceProtocolMapperContainerModel
-
updateProtocolMapper
- Specified by:
updateProtocolMapperin interfaceProtocolMapperContainerModel
-
getProtocolMapperById
- Specified by:
getProtocolMapperByIdin interfaceProtocolMapperContainerModel
-
getProtocolMapperByType
- Specified by:
getProtocolMapperByTypein interfaceProtocolMapperContainerModel
-
getProtocolMapperByName
- Specified by:
getProtocolMapperByNamein interfaceProtocolMapperContainerModel
-
entityToModel
-
getRealmScopeMappingsStream
Description copied from interface:ScopeContainerModelFrom the scope mappings returned byScopeContainerModel.getScopeMappingsStream()returns only those that belong to the realm that owns this scope container.- Specified by:
getRealmScopeMappingsStreamin interfaceScopeContainerModel- Returns:
- stream of
RoleModel. Never returnsnull.
-
getScopeMappingsStream
Description copied from interface:ScopeContainerModelReturns scope mappings for this scope container as a stream.- Specified by:
getScopeMappingsStreamin interfaceScopeContainerModel- Returns:
- Stream of
RoleModel. Never returnsnull.
-
addScopeMapping
- Specified by:
addScopeMappingin interfaceScopeContainerModel
-
deleteScopeMapping
- Specified by:
deleteScopeMappingin interfaceScopeContainerModel
-
hasScope
Description copied from interface:ScopeContainerModelReturnstrue, if this object has the given role directly or indirectly in its scope,falseotherwise.- Specified by:
hasScopein interfaceScopeContainerModel- Parameters:
role- the role- Returns:
- see description
- See Also:
-
setAttribute
- Specified by:
setAttributein interfaceClientScopeModel
-
removeAttribute
- Specified by:
removeAttributein interfaceClientScopeModel
-
getAttribute
- Specified by:
getAttributein interfaceClientScopeModel
-
toClientScopeEntity
public static ClientScopeEntity toClientScopeEntity(ClientScopeModel model, jakarta.persistence.EntityManager em) -
getAttributes
- Specified by:
getAttributesin interfaceClientScopeModel
-
equals
-
hashCode
public int hashCode() -
toString
-