org.keycloak.connections.file

## Class InMemoryModel

- java.lang.Object
- - org.keycloak.connections.file.InMemoryModel

-     public class InMemoryModel
      extends Object

  This class provides an in-memory copy of the entire model for each Keycloak session. At the start of the session, the model is read from JSON. When the session's transaction ends, the model is written back out.
  Author:
    Stan Silvert ssilvert@redhat.com (C) 2015 Red Hat Inc.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InMemoryModel()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `RealmModel` | `getRealm(String id)`
    `RealmModel` | `getRealmByName(String name)`
    `Collection<RealmModel>` | `getRealms()`
    `UserModel` | `getUser(String realmId, String userId)`
    `Collection<UserModel>` | `getUsers(String realmId)`
    `boolean` | `hasUserWithUsername(String realmId, String username)`
    `void` | `putRealm(String id, RealmModel realm)`
    `void` | `putUser(String realmId, String userId, UserModel user)`
    `protected Map<String,UserModel>` | `realmUsers(String realmId)`
    `boolean` | `removeRealm(String id)`
    `boolean` | `removeUser(String realmId, String userId)`

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

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

- - ### Constructor Detail

    - #### InMemoryModel

          public InMemoryModel()

  - ### Method Detail

    - #### putRealm

          public void putRealm(String id,
                      RealmModel realm)

    - #### getRealm

          public RealmModel getRealm(String id)

    - #### getRealms

          public Collection<RealmModel> getRealms()

    - #### getRealmByName

          public RealmModel getRealmByName(String name)

    - #### removeRealm

          public boolean removeRealm(String id)

    - #### realmUsers

          protected Map<String,UserModel> realmUsers(String realmId)

    - #### putUser

          public void putUser(String realmId,
                     String userId,
                     UserModel user)

    - #### getUser

          public UserModel getUser(String realmId,
                          String userId)

    - #### hasUserWithUsername

          public boolean hasUserWithUsername(String realmId,
                                    String username)

    - #### getUsers

          public Collection<UserModel> getUsers(String realmId)

    - #### removeUser

          public boolean removeUser(String realmId,
                           String userId)

Copyright © 2015. All rights reserved.