org.keycloak.models.mongo.keycloak.adapters

## Class MongoKeycloakSession

- java.lang.Object
- - org.keycloak.models.mongo.keycloak.adapters.MongoKeycloakSession

- All Implemented Interfaces:
    KeycloakSession, Provider

      public class MongoKeycloakSession
      extends Object
      implements KeycloakSession

  Author:
    Marek Posolda

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MongoKeycloakSession(MongoStore mongoStore)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `RealmModel` | `createRealm(String name)`
    `RealmModel` | `createRealm(String id, String name)`
    `protected MongoStore` | `getMongoStore()`
    `RealmModel` | `getRealm(String id)`
    `RealmModel` | `getRealmByName(String name)`
    `List<RealmModel>` | `getRealms()`
    `KeycloakTransaction` | `getTransaction()`
    `void` | `removeAllData()`
    `boolean` | `removeRealm(String id)`

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

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

- - ### Constructor Detail

    - #### MongoKeycloakSession

          public MongoKeycloakSession(MongoStore mongoStore)

  - ### Method Detail

    - #### getTransaction

          public KeycloakTransaction getTransaction()

      Specified by:
        `getTransaction` in interface `KeycloakSession`

    - #### close

          public void close()

      Specified by:
        `close` in interface `KeycloakSession`
      Specified by:
        `close` in interface `Provider`

    - #### removeAllData

          public void removeAllData()

      Specified by:
        `removeAllData` in interface `KeycloakSession`

    - #### createRealm

          public RealmModel createRealm(String name)

      Specified by:
        `createRealm` in interface `KeycloakSession`

    - #### createRealm

          public RealmModel createRealm(String id,
                               String name)

      Specified by:
        `createRealm` in interface `KeycloakSession`

    - #### getRealm

          public RealmModel getRealm(String id)

      Specified by:
        `getRealm` in interface `KeycloakSession`

    - #### getRealms

          public List<RealmModel> getRealms()

      Specified by:
        `getRealms` in interface `KeycloakSession`

    - #### getRealmByName

          public RealmModel getRealmByName(String name)

      Specified by:
        `getRealmByName` in interface `KeycloakSession`

    - #### removeRealm

          public boolean removeRealm(String id)

      Specified by:
        `removeRealm` in interface `KeycloakSession`

    - #### getMongoStore

          protected MongoStore getMongoStore()

Copyright © 2014. All Rights Reserved.