org.keycloak.models.mongo.keycloak.adapters

## Class ApplicationAdapter

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

- All Implemented Interfaces:
    ApplicationModel, ClientModel, RoleContainerModel

      public class ApplicationAdapter
      extends ClientAdapter<MongoApplicationEntity>
      implements ApplicationModel

  Author:
    Marek Posolda

- - ### Field Summary

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

      `clientEntity, session`

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

      `invocationContext`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ApplicationAdapter(KeycloakSession session, RealmModel realm, MongoApplicationEntity applicationEntity, MongoStoreInvocationContext invContext)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addDefaultRole(String name)`
    `RoleAdapter` | `addRole(String name)`
    `RoleAdapter` | `addRole(String id, String name)`
    `boolean` | `equals(Object o)`
    `Set<RoleModel>` | `getApplicationScopeMappings(ClientModel client)`
    `String` | `getBaseUrl()`
    `List<String>` | `getDefaultRoles()`
    `String` | `getManagementUrl()`
    `String` | `getName()`
    `RoleAdapter` | `getRole(String name)`
    `Set<RoleModel>` | `getRoles()`
    `int` | `hashCode()`
    `boolean` | `hasScope(RoleModel role)`
    `boolean` | `isBearerOnly()`
    `boolean` | `isDirectGrantsOnly()`
    `boolean` | `isPublicClient()`
    `boolean` | `isSurrogateAuthRequired()`
    `boolean` | `removeRole(RoleModel role)`
    `void` | `setBaseUrl(String url)`
    `void` | `setBearerOnly(boolean only)`
    `void` | `setDirectGrantsOnly(boolean flag)`
    `void` | `setManagementUrl(String url)`
    `void` | `setName(String name)`
    `void` | `setPublicClient(boolean flag)`
    `void` | `setSurrogateAuthRequired(boolean surrogateAuthRequired)`
    `void` | `updateApplication()`
    `void` | `updateDefaultRoles(String[] defaultRoles)`

    - ### Methods inherited from class org.keycloak.models.mongo.keycloak.adapters.ClientAdapter

      `addRedirectUri, addScopeMapping, addWebOrigin, deleteScopeMapping, getAllowedClaimsMask, getClientId, getId, getMongoEntity, getMongoEntityAsClient, getNotBefore, getRealm, getRealmScopeMappings, getRedirectUris, getScopeMappings, getSecret, getWebOrigins, isEnabled, isFullScopeAllowed, removeRedirectUri, removeWebOrigin, setAllowedClaimsMask, setEnabled, setFullScopeAllowed, setNotBefore, setRedirectUris, setSecret, setWebOrigins, validateSecret`

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

      `getMongoStore, 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

      `addRedirectUri, addScopeMapping, addWebOrigin, deleteScopeMapping, getAllowedClaimsMask, getClientId, getId, getNotBefore, getRealm, getRealmScopeMappings, getRedirectUris, getScopeMappings, getSecret, getWebOrigins, isEnabled, isFullScopeAllowed, removeRedirectUri, removeWebOrigin, setAllowedClaimsMask, setEnabled, setFullScopeAllowed, setNotBefore, setRedirectUris, setSecret, setWebOrigins, validateSecret`

- - ### Constructor Detail

    - #### ApplicationAdapter

          public ApplicationAdapter(KeycloakSession session,
                            RealmModel realm,
                            MongoApplicationEntity applicationEntity,
                            MongoStoreInvocationContext invContext)

  - ### Method Detail

    - #### updateApplication

          public void updateApplication()

      Specified by:
        `updateApplication` in interface `ApplicationModel`

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `ApplicationModel`

    - #### setName

          public void setName(String name)

      Specified by:
        `setName` in interface `ApplicationModel`

    - #### isSurrogateAuthRequired

          public boolean isSurrogateAuthRequired()

      Specified by:
        `isSurrogateAuthRequired` in interface `ApplicationModel`

    - #### setSurrogateAuthRequired

          public void setSurrogateAuthRequired(boolean surrogateAuthRequired)

      Specified by:
        `setSurrogateAuthRequired` in interface `ApplicationModel`

    - #### getManagementUrl

          public String getManagementUrl()

      Specified by:
        `getManagementUrl` in interface `ApplicationModel`

    - #### setManagementUrl

          public void setManagementUrl(String url)

      Specified by:
        `setManagementUrl` in interface `ApplicationModel`

    - #### setBaseUrl

          public void setBaseUrl(String url)

      Specified by:
        `setBaseUrl` in interface `ApplicationModel`

    - #### getBaseUrl

          public String getBaseUrl()

      Specified by:
        `getBaseUrl` in interface `ApplicationModel`

    - #### isBearerOnly

          public boolean isBearerOnly()

      Specified by:
        `isBearerOnly` in interface `ApplicationModel`

    - #### setBearerOnly

          public void setBearerOnly(boolean only)

      Specified by:
        `setBearerOnly` in interface `ApplicationModel`

    - #### isPublicClient

          public boolean isPublicClient()

      Specified by:
        `isPublicClient` in interface `ClientModel`
      Overrides:
        `isPublicClient` in class `ClientAdapter<MongoApplicationEntity>`

    - #### setPublicClient

          public void setPublicClient(boolean flag)

      Specified by:
        `setPublicClient` in interface `ClientModel`
      Overrides:
        `setPublicClient` in class `ClientAdapter<MongoApplicationEntity>`

    - #### isDirectGrantsOnly

          public boolean isDirectGrantsOnly()

      Specified by:
        `isDirectGrantsOnly` in interface `ClientModel`

    - #### setDirectGrantsOnly

          public void setDirectGrantsOnly(boolean flag)

      Specified by:
        `setDirectGrantsOnly` in interface `ClientModel`

    - #### getRole

          public RoleAdapter getRole(String name)

      Specified by:
        `getRole` in interface `RoleContainerModel`

    - #### addRole

          public RoleAdapter addRole(String name)

      Specified by:
        `addRole` in interface `RoleContainerModel`

    - #### addRole

          public RoleAdapter addRole(String id,
                            String name)

      Specified by:
        `addRole` in interface `RoleContainerModel`

    - #### removeRole

          public boolean removeRole(RoleModel role)

      Specified by:
        `removeRole` in interface `RoleContainerModel`

    - #### getRoles

          public Set<RoleModel> getRoles()

      Specified by:
        `getRoles` in interface `RoleContainerModel`

    - #### hasScope

          public boolean hasScope(RoleModel role)

      Specified by:
        `hasScope` in interface `ClientModel`
      Overrides:
        `hasScope` in class `ClientAdapter<MongoApplicationEntity>`

    - #### getApplicationScopeMappings

          public Set<RoleModel> getApplicationScopeMappings(ClientModel client)

      Specified by:
        `getApplicationScopeMappings` in interface `ApplicationModel`

    - #### getDefaultRoles

          public List<String> getDefaultRoles()

      Specified by:
        `getDefaultRoles` in interface `ApplicationModel`

    - #### addDefaultRole

          public void addDefaultRole(String name)

      Specified by:
        `addDefaultRole` in interface `ApplicationModel`

    - #### updateDefaultRoles

          public void updateDefaultRoles(String[] defaultRoles)

      Specified by:
        `updateDefaultRoles` in interface `ApplicationModel`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `AbstractMongoAdapter<MongoApplicationEntity>`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `AbstractMongoAdapter<MongoApplicationEntity>`

Copyright © 2014. All Rights Reserved.