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`

  - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRedirectUri(String redirectUri)`
    `void` | `addScopeMapping(RoleModel role)`
    `void` | `addWebOrigin(String webOrigin)`
    `void` | `deleteScopeMapping(RoleModel role)`
    `long` | `getAllowedClaimsMask()`
    `abstract String` | `getClientId()` String exposed to outside world
    `protected abstract void` | `getDelegateForUpdate()`
    `String` | `getId()` Internal database key
    `int` | `getNotBefore()` Time in seconds since epoc
    `RealmModel` | `getRealm()`
    `Set<RoleModel>` | `getRealmScopeMappings()`
    `Set<String>` | `getRedirectUris()`
    `Set<RoleModel>` | `getScopeMappings()`
    `String` | `getSecret()`
    `Set<String>` | `getWebOrigins()`
    `boolean` | `hasScope(RoleModel role)`
    `boolean` | `isDirectGrantsOnly()`
    `boolean` | `isEnabled()`
    `boolean` | `isFullScopeAllowed()`
    `boolean` | `isPublicClient()`
    `void` | `removeRedirectUri(String redirectUri)`
    `void` | `removeWebOrigin(String webOrigin)`
    `void` | `setAllowedClaimsMask(long mask)`
    `void` | `setDirectGrantsOnly(boolean flag)`
    `void` | `setEnabled(boolean enabled)`
    `void` | `setFullScopeAllowed(boolean value)`
    `void` | `setNotBefore(int notBefore)`
    `void` | `setPublicClient(boolean flag)`
    `void` | `setRedirectUris(Set<String> redirectUris)`
    `void` | `setSecret(String secret)`
    `void` | `setWebOrigins(Set<String> webOrigins)`
    `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:

    - #### getAllowedClaimsMask

          public long getAllowedClaimsMask()

      Specified by:
        `getAllowedClaimsMask` in interface `ClientModel`

    - #### setAllowedClaimsMask

          public void setAllowedClaimsMask(long mask)

      Specified by:
        `setAllowedClaimsMask` in interface `ClientModel`

    - #### 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`

    - #### 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`

Copyright © 2014. All Rights Reserved.