public class UserAdapter extends Object implements CachedUserModel.Streams
CachedUserModel.StreamsUserModel.RequiredAction, UserModel.UserRemovedEvent| Modifier and Type | Field and Description |
|---|---|
protected CachedUser |
cached |
protected KeycloakSession |
keycloakSession |
protected RealmModel |
realm |
protected UserModel |
updated |
protected UserCacheSession |
userProviderCache |
COMPARE_BY_USERNAME, EMAIL, EMAIL_VERIFIED, ENABLED, EXACT, FIRST_NAME, GROUPS, IDP_ALIAS, IDP_USER_ID, INCLUDE_SERVICE_ACCOUNT, LAST_NAME, LOCALE, SEARCH, USERNAME| Constructor and Description |
|---|
UserAdapter(CachedUser cached,
UserCacheSession userProvider,
KeycloakSession keycloakSession,
RealmModel realm) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetAttribute, getGroups, getRequiredActionsgetGroups, getGroups, getGroupsCount, getGroupsStreamgetClientRoleMappings, getRealmRoleMappings, getRoleMappingsprotected final CachedUser cached
protected final UserCacheSession userProviderCache
protected final KeycloakSession keycloakSession
protected final RealmModel realm
protected volatile UserModel updated
public UserAdapter(CachedUser cached, UserCacheSession userProvider, KeycloakSession keycloakSession, RealmModel realm)
public String getFirstName()
getFirstName in interface UserModelpublic void setFirstName(String firstName)
setFirstName in interface UserModelpublic String getLastName()
getLastName in interface UserModelpublic void setLastName(String lastName)
setLastName in interface UserModelpublic UserModel getDelegateForUpdate()
getDelegateForUpdate in interface CachedUserModelpublic boolean isMarkedForEviction()
isMarkedForEviction in interface CachedUserModelpublic void invalidate()
invalidate in interface CachedUserModelpublic long getCacheTimestamp()
getCacheTimestamp in interface CachedUserModelpublic ConcurrentHashMap getCachedWith()
getCachedWith in interface CachedUserModelpublic String getUsername()
getUsername in interface UserModelpublic void setUsername(String username)
setUsername in interface UserModelpublic Long getCreatedTimestamp()
getCreatedTimestamp in interface UserModelpublic void setCreatedTimestamp(Long timestamp)
setCreatedTimestamp in interface UserModelpublic void setEnabled(boolean enabled)
setEnabled in interface UserModelpublic void setSingleAttribute(String name, String value)
setSingleAttribute in interface UserModelpublic void setAttribute(String name, List<String> values)
setAttribute in interface UserModelpublic void removeAttribute(String name)
removeAttribute in interface UserModelpublic String getFirstAttribute(String name)
getFirstAttribute in interface UserModelpublic Stream<String> getAttributeStream(String name)
getAttributeStream in interface UserModelgetAttributeStream in interface UserModel.Streamspublic Map<String,List<String>> getAttributes()
getAttributes in interface UserModelpublic Stream<String> getRequiredActionsStream()
getRequiredActionsStream in interface UserModelgetRequiredActionsStream in interface UserModel.Streamspublic void addRequiredAction(UserModel.RequiredAction action)
addRequiredAction in interface UserModelpublic void removeRequiredAction(UserModel.RequiredAction action)
removeRequiredAction in interface UserModelpublic void addRequiredAction(String action)
addRequiredAction in interface UserModelpublic void removeRequiredAction(String action)
removeRequiredAction in interface UserModelpublic boolean isEmailVerified()
isEmailVerified in interface UserModelpublic void setEmailVerified(boolean verified)
setEmailVerified in interface UserModelpublic String getFederationLink()
getFederationLink in interface UserModelpublic void setFederationLink(String link)
setFederationLink in interface UserModelpublic String getServiceAccountClientLink()
getServiceAccountClientLink in interface UserModelpublic void setServiceAccountClientLink(String clientInternalId)
setServiceAccountClientLink in interface UserModelpublic Stream<RoleModel> getRealmRoleMappingsStream()
getRealmRoleMappingsStream in interface RoleMapperModelgetRealmRoleMappingsStream in interface RoleMapperModel.Streamspublic Stream<RoleModel> getClientRoleMappingsStream(ClientModel app)
getClientRoleMappingsStream in interface RoleMapperModelgetClientRoleMappingsStream in interface RoleMapperModel.Streamspublic boolean hasRole(RoleModel role)
hasRole in interface RoleMapperModelpublic void grantRole(RoleModel role)
grantRole in interface RoleMapperModelpublic Stream<RoleModel> getRoleMappingsStream()
getRoleMappingsStream in interface RoleMapperModelgetRoleMappingsStream in interface RoleMapperModel.Streamspublic void deleteRoleMapping(RoleModel role)
deleteRoleMapping in interface RoleMapperModelpublic Stream<GroupModel> getGroupsStream()
getGroupsStream in interface UserModelgetGroupsStream in interface UserModel.Streamspublic long getGroupsCountByNameContaining(String search)
getGroupsCountByNameContaining in interface UserModelpublic void joinGroup(GroupModel group)
public void leaveGroup(GroupModel group)
leaveGroup in interface UserModelpublic boolean isMemberOf(GroupModel group)
isMemberOf in interface UserModelCopyright © 2020 JBoss by Red Hat. All rights reserved.