org.keycloak.models.jpa

## Class ClientAdapter

- java.lang.Object
- - org.keycloak.models.jpa.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 javax.persistence.EntityManager` | `em`
    `protected ClientEntity` | `entity`
    `protected RealmModel` | `realm`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientAdapter(RealmModel realm, ClientEntity entity, javax.persistence.EntityManager em)`

  - ### 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)`
    `boolean` | `equals(Object o)`
    `long` | `getAllowedClaimsMask()`
    `String` | `getClientId()` String exposed to outside world
    `ClientEntity` | `getEntity()`
    `String` | `getId()` Internal database key
    `int` | `getNotBefore()` Time in seconds since epoc
    `RealmModel` | `getRealm()`
    `protected javax.persistence.TypedQuery<ScopeMappingEntity>` | `getRealmScopeMappingQuery(RoleModel role)`
    `Set<RoleModel>` | `getRealmScopeMappings()`
    `Set<String>` | `getRedirectUris()`
    `Set<RoleModel>` | `getScopeMappings()`
    `String` | `getSecret()`
    `Set<String>` | `getWebOrigins()`
    `int` | `hashCode()`
    `boolean` | `hasScope(RoleModel role)`
    `boolean` | `isEnabled()`
    `boolean` | `isFullScopeAllowed()`
    `boolean` | `isPublicClient()`
    `void` | `removeRedirectUri(String redirectUri)`
    `void` | `removeWebOrigin(String webOrigin)`
    `void` | `setAllowedClaimsMask(long mask)`
    `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, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

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

      `isDirectGrantsOnly, setDirectGrantsOnly`

- - ### Field Detail

    - #### entity

          protected ClientEntity entity

    - #### realm

          protected RealmModel realm

    - #### em

          protected javax.persistence.EntityManager em

  - ### Constructor Detail

    - #### ClientAdapter

          public ClientAdapter(RealmModel realm,
                       ClientEntity entity,
                       javax.persistence.EntityManager em)

  - ### Method Detail

    - #### getEntity

          public ClientEntity getEntity()

    - #### getId

          public String getId()

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

    - #### getRealm

          public RealmModel getRealm()

      Specified by:
        `getRealm` in interface `ClientModel`

    - #### getClientId

          public String getClientId()

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

    - #### isEnabled

          public boolean isEnabled()

      Specified by:
        `isEnabled` in interface `ClientModel`

    - #### setEnabled

          public void setEnabled(boolean enabled)

      Specified by:
        `setEnabled` in interface `ClientModel`

    - #### getAllowedClaimsMask

          public long getAllowedClaimsMask()

      Specified by:
        `getAllowedClaimsMask` in interface `ClientModel`

    - #### setAllowedClaimsMask

          public void setAllowedClaimsMask(long mask)

      Specified by:
        `setAllowedClaimsMask` 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`

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

    - #### getSecret

          public String getSecret()

      Specified by:
        `getSecret` in interface `ClientModel`

    - #### setSecret

          public void setSecret(String secret)

      Specified by:
        `setSecret` in interface `ClientModel`

    - #### validateSecret

          public boolean validateSecret(String secret)

      Specified by:
        `validateSecret` 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`

    - #### getRealmScopeMappings

          public Set<RoleModel> getRealmScopeMappings()

      Specified by:
        `getRealmScopeMappings` 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`

    - #### getRealmScopeMappingQuery

          protected javax.persistence.TypedQuery<ScopeMappingEntity> getRealmScopeMappingQuery(RoleModel role)

    - #### hasScope

          public boolean hasScope(RoleModel role)

      Specified by:
        `hasScope` in interface `ClientModel`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2014. All Rights Reserved.