Package org.keycloak.models.map.realm
Class MapRealmProvider
java.lang.Object
org.keycloak.models.map.realm.MapRealmProvider
- All Implemented Interfaces:
RealmProvider,Provider
-
Constructor Summary
ConstructorsConstructorDescriptionMapRealmProvider(KeycloakSession session, MapStorage<MapRealmEntity, RealmModel> realmStore) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()createRealm(String name) Creates new realm with the given name.createRealm(String id, String name) Created new realm with given ID and name.booleandeleteLocalizationText(RealmModel realm, String locale, String key) booleandeleteLocalizationTextsByLocale(RealmModel realm, String locale) 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.getRealmsWithProviderTypeStream(Class<?> type) Returns stream of realms which has component with the given provider type.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) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.models.RealmProvider
createClientInitialAccessModel, decreaseRemainingCount, getClientInitialAccessModel, listClientInitialAccessStream, removeClientInitialAccessModel
-
Constructor Details
-
MapRealmProvider
-
-
Method Details
-
createRealm
Description copied from interface:RealmProviderCreates new realm with the given name. The internal ID will be generated automatically.- Specified by:
createRealmin interfaceRealmProvider- Parameters:
name- String name of the realm- Returns:
- Model of the created realm.
-
createRealm
Description copied from interface:RealmProviderCreated new realm with given ID and name.- Specified by:
createRealmin interfaceRealmProvider- 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
Description copied from interface:RealmProviderExact search for a realm by its internal ID.- Specified by:
getRealmin interfaceRealmProvider- Parameters:
id- Internal ID of the realm.- Returns:
- Model of the realm
-
getRealmByName
Description copied from interface:RealmProviderExact search for a realm by its name.- Specified by:
getRealmByNamein interfaceRealmProvider- Parameters:
name- String name of the realm- Returns:
- Model of the realm
-
getRealmsStream
Description copied from interface:RealmProviderReturns realms as a stream.- Specified by:
getRealmsStreamin interfaceRealmProvider- Returns:
- Stream of
RealmModel. Never returnsnull.
-
getRealmsWithProviderTypeStream
Description copied from interface:RealmProviderReturns stream of realms which has component with the given provider type.- Specified by:
getRealmsWithProviderTypeStreamin interfaceRealmProvider- Parameters:
type-Class<?>Type of the provider.- Returns:
- Stream of
RealmModel. Never returnsnull.
-
removeRealm
Description copied from interface:RealmProviderRemoves realm with the given id.- Specified by:
removeRealmin interfaceRealmProvider- Parameters:
id- of realm.- Returns:
trueif the realm was successfully removed.
-
removeExpiredClientInitialAccess
public void removeExpiredClientInitialAccess()Description copied from interface:RealmProviderRemoves all expired client initial accesses from all realms.- Specified by:
removeExpiredClientInitialAccessin interfaceRealmProvider
-
saveLocalizationText
- Specified by:
saveLocalizationTextin interfaceRealmProvider
-
saveLocalizationTexts
public void saveLocalizationTexts(RealmModel realm, String locale, Map<String, String> localizationTexts) - Specified by:
saveLocalizationTextsin interfaceRealmProvider
-
updateLocalizationText
- Specified by:
updateLocalizationTextin interfaceRealmProvider
-
deleteLocalizationTextsByLocale
- Specified by:
deleteLocalizationTextsByLocalein interfaceRealmProvider
-
deleteLocalizationText
- Specified by:
deleteLocalizationTextin interfaceRealmProvider
-
getLocalizationTextsById
- Specified by:
getLocalizationTextsByIdin interfaceRealmProvider
-
close
public void close()
-