public class ClientScopeAdapter extends Object implements ClientScopeModel, JpaModel<ClientScopeEntity>
ClientScopeModel.ClientScopeRemovedEvent, ClientScopeModel.SearchableFields
OrderedModel.OrderedModelComparator<OM extends OrderedModel>
Modifier and Type | Field and Description |
---|---|
protected javax.persistence.EntityManager |
em |
protected ClientScopeEntity |
entity |
protected RealmModel |
realm |
protected KeycloakSession |
session |
CONSENT_SCREEN_TEXT, DISPLAY_ON_CONSENT_SCREEN, GUI_ORDER, INCLUDE_IN_TOKEN_SCOPE
Constructor and Description |
---|
ClientScopeAdapter(RealmModel realm,
javax.persistence.EntityManager em,
KeycloakSession session,
ClientScopeEntity entity) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getConsentScreenText, getGuiOrder, isDisplayOnConsentScreen, isIncludeInTokenScope, setConsentScreenText, setDisplayOnConsentScreen, setGuiOrder, setIncludeInTokenScope
getProtocolMappers
getRealmScopeMappings, getScopeMappings
protected KeycloakSession session
protected RealmModel realm
protected javax.persistence.EntityManager em
protected ClientScopeEntity entity
public ClientScopeAdapter(RealmModel realm, javax.persistence.EntityManager em, KeycloakSession session, ClientScopeEntity entity)
public ClientScopeEntity getEntity()
getEntity
in interface JpaModel<ClientScopeEntity>
public String getId()
getId
in interface ClientScopeModel
public RealmModel getRealm()
getRealm
in interface ClientScopeModel
public String getName()
getName
in interface ClientScopeModel
public void setName(String name)
setName
in interface ClientScopeModel
public String getDescription()
getDescription
in interface ClientScopeModel
public void setDescription(String description)
setDescription
in interface ClientScopeModel
public String getProtocol()
getProtocol
in interface ClientScopeModel
public void setProtocol(String protocol)
setProtocol
in interface ClientScopeModel
public Stream<ProtocolMapperModel> getProtocolMappersStream()
ProtocolMapperContainerModel
getProtocolMappersStream
in interface ProtocolMapperContainerModel
null
.public ProtocolMapperModel addProtocolMapper(ProtocolMapperModel model)
addProtocolMapper
in interface ProtocolMapperContainerModel
protected ProtocolMapperEntity getProtocolMapperEntity(String id)
protected ProtocolMapperEntity getProtocolMapperEntityByName(String protocol, String name)
public void removeProtocolMapper(ProtocolMapperModel mapping)
removeProtocolMapper
in interface ProtocolMapperContainerModel
public void updateProtocolMapper(ProtocolMapperModel mapping)
updateProtocolMapper
in interface ProtocolMapperContainerModel
public ProtocolMapperModel getProtocolMapperById(String id)
getProtocolMapperById
in interface ProtocolMapperContainerModel
public ProtocolMapperModel getProtocolMapperByName(String protocol, String name)
getProtocolMapperByName
in interface ProtocolMapperContainerModel
protected ProtocolMapperModel entityToModel(ProtocolMapperEntity entity)
public Stream<RoleModel> getRealmScopeMappingsStream()
ScopeContainerModel
ScopeContainerModel.getScopeMappingsStream()
returns only those
that belong to the realm that owns this scope container.getRealmScopeMappingsStream
in interface ScopeContainerModel
RoleModel
. Never returns null
.public Stream<RoleModel> getScopeMappingsStream()
ScopeContainerModel
getScopeMappingsStream
in interface ScopeContainerModel
RoleModel
. Never returns null
.public void addScopeMapping(RoleModel role)
addScopeMapping
in interface ScopeContainerModel
public void deleteScopeMapping(RoleModel role)
deleteScopeMapping
in interface ScopeContainerModel
public boolean hasScope(RoleModel role)
hasScope
in interface ScopeContainerModel
public void setAttribute(String name, String value)
setAttribute
in interface ClientScopeModel
public void removeAttribute(String name)
removeAttribute
in interface ClientScopeModel
public String getAttribute(String name)
getAttribute
in interface ClientScopeModel
public static ClientScopeEntity toClientScopeEntity(ClientScopeModel model, javax.persistence.EntityManager em)
public Map<String,String> getAttributes()
getAttributes
in interface ClientScopeModel
Copyright © 2021 JBoss by Red Hat. All rights reserved.