public class JpaRealmProvider extends Object implements RealmProvider, ClientProvider, GroupProvider, RoleProvider
| 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) |
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, searchForRolesgetClientRolesStreamprotected static final org.jboss.logging.Logger logger
protected javax.persistence.EntityManager em
public JpaRealmProvider(KeycloakSession session, javax.persistence.EntityManager em)
public MigrationModel getMigrationModel()
getMigrationModel in interface RealmProviderpublic 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 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 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)
preRemove in interface GroupProviderpublic 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 void removeClients(RealmModel realm)
removeClients in interface ClientProviderpublic boolean removeClient(RealmModel realm, String id)
removeClient in interface ClientProviderpublic ClientScopeModel getClientScopeById(String id, RealmModel realm)
getClientScopeById in interface RealmProviderpublic Stream<GroupModel> searchForGroupByNameStream(RealmModel realm, String search, Integer first, Integer max)
searchForGroupByNameStream in interface GroupLookupProviderpublic 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 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.