public class User extends Object
Represents a user.
Modifier and Type | Class and Description |
---|---|
static class |
User.Builder
Builder for
User class. |
static class |
User.DeputyUser
This class represents a deputy user.
|
Modifier and Type | Method and Description |
---|---|
static User.Builder |
builder()
Creates a builder for a new concrete
User instance. |
static User.Builder |
builder(User userTemplate)
|
boolean |
equals(Object other) |
String |
getAccountId()
Returns the id of the account to which the user belongs.
|
String |
getAddress()
Returns the address of the user.
|
com.google.common.collect.ImmutableList<User.DeputyUser> |
getDeputies()
Returns the ids of the users to which user can be switched.
|
String |
getDisplayName()
Returns the display name of the user.
|
String |
getEmail()
Returns the email address of the user.
|
String |
getExternalId()
Returns the external id of the user.
|
String |
getFirstName()
Returns the first name of the user.
|
String |
getHomeUrl()
Returns user’s home url
|
String |
getId()
Returns the id of the user.
|
String |
getLanguage()
Returns the language of the user.
|
String |
getLastName()
Returns the last name of the user.
|
String |
getLogin()
Returns the login of the user.
|
com.google.common.collect.ImmutableSet<String> |
getMemberGroups()
Returns the ids of the groups of which the user is a member of.
|
String |
getMobile()
Returns the mobile number of the user.
|
String |
getNotes()
Returns the notes of the user.
|
com.google.common.collect.ImmutableSet<UserNotification> |
getNotifications()
Return the notifications that the user has subscribed to.
|
String |
getPassword()
Returns the password of the user.
|
String |
getPhone()
Returns the phone number of the user.
|
com.google.common.collect.ImmutableSet<SystemRole> |
getRoles()
Returns the system roles of the user.
|
String |
getTenantId()
Returns the id of the main tenant to which the user belongs.
|
Map<String,Object> |
getVariables()
Returns any optional additional variables attached to this user.
|
boolean |
hasAnyRoleOf(Set<SystemRole> roles)
Checks if the user has any of the given roles.
|
boolean |
hasAnyRoleOf(SystemRole role)
Checks if the user has the given role.
|
boolean |
hasAnyRoleOf(SystemRole first,
SystemRole second,
SystemRole... more)
Checks if the user has any of the given roles.
|
int |
hashCode() |
boolean |
hasNotification(UserNotification notification)
Checks if the user has subscribed to the given notification option.
|
boolean |
isActive()
Returns true if the user is active
|
boolean |
isAdmin()
Returns true if the user is an admin user.
|
boolean |
isLivePreview() |
String |
toString() |
public static User.Builder builder()
Creates a builder for a new concrete User
instance.
public static User.Builder builder(User userTemplate)
userTemplate
- the user template.public String getId()
Returns the id of the user.
public String getExternalId()
Returns the external id of the user.
public String getFirstName()
Returns the first name of the user.
public String getLastName()
Returns the last name of the user.
public String getDisplayName()
Returns the display name of the user.
public String getLogin()
Returns the login of the user.
public String getPassword()
Returns the password of the user.
public String getLanguage()
Returns the language of the user.
public String getEmail()
Returns the email address of the user.
public String getPhone()
Returns the phone number of the user.
public String getMobile()
Returns the mobile number of the user.
public String getAddress()
Returns the address of the user.
public String getNotes()
Returns the notes of the user.
public boolean isAdmin()
Returns true if the user is an admin user.
public boolean isActive()
Returns true if the user is active
public String getAccountId()
Returns the id of the account to which the user belongs.
public String getTenantId()
Returns the id of the main tenant to which the user belongs. Note that the <i>current</i> tenant id might be different from the tenant id returned by this method.
public com.google.common.collect.ImmutableSet<String> getMemberGroups()
Returns the ids of the groups of which the user is a member of.
public com.google.common.collect.ImmutableList<User.DeputyUser> getDeputies()
Returns the ids of the users to which user can be switched.
public com.google.common.collect.ImmutableSet<UserNotification> getNotifications()
Return the notifications that the user has subscribed to.
public boolean hasNotification(UserNotification notification)
Checks if the user has subscribed to the given notification option.
notification
- the notification option to check forpublic com.google.common.collect.ImmutableSet<SystemRole> getRoles()
Returns the system roles of the user.
public boolean hasAnyRoleOf(SystemRole role)
Checks if the user has the given role.
role
- the role to check forpublic boolean hasAnyRoleOf(SystemRole first, SystemRole second, SystemRole... more)
Checks if the user has any of the given roles.
first
- first role to check forsecond
- second role to check formore
- more roles to check forpublic boolean hasAnyRoleOf(Set<SystemRole> roles)
Checks if the user has any of the given roles.
roles
- the roles to check forpublic String getHomeUrl()
Returns user’s home url
public Map<String,Object> getVariables()
Returns any optional additional variables attached to this user.
null
or emptypublic boolean isLivePreview()
Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.