public class UserAdapter extends Object implements CachedUserModel
UserModel.RequiredAction, UserModel.UserRemovedEvent
Modifier and Type | Field and Description |
---|---|
protected CachedUser |
cached |
protected KeycloakSession |
keycloakSession |
protected RealmModel |
realm |
protected UserModel |
updated |
protected UserCacheSession |
userProviderCache |
DISABLED_REASON, EMAIL, FIRST_NAME, GROUPS, 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, wait
getGroups, getGroups, getGroupsCount, getGroupsCountByNameContaining
protected 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 UserModel
public void setFirstName(String firstName)
setFirstName
in interface UserModel
public String getLastName()
getLastName
in interface UserModel
public void setLastName(String lastName)
setLastName
in interface UserModel
public UserModel getDelegateForUpdate()
getDelegateForUpdate
in interface CachedUserModel
public boolean isMarkedForEviction()
isMarkedForEviction
in interface CachedUserModel
public void invalidate()
invalidate
in interface CachedUserModel
public long getCacheTimestamp()
getCacheTimestamp
in interface CachedUserModel
public ConcurrentHashMap getCachedWith()
getCachedWith
in interface CachedUserModel
public String getUsername()
getUsername
in interface UserModel
public void setUsername(String username)
setUsername
in interface UserModel
public Long getCreatedTimestamp()
getCreatedTimestamp
in interface UserModel
public void setCreatedTimestamp(Long timestamp)
setCreatedTimestamp
in interface UserModel
public void setEnabled(boolean enabled)
setEnabled
in interface UserModel
public void setSingleAttribute(String name, String value)
setSingleAttribute
in interface UserModel
public void setAttribute(String name, List<String> values)
setAttribute
in interface UserModel
public void removeAttribute(String name)
removeAttribute
in interface UserModel
public String getFirstAttribute(String name)
getFirstAttribute
in interface UserModel
public List<String> getAttribute(String name)
getAttribute
in interface UserModel
public Map<String,List<String>> getAttributes()
getAttributes
in interface UserModel
public Set<String> getRequiredActions()
getRequiredActions
in interface UserModel
public void addRequiredAction(UserModel.RequiredAction action)
addRequiredAction
in interface UserModel
public void removeRequiredAction(UserModel.RequiredAction action)
removeRequiredAction
in interface UserModel
public void addRequiredAction(String action)
addRequiredAction
in interface UserModel
public void removeRequiredAction(String action)
removeRequiredAction
in interface UserModel
public boolean isEmailVerified()
isEmailVerified
in interface UserModel
public void setEmailVerified(boolean verified)
setEmailVerified
in interface UserModel
public String getFederationLink()
getFederationLink
in interface UserModel
public void setFederationLink(String link)
setFederationLink
in interface UserModel
public String getServiceAccountClientLink()
getServiceAccountClientLink
in interface UserModel
public void setServiceAccountClientLink(String clientInternalId)
setServiceAccountClientLink
in interface UserModel
public Set<RoleModel> getRealmRoleMappings()
getRealmRoleMappings
in interface RoleMapperModel
public Set<RoleModel> getClientRoleMappings(ClientModel app)
getClientRoleMappings
in interface RoleMapperModel
public boolean hasRole(RoleModel role)
hasRole
in interface RoleMapperModel
public void grantRole(RoleModel role)
grantRole
in interface RoleMapperModel
public Set<RoleModel> getRoleMappings()
getRoleMappings
in interface RoleMapperModel
public void deleteRoleMapping(RoleModel role)
deleteRoleMapping
in interface RoleMapperModel
public Set<GroupModel> getGroups()
public void joinGroup(GroupModel group)
public void leaveGroup(GroupModel group)
leaveGroup
in interface UserModel
public boolean isMemberOf(GroupModel group)
isMemberOf
in interface UserModel
Copyright © 2021 JBoss by Red Hat. All rights reserved.