Package org.keycloak.models
Interface RealmProvider
- All Superinterfaces:
Provider
- All Known Subinterfaces:
CacheRealmProvider
- All Known Implementing Classes:
JpaRealmProvider,RealmCacheSession
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Method Summary
Modifier and TypeMethodDescriptiondefault ClientInitialAccessModelcreateClientInitialAccessModel(RealmModel realm, int expiration, int count) createRealm(String name) Creates new realm with the given name.createRealm(String id, String name) Created new realm with given ID and name.default voiddecreaseRemainingCount(RealmModel realm, ClientInitialAccessModel clientInitialAccess) booleandeleteLocalizationText(RealmModel realm, String locale, String key) booleandeleteLocalizationTextsByLocale(RealmModel realm, String locale) default ClientInitialAccessModelgetClientInitialAccessModel(RealmModel realm, String id) getLocalizationTextsById(RealmModel realm, String locale, String key) Exact search for a realm by its internal ID.getRealmByName(String name) Exact search for a realm by its name.Returns realms as a stream.default Stream<RealmModel>getRealmsStream(String search) Returns realms as a stream filtered by search.getRealmsWithProviderTypeStream(Class<?> type) Returns stream of realms which has component with the given provider type.default Stream<ClientInitialAccessModel>Returns client's initial access as a stream.default voidremoveClientInitialAccessModel(RealmModel realm, String id) voidRemoves all expired client initial accesses from all realms.booleanremoveRealm(String id) Removes realm with the given id.voidsaveLocalizationText(RealmModel realm, String locale, String key, String text) voidsaveLocalizationTexts(RealmModel realm, String locale, Map<String, String> localizationTexts) booleanupdateLocalizationText(RealmModel realm, String locale, String key, String text)
-
Method Details
-
createRealm
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
Created new realm with given ID and name.- Parameters:
id- Internal ID of the realm ornullif one is to be created by the underlying store. If the store expects the ID to have a certain format (for exampleUUID) and the supplied ID doesn't follow the expected format, the store may replace theidwith a new one at its own discretion.name- String name of the realm- Returns:
- Model of the created realm.
-
getRealm
Exact search for a realm by its internal ID.- Parameters:
id- Internal ID of the realm.- Returns:
- Model of the realm
-
getRealmByName
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 returnsnull.
-
getRealmsStream
Returns realms as a stream filtered by search.- Parameters:
search- String to search for in realm names- Returns:
- Stream of
RealmModel. Never returnsnull.
-
getRealmsWithProviderTypeStream
Returns stream of realms which has component with the given provider type.- Parameters:
type-Class<?>Type of the provider.- Returns:
- Stream of
RealmModel. Never returnsnull.
-
removeRealm
Removes realm with the given id.- Parameters:
id- of realm.- Returns:
trueif the realm was successfully removed.
-
createClientInitialAccessModel
default ClientInitialAccessModel createClientInitialAccessModel(RealmModel realm, int expiration, int count) -
getClientInitialAccessModel
-
removeClientInitialAccessModel
-
listClientInitialAccessStream
Returns client's initial access as a stream.- Parameters:
realm-RealmModelThe realm where to list client's initial access.- Returns:
- Stream of
ClientInitialAccessModel. Never returnsnull.
-
removeExpiredClientInitialAccess
void removeExpiredClientInitialAccess()Removes all expired client initial accesses from all realms. -
decreaseRemainingCount
-
saveLocalizationText
-
saveLocalizationTexts
-
updateLocalizationText
-
deleteLocalizationTextsByLocale
-
deleteLocalizationText
-
getLocalizationTextsById
-