Interface RealmProvider

All Superinterfaces:
Provider
All Known Subinterfaces:
CacheRealmProvider
All Known Implementing Classes:
JpaRealmProvider, RealmCacheSession

public interface RealmProvider extends Provider
Version:
$Revision: 1 $
Author:
Bill Burke
  • Method Details

    • createRealm

      RealmModel createRealm(String name)
      Creates new realm with the given name. The internal ID will be generated automatically.
      Parameters:
      name - String name of the realm
      Returns:
      Model of the created realm.
    • createRealm

      RealmModel createRealm(String id, String name)
      Created new realm with given ID and name.
      Parameters:
      id - Internal ID of the realm or null if one is to be created by the underlying store. If the store expects the ID to have a certain format (for example UUID) and the supplied ID doesn't follow the expected format, the store may replace the id with a new one at its own discretion.
      name - String name of the realm
      Returns:
      Model of the created realm.
    • getRealm

      RealmModel getRealm(String id)
      Exact search for a realm by its internal ID.
      Parameters:
      id - Internal ID of the realm.
      Returns:
      Model of the realm
    • getRealmByName

      RealmModel getRealmByName(String name)
      Exact search for a realm by its name.
      Parameters:
      name - String name of the realm
      Returns:
      Model of the realm
    • getRealmsStream

      Stream<RealmModel> getRealmsStream()
      Returns realms as a stream.
      Returns:
      Stream of RealmModel. Never returns null.
    • getRealmsStream

      default Stream<RealmModel> getRealmsStream(String search)
      Returns realms as a stream filtered by search.
      Parameters:
      search - String to search for in realm names
      Returns:
      Stream of RealmModel. Never returns null.
    • getRealmsWithProviderTypeStream

      Stream<RealmModel> getRealmsWithProviderTypeStream(Class<?> type)
      Returns stream of realms which has component with the given provider type.
      Parameters:
      type - Class<?> Type of the provider.
      Returns:
      Stream of RealmModel. Never returns null.
    • removeRealm

      boolean removeRealm(String id)
      Removes realm with the given id.
      Parameters:
      id - of realm.
      Returns:
      true if the realm was successfully removed.
    • createClientInitialAccessModel

      default ClientInitialAccessModel createClientInitialAccessModel(RealmModel realm, int expiration, int count)
    • getClientInitialAccessModel

      default ClientInitialAccessModel getClientInitialAccessModel(RealmModel realm, String id)
    • removeClientInitialAccessModel

      default void removeClientInitialAccessModel(RealmModel realm, String id)
    • listClientInitialAccessStream

      default Stream<ClientInitialAccessModel> listClientInitialAccessStream(RealmModel realm)
      Returns client's initial access as a stream.
      Parameters:
      realm - RealmModel The realm where to list client's initial access.
      Returns:
      Stream of ClientInitialAccessModel. Never returns null.
    • removeExpiredClientInitialAccess

      void removeExpiredClientInitialAccess()
      Removes all expired client initial accesses from all realms.
    • decreaseRemainingCount

      default void decreaseRemainingCount(RealmModel realm, ClientInitialAccessModel clientInitialAccess)
    • saveLocalizationText

      void saveLocalizationText(RealmModel realm, String locale, String key, String text)
    • saveLocalizationTexts

      void saveLocalizationTexts(RealmModel realm, String locale, Map<String,String> localizationTexts)
    • updateLocalizationText

      boolean updateLocalizationText(RealmModel realm, String locale, String key, String text)
    • deleteLocalizationTextsByLocale

      boolean deleteLocalizationTextsByLocale(RealmModel realm, String locale)
    • deleteLocalizationText

      boolean deleteLocalizationText(RealmModel realm, String locale, String key)
    • getLocalizationTextsById

      String getLocalizationTextsById(RealmModel realm, String locale, String key)