Class RoleLDAPStorageMapper.LDAPRoleMappingsUserDelegate
- java.lang.Object
- 
- org.keycloak.models.utils.UserModelDelegate
- 
- org.keycloak.storage.ldap.mappers.membership.role.RoleLDAPStorageMapper.LDAPRoleMappingsUserDelegate
 
 
- 
- All Implemented Interfaces:
- RoleMapperModel,- UserModel
 - Enclosing class:
- RoleLDAPStorageMapper
 
 public class RoleLDAPStorageMapper.LDAPRoleMappingsUserDelegate extends UserModelDelegate 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.keycloak.models.UserModelUserModel.RequiredAction, UserModel.SearchableFields, UserModel.Streams, UserModel.UserRemovedEvent
 
- 
 - 
Field Summary- 
Fields inherited from class org.keycloak.models.utils.UserModelDelegatedelegate
 - 
Fields inherited from interface org.keycloak.models.UserModelCOMPARE_BY_USERNAME, DISABLED_REASON, EMAIL, EMAIL_VERIFIED, ENABLED, EXACT, FIRST_NAME, GROUPS, IDP_ALIAS, IDP_USER_ID, INCLUDE_SERVICE_ACCOUNT, LAST_NAME, LOCALE, SEARCH, USERNAME
 
- 
 - 
Constructor SummaryConstructors Constructor Description LDAPRoleMappingsUserDelegate(RealmModel realm, UserModel user, LDAPObject ldapUser, RoleContainerModel targetRoleContainer)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteRoleMapping(RoleModel role)Removes the given role mapping from this object.Stream<RoleModel>getClientRoleMappingsStream(ClientModel client)Returns stream of client roles that are directly set to this object for the given client.protected Stream<RoleModel>getLDAPRoleMappingsConverted()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.booleanhasRole(RoleModel role)Returnstrueif this object is directly or indirectly assigned the given role,falseotherwise.- 
Methods inherited from class org.keycloak.models.utils.UserModelDelegateaddRequiredAction, addRequiredAction, credentialManager, equals, getAttributes, getAttributeStream, getCreatedTimestamp, getDelegate, getEmail, getFederationLink, getFirstAttribute, getFirstName, getGroupsStream, getId, getLastName, getRequiredActionsStream, getServiceAccountClientLink, getUsername, hashCode, isEmailVerified, isEnabled, isMemberOf, joinGroup, leaveGroup, removeAttribute, removeRequiredAction, removeRequiredAction, setAttribute, setCreatedTimestamp, setEmail, setEmailVerified, setEnabled, setFederationLink, setFirstName, setLastName, setServiceAccountClientLink, setSingleAttribute, setUsername
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.keycloak.models.RoleMapperModelhasDirectRole
 - 
Methods inherited from interface org.keycloak.models.UserModelgetGroupsCount, getGroupsCountByNameContaining, getGroupsStream
 
- 
 
- 
- 
- 
Constructor Detail- 
LDAPRoleMappingsUserDelegatepublic LDAPRoleMappingsUserDelegate(RealmModel realm, UserModel user, LDAPObject ldapUser, RoleContainerModel targetRoleContainer) 
 
- 
 - 
Method Detail- 
getRealmRoleMappingsStreampublic Stream<RoleModel> getRealmRoleMappingsStream() Description copied from interface:RoleMapperModelReturns stream of realm roles that are directly set to this object.- Specified by:
- getRealmRoleMappingsStreamin interface- RoleMapperModel
- Overrides:
- getRealmRoleMappingsStreamin class- UserModelDelegate
- Returns:
- Stream of RoleModel. Never returnsnull.
 
 - 
getClientRoleMappingsStreampublic Stream<RoleModel> getClientRoleMappingsStream(ClientModel client) Description copied from interface:RoleMapperModelReturns stream of client roles that are directly set to this object for the given client.- Specified by:
- getClientRoleMappingsStreamin interface- RoleMapperModel
- Overrides:
- getClientRoleMappingsStreamin class- UserModelDelegate
- Parameters:
- client-- ClientModelClient to get the roles for.
- Returns:
- Stream of RoleModel. Never returnsnull.
 
 - 
hasRolepublic boolean hasRole(RoleModel role) Description copied from interface:RoleMapperModelReturnstrueif 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
 - Specified by:
- hasRolein interface- RoleMapperModel
- Overrides:
- hasRolein class- UserModelDelegate
- Returns:
- see description
- See Also:
- if you want to check if this object is directly assigned to a role
 
 - 
grantRolepublic void grantRole(RoleModel role) Description copied from interface:RoleMapperModelGrants the given role to this object.- Specified by:
- grantRolein interface- RoleMapperModel
- Overrides:
- grantRolein class- UserModelDelegate
 
 - 
getRoleMappingsStreampublic Stream<RoleModel> getRoleMappingsStream() Description copied from interface:RoleMapperModelReturns stream of all role (both realm all client) that are directly set to this object.- Specified by:
- getRoleMappingsStreamin interface- RoleMapperModel
- Overrides:
- getRoleMappingsStreamin class- UserModelDelegate
- Returns:
- Stream of RoleModel. Never returnsnull.
 
 - 
deleteRoleMappingpublic void deleteRoleMapping(RoleModel role) Description copied from interface:RoleMapperModelRemoves the given role mapping from this object.- Specified by:
- deleteRoleMappingin interface- RoleMapperModel
- Overrides:
- deleteRoleMappingin class- UserModelDelegate
- Parameters:
- role- Role to remove
 
 
- 
 
-