org.keycloak.models.cache

## Class ClientAdapter

- java.lang.Object
- - org.keycloak.models.cache.ClientAdapter

- All Implemented Interfaces:
    ClientModel
  Direct Known Subclasses:
    ApplicationAdapter, OAuthClientAdapter

      public abstract class ClientAdapter
      extends Object
      implements ClientModel

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected RealmCache` | `cache`
    `protected CachedClient` | `cachedClient`
    `protected RealmModel` | `cachedRealm`
    `protected CacheRealmProvider` | `cacheSession`
    `protected ClientModel` | `updatedClient`

    - ### Fields inherited from interface org.keycloak.models.ClientModel

      `PRIVATE_KEY, PUBLIC_KEY, X509CERTIFICATE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientAdapter(RealmModel cachedRealm, CachedClient cached, RealmCache cache, CacheRealmProvider cacheSession)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ProtocolMapperModel` | `addProtocolMapper(ProtocolMapperModel model)`
    `void` | `addRedirectUri(String redirectUri)`
    `void` | `addScopeMapping(RoleModel role)`
    `void` | `addWebOrigin(String webOrigin)`
    `void` | `deleteScopeMapping(RoleModel role)`
    `String` | `getAttribute(String name)`
    `Map<String,String>` | `getAttributes()`
    `abstract String` | `getClientId()` String exposed to outside world
    `protected abstract void` | `getDelegateForUpdate()`
    `String` | `getId()` Internal database key
    `List<ClientIdentityProviderMappingModel>` | `getIdentityProviders()`
    `int` | `getNotBefore()` Time in seconds since epoc
    `String` | `getProtocol()`
    `ProtocolMapperModel` | `getProtocolMapperById(String id)`
    `ProtocolMapperModel` | `getProtocolMapperByName(String protocol, String name)`
    `Set<ProtocolMapperModel>` | `getProtocolMappers()`
    `RealmModel` | `getRealm()`
    `Set<RoleModel>` | `getRealmScopeMappings()`
    `Set<String>` | `getRedirectUris()`
    `Set<RoleModel>` | `getScopeMappings()`
    `String` | `getSecret()`
    `Set<String>` | `getWebOrigins()`
    `boolean` | `hasScope(RoleModel role)`
    `boolean` | `isAllowedRetrieveTokenFromIdentityProvider(String providerId)`
    `boolean` | `isDirectGrantsOnly()`
    `boolean` | `isEnabled()`
    `boolean` | `isFrontchannelLogout()`
    `boolean` | `isFullScopeAllowed()`
    `boolean` | `isPublicClient()`
    `void` | `removeAttribute(String name)`
    `void` | `removeProtocolMapper(ProtocolMapperModel mapping)`
    `void` | `removeRedirectUri(String redirectUri)`
    `void` | `removeWebOrigin(String webOrigin)`
    `void` | `setAttribute(String name, String value)`
    `void` | `setDirectGrantsOnly(boolean flag)`
    `void` | `setEnabled(boolean enabled)`
    `void` | `setFrontchannelLogout(boolean flag)`
    `void` | `setFullScopeAllowed(boolean value)`
    `void` | `setNotBefore(int notBefore)`
    `void` | `setProtocol(String protocol)`
    `void` | `setPublicClient(boolean flag)`
    `void` | `setRedirectUris(Set<String> redirectUris)`
    `void` | `setSecret(String secret)`
    `void` | `setWebOrigins(Set<String> webOrigins)`
    `void` | `updateIdentityProviders(List<ClientIdentityProviderMappingModel> identityProviders)`
    `void` | `updateProtocolMapper(ProtocolMapperModel mapping)`
    `boolean` | `validateSecret(String secret)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### cachedClient

          protected CachedClient cachedClient

    - #### cacheSession

          protected CacheRealmProvider cacheSession

    - #### updatedClient

          protected ClientModel updatedClient

    - #### cachedRealm

          protected RealmModel cachedRealm

    - #### cache

          protected RealmCache cache

  - ### Constructor Detail

    - #### ClientAdapter

          public ClientAdapter(RealmModel cachedRealm,
                       CachedClient cached,
                       RealmCache cache,
                       CacheRealmProvider cacheSession)

  - ### Method Detail

    - #### getDelegateForUpdate

          protected abstract void getDelegateForUpdate()

    - #### getId

          public String getId()

      Description copied from interface: `ClientModel`
      Internal database key
      Specified by:
        `getId` in interface `ClientModel`
      Returns:

    - #### getClientId

          public abstract String getClientId()

      Description copied from interface: `ClientModel`
      String exposed to outside world
      Specified by:
        `getClientId` in interface `ClientModel`
      Returns:

    - #### getWebOrigins

          public Set<String> getWebOrigins()

      Specified by:
        `getWebOrigins` in interface `ClientModel`

    - #### setWebOrigins

          public void setWebOrigins(Set<String> webOrigins)

      Specified by:
        `setWebOrigins` in interface `ClientModel`

    - #### addWebOrigin

          public void addWebOrigin(String webOrigin)

      Specified by:
        `addWebOrigin` in interface `ClientModel`

    - #### removeWebOrigin

          public void removeWebOrigin(String webOrigin)

      Specified by:
        `removeWebOrigin` in interface `ClientModel`

    - #### getRedirectUris

          public Set<String> getRedirectUris()

      Specified by:
        `getRedirectUris` in interface `ClientModel`

    - #### setRedirectUris

          public void setRedirectUris(Set<String> redirectUris)

      Specified by:
        `setRedirectUris` in interface `ClientModel`

    - #### addRedirectUri

          public void addRedirectUri(String redirectUri)

      Specified by:
        `addRedirectUri` in interface `ClientModel`

    - #### removeRedirectUri

          public void removeRedirectUri(String redirectUri)

      Specified by:
        `removeRedirectUri` in interface `ClientModel`

    - #### isEnabled

          public boolean isEnabled()

      Specified by:
        `isEnabled` in interface `ClientModel`

    - #### setEnabled

          public void setEnabled(boolean enabled)

      Specified by:
        `setEnabled` in interface `ClientModel`

    - #### validateSecret

          public boolean validateSecret(String secret)

      Specified by:
        `validateSecret` in interface `ClientModel`

    - #### getSecret

          public String getSecret()

      Specified by:
        `getSecret` in interface `ClientModel`

    - #### setSecret

          public void setSecret(String secret)

      Specified by:
        `setSecret` in interface `ClientModel`

    - #### isPublicClient

          public boolean isPublicClient()

      Specified by:
        `isPublicClient` in interface `ClientModel`

    - #### setPublicClient

          public void setPublicClient(boolean flag)

      Specified by:
        `setPublicClient` in interface `ClientModel`

    - #### isFrontchannelLogout

          public boolean isFrontchannelLogout()

      Specified by:
        `isFrontchannelLogout` in interface `ClientModel`

    - #### setFrontchannelLogout

          public void setFrontchannelLogout(boolean flag)

      Specified by:
        `setFrontchannelLogout` in interface `ClientModel`

    - #### isFullScopeAllowed

          public boolean isFullScopeAllowed()

      Specified by:
        `isFullScopeAllowed` in interface `ClientModel`

    - #### setFullScopeAllowed

          public void setFullScopeAllowed(boolean value)

      Specified by:
        `setFullScopeAllowed` in interface `ClientModel`

    - #### isDirectGrantsOnly

          public boolean isDirectGrantsOnly()

      Specified by:
        `isDirectGrantsOnly` in interface `ClientModel`

    - #### setDirectGrantsOnly

          public void setDirectGrantsOnly(boolean flag)

      Specified by:
        `setDirectGrantsOnly` in interface `ClientModel`

    - #### getScopeMappings

          public Set<RoleModel> getScopeMappings()

      Specified by:
        `getScopeMappings` in interface `ClientModel`

    - #### addScopeMapping

          public void addScopeMapping(RoleModel role)

      Specified by:
        `addScopeMapping` in interface `ClientModel`

    - #### deleteScopeMapping

          public void deleteScopeMapping(RoleModel role)

      Specified by:
        `deleteScopeMapping` in interface `ClientModel`

    - #### getRealmScopeMappings

          public Set<RoleModel> getRealmScopeMappings()

      Specified by:
        `getRealmScopeMappings` in interface `ClientModel`

    - #### hasScope

          public boolean hasScope(RoleModel role)

      Specified by:
        `hasScope` in interface `ClientModel`

    - #### getRealm

          public RealmModel getRealm()

      Specified by:
        `getRealm` in interface `ClientModel`

    - #### getNotBefore

          public int getNotBefore()

      Description copied from interface: `ClientModel`
      Time in seconds since epoc
      Specified by:
        `getNotBefore` in interface `ClientModel`
      Returns:

    - #### setNotBefore

          public void setNotBefore(int notBefore)

      Specified by:
        `setNotBefore` in interface `ClientModel`

    - #### getProtocol

          public String getProtocol()

      Specified by:
        `getProtocol` in interface `ClientModel`

    - #### setProtocol

          public void setProtocol(String protocol)

      Specified by:
        `setProtocol` in interface `ClientModel`

    - #### setAttribute

          public void setAttribute(String name,
                          String value)

      Specified by:
        `setAttribute` in interface `ClientModel`

    - #### removeAttribute

          public void removeAttribute(String name)

      Specified by:
        `removeAttribute` in interface `ClientModel`

    - #### getAttribute

          public String getAttribute(String name)

      Specified by:
        `getAttribute` in interface `ClientModel`

    - #### getAttributes

          public Map<String,String> getAttributes()

      Specified by:
        `getAttributes` in interface `ClientModel`

    - #### updateIdentityProviders

          public void updateIdentityProviders(List<ClientIdentityProviderMappingModel> identityProviders)

      Specified by:
        `updateIdentityProviders` in interface `ClientModel`

    - #### getIdentityProviders

          public List<ClientIdentityProviderMappingModel> getIdentityProviders()

      Specified by:
        `getIdentityProviders` in interface `ClientModel`

    - #### isAllowedRetrieveTokenFromIdentityProvider

          public boolean isAllowedRetrieveTokenFromIdentityProvider(String providerId)

      Specified by:
        `isAllowedRetrieveTokenFromIdentityProvider` in interface `ClientModel`

    - #### getProtocolMappers

          public Set<ProtocolMapperModel> getProtocolMappers()

      Specified by:
        `getProtocolMappers` in interface `ClientModel`

    - #### addProtocolMapper

          public ProtocolMapperModel addProtocolMapper(ProtocolMapperModel model)

      Specified by:
        `addProtocolMapper` in interface `ClientModel`

    - #### removeProtocolMapper

          public void removeProtocolMapper(ProtocolMapperModel mapping)

      Specified by:
        `removeProtocolMapper` in interface `ClientModel`

    - #### updateProtocolMapper

          public void updateProtocolMapper(ProtocolMapperModel mapping)

      Specified by:
        `updateProtocolMapper` in interface `ClientModel`

    - #### getProtocolMapperById

          public ProtocolMapperModel getProtocolMapperById(String id)

      Specified by:
        `getProtocolMapperById` in interface `ClientModel`

    - #### getProtocolMapperByName

          public ProtocolMapperModel getProtocolMapperByName(String protocol,
                                                    String name)

      Specified by:
        `getProtocolMapperByName` in interface `ClientModel`

Copyright © 2015. All rights reserved.