Package org.keycloak.storage.role
Interface RoleLookupProvider
- 
- All Known Subinterfaces:
- CacheRealmProvider,- RealmProvider,- RoleProvider,- RoleStorageProvider
 - All Known Implementing Classes:
- JpaRealmProvider,- MapRealmProvider,- MapRoleProvider,- RealmCacheSession,- RoleStorageManager
 
 public interface RoleLookupProviderAbstraction interface for lookup of both realm roles and client roles by id, name and description.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description RoleModelgetClientRole(ClientModel client, String name)Exact search for a client role by given name.RoleModelgetRealmRole(RealmModel realm, String name)Exact search for a role by given name.RoleModelgetRoleById(RealmModel realm, String id)Exact search for a role by its internal ID..Stream<RoleModel>searchForClientRolesStream(ClientModel client, String search, Integer first, Integer max)Case-insensitive search for client roles that contain the given string in their name or description.Stream<RoleModel>searchForRolesStream(RealmModel realm, String search, Integer first, Integer max)Case-insensitive search for roles that contain the given string in their name or description.
 
- 
- 
- 
Method Detail- 
getRealmRoleRoleModel getRealmRole(RealmModel realm, String name) Exact search for a role by given name.- Parameters:
- realm- Realm.
- name- String name of the role.
- Returns:
- Model of the role, or nullif no role is found.
 
 - 
getRoleByIdRoleModel getRoleById(RealmModel realm, String id) Exact search for a role by its internal ID..- Parameters:
- realm- Realm.
- id- Internal ID of the role.
- Returns:
- Model of the role.
 
 - 
searchForRolesStreamStream<RoleModel> searchForRolesStream(RealmModel realm, String search, Integer first, Integer max) Case-insensitive search for roles that contain the given string in their name or description.- 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.
 
 - 
getClientRoleRoleModel getClientRole(ClientModel client, String name) Exact search for a client role by given name.- Parameters:
- client- Client.
- name- String name of the role.
- Returns:
- Model of the role, or nullif no role is found.
 
 - 
searchForClientRolesStreamStream<RoleModel> searchForClientRolesStream(ClientModel client, String search, Integer first, Integer max) Case-insensitive search for client roles that contain the given string in their name or description.- 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.
 
 
- 
 
-