org.keycloak.models.mongo.keycloak.adapters

## Class ClientAdapter<T extends MongoIdentifiableEntity>

- java.lang.Object
- - org.keycloak.models.mongo.keycloak.adapters.AbstractMongoAdapter<T>
  - - org.keycloak.models.mongo.keycloak.adapters.ClientAdapter<T>

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

      public abstract class ClientAdapter<T extends MongoIdentifiableEntity>
      extends AbstractMongoAdapter<T>
      implements ClientModel

  Author:
    Marek Posolda

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected T` | `clientEntity`

    - ### Fields inherited from class org.keycloak.models.mongo.keycloak.adapters.AbstractMongoAdapter

      `invocationContext`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientAdapter(RealmAdapter realm, T clientEntity, MongoStoreInvocationContext invContext)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRedirectUri(String redirectUri)`
    `void` | `addWebOrigin(String webOrigin)`
    `int` | `getActiveUserSessions()`
    `long` | `getAllowedClaimsMask()`
    `String` | `getClientId()` String exposed to outside world
    `String` | `getId()` Internal database key
    `T` | `getMongoEntity()`
    `ClientEntity` | `getMongoEntityAsClient()`
    `int` | `getNotBefore()` Time in seconds since epoc
    `RealmAdapter` | `getRealm()`
    `Set<String>` | `getRedirectUris()`
    `String` | `getSecret()`
    `Set<UserSessionModel>` | `getUserSessions()`
    `Set<String>` | `getWebOrigins()`
    `boolean` | `isEnabled()`
    `boolean` | `isPublicClient()`
    `void` | `removeRedirectUri(String redirectUri)`
    `void` | `removeWebOrigin(String webOrigin)`
    `void` | `setAllowedClaimsMask(long mask)`
    `void` | `setEnabled(boolean enabled)`
    `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 org.keycloak.models.mongo.keycloak.adapters.AbstractMongoAdapter

      `equals, getMongoStore, hashCode, updateMongoEntity`

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

    - #### clientEntity

          protected final T extends MongoIdentifiableEntity clientEntity

  - ### Constructor Detail

    - #### ClientAdapter

          public ClientAdapter(RealmAdapter realm,
                       T clientEntity,
                       MongoStoreInvocationContext invContext)

  - ### Method Detail

    - #### getMongoEntity

          public T getMongoEntity()

      Specified by:
        `getMongoEntity` in class `AbstractMongoAdapter<T extends MongoIdentifiableEntity>`

    - #### getMongoEntityAsClient

          public ClientEntity getMongoEntityAsClient()

    - #### getId

          public String getId()

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

    - #### getClientId

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

    - #### getRealm

          public RealmAdapter 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`

    - #### getUserSessions

          public Set<UserSessionModel> getUserSessions()

      Specified by:
        `getUserSessions` in interface `ClientModel`

    - #### getActiveUserSessions

          public int getActiveUserSessions()

      Specified by:
        `getActiveUserSessions` in interface `ClientModel`

Copyright © 2014. All Rights Reserved.