Package org.keycloak.models.map.realm
Class MapRealmProvider
- java.lang.Object
- 
- org.keycloak.models.map.realm.MapRealmProvider
 
- 
- All Implemented Interfaces:
- ClientProvider,- ClientScopeProvider,- GroupProvider,- RealmProvider,- RoleProvider,- Provider,- ClientLookupProvider,- ClientScopeLookupProvider,- GroupLookupProvider,- RoleLookupProvider
 
 public class MapRealmProvider extends Object implements RealmProvider 
- 
- 
Constructor SummaryConstructors Constructor Description MapRealmProvider(KeycloakSession session, MapStorage<MapRealmEntity,RealmModel> realmStore)
 - 
Method Summary- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.keycloak.models.ClientProvidergetClientsStream
 - 
Methods inherited from interface org.keycloak.models.ClientScopeProvideraddClientScope
 - 
Methods inherited from interface org.keycloak.storage.group.GroupLookupProvidersearchForGroupByNameStream
 - 
Methods inherited from interface org.keycloak.models.GroupProvidergetGroupsCount, getGroupsStream, getGroupsStream
 - 
Methods inherited from interface org.keycloak.models.RealmProvideraddClient, addClientRole, addClientRole, addRealmRole, createClientInitialAccessModel, createGroup, createGroup, createGroup, decreaseRemainingCount, getClientInitialAccessModel, getClientRole, getClientRoles, getClientRoles, getClientScopeById, getRealmRoles, getRoleById, listClientInitialAccessStream, removeClientInitialAccessModel, removeRole, searchForClientRoles, searchForRoles
 - 
Methods inherited from interface org.keycloak.models.RoleProvideraddClientRole, getClientRolesStream, getRealmRolesStream
 
- 
 
- 
- 
- 
Constructor Detail- 
MapRealmProviderpublic MapRealmProvider(KeycloakSession session, MapStorage<MapRealmEntity,RealmModel> realmStore) 
 
- 
 - 
Method Detail- 
createRealmpublic RealmModel createRealm(String name) Description copied from interface:RealmProviderCreates new realm with the given name. The internal ID will be generated automatically.- Specified by:
- createRealmin interface- RealmProvider
- Parameters:
- name- String name of the realm
- Returns:
- Model of the created realm.
 
 - 
createRealmpublic RealmModel createRealm(String id, String name) Description copied from interface:RealmProviderCreated new realm with given ID and name.- Specified by:
- createRealmin interface- RealmProvider
- Parameters:
- id- Internal ID of the realm or- nullif one is to be created by the underlying store. If the store expects the ID to have a certain format (for example- UUID) and the supplied ID doesn't follow the expected format, the store may replace the- idwith a new one at its own discretion.
- name- String name of the realm
- Returns:
- Model of the created realm.
 
 - 
getRealmpublic RealmModel getRealm(String id) Description copied from interface:RealmProviderExact search for a realm by its internal ID.- Specified by:
- getRealmin interface- RealmProvider
- Parameters:
- id- Internal ID of the realm.
- Returns:
- Model of the realm
 
 - 
getRealmByNamepublic RealmModel getRealmByName(String name) Description copied from interface:RealmProviderExact search for a realm by its name.- Specified by:
- getRealmByNamein interface- RealmProvider
- Parameters:
- name- String name of the realm
- Returns:
- Model of the realm
 
 - 
getRealmsStreampublic Stream<RealmModel> getRealmsStream() Description copied from interface:RealmProviderReturns realms as a stream.- Specified by:
- getRealmsStreamin interface- RealmProvider
- Returns:
- Stream of RealmModel. Never returnsnull.
 
 - 
getRealmsWithProviderTypeStreampublic Stream<RealmModel> getRealmsWithProviderTypeStream(Class<?> type) Description copied from interface:RealmProviderReturns stream of realms which has component with the given provider type.- Specified by:
- getRealmsWithProviderTypeStreamin interface- RealmProvider
- Parameters:
- type-- Class<?>Type of the provider.
- Returns:
- Stream of RealmModel. Never returnsnull.
 
 - 
removeRealmpublic boolean removeRealm(String id) Description copied from interface:RealmProviderRemoves realm with the given id.- Specified by:
- removeRealmin interface- RealmProvider
- Parameters:
- id- of realm.
- Returns:
- trueif the realm was successfully removed.
 
 - 
removeExpiredClientInitialAccesspublic void removeExpiredClientInitialAccess() Description copied from interface:RealmProviderRemoves all expired client initial accesses from all realms.- Specified by:
- removeExpiredClientInitialAccessin interface- RealmProvider
 
 - 
saveLocalizationTextpublic void saveLocalizationText(RealmModel realm, String locale, String key, String text) - Specified by:
- saveLocalizationTextin interface- RealmProvider
 
 - 
saveLocalizationTextspublic void saveLocalizationTexts(RealmModel realm, String locale, Map<String,String> localizationTexts) - Specified by:
- saveLocalizationTextsin interface- RealmProvider
 
 - 
updateLocalizationTextpublic boolean updateLocalizationText(RealmModel realm, String locale, String key, String text) - Specified by:
- updateLocalizationTextin interface- RealmProvider
 
 - 
deleteLocalizationTextsByLocalepublic boolean deleteLocalizationTextsByLocale(RealmModel realm, String locale) - Specified by:
- deleteLocalizationTextsByLocalein interface- RealmProvider
 
 - 
deleteLocalizationTextpublic boolean deleteLocalizationText(RealmModel realm, String locale, String key) - Specified by:
- deleteLocalizationTextin interface- RealmProvider
 
 - 
getLocalizationTextsByIdpublic String getLocalizationTextsById(RealmModel realm, String locale, String key) - Specified by:
- getLocalizationTextsByIdin interface- RealmProvider
 
 - 
addClient@Deprecated public ClientModel addClient(RealmModel realm, String id, String clientId) Deprecated.Description copied from interface:ClientProviderAdds a client with given internal ID andclientIdto the given realm.- Specified by:
- addClientin interface- ClientProvider
- Specified by:
- addClientin interface- RealmProvider
- Parameters:
- realm- Realm owning this client.
- id- Internal ID of the client or- nullif one is to be created by the underlying store
- clientId- String that identifies the client to the external parties. Maps to- client_idin OIDC or- entityIDin SAML.
- Returns:
- Model of the created client.
 
 - 
getClientsCount@Deprecated public long getClientsCount(RealmModel realm) Deprecated.Description copied from interface:ClientProviderReturns number of clients in the given realm- Specified by:
- getClientsCountin interface- ClientProvider
- Specified by:
- getClientsCountin interface- RealmProvider
- Parameters:
- realm- Realm.
- Returns:
- Number of the clients in the given realm.
 
 - 
getClientsStream@Deprecated public Stream<ClientModel> getClientsStream(RealmModel realm, Integer firstResult, Integer maxResults) Deprecated.Description copied from interface:ClientProviderReturns the clients of the given realm as a stream.- Specified by:
- getClientsStreamin interface- ClientProvider
- Parameters:
- realm- Realm.
- firstResult- First result to return. Ignored if negative or- null.
- maxResults- Maximum number of results to return. Ignored if negative or- null.
- Returns:
- Stream of the clients. Never returns null.
 
 - 
getAlwaysDisplayInConsoleClientsStream@Deprecated public Stream<ClientModel> getAlwaysDisplayInConsoleClientsStream(RealmModel realm) Deprecated.Description copied from interface:ClientProviderReturns a stream of clients that are expected to always show up in account console.- Specified by:
- getAlwaysDisplayInConsoleClientsStreamin interface- ClientProvider
- Parameters:
- realm- Realm owning the clients.
- Returns:
- Stream of the clients. Never returns null.
 
 - 
removeClient@Deprecated public boolean removeClient(RealmModel realm, String id) Deprecated.Description copied from interface:ClientProviderRemoves given client from the given realm.- Specified by:
- removeClientin interface- ClientProvider
- Parameters:
- realm- Realm.
- id- Internal ID of the client
- Returns:
- trueif the client existed and has been removed,- falseotherwise.
 
 - 
removeClients@Deprecated public void removeClients(RealmModel realm) Deprecated.Description copied from interface:ClientProviderRemoves all clients from the given realm.- Specified by:
- removeClientsin interface- ClientProvider
- Parameters:
- realm- Realm.
 
 - 
getClientById@Deprecated public ClientModel getClientById(RealmModel realm, String id) Deprecated.Description copied from interface:ClientLookupProviderExact search for a client by its internal ID.- Specified by:
- getClientByIdin interface- ClientLookupProvider
- Parameters:
- realm- Realm to limit the search.
- id- Internal ID
- Returns:
- Model of the client, or nullif no client is found.
 
 - 
getClientByClientId@Deprecated public ClientModel getClientByClientId(RealmModel realm, String clientId) Deprecated.Description copied from interface:ClientLookupProviderExact search for a client by its public client identifier.- Specified by:
- getClientByClientIdin interface- ClientLookupProvider
- Parameters:
- realm- Realm to limit the search for clients.
- clientId- String that identifies the client to the external parties. Maps to- client_idin OIDC or- entityIDin SAML.
- Returns:
- Model of the client, or nullif no client is found.
 
 - 
searchClientsByClientIdStream@Deprecated public Stream<ClientModel> searchClientsByClientIdStream(RealmModel realm, String clientId, Integer firstResult, Integer maxResults) Deprecated.Description copied from interface:ClientLookupProviderCase-insensitive search for clients that contain the given string in their public client identifier.- Specified by:
- searchClientsByClientIdStreamin interface- ClientLookupProvider
- Parameters:
- realm- Realm to limit the search for clients.
- clientId- Searched substring of the public client identifier (- client_idin OIDC or- entityIDin SAML.)
- firstResult- First result to return. Ignored if negative or- null.
- maxResults- Maximum number of results to return. Ignored if negative or- null.
- Returns:
- Stream of ClientModel or an empty stream if no client is found. Never returns null.
 
 - 
searchClientsByAttributes@Deprecated public Stream<ClientModel> searchClientsByAttributes(RealmModel realm, Map<String,String> attributes, Integer firstResult, Integer maxResults) Deprecated.- Specified by:
- searchClientsByAttributesin interface- ClientLookupProvider
 
 - 
addClientScopes@Deprecated public void addClientScopes(RealmModel realm, ClientModel client, Set<ClientScopeModel> clientScopes, boolean defaultScope) Deprecated.Description copied from interface:ClientProviderAssign clientScopes to the client. Add as default scopes (if parameter 'defaultScope' is true) or optional scopes (if parameter 'defaultScope' is false)- Specified by:
- addClientScopesin interface- ClientProvider
- Parameters:
- realm- Realm.
- client- Client.
- clientScopes- to be assigned
- defaultScope- if true the scopes are assigned as default, or optional in case of false
 
 - 
removeClientScope@Deprecated public void removeClientScope(RealmModel realm, ClientModel client, ClientScopeModel clientScope) Deprecated.Description copied from interface:ClientProviderUnassign clientScope from the client.- Specified by:
- removeClientScopein interface- ClientProvider
- Parameters:
- realm- Realm.
- client- Client.
- clientScope- to be unassigned
 
 - 
getClientScopes@Deprecated public Map<String,ClientScopeModel> getClientScopes(RealmModel realm, ClientModel client, boolean defaultScopes) Deprecated.Description copied from interface:ClientLookupProviderReturn all default scopes (ifdefaultScopeistrue) or all optional scopes (ifdefaultScopeisfalse) linked with the client- Specified by:
- getClientScopesin interface- ClientLookupProvider
- Parameters:
- realm- Realm
- client- Client
- defaultScopes- if true default scopes, if false optional scopes, are returned
- Returns:
- map where key is the name of the clientScope, value is particular clientScope. Returns empty map if no scopes linked (never returns null).
 
 - 
getClientScopeById@Deprecated public ClientScopeModel getClientScopeById(RealmModel realm, String id) Deprecated.Description copied from interface:ClientScopeLookupProviderExact search for a client scope by its internal ID..- Specified by:
- getClientScopeByIdin interface- ClientScopeLookupProvider
- Specified by:
- getClientScopeByIdin interface- RealmProvider
- Parameters:
- realm- Realm.
- id- Internal ID of the role.
- Returns:
- Model of the client scope.
 
 - 
getClientScopesStream@Deprecated public Stream<ClientScopeModel> getClientScopesStream(RealmModel realm) Deprecated.Description copied from interface:ClientScopeProviderReturns all the client scopes of the given realm as a stream.- Specified by:
- getClientScopesStreamin interface- ClientScopeProvider
- Parameters:
- realm- Realm.
- Returns:
- Stream of the client scopes. Never returns null.
 
 - 
addClientScope@Deprecated public ClientScopeModel addClientScope(RealmModel realm, String id, String name) Deprecated.Description copied from interface:ClientScopeProviderCreates new client scope with given internal ID andnameto the given realm. Spaces innamewill be replaced by underscore so that scope name can be used as value of scope parameter.- Specified by:
- addClientScopein interface- ClientScopeProvider
- Parameters:
- realm- Realm owning this client scope.
- id- Internal ID of the client scope or- nullif one is to be created by the underlying store
- name- String name of the client scope.
- Returns:
- Model of the created client scope.
 
 - 
removeClientScope@Deprecated public boolean removeClientScope(RealmModel realm, String id) Deprecated.Description copied from interface:ClientScopeProviderRemoves client scope from the given realm.- Specified by:
- removeClientScopein interface- ClientScopeProvider
- Parameters:
- realm- Realm.
- id- Internal ID of the client scope
- Returns:
- trueif the client scope existed and has been removed,- falseotherwise.
 
 - 
removeClientScopes@Deprecated public void removeClientScopes(RealmModel realm) Deprecated.Description copied from interface:ClientScopeProviderRemoves all client scopes from the given realm.- Specified by:
- removeClientScopesin interface- ClientScopeProvider
- Parameters:
- realm- Realm.
 
 - 
getAllRedirectUrisOfEnabledClients@Deprecated public Map<ClientModel,Set<String>> getAllRedirectUrisOfEnabledClients(RealmModel realm) Deprecated.Description copied from interface:ClientProviderReturns a map of (rootUrl, {validRedirectUris}) for all enabled clients.- Specified by:
- getAllRedirectUrisOfEnabledClientsin interface- ClientProvider
- Returns:
 
 - 
moveGroup@Deprecated public void moveGroup(RealmModel realm, GroupModel group, GroupModel toParent) Deprecated.Description copied from interface:GroupProviderThis method is used for moving groups in group structure, for example:- making an existing child group child group of some other group,
- setting a top level group (i.e. group without parent group) child of some group,
- making a child group top level group (i.e. removing its parent group).
 - Specified by:
- moveGroupin interface- GroupProvider
- Specified by:
- moveGroupin interface- RealmProvider
- Parameters:
- realm- Realm owning this group.
- group- Group to update.
- toParent- New parent group, or- nullif we are moving the group to top level group.
 
 - 
getGroupById@Deprecated public GroupModel getGroupById(RealmModel realm, String id) Deprecated.Description copied from interface:GroupLookupProviderReturns a group from the given realm with the corresponding id- Specified by:
- getGroupByIdin interface- GroupLookupProvider
- Specified by:
- getGroupByIdin interface- RealmProvider
- Parameters:
- realm- Realm.
- id- Id.
- Returns:
- GroupModel with the corresponding id.
 
 - 
getGroupsCount@Deprecated public Long getGroupsCount(RealmModel realm, Boolean onlyTopGroups) Deprecated.Description copied from interface:GroupProviderReturns a number of groups/top level groups (i.e. groups without parent group) for the given realm.- Specified by:
- getGroupsCountin interface- GroupProvider
- Specified by:
- getGroupsCountin interface- RealmProvider
- Parameters:
- realm- Realm.
- onlyTopGroups- When true the function returns a count of top level groups only.
- Returns:
- Number of groups/top level groups.
 
 - 
getGroupsCountByNameContaining@Deprecated public Long getGroupsCountByNameContaining(RealmModel realm, String search) Deprecated.Description copied from interface:GroupProviderReturns the number of top level groups containing groups with the given string in name for the given realm.- Specified by:
- getGroupsCountByNameContainingin interface- GroupProvider
- Specified by:
- getGroupsCountByNameContainingin interface- RealmProvider
- Parameters:
- realm- Realm.
- search- Case insensitive string which will be searched for.
- Returns:
- Number of groups with the given string in its name.
 
 - 
removeGroup@Deprecated public boolean removeGroup(RealmModel realm, GroupModel group) Deprecated.Description copied from interface:GroupProviderRemoves the given group for the given realm.- Specified by:
- removeGroupin interface- GroupProvider
- Specified by:
- removeGroupin interface- RealmProvider
- Parameters:
- realm- Realm.
- group- Group.
- Returns:
- true if the group was removed, false if group doesn't exist or doesn't belong to the given realm
 
 - 
createGroup@Deprecated public GroupModel createGroup(RealmModel realm, String id, String name, GroupModel toParent) Deprecated.Description copied from interface:GroupProviderCreates a new group with the given name, id, name and parent to the given realm.- Specified by:
- createGroupin interface- GroupProvider
- Specified by:
- createGroupin interface- RealmProvider
- Parameters:
- realm- Realm.
- id- Id, will be generated if- null.
- name- Name.
- toParent- Parent group, or- nullif the group is top level group
- Returns:
- Model of the created group
 
 - 
addTopLevelGroup@Deprecated public void addTopLevelGroup(RealmModel realm, GroupModel subGroup) Deprecated.Description copied from interface:GroupProviderRemoves parent group for the given group in the given realm.- Specified by:
- addTopLevelGroupin interface- GroupProvider
- Specified by:
- addTopLevelGroupin interface- RealmProvider
- Parameters:
- realm- Realm.
- subGroup- Group.
 
 - 
getGroupsStream@Deprecated public Stream<GroupModel> getGroupsStream(RealmModel realm) Deprecated.Description copied from interface:GroupProviderReturns groups for the given realm.- Specified by:
- getGroupsStreamin interface- GroupProvider
- Parameters:
- realm- Realm.
- Returns:
- Stream of groups in the Realm.
 
 - 
getGroupsStream@Deprecated public Stream<GroupModel> getGroupsStream(RealmModel realm, Stream<String> ids, String search, Integer first, Integer max) Deprecated.Description copied from interface:GroupProviderReturns a paginated stream of groups with given ids and given search value in group names.- Specified by:
- getGroupsStreamin interface- GroupProvider
- Parameters:
- realm- Realm.
- ids- Stream of ids.
- search- Case insensitive string which will be searched for. Ignored if null.
- first- Index of the first result to return. Ignored if negative or- null.
- max- Maximum number of results to return. Ignored if negative or- null.
- Returns:
- Stream of desired groups. Never returns null.
 
 - 
getGroupsByRoleStream@Deprecated public Stream<GroupModel> getGroupsByRoleStream(RealmModel realm, RoleModel role, Integer firstResult, Integer maxResults) Deprecated.Description copied from interface:GroupProviderReturns groups with the given role in the given realm.- Specified by:
- getGroupsByRoleStreamin interface- GroupProvider
- Parameters:
- realm- Realm.
- role- Role.
- firstResult- First result to return. Ignored if negative or- null.
- maxResults- Maximum number of results to return. Ignored if negative or- null.
- Returns:
- Stream of groups with the given role. Never returns null.
 
 - 
getTopLevelGroupsStream@Deprecated public Stream<GroupModel> getTopLevelGroupsStream(RealmModel realm) Deprecated.Description copied from interface:GroupProviderReturns all top level groups (i.e. groups without parent group) for the given realm.- Specified by:
- getTopLevelGroupsStreamin interface- GroupProvider
- Parameters:
- realm- Realm.
- Returns:
- Stream of all top level groups in the realm. Never returns null.
 
 - 
getTopLevelGroupsStream@Deprecated public Stream<GroupModel> getTopLevelGroupsStream(RealmModel realm, Integer firstResult, Integer maxResults) Deprecated.Description copied from interface:GroupProviderReturns top level groups (i.e. groups without parent group) for the given realm.- Specified by:
- getTopLevelGroupsStreamin interface- GroupProvider
- Parameters:
- realm- Realm.
- firstResult- First result to return. Ignored if negative or- null.
- maxResults- Maximum number of results to return. Ignored if negative or- null.
- Returns:
- Stream of top level groups in the realm. Never returns null.
 
 - 
searchForGroupByNameStream@Deprecated public Stream<GroupModel> searchForGroupByNameStream(RealmModel realm, String search, Boolean exact, Integer firstResult, Integer maxResults) Deprecated.Description copied from interface:GroupLookupProviderReturns the group hierarchy with the given string in name for the given realm. For a matching group node the parent group is fetched by id (with all children) and added to the result stream. This is done until the group node does not have a parent (root group)- Specified by:
- searchForGroupByNameStreamin interface- GroupLookupProvider
- Parameters:
- realm- Realm.
- search- Case sensitive searched string.
- exact- Boolean which defines wheather search param should be matched exactly.
- firstResult- First result to return. Ignored if negative or- null.
- maxResults- Maximum number of results to return. Ignored if negative or- null.
- Returns:
- Stream of root groups that have the given string in their name themself or a group in their child-collection has.
 The returned hierarchy contains siblings that do not necessarily have a matching name. Never returns null.
 
 - 
searchGroupsByAttributespublic Stream<GroupModel> searchGroupsByAttributes(RealmModel realm, Map<String,String> attributes, Integer firstResult, Integer maxResults) Description copied from interface:GroupLookupProviderReturns the groups filtered by attribute names and attribute values for the given realm.- Specified by:
- searchGroupsByAttributesin interface- GroupLookupProvider
- Parameters:
- realm- Realm.
- attributes- name-value pairs that are compared to group attributes.
- firstResult- First result to return. Ignored if negative or- null.
- maxResults- Maximum number of results to return. Ignored if negative or- null.
- Returns:
- Stream of groups with attributes matching all searched attributes. Never returns null.
 
 - 
addRealmRole@Deprecated public RoleModel addRealmRole(RealmModel realm, String id, String name) Deprecated.Description copied from interface:RoleProviderAdds a realm role with given internal ID andnameto the given realm.- Specified by:
- addRealmRolein interface- RealmProvider
- Specified by:
- addRealmRolein interface- RoleProvider
- Parameters:
- realm- Realm owning this role.
- id- Internal ID of the role or- nullif one is to be created by the underlying store
- name- String name of the role.
- Returns:
- Model of the created client.
 
 - 
getRealmRole@Deprecated public RoleModel getRealmRole(RealmModel realm, String name) Deprecated.Description copied from interface:RoleLookupProviderExact search for a role by given name.- Specified by:
- getRealmRolein interface- RealmProvider
- Specified by:
- getRealmRolein interface- RoleLookupProvider
- Parameters:
- realm- Realm.
- name- String name of the role.
- Returns:
- Model of the role, or nullif no role is found.
 
 - 
getRealmRolesStream@Deprecated public Stream<RoleModel> getRealmRolesStream(RealmModel realm, Integer first, Integer max) Deprecated.Description copied from interface:RoleProviderReturns the realm roles of the given realm as a stream.- Specified by:
- getRealmRolesStreamin interface- RoleProvider
- Parameters:
- realm- Realm.
- first- First result to return. Ignored if negative or- null.
- max- Maximum number of results to return. Ignored if negative or- null.
- Returns:
- Stream of the roles. Never returns null.
 
 - 
getRolesStreampublic Stream<RoleModel> getRolesStream(RealmModel realm, Stream<String> ids, String search, Integer first, Integer max) Description copied from interface:RoleProviderReturns a paginated stream of roles with given ids and given search value in role names.- Specified by:
- getRolesStreamin interface- RoleProvider
- Parameters:
- realm- Realm. Cannot be- null.
- ids- Stream of ids. Returns empty- Streamwhen- null.
- search- Case-insensitive string to search by role's name or description. Ignored if- null.
- first- Index of the first result to return. Ignored if negative or- null.
- max- Maximum number of results to return. Ignored if negative or- null.
- Returns:
- Stream of desired roles. Never returns null.
 
 - 
removeRole@Deprecated public boolean removeRole(RoleModel role) Deprecated.Description copied from interface:RoleProviderRemoves given realm role from the given realm.- Specified by:
- removeRolein interface- RoleProvider
- Parameters:
- role- Role to be removed.
- Returns:
- trueif the role existed and has been removed,- falseotherwise.
 
 - 
removeRoles@Deprecated public void removeRoles(RealmModel realm) Deprecated.Description copied from interface:RoleProviderRemoves all roles from the given realm.- Specified by:
- removeRolesin interface- RoleProvider
- Parameters:
- realm- Realm.
 
 - 
addClientRole@Deprecated public RoleModel addClientRole(ClientModel client, String id, String name) Deprecated.Description copied from interface:RoleProviderAdds a client role with given internal ID andnameto the given client.- Specified by:
- addClientRolein interface- RoleProvider
- Parameters:
- client- Client owning this role.
- id- Internal ID of the client role or- nullif one is to be created by the underlying store.
- name- String name of the role.
- Returns:
- Model of the created role.
 
 - 
getClientRolesStream@Deprecated public Stream<RoleModel> getClientRolesStream(ClientModel client, Integer first, Integer max) Deprecated.Description copied from interface:RoleProviderReturns the client roles of the given client.- Specified by:
- getClientRolesStreamin interface- RoleProvider
- Parameters:
- client- Client.
- first- First result to return. Ignored if negative or- null.
- max- Maximum number of results to return. Ignored if negative or- null.
- Returns:
- Stream of the roles. Never returns null.
 
 - 
removeRoles@Deprecated public void removeRoles(ClientModel client) Deprecated.Description copied from interface:RoleProviderRemoves all roles from the given client.- Specified by:
- removeRolesin interface- RoleProvider
- Parameters:
- client- Client.
 
 - 
getRoleById@Deprecated public RoleModel getRoleById(RealmModel realm, String id) Deprecated.Description copied from interface:RoleLookupProviderExact search for a role by its internal ID..- Specified by:
- getRoleByIdin interface- RoleLookupProvider
- Parameters:
- realm- Realm.
- id- Internal ID of the role.
- Returns:
- Model of the role.
 
 - 
searchForRolesStream@Deprecated public Stream<RoleModel> searchForRolesStream(RealmModel realm, String search, Integer first, Integer max) Deprecated.Description copied from interface:RoleLookupProviderCase-insensitive search for roles that contain the given string in their name or description.- Specified by:
- searchForRolesStreamin interface- RoleLookupProvider
- Parameters:
- realm- Realm.
- search- Searched substring of the role's name or description.
- first- First result to return. Ignored if negative or- null.
- max- Maximum number of results to return. Ignored if negative or- null.
- Returns:
- Stream of the realm roles their name or description contains given search string. 
 Never returns null.
 
 - 
getClientRole@Deprecated public RoleModel getClientRole(ClientModel client, String name) Deprecated.Description copied from interface:RoleLookupProviderExact search for a client role by given name.- Specified by:
- getClientRolein interface- RoleLookupProvider
- Parameters:
- client- Client.
- name- String name of the role.
- Returns:
- Model of the role, or nullif no role is found.
 
 - 
searchForClientRolesStream@Deprecated public Stream<RoleModel> searchForClientRolesStream(ClientModel client, String search, Integer first, Integer max) Deprecated.Description copied from interface:RoleLookupProviderCase-insensitive search for client roles that contain the given string in their name or description.- Specified by:
- searchForClientRolesStreamin interface- RoleLookupProvider
- Parameters:
- client- Client.
- search- String to search by role's name or description.
- first- First result to return. Ignored if negative or- null.
- max- Maximum number of results to return. Ignored if negative or- null.
- Returns:
- Stream of the client roles their name or description contains given search string. 
 Never returns null.
 
 
- 
 
-