public class RoleLDAPStorageMapper.LDAPRoleMappingsUserDelegate extends UserModelDelegate
UserModel.RequiredAction, UserModel.SearchableFields, UserModel.Streams, UserModel.UserRemovedEvent
delegate
COMPARE_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 and Description |
---|
LDAPRoleMappingsUserDelegate(RealmModel realm,
UserModel user,
LDAPObject ldapUser) |
Modifier and Type | Method and Description |
---|---|
void |
deleteRoleMapping(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.
|
void |
grantRole(RoleModel role)
Grants the given role to this object.
|
boolean |
hasRole(RoleModel role)
Returns
true if this object is directly or indirectly assigned the given role, false otherwise. |
addRequiredAction, addRequiredAction, 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
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getAttribute, getGroups, getRequiredActions
getGroups, getGroups, getGroupsCount, getGroupsCountByNameContaining, getGroupsStream
getClientRoleMappings, getRealmRoleMappings, getRoleMappings
public LDAPRoleMappingsUserDelegate(RealmModel realm, UserModel user, LDAPObject ldapUser)
public Stream<RoleModel> getRealmRoleMappingsStream()
RoleMapperModel
getRealmRoleMappingsStream
in interface RoleMapperModel
getRealmRoleMappingsStream
in interface RoleMapperModel.Streams
getRealmRoleMappingsStream
in class UserModelDelegate
RoleModel
. Never returns null
.public Stream<RoleModel> getClientRoleMappingsStream(ClientModel client)
RoleMapperModel
getClientRoleMappingsStream
in interface RoleMapperModel
getClientRoleMappingsStream
in interface RoleMapperModel.Streams
getClientRoleMappingsStream
in class UserModelDelegate
client
- ClientModel
Client to get the roles for.RoleModel
. Never returns null
.public boolean hasRole(RoleModel role)
RoleMapperModel
true
if this object is directly or indirectly assigned the given role, false
otherwise.
For example, true
is returned for hasRole(R) if:
hasRole
in interface RoleMapperModel
hasRole
in class UserModelDelegate
public void grantRole(RoleModel role)
RoleMapperModel
grantRole
in interface RoleMapperModel
grantRole
in class UserModelDelegate
public Stream<RoleModel> getRoleMappingsStream()
RoleMapperModel
getRoleMappingsStream
in interface RoleMapperModel
getRoleMappingsStream
in interface RoleMapperModel.Streams
getRoleMappingsStream
in class UserModelDelegate
RoleModel
. Never returns null
.public void deleteRoleMapping(RoleModel role)
RoleMapperModel
deleteRoleMapping
in interface RoleMapperModel
deleteRoleMapping
in class UserModelDelegate
role
- Role to removeCopyright © 2021 JBoss by Red Hat. All rights reserved.