public class GroupLDAPStorageMapper.LDAPGroupMappingsUserDelegate 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 |
---|
LDAPGroupMappingsUserDelegate(RealmModel realm,
UserModel user,
LDAPObject ldapUser) |
Modifier and Type | Method and Description |
---|---|
Stream<GroupModel> |
getGroupsStream()
Obtains the groups associated with the user.
|
protected Stream<GroupModel> |
getLDAPGroupMappingsConverted() |
boolean |
hasRole(RoleModel role)
Returns
true if this object is directly or indirectly assigned the given role, false otherwise. |
boolean |
isMemberOf(GroupModel group) |
void |
joinGroup(GroupModel group) |
void |
leaveGroup(GroupModel group) |
addRequiredAction, addRequiredAction, deleteRoleMapping, equals, getAttributes, getAttributeStream, getClientRoleMappingsStream, getCreatedTimestamp, getDelegate, getEmail, getFederationLink, getFirstAttribute, getFirstName, getId, getLastName, getRealmRoleMappingsStream, getRequiredActionsStream, getRoleMappingsStream, getServiceAccountClientLink, getUsername, grantRole, hashCode, isEmailVerified, isEnabled, 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 LDAPGroupMappingsUserDelegate(RealmModel realm, UserModel user, LDAPObject ldapUser)
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 Stream<GroupModel> getGroupsStream()
UserModel
getGroupsStream
in interface UserModel
getGroupsStream
in interface UserModel.Streams
getGroupsStream
in class UserModelDelegate
Stream
of groups.public void joinGroup(GroupModel group)
joinGroup
in interface UserModel
joinGroup
in class UserModelDelegate
public void leaveGroup(GroupModel group)
leaveGroup
in interface UserModel
leaveGroup
in class UserModelDelegate
public boolean isMemberOf(GroupModel group)
isMemberOf
in interface UserModel
isMemberOf
in class UserModelDelegate
protected Stream<GroupModel> getLDAPGroupMappingsConverted()
Copyright © 2021 JBoss by Red Hat. All rights reserved.