Package org.keycloak.models
Interface RoleMapperModel
- 
- All Known Subinterfaces:
- CachedUserModel,- CachedUserModel.Streams,- GroupModel,- GroupModel.Streams,- RoleMapperModel.Streams,- UserModel,- UserModel.Streams
 - All Known Implementing Classes:
- AbstractGroupModel,- AbstractUserAdapter,- AbstractUserAdapter.Streams,- AbstractUserAdapterFederatedStorage,- AbstractUserAdapterFederatedStorage.Streams,- AbstractUserModel,- GroupAdapter,- GroupAdapter,- GroupLDAPStorageMapper.LDAPGroupMappingsUserDelegate,- InMemoryUserAdapter,- LDAPWritesOnlyUserModelDelegate,- MapGroupAdapter,- MapUserAdapter,- MSADLDSUserAccountControlStorageMapper.MSADUserModelDelegate,- MSADUserAccountControlStorageMapper.MSADUserModelDelegate,- ReadOnlyKerberosUserModelDelegate,- ReadonlyLDAPUserModelDelegate,- ReadonlySSSDUserModelDelegate,- ReadOnlyUserModelDelegate,- RoleLDAPStorageMapper.LDAPRoleMappingsUserDelegate,- TxAwareLDAPUserModelDelegate,- UpdateOnlyChangeUserModelDelegate,- UserAdapter,- UserAdapter,- UserModelDefaultMethods,- UserModelDefaultMethods.Streams,- UserModelDelegate
 
 public interface RoleMapperModel- Version:
- $Revision: 1 $
- Author:
- Bill Burke
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceRoleMapperModel.StreamsDeprecated.This interface is no longer necessary, collection-based methods were removed from the parent interface and therefore the parent interface can be used directly
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voiddeleteRoleMapping(RoleModel role)Removes the given role mapping from this object.Stream<RoleModel>getClientRoleMappingsStream(ClientModel app)Returns stream of client roles that are directly set to this object for the given client.Stream<RoleModel>getRealmRoleMappingsStream()Returns stream of realm roles that are directly set to this object.Stream<RoleModel>getRoleMappingsStream()Returns stream of all role (both realm all client) that are directly set to this object.voidgrantRole(RoleModel role)Grants the given role to this object.default booleanhasDirectRole(RoleModel role)Returnstrue, if this object is directly assigned the given role.booleanhasRole(RoleModel role)Returnstrueif this object is directly or indirectly assigned the given role,falseotherwise.
 
- 
- 
- 
Method Detail- 
getRealmRoleMappingsStreamStream<RoleModel> getRealmRoleMappingsStream() Returns stream of realm roles that are directly set to this object.- Returns:
- Stream of RoleModel. Never returnsnull.
 
 - 
getClientRoleMappingsStreamStream<RoleModel> getClientRoleMappingsStream(ClientModel app) Returns stream of client roles that are directly set to this object for the given client.- Parameters:
- app-- ClientModelClient to get the roles for.
- Returns:
- Stream of RoleModel. Never returnsnull.
 
 - 
hasDirectRoledefault boolean hasDirectRole(RoleModel role) Returnstrue, if this object is directly assigned the given role.- Parameters:
- role- the role
- Returns:
- see description
- See Also:
- if you want to check whether this object is directly or indirectly assigned to a role
 
 - 
hasRoleboolean hasRole(RoleModel role) Returnstrueif this object is directly or indirectly assigned the given role,falseotherwise.For example, trueis returned for hasRole(R) if:- R is directly assigned to this object
- R is indirectly assigned to this object via composites
- R is not assigned to this object but this object belongs to a group G which is assigned the role R
- R is not assigned to this object but this object belongs to a group G, and G belongs to group H which is assigned the role R
 - Parameters:
- role-
- Returns:
- see description
- See Also:
- if you want to check if this object is directly assigned to a role
 
 - 
grantRolevoid grantRole(RoleModel role) Grants the given role to this object.- Parameters:
- role-
 
 - 
getRoleMappingsStreamStream<RoleModel> getRoleMappingsStream() Returns stream of all role (both realm all client) that are directly set to this object.- Returns:
- Stream of RoleModel. Never returnsnull.
 
 - 
deleteRoleMappingvoid deleteRoleMapping(RoleModel role) Removes the given role mapping from this object.- Parameters:
- role- Role to remove
 
 
- 
 
-