Package org.keycloak.models.delegate
Class ClientModelLazyDelegate
- java.lang.Object
-
- org.keycloak.models.delegate.ClientModelLazyDelegate
-
- All Implemented Interfaces:
ClientModel
,ClientScopeModel
,OrderedModel
,ProtocolMapperContainerModel
,RoleContainerModel
,ScopeContainerModel
- Direct Known Subclasses:
ClientModelLazyDelegate.WithId
public class ClientModelLazyDelegate extends Object implements ClientModel
- Author:
- hmlnarik
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClientModelLazyDelegate.WithId
-
Nested classes/interfaces inherited from interface org.keycloak.models.ClientModel
ClientModel.ClientCreationEvent, ClientModel.ClientIdChangeEvent, ClientModel.ClientProtocolUpdatedEvent, ClientModel.ClientRemovedEvent, ClientModel.ClientUpdatedEvent, ClientModel.SearchableFields
-
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>
-
Nested classes/interfaces inherited from interface org.keycloak.models.RoleContainerModel
RoleContainerModel.RoleRemovedEvent
-
-
Field Summary
-
Fields inherited from interface org.keycloak.models.ClientModel
LOGO_URI, POLICY_URI, PRIVATE_KEY, PUBLIC_KEY, TOS_URI, X509CERTIFICATE
-
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 ClientModelLazyDelegate(Supplier<ClientModel> delegateSupplier)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.models.RoleContainerModel
getDefaultRoles
-
-
-
-
Constructor Detail
-
ClientModelLazyDelegate
public ClientModelLazyDelegate(Supplier<ClientModel> delegateSupplier)
-
-
Method Detail
-
updateClient
public void updateClient()
- Specified by:
updateClient
in interfaceClientModel
-
getId
public String getId()
- Specified by:
getId
in interfaceClientModel
- Specified by:
getId
in interfaceClientScopeModel
- Specified by:
getId
in interfaceRoleContainerModel
-
getClientId
public String getClientId()
- Specified by:
getClientId
in interfaceClientModel
-
setClientId
public void setClientId(String clientId)
- Specified by:
setClientId
in interfaceClientModel
-
getName
public String getName()
- Specified by:
getName
in interfaceClientModel
- Specified by:
getName
in interfaceClientScopeModel
-
setName
public void setName(String name)
- Specified by:
setName
in interfaceClientModel
- Specified by:
setName
in interfaceClientScopeModel
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceClientModel
- Specified by:
getDescription
in interfaceClientScopeModel
-
setDescription
public void setDescription(String description)
- Specified by:
setDescription
in interfaceClientModel
- Specified by:
setDescription
in interfaceClientScopeModel
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceClientModel
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabled
in interfaceClientModel
-
isAlwaysDisplayInConsole
public boolean isAlwaysDisplayInConsole()
- Specified by:
isAlwaysDisplayInConsole
in interfaceClientModel
-
setAlwaysDisplayInConsole
public void setAlwaysDisplayInConsole(boolean alwaysDisplayInConsole)
- Specified by:
setAlwaysDisplayInConsole
in interfaceClientModel
-
isSurrogateAuthRequired
public boolean isSurrogateAuthRequired()
- Specified by:
isSurrogateAuthRequired
in interfaceClientModel
-
setSurrogateAuthRequired
public void setSurrogateAuthRequired(boolean surrogateAuthRequired)
- Specified by:
setSurrogateAuthRequired
in interfaceClientModel
-
getWebOrigins
public Set<String> getWebOrigins()
- Specified by:
getWebOrigins
in interfaceClientModel
-
setWebOrigins
public void setWebOrigins(Set<String> webOrigins)
- Specified by:
setWebOrigins
in interfaceClientModel
-
addWebOrigin
public void addWebOrigin(String webOrigin)
- Specified by:
addWebOrigin
in interfaceClientModel
-
removeWebOrigin
public void removeWebOrigin(String webOrigin)
- Specified by:
removeWebOrigin
in interfaceClientModel
-
getRedirectUris
public Set<String> getRedirectUris()
- Specified by:
getRedirectUris
in interfaceClientModel
-
setRedirectUris
public void setRedirectUris(Set<String> redirectUris)
- Specified by:
setRedirectUris
in interfaceClientModel
-
addRedirectUri
public void addRedirectUri(String redirectUri)
- Specified by:
addRedirectUri
in interfaceClientModel
-
removeRedirectUri
public void removeRedirectUri(String redirectUri)
- Specified by:
removeRedirectUri
in interfaceClientModel
-
getManagementUrl
public String getManagementUrl()
- Specified by:
getManagementUrl
in interfaceClientModel
-
setManagementUrl
public void setManagementUrl(String url)
- Specified by:
setManagementUrl
in interfaceClientModel
-
getRootUrl
public String getRootUrl()
- Specified by:
getRootUrl
in interfaceClientModel
-
setRootUrl
public void setRootUrl(String url)
- Specified by:
setRootUrl
in interfaceClientModel
-
getBaseUrl
public String getBaseUrl()
- Specified by:
getBaseUrl
in interfaceClientModel
-
setBaseUrl
public void setBaseUrl(String url)
- Specified by:
setBaseUrl
in interfaceClientModel
-
isBearerOnly
public boolean isBearerOnly()
- Specified by:
isBearerOnly
in interfaceClientModel
-
setBearerOnly
public void setBearerOnly(boolean only)
- Specified by:
setBearerOnly
in interfaceClientModel
-
getNodeReRegistrationTimeout
public int getNodeReRegistrationTimeout()
- Specified by:
getNodeReRegistrationTimeout
in interfaceClientModel
-
setNodeReRegistrationTimeout
public void setNodeReRegistrationTimeout(int timeout)
- Specified by:
setNodeReRegistrationTimeout
in interfaceClientModel
-
getClientAuthenticatorType
public String getClientAuthenticatorType()
- Specified by:
getClientAuthenticatorType
in interfaceClientModel
-
setClientAuthenticatorType
public void setClientAuthenticatorType(String clientAuthenticatorType)
- Specified by:
setClientAuthenticatorType
in interfaceClientModel
-
validateSecret
public boolean validateSecret(String secret)
- Specified by:
validateSecret
in interfaceClientModel
-
getSecret
public String getSecret()
- Specified by:
getSecret
in interfaceClientModel
-
setSecret
public void setSecret(String secret)
- Specified by:
setSecret
in interfaceClientModel
-
getRegistrationToken
public String getRegistrationToken()
- Specified by:
getRegistrationToken
in interfaceClientModel
-
setRegistrationToken
public void setRegistrationToken(String registrationToken)
- Specified by:
setRegistrationToken
in interfaceClientModel
-
getProtocol
public String getProtocol()
- Specified by:
getProtocol
in interfaceClientModel
- Specified by:
getProtocol
in interfaceClientScopeModel
-
setProtocol
public void setProtocol(String protocol)
- Specified by:
setProtocol
in interfaceClientModel
- Specified by:
setProtocol
in interfaceClientScopeModel
-
setAttribute
public void setAttribute(String name, String value)
- Specified by:
setAttribute
in interfaceClientModel
- Specified by:
setAttribute
in interfaceClientScopeModel
-
removeAttribute
public void removeAttribute(String name)
- Specified by:
removeAttribute
in interfaceClientModel
- Specified by:
removeAttribute
in interfaceClientScopeModel
-
getAttribute
public String getAttribute(String name)
- Specified by:
getAttribute
in interfaceClientModel
- Specified by:
getAttribute
in interfaceClientScopeModel
-
getAttributes
public Map<String,String> getAttributes()
- Specified by:
getAttributes
in interfaceClientModel
- Specified by:
getAttributes
in interfaceClientScopeModel
-
getAuthenticationFlowBindingOverride
public String getAuthenticationFlowBindingOverride(String binding)
- Specified by:
getAuthenticationFlowBindingOverride
in interfaceClientModel
-
getAuthenticationFlowBindingOverrides
public Map<String,String> getAuthenticationFlowBindingOverrides()
- Specified by:
getAuthenticationFlowBindingOverrides
in interfaceClientModel
-
removeAuthenticationFlowBindingOverride
public void removeAuthenticationFlowBindingOverride(String binding)
- Specified by:
removeAuthenticationFlowBindingOverride
in interfaceClientModel
-
setAuthenticationFlowBindingOverride
public void setAuthenticationFlowBindingOverride(String binding, String flowId)
- Specified by:
setAuthenticationFlowBindingOverride
in interfaceClientModel
-
isFrontchannelLogout
public boolean isFrontchannelLogout()
- Specified by:
isFrontchannelLogout
in interfaceClientModel
-
setFrontchannelLogout
public void setFrontchannelLogout(boolean flag)
- Specified by:
setFrontchannelLogout
in interfaceClientModel
-
isFullScopeAllowed
public boolean isFullScopeAllowed()
- Specified by:
isFullScopeAllowed
in interfaceClientModel
-
setFullScopeAllowed
public void setFullScopeAllowed(boolean value)
- Specified by:
setFullScopeAllowed
in interfaceClientModel
-
isPublicClient
public boolean isPublicClient()
- Specified by:
isPublicClient
in interfaceClientModel
-
setPublicClient
public void setPublicClient(boolean flag)
- Specified by:
setPublicClient
in interfaceClientModel
-
isConsentRequired
public boolean isConsentRequired()
- Specified by:
isConsentRequired
in interfaceClientModel
-
setConsentRequired
public void setConsentRequired(boolean consentRequired)
- Specified by:
setConsentRequired
in interfaceClientModel
-
isStandardFlowEnabled
public boolean isStandardFlowEnabled()
- Specified by:
isStandardFlowEnabled
in interfaceClientModel
-
setStandardFlowEnabled
public void setStandardFlowEnabled(boolean standardFlowEnabled)
- Specified by:
setStandardFlowEnabled
in interfaceClientModel
-
isImplicitFlowEnabled
public boolean isImplicitFlowEnabled()
- Specified by:
isImplicitFlowEnabled
in interfaceClientModel
-
setImplicitFlowEnabled
public void setImplicitFlowEnabled(boolean implicitFlowEnabled)
- Specified by:
setImplicitFlowEnabled
in interfaceClientModel
-
isDirectAccessGrantsEnabled
public boolean isDirectAccessGrantsEnabled()
- Specified by:
isDirectAccessGrantsEnabled
in interfaceClientModel
-
setDirectAccessGrantsEnabled
public void setDirectAccessGrantsEnabled(boolean directAccessGrantsEnabled)
- Specified by:
setDirectAccessGrantsEnabled
in interfaceClientModel
-
isServiceAccountsEnabled
public boolean isServiceAccountsEnabled()
- Specified by:
isServiceAccountsEnabled
in interfaceClientModel
-
setServiceAccountsEnabled
public void setServiceAccountsEnabled(boolean serviceAccountsEnabled)
- Specified by:
setServiceAccountsEnabled
in interfaceClientModel
-
getRealm
public RealmModel getRealm()
- Specified by:
getRealm
in interfaceClientModel
- Specified by:
getRealm
in interfaceClientScopeModel
-
addClientScope
public void addClientScope(ClientScopeModel clientScope, boolean defaultScope)
- Specified by:
addClientScope
in interfaceClientModel
-
addClientScopes
public void addClientScopes(Set<ClientScopeModel> clientScopes, boolean defaultScope)
- Specified by:
addClientScopes
in interfaceClientModel
-
removeClientScope
public void removeClientScope(ClientScopeModel clientScope)
- Specified by:
removeClientScope
in interfaceClientModel
-
getClientScopes
public Map<String,ClientScopeModel> getClientScopes(boolean defaultScope)
- Specified by:
getClientScopes
in interfaceClientModel
-
getDynamicClientScope
public ClientScopeModel getDynamicClientScope(String scope)
- Specified by:
getDynamicClientScope
in interfaceClientModel
-
getNotBefore
public int getNotBefore()
- Specified by:
getNotBefore
in interfaceClientModel
-
setNotBefore
public void setNotBefore(int notBefore)
- Specified by:
setNotBefore
in interfaceClientModel
-
getRegisteredNodes
public Map<String,Integer> getRegisteredNodes()
- Specified by:
getRegisteredNodes
in interfaceClientModel
-
registerNode
public void registerNode(String nodeHost, int registrationTime)
- Specified by:
registerNode
in interfaceClientModel
-
unregisterNode
public void unregisterNode(String nodeHost)
- Specified by:
unregisterNode
in interfaceClientModel
-
isDisplayOnConsentScreen
public boolean isDisplayOnConsentScreen()
- Specified by:
isDisplayOnConsentScreen
in interfaceClientModel
- Specified by:
isDisplayOnConsentScreen
in interfaceClientScopeModel
-
getConsentScreenText
public String getConsentScreenText()
- Specified by:
getConsentScreenText
in interfaceClientModel
- Specified by:
getConsentScreenText
in interfaceClientScopeModel
-
setDisplayOnConsentScreen
public void setDisplayOnConsentScreen(boolean displayOnConsentScreen)
- Specified by:
setDisplayOnConsentScreen
in interfaceClientScopeModel
-
setConsentScreenText
public void setConsentScreenText(String consentScreenText)
- Specified by:
setConsentScreenText
in interfaceClientScopeModel
-
getGuiOrder
public String getGuiOrder()
- Specified by:
getGuiOrder
in interfaceClientScopeModel
- Specified by:
getGuiOrder
in interfaceOrderedModel
-
setGuiOrder
public void setGuiOrder(String guiOrder)
- Specified by:
setGuiOrder
in interfaceClientScopeModel
-
isIncludeInTokenScope
public boolean isIncludeInTokenScope()
- Specified by:
isIncludeInTokenScope
in interfaceClientScopeModel
-
setIncludeInTokenScope
public void setIncludeInTokenScope(boolean includeInTokenScope)
- Specified by:
setIncludeInTokenScope
in interfaceClientScopeModel
-
isDynamicScope
public boolean isDynamicScope()
- Specified by:
isDynamicScope
in interfaceClientScopeModel
-
setIsDynamicScope
public void setIsDynamicScope(boolean isDynamicScope)
- Specified by:
setIsDynamicScope
in interfaceClientScopeModel
-
getDynamicScopeRegexp
public String getDynamicScopeRegexp()
- Specified by:
getDynamicScopeRegexp
in interfaceClientScopeModel
-
getScopeMappingsStream
public Stream<RoleModel> getScopeMappingsStream()
- Specified by:
getScopeMappingsStream
in interfaceScopeContainerModel
-
getRealmScopeMappingsStream
public Stream<RoleModel> getRealmScopeMappingsStream()
- Specified by:
getRealmScopeMappingsStream
in interfaceScopeContainerModel
-
addScopeMapping
public void addScopeMapping(RoleModel role)
- Specified by:
addScopeMapping
in interfaceScopeContainerModel
-
deleteScopeMapping
public void deleteScopeMapping(RoleModel role)
- Specified by:
deleteScopeMapping
in interfaceScopeContainerModel
-
hasDirectScope
public boolean hasDirectScope(RoleModel role)
- Specified by:
hasDirectScope
in interfaceClientModel
- Specified by:
hasDirectScope
in interfaceScopeContainerModel
-
hasScope
public boolean hasScope(RoleModel role)
- Specified by:
hasScope
in interfaceScopeContainerModel
-
getRole
public RoleModel getRole(String name)
- Specified by:
getRole
in interfaceRoleContainerModel
-
addRole
public RoleModel addRole(String name)
- Specified by:
addRole
in interfaceRoleContainerModel
-
addRole
public RoleModel addRole(String id, String name)
- Specified by:
addRole
in interfaceRoleContainerModel
-
removeRole
public boolean removeRole(RoleModel role)
- Specified by:
removeRole
in interfaceRoleContainerModel
-
getRolesStream
public Stream<RoleModel> getRolesStream()
- Specified by:
getRolesStream
in interfaceRoleContainerModel
-
getRolesStream
public Stream<RoleModel> getRolesStream(Integer firstResult, Integer maxResults)
- Specified by:
getRolesStream
in interfaceRoleContainerModel
-
searchForRolesStream
public Stream<RoleModel> searchForRolesStream(String search, Integer first, Integer max)
- Specified by:
searchForRolesStream
in interfaceRoleContainerModel
-
getDefaultRolesStream
public Stream<String> getDefaultRolesStream()
- Specified by:
getDefaultRolesStream
in interfaceRoleContainerModel
-
addDefaultRole
public void addDefaultRole(String name)
- Specified by:
addDefaultRole
in interfaceRoleContainerModel
-
updateDefaultRoles
public void updateDefaultRoles(String... defaultRoles)
- Specified by:
updateDefaultRoles
in interfaceRoleContainerModel
-
removeDefaultRoles
public void removeDefaultRoles(String... defaultRoles)
- Specified by:
removeDefaultRoles
in interfaceRoleContainerModel
-
getProtocolMappersStream
public Stream<ProtocolMapperModel> getProtocolMappersStream()
- Specified by:
getProtocolMappersStream
in interfaceProtocolMapperContainerModel
-
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
-
-