public class UserAdapter extends Object implements UserModel.Streams, JpaModel<UserEntity>
UserModel.RequiredAction, UserModel.Streams, UserModel.UserRemovedEvent| Modifier and Type | Field and Description |
|---|---|
protected javax.persistence.EntityManager |
em |
protected RealmModel |
realm |
protected UserEntity |
user |
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(KeycloakSession session,
RealmModel realm,
javax.persistence.EntityManager em,
UserEntity user) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetAttribute, getGroups, getRequiredActionsaddRequiredAction, getGroups, getGroups, removeRequiredActiongetClientRoleMappings, getRealmRoleMappings, getRoleMappingsprotected UserEntity user
protected javax.persistence.EntityManager em
protected RealmModel realm
public UserAdapter(KeycloakSession session, RealmModel realm, javax.persistence.EntityManager em, UserEntity user)
public UserEntity getEntity()
getEntity in interface JpaModel<UserEntity>public 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(String actionName)
addRequiredAction in interface UserModelpublic void removeRequiredAction(String actionName)
removeRequiredAction in interface UserModelpublic 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 boolean isEmailVerified()
isEmailVerified in interface UserModelpublic void setEmailVerified(boolean verified)
setEmailVerified in interface UserModelpublic Stream<GroupModel> getGroupsStream()
getGroupsStream in interface UserModelgetGroupsStream in interface UserModel.Streamspublic Stream<GroupModel> getGroupsStream(String search, Integer first, Integer max)
getGroupsStream in interface UserModelpublic long getGroupsCount()
getGroupsCount in interface UserModelpublic long getGroupsCountByNameContaining(String search)
getGroupsCountByNameContaining in interface UserModelpublic void joinGroup(GroupModel group)
protected void joinGroupImpl(GroupModel group)
public void leaveGroup(GroupModel group)
leaveGroup in interface UserModelpublic boolean isMemberOf(GroupModel group)
isMemberOf in interface UserModelprotected javax.persistence.TypedQuery<UserGroupMembershipEntity> getUserGroupMappingQuery(GroupModel group)
public boolean hasRole(RoleModel role)
hasRole in interface RoleMapperModelprotected javax.persistence.TypedQuery<UserRoleMappingEntity> getUserRoleMappingEntityTypedQuery(RoleModel role)
public void grantRole(RoleModel role)
grantRole in interface RoleMapperModelpublic void grantRoleImpl(RoleModel role)
public Stream<RoleModel> getRealmRoleMappingsStream()
getRealmRoleMappingsStream in interface RoleMapperModelgetRealmRoleMappingsStream in interface RoleMapperModel.Streamspublic Stream<RoleModel> getRoleMappingsStream()
getRoleMappingsStream in interface RoleMapperModelgetRoleMappingsStream in interface RoleMapperModel.Streamspublic void deleteRoleMapping(RoleModel role)
deleteRoleMapping in interface RoleMapperModelpublic Stream<RoleModel> getClientRoleMappingsStream(ClientModel app)
getClientRoleMappingsStream in interface RoleMapperModelgetClientRoleMappingsStream in interface RoleMapperModel.Streamspublic 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 UserModelCopyright © 2021 JBoss by Red Hat. All rights reserved.