public interface UserModel extends RoleMapperModel
Modifier and Type | Interface and Description |
---|---|
static class |
UserModel.RequiredAction |
static class |
UserModel.SearchableFields |
static interface |
UserModel.Streams
The
UserModel.Streams interface makes all collection-based methods in UserModel default by providing
implementations that delegate to the Stream -based variants instead of the other way around. |
static interface |
UserModel.UserRemovedEvent |
Modifier and Type | Field and Description |
---|---|
static Comparator<UserModel> |
COMPARE_BY_USERNAME |
static String |
DISABLED_REASON |
static String |
EMAIL |
static String |
EMAIL_VERIFIED |
static String |
ENABLED |
static String |
EXACT |
static String |
FIRST_NAME |
static String |
GROUPS |
static String |
IDP_ALIAS |
static String |
IDP_USER_ID |
static String |
INCLUDE_SERVICE_ACCOUNT |
static String |
LAST_NAME |
static String |
LOCALE |
static String |
SEARCH |
static String |
USERNAME |
Modifier and Type | Method and Description |
---|---|
void |
addRequiredAction(String action) |
default void |
addRequiredAction(UserModel.RequiredAction action) |
List<String> |
getAttribute(String name)
Deprecated.
Use
getAttributeStream instead. |
Map<String,List<String>> |
getAttributes() |
default Stream<String> |
getAttributeStream(String name)
Obtains all values associated with the specified attribute name.
|
Long |
getCreatedTimestamp()
Get timestamp of user creation.
|
String |
getEmail() |
String |
getFederationLink() |
String |
getFirstAttribute(String name) |
String |
getFirstName() |
Set<GroupModel> |
getGroups()
Deprecated.
Use
getGroupsStream instead. |
default Set<GroupModel> |
getGroups(int first,
int max)
Deprecated.
Use
getGroupsStream instead. |
default Set<GroupModel> |
getGroups(String search,
int first,
int max)
Deprecated.
Use
getGroupsStream instead. |
default long |
getGroupsCount() |
default long |
getGroupsCountByNameContaining(String search) |
default Stream<GroupModel> |
getGroupsStream()
Obtains the groups associated with the user.
|
default Stream<GroupModel> |
getGroupsStream(String search,
Integer first,
Integer max)
Returns a paginated stream of groups within this realm with search in the name
|
String |
getId() |
String |
getLastName() |
Set<String> |
getRequiredActions()
Deprecated.
Use
getRequiredActionsStream instead. |
default Stream<String> |
getRequiredActionsStream()
Obtains the names of required actions associated with the user.
|
String |
getServiceAccountClientLink() |
String |
getUsername() |
boolean |
isEmailVerified() |
boolean |
isEnabled() |
boolean |
isMemberOf(GroupModel group) |
void |
joinGroup(GroupModel group) |
void |
leaveGroup(GroupModel group) |
void |
removeAttribute(String name) |
void |
removeRequiredAction(String action) |
default void |
removeRequiredAction(UserModel.RequiredAction action) |
void |
setAttribute(String name,
List<String> values) |
void |
setCreatedTimestamp(Long timestamp) |
void |
setEmail(String email)
Sets email for this user.
|
void |
setEmailVerified(boolean verified) |
void |
setEnabled(boolean enabled) |
void |
setFederationLink(String link) |
void |
setFirstName(String firstName) |
void |
setLastName(String lastName) |
void |
setServiceAccountClientLink(String clientInternalId) |
void |
setSingleAttribute(String name,
String value)
Set single value of specified attribute.
|
void |
setUsername(String username)
Sets username for this user.
|
deleteRoleMapping, getClientRoleMappings, getClientRoleMappingsStream, getRealmRoleMappings, getRealmRoleMappingsStream, getRoleMappings, getRoleMappingsStream, grantRole, hasRole
static final String USERNAME
static final String FIRST_NAME
static final String LAST_NAME
static final String EMAIL
static final String EMAIL_VERIFIED
static final String LOCALE
static final String ENABLED
static final String IDP_ALIAS
static final String IDP_USER_ID
static final String INCLUDE_SERVICE_ACCOUNT
static final String GROUPS
static final String SEARCH
static final String EXACT
static final String DISABLED_REASON
static final Comparator<UserModel> COMPARE_BY_USERNAME
String getId()
String getUsername()
void setUsername(String username)
username
- username stringLong getCreatedTimestamp()
void setCreatedTimestamp(Long timestamp)
boolean isEnabled()
void setEnabled(boolean enabled)
void setSingleAttribute(String name, String value)
name
- value
- void removeAttribute(String name)
String getFirstAttribute(String name)
name
- @Deprecated List<String> getAttribute(String name)
getAttributeStream
instead.name
- default Stream<String> getAttributeStream(String name)
name
- the name of the attribute.Stream
of attribute values.@Deprecated Set<String> getRequiredActions()
getRequiredActionsStream
instead.default Stream<String> getRequiredActionsStream()
Stream
of required action names.void addRequiredAction(String action)
void removeRequiredAction(String action)
default void addRequiredAction(UserModel.RequiredAction action)
default void removeRequiredAction(UserModel.RequiredAction action)
String getFirstName()
void setFirstName(String firstName)
String getLastName()
void setLastName(String lastName)
String getEmail()
void setEmail(String email)
email
- the emailboolean isEmailVerified()
void setEmailVerified(boolean verified)
@Deprecated Set<GroupModel> getGroups()
getGroupsStream
instead.default Stream<GroupModel> getGroupsStream()
Stream
of groups.@Deprecated default Set<GroupModel> getGroups(int first, int max)
getGroupsStream
instead.@Deprecated default Set<GroupModel> getGroups(String search, int first, int max)
getGroupsStream
instead.default Stream<GroupModel> getGroupsStream(String search, Integer first, Integer max)
search
- Case insensitive string which will be searched for. Ignored if null.first
- Index of first group to return. Ignored if negative or null
.max
- Maximum number of records to return. Ignored if negative or null
.null
.default long getGroupsCount()
default long getGroupsCountByNameContaining(String search)
void joinGroup(GroupModel group)
void leaveGroup(GroupModel group)
boolean isMemberOf(GroupModel group)
String getFederationLink()
void setFederationLink(String link)
String getServiceAccountClientLink()
void setServiceAccountClientLink(String clientInternalId)
Copyright © 2021 JBoss by Red Hat. All rights reserved.