public final class User extends Object
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 | Field and Description |
---|---|
static com.edorasware.commons.core.entity.Type |
ENTITY_TYPE
The type that identifies a user entity.
|
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) |
com.edorasware.commons.core.entity.WorkObjectId |
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.
|
com.edorasware.commons.core.entity.UserId |
getExternalId()
Returns the external id of the user.
|
String |
getFirstName()
Returns the first name of the user.
|
String |
getHomeUrl()
Returns user's home url
|
com.edorasware.commons.core.entity.UserId |
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<com.edorasware.commons.core.entity.GroupId> |
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.
|
com.edorasware.commons.core.entity.TenantId |
getTenantId()
Returns the id of the main tenant to which the user belongs.
|
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 final com.edorasware.commons.core.entity.Type ENTITY_TYPE
public static User.Builder builder()
User
instance.public static User.Builder builder(User userTemplate)
userTemplate
- the user template.public com.edorasware.commons.core.entity.UserId getId()
public com.edorasware.commons.core.entity.UserId getExternalId()
public String getFirstName()
public String getLastName()
public String getDisplayName()
public String getLogin()
public String getPassword()
public String getLanguage()
public String getEmail()
public String getPhone()
public String getMobile()
public String getAddress()
public String getNotes()
public boolean isAdmin()
public boolean isActive()
public com.edorasware.commons.core.entity.WorkObjectId getAccountId()
public com.edorasware.commons.core.entity.TenantId getTenantId()
public com.google.common.collect.ImmutableSet<com.edorasware.commons.core.entity.GroupId> getMemberGroups()
public com.google.common.collect.ImmutableList<User.DeputyUser> getDeputies()
public com.google.common.collect.ImmutableSet<UserNotification> getNotifications()
public boolean hasNotification(UserNotification notification)
notification
- the notification option to check forpublic com.google.common.collect.ImmutableSet<SystemRole> getRoles()
public boolean hasAnyRoleOf(SystemRole role)
role
- the role to check forpublic boolean hasAnyRoleOf(SystemRole first, SystemRole second, SystemRole... more)
first
- first role to check forsecond
- second role to check formore
- more roles to check forpublic boolean hasAnyRoleOf(Set<SystemRole> roles)
roles
- the roles to check forpublic String getHomeUrl()
public boolean isLivePreview()
Copyright © 2010 - 2017 edorasware ag. All Rights Reserved.