public class RealmCacheSession extends Object implements CacheRealmProvider
| Modifier and Type | Field and Description |
|---|---|
protected RealmCacheManager |
cache |
protected boolean |
clearAll |
protected ClientProvider |
clientDelegate |
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 |
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, waitcreateGroup, createGroup, createGroup, getClientByClientId, getClientById, removeClient, searchClientsByClientIdprotected 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 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 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 List<RealmModel> getRealmsWithProviderType(Class<?> type)
getRealmsWithProviderType in interface RealmProviderpublic List<RealmModel> getRealms()
getRealms 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 List<ClientModel> getClients(RealmModel realm, Integer firstResult, Integer maxResults)
getClients in interface ClientProvidergetClients in interface RealmProviderpublic List<ClientModel> getClients(RealmModel realm)
getClients in interface ClientProvidergetClients in interface RealmProviderpublic List<ClientModel> getAlwaysDisplayInConsoleClients(RealmModel realm)
getAlwaysDisplayInConsoleClients in interface ClientProvidergetAlwaysDisplayInConsoleClients in interface RealmProviderpublic void removeClients(RealmModel realm)
removeClients in interface ClientProviderpublic boolean removeClient(RealmModel realm, String id)
removeClient in interface ClientProviderremoveClient in interface RealmProviderpublic RoleModel addRealmRole(RealmModel realm, String name)
addRealmRole in interface RealmProviderpublic RoleModel addRealmRole(RealmModel realm, String id, String name)
addRealmRole in interface RealmProviderpublic Set<RoleModel> getRealmRoles(RealmModel realm)
getRealmRoles in interface RealmProviderpublic Set<RoleModel> getClientRoles(RealmModel realm, ClientModel client)
getClientRoles in interface RealmProviderpublic Set<RoleModel> getRealmRoles(RealmModel realm, Integer first, Integer max)
getRealmRoles in interface RealmProviderpublic Set<RoleModel> getClientRoles(RealmModel realm, ClientModel client, Integer first, Integer max)
getClientRoles in interface RealmProviderpublic Set<RoleModel> searchForClientRoles(RealmModel realm, ClientModel client, String search, Integer first, Integer max)
searchForClientRoles in interface RealmProviderpublic Set<RoleModel> searchForRoles(RealmModel realm, String search, Integer first, Integer max)
searchForRoles in interface RealmProviderpublic RoleModel addClientRole(RealmModel realm, ClientModel client, String name)
addClientRole in interface RealmProviderpublic RoleModel addClientRole(RealmModel realm, ClientModel client, String id, String name)
addClientRole in interface RealmProviderpublic RoleModel getRealmRole(RealmModel realm, String name)
getRealmRole in interface RealmProviderpublic RoleModel getClientRole(RealmModel realm, ClientModel client, String name)
getClientRole in interface RealmProviderpublic boolean removeRole(RealmModel realm, RoleModel role)
removeRole in interface RealmProviderpublic RoleModel getRoleById(String id, RealmModel realm)
getRoleById in interface RealmProviderpublic GroupModel getGroupById(String id, RealmModel realm)
getGroupById in interface RealmProviderpublic void moveGroup(RealmModel realm, GroupModel group, GroupModel toParent)
moveGroup in interface RealmProviderpublic List<GroupModel> getGroups(RealmModel realm)
getGroups in interface RealmProviderpublic Long getGroupsCount(RealmModel realm, Boolean onlyTopGroups)
getGroupsCount in interface RealmProviderpublic long getClientsCount(RealmModel realm)
getClientsCount in interface ClientProvidergetClientsCount in interface RealmProviderpublic Long getGroupsCountByNameContaining(RealmModel realm, String search)
getGroupsCountByNameContaining in interface RealmProviderpublic List<GroupModel> getGroupsByRole(RealmModel realm, RoleModel role, int firstResult, int maxResults)
getGroupsByRole in interface RealmProviderpublic List<GroupModel> getTopLevelGroups(RealmModel realm)
getTopLevelGroups in interface RealmProviderpublic List<GroupModel> getTopLevelGroups(RealmModel realm, Integer first, Integer max)
getTopLevelGroups in interface RealmProviderpublic List<GroupModel> searchForGroupByName(RealmModel realm, String search, Integer first, Integer max)
searchForGroupByName in interface RealmProviderpublic boolean removeGroup(RealmModel realm, GroupModel group)
removeGroup in interface RealmProviderpublic GroupModel createGroup(RealmModel realm, String id, String name, GroupModel toParent)
createGroup in interface RealmProviderpublic void addTopLevelGroup(RealmModel realm, GroupModel subGroup)
addTopLevelGroup in interface RealmProviderpublic ClientModel getClientById(RealmModel realm, String id)
getClientById in interface RealmProvidergetClientById in interface ClientLookupProviderprotected ClientModel cacheClient(RealmModel realm, ClientModel delegate, Long revision)
protected ClientModel validateCache(RealmModel realm, CachedClient cached)
public List<ClientModel> searchClientsByClientId(RealmModel realm, String clientId, Integer firstResult, Integer maxResults)
searchClientsByClientId in interface RealmProvidersearchClientsByClientId in interface ClientLookupProviderpublic ClientModel getClientByClientId(RealmModel realm, String clientId)
getClientByClientId in interface RealmProvidergetClientByClientId 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 List<ClientInitialAccessModel> listClientInitialAccess(RealmModel realm)
listClientInitialAccess in interface RealmProviderpublic void removeExpiredClientInitialAccess()
removeExpiredClientInitialAccess in interface RealmProviderpublic void decreaseRemainingCount(RealmModel realm, ClientInitialAccessModel clientInitialAccess)
decreaseRemainingCount in interface RealmProviderCopyright © 2020 JBoss by Red Hat. All rights reserved.