public class RealmCacheSession extends Object implements CacheRealmProvider
| Modifier and Type | Field and Description |
|---|---|
protected RealmCacheManager |
cache |
protected boolean |
clearAll |
protected ClientProvider |
clientDelegate |
protected GroupProvider |
groupDelegate |
protected Set<InvalidationEvent> |
invalidationEvents |
protected Set<String> |
invalidations |
protected Set<String> |
listInvalidations |
protected static org.jboss.logging.Logger |
logger |
protected Map<String,ClientModel> |
managedApplications |
protected Map<String,ClientScopeAdapter> |
managedClientScopes |
protected Map<String,GroupAdapter> |
managedGroups |
protected Map<String,RealmAdapter> |
managedRealms |
protected Map<String,RoleAdapter> |
managedRoles |
static String |
REALM_CLIENTS_QUERY_SUFFIX |
protected RealmProvider |
realmDelegate |
protected RoleProvider |
roleDelegate |
static String |
ROLES_QUERY_SUFFIX |
protected KeycloakSession |
session |
protected boolean |
setRollbackOnly |
protected long |
startupRevision |
protected boolean |
transactionActive |
| Constructor and Description |
|---|
RealmCacheSession(RealmCacheManager cache,
KeycloakSession session) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddClientRole, addClientRole, createGroup, createGroup, createGroup, getAlwaysDisplayInConsoleClients, getClientByClientId, getClientById, getClientRole, getClientRoles, getClientRoles, getClients, getClients, getGroupById, getGroups, getGroupsByRole, getRealmRoles, getRealmRoles, getRealms, getRealmsWithProviderType, getRoleById, getTopLevelGroups, getTopLevelGroups, listClientInitialAccess, removeClient, removeRole, searchClientsByClientId, searchForClientRoles, searchForGroupByName, searchForRolesgetGroupsStream, getGroupsStreamprotected static final org.jboss.logging.Logger logger
public static final String REALM_CLIENTS_QUERY_SUFFIX
public static final String ROLES_QUERY_SUFFIX
protected RealmCacheManager cache
protected KeycloakSession session
protected RealmProvider realmDelegate
protected ClientProvider clientDelegate
protected GroupProvider groupDelegate
protected RoleProvider roleDelegate
protected boolean transactionActive
protected boolean setRollbackOnly
protected Map<String,RealmAdapter> managedRealms
protected Map<String,ClientModel> managedApplications
protected Map<String,ClientScopeAdapter> managedClientScopes
protected Map<String,RoleAdapter> managedRoles
protected Map<String,GroupAdapter> managedGroups
protected Set<InvalidationEvent> invalidationEvents
protected boolean clearAll
protected final long startupRevision
public RealmCacheSession(RealmCacheManager cache, KeycloakSession session)
public long getStartupRevision()
public boolean isInvalid(String id)
public void clear()
clear in interface CacheRealmProviderpublic MigrationModel getMigrationModel()
getMigrationModel in interface RealmProviderpublic RealmProvider getRealmDelegate()
getRealmDelegate in interface CacheRealmProviderpublic ClientProvider getClientDelegate()
public RoleProvider getRoleDelegate()
public GroupProvider getGroupDelegate()
public void registerRealmInvalidation(String id, String name)
registerRealmInvalidation in interface CacheRealmProviderpublic void registerClientInvalidation(String id, String clientId, String realmId)
registerClientInvalidation in interface CacheRealmProviderpublic void registerClientScopeInvalidation(String id)
registerClientScopeInvalidation in interface CacheRealmProviderpublic void registerRoleInvalidation(String id, String roleName, String roleContainerId)
registerRoleInvalidation in interface CacheRealmProviderpublic void registerGroupInvalidation(String id)
registerGroupInvalidation in interface CacheRealmProviderprotected void runInvalidations()
public RealmModel createRealm(String name)
createRealm in interface RealmProviderpublic RealmModel createRealm(String id, String name)
createRealm in interface RealmProviderpublic RealmModel getRealm(String id)
getRealm in interface RealmProviderpublic RealmModel getRealmByName(String name)
getRealmByName in interface RealmProviderpublic Stream<RealmModel> getRealmsWithProviderTypeStream(Class<?> type)
getRealmsWithProviderTypeStream in interface RealmProviderpublic Stream<RealmModel> getRealmsStream()
getRealmsStream in interface RealmProviderpublic boolean removeRealm(String id)
removeRealm in interface RealmProviderpublic void evictRealmOnRemoval(RealmModel realm)
public ClientModel addClient(RealmModel realm, String clientId)
addClient in interface ClientProvideraddClient in interface RealmProviderpublic ClientModel addClient(RealmModel realm, String id, String clientId)
addClient in interface ClientProvideraddClient in interface RealmProviderpublic Stream<ClientModel> getClientsStream(RealmModel realm, Integer firstResult, Integer maxResults)
getClientsStream in interface ClientProviderpublic Stream<ClientModel> getClientsStream(RealmModel realm)
getClientsStream in interface ClientProviderpublic Stream<ClientModel> getAlwaysDisplayInConsoleClientsStream(RealmModel realm)
getAlwaysDisplayInConsoleClientsStream in interface ClientProviderpublic void removeClients(RealmModel realm)
removeClients in interface ClientProviderpublic boolean removeClient(RealmModel realm, String id)
removeClient in interface ClientProviderpublic RoleModel addRealmRole(RealmModel realm, String name)
addRealmRole in interface RealmProvideraddRealmRole in interface RoleProviderpublic RoleModel addRealmRole(RealmModel realm, String id, String name)
addRealmRole in interface RealmProvideraddRealmRole in interface RoleProviderpublic Stream<RoleModel> getRealmRolesStream(RealmModel realm)
getRealmRolesStream in interface RoleProviderpublic Stream<RoleModel> getClientRolesStream(ClientModel client)
getClientRolesStream in interface RoleProviderpublic Stream<RoleModel> getRealmRolesStream(RealmModel realm, Integer first, Integer max)
getRealmRolesStream in interface RoleProviderpublic Stream<RoleModel> getClientRolesStream(ClientModel client, Integer first, Integer max)
getClientRolesStream in interface RoleProviderpublic Stream<RoleModel> searchForClientRolesStream(ClientModel client, String search, Integer first, Integer max)
searchForClientRolesStream in interface RoleLookupProviderpublic Stream<RoleModel> searchForRolesStream(RealmModel realm, String search, Integer first, Integer max)
searchForRolesStream in interface RoleLookupProviderpublic RoleModel addClientRole(ClientModel client, String name)
addClientRole in interface RoleProviderpublic RoleModel addClientRole(ClientModel client, String id, String name)
addClientRole in interface RoleProviderpublic RoleModel getRealmRole(RealmModel realm, String name)
getRealmRole in interface RealmProvidergetRealmRole in interface RoleLookupProviderpublic RoleModel getClientRole(ClientModel client, String name)
getClientRole in interface RoleLookupProviderpublic boolean removeRole(RoleModel role)
removeRole in interface RoleProviderpublic void removeRoles(RealmModel realm)
removeRoles in interface RoleProviderpublic void removeRoles(ClientModel client)
removeRoles in interface RoleProviderpublic RoleModel getRoleById(RealmModel realm, String id)
getRoleById in interface RoleLookupProviderpublic GroupModel getGroupById(RealmModel realm, String id)
getGroupById in interface RealmProvidergetGroupById in interface GroupLookupProviderpublic void moveGroup(RealmModel realm, GroupModel group, GroupModel toParent)
moveGroup in interface GroupProvidermoveGroup in interface RealmProviderpublic Stream<GroupModel> getGroupsStream(RealmModel realm)
getGroupsStream in interface GroupProviderpublic Stream<GroupModel> getGroupsStream(RealmModel realm, Stream<String> ids, String search, Integer first, Integer max)
getGroupsStream in interface GroupProviderpublic Long getGroupsCount(RealmModel realm, Stream<String> ids, String search)
getGroupsCount in interface GroupProviderpublic Long getGroupsCount(RealmModel realm, Boolean onlyTopGroups)
getGroupsCount in interface GroupProvidergetGroupsCount in interface RealmProviderpublic long getClientsCount(RealmModel realm)
getClientsCount in interface ClientProvidergetClientsCount in interface RealmProviderpublic Long getGroupsCountByNameContaining(RealmModel realm, String search)
getGroupsCountByNameContaining in interface GroupProvidergetGroupsCountByNameContaining in interface RealmProviderpublic Stream<GroupModel> getGroupsByRoleStream(RealmModel realm, RoleModel role, Integer firstResult, Integer maxResults)
getGroupsByRoleStream in interface GroupProviderpublic Stream<GroupModel> getTopLevelGroupsStream(RealmModel realm)
getTopLevelGroupsStream in interface GroupProviderpublic Stream<GroupModel> getTopLevelGroupsStream(RealmModel realm, Integer first, Integer max)
getTopLevelGroupsStream in interface GroupProviderpublic Stream<GroupModel> searchForGroupByNameStream(RealmModel realm, String search, Integer first, Integer max)
searchForGroupByNameStream in interface GroupLookupProviderpublic boolean removeGroup(RealmModel realm, GroupModel group)
removeGroup in interface GroupProviderremoveGroup in interface RealmProviderpublic GroupModel createGroup(RealmModel realm, String id, String name, GroupModel toParent)
createGroup in interface GroupProvidercreateGroup in interface RealmProviderpublic void addTopLevelGroup(RealmModel realm, GroupModel subGroup)
addTopLevelGroup in interface GroupProvideraddTopLevelGroup in interface RealmProviderpublic void preRemove(RealmModel realm, RoleModel role)
preRemove in interface GroupProviderpublic ClientModel getClientById(RealmModel realm, String id)
getClientById in interface ClientLookupProviderprotected ClientModel cacheClient(RealmModel realm, ClientModel delegate, Long revision)
protected ClientModel validateCache(RealmModel realm, CachedClient cached)
public Stream<ClientModel> searchClientsByClientIdStream(RealmModel realm, String clientId, Integer firstResult, Integer maxResults)
searchClientsByClientIdStream in interface ClientLookupProviderpublic ClientModel getClientByClientId(RealmModel realm, String clientId)
getClientByClientId in interface ClientLookupProviderpublic ClientScopeModel getClientScopeById(String id, RealmModel realm)
getClientScopeById in interface RealmProviderpublic ClientInitialAccessModel createClientInitialAccessModel(RealmModel realm, int expiration, int count)
createClientInitialAccessModel in interface RealmProviderpublic ClientInitialAccessModel getClientInitialAccessModel(RealmModel realm, String id)
getClientInitialAccessModel in interface RealmProviderpublic void removeClientInitialAccessModel(RealmModel realm, String id)
removeClientInitialAccessModel in interface RealmProviderpublic Stream<ClientInitialAccessModel> listClientInitialAccessStream(RealmModel realm)
listClientInitialAccessStream in interface RealmProviderpublic void removeExpiredClientInitialAccess()
removeExpiredClientInitialAccess in interface RealmProviderpublic void decreaseRemainingCount(RealmModel realm, ClientInitialAccessModel clientInitialAccess)
decreaseRemainingCount in interface RealmProviderpublic void saveLocalizationText(RealmModel realm, String locale, String key, String text)
saveLocalizationText in interface RealmProviderpublic void saveLocalizationTexts(RealmModel realm, String locale, Map<String,String> localizationTexts)
saveLocalizationTexts in interface RealmProviderpublic boolean updateLocalizationText(RealmModel realm, String locale, String key, String text)
updateLocalizationText in interface RealmProviderpublic boolean deleteLocalizationTextsByLocale(RealmModel realm, String locale)
deleteLocalizationTextsByLocale in interface RealmProviderpublic boolean deleteLocalizationText(RealmModel realm, String locale, String key)
deleteLocalizationText in interface RealmProviderpublic String getLocalizationTextsById(RealmModel realm, String locale, String key)
getLocalizationTextsById in interface RealmProviderCopyright © 2020 JBoss by Red Hat. All rights reserved.