public class JpaRealmProvider extends Object implements RealmProvider, ClientProvider, ClientScopeProvider, GroupProvider, RoleProvider, DeploymentStateProvider
| Modifier and Type | Field and Description |
|---|---|
protected javax.persistence.EntityManager |
em |
protected static org.jboss.logging.Logger |
logger |
| Constructor and Description |
|---|
JpaRealmProvider(KeycloakSession session,
javax.persistence.EntityManager em,
Set<String> clientSearchableAttributes) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddClientRole, addClientRole, createClientInitialAccessModel, createGroup, createGroup, createGroup, decreaseRemainingCount, getAlwaysDisplayInConsoleClients, getClientByClientId, getClientById, getClientInitialAccessModel, getClientRole, getClientRoles, getClientRoles, getClients, getClients, getClientScopeById, getGroupById, getGroups, getGroupsByRole, getRealmRoles, getRealmRoles, getRealms, getRealmsWithProviderType, getRoleById, getTopLevelGroups, getTopLevelGroups, listClientInitialAccess, listClientInitialAccessStream, removeClient, removeClientInitialAccessModel, removeRole, searchClientsByClientId, searchForClientRoles, searchForGroupByName, searchForRolesaddClientScopegetClientRolesStreamprotected static final org.jboss.logging.Logger logger
protected javax.persistence.EntityManager em
public JpaRealmProvider(KeycloakSession session, javax.persistence.EntityManager em, Set<String> clientSearchableAttributes)
public MigrationModel getMigrationModel()
getMigrationModel in interface DeploymentStateProviderpublic 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 Stream<RealmModel> getRealmsWithProviderTypeStream(Class<?> providerType)
getRealmsWithProviderTypeStream in interface RealmProviderpublic Stream<RealmModel> getRealmsStream()
getRealmsStream in interface RealmProviderpublic RealmModel getRealmByName(String name)
getRealmByName in interface RealmProviderpublic boolean removeRealm(String id)
removeRealm in interface RealmProviderpublic 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 RoleModel getRealmRole(RealmModel realm, String name)
getRealmRole in interface RealmProvidergetRealmRole 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 Stream<RoleModel> getRealmRolesStream(RealmModel realm)
getRealmRolesStream in interface RoleProviderpublic RoleModel getClientRole(ClientModel client, String name)
getClientRole in interface RoleLookupProviderpublic Map<ClientModel,Set<String>> getAllRedirectUrisOfEnabledClients(RealmModel realm)
getAllRedirectUrisOfEnabledClients in interface ClientProviderpublic 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 RoleProviderprotected Stream<RoleModel> getRolesStream(javax.persistence.TypedQuery<RoleEntity> query, RealmModel realm, Integer first, Integer max)
public 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 RoleLookupProviderprotected Stream<RoleModel> searchForRoles(javax.persistence.TypedQuery<RoleEntity> query, RealmModel realm, String search, Integer first, Integer max)
public boolean removeRole(RoleModel role)
removeRole in interface RoleProviderpublic RoleContainerModel.RoleRemovedEvent roleRemovedEvent(RoleModel role)
public 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 Stream<GroupModel> getGroupsStream(RealmModel realm, Stream<String> ids, Integer first, Integer max)
getGroupsStream in interface GroupProviderpublic Stream<GroupModel> getGroupsStream(RealmModel realm, Stream<String> ids)
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 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)
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)
getClientsStream in interface ClientProviderpublic Stream<ClientModel> getClientsStream(RealmModel realm, Integer firstResult, Integer maxResults)
getClientsStream in interface ClientProviderpublic Stream<ClientModel> getAlwaysDisplayInConsoleClientsStream(RealmModel realm)
getAlwaysDisplayInConsoleClientsStream in interface ClientProviderpublic ClientModel getClientById(RealmModel realm, String id)
getClientById in interface ClientLookupProviderpublic ClientModel getClientByClientId(RealmModel realm, String clientId)
getClientByClientId in interface ClientLookupProviderpublic Stream<ClientModel> searchClientsByClientIdStream(RealmModel realm, String clientId, Integer firstResult, Integer maxResults)
searchClientsByClientIdStream in interface ClientLookupProviderpublic Stream<ClientModel> searchClientsByAttributes(RealmModel realm, Map<String,String> attributes, Integer firstResult, Integer maxResults)
searchClientsByAttributes in interface ClientLookupProviderpublic void removeClients(RealmModel realm)
removeClients in interface ClientProviderpublic boolean removeClient(RealmModel realm, String id)
removeClient in interface ClientProviderpublic ClientScopeModel getClientScopeById(RealmModel realm, String id)
getClientScopeById in interface RealmProvidergetClientScopeById in interface ClientScopeLookupProviderpublic Stream<ClientScopeModel> getClientScopesStream(RealmModel realm)
getClientScopesStream in interface ClientScopeProviderpublic ClientScopeModel addClientScope(RealmModel realm, String id, String name)
addClientScope in interface ClientScopeProviderpublic boolean removeClientScope(RealmModel realm, String id)
removeClientScope in interface ClientScopeProviderpublic void removeClientScopes(RealmModel realm)
removeClientScopes in interface ClientScopeProviderpublic void addClientScopes(RealmModel realm, ClientModel client, Set<ClientScopeModel> clientScopes, boolean defaultScope)
addClientScopes in interface ClientProviderpublic void removeClientScope(RealmModel realm, ClientModel client, ClientScopeModel clientScope)
removeClientScope in interface ClientProviderpublic Map<String,ClientScopeModel> getClientScopes(RealmModel realm, ClientModel client, boolean defaultScope)
getClientScopes in interface ClientLookupProviderpublic Stream<GroupModel> searchForGroupByNameStream(RealmModel realm, String search, Integer first, Integer max)
searchForGroupByNameStream in interface GroupLookupProviderpublic void removeExpiredClientInitialAccess()
removeExpiredClientInitialAccess in interface RealmProviderpublic boolean updateLocalizationText(RealmModel realm, String locale, String key, String text)
updateLocalizationText 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 deleteLocalizationTextsByLocale(RealmModel realm, String locale)
deleteLocalizationTextsByLocale in interface RealmProviderpublic String getLocalizationTextsById(RealmModel realm, String locale, String key)
getLocalizationTextsById in interface RealmProviderpublic boolean deleteLocalizationText(RealmModel realm, String locale, String key)
deleteLocalizationText in interface RealmProviderCopyright © 2021 JBoss by Red Hat. All rights reserved.