public class UserEntity extends Object implements UserWithAttributes, TimestampedUser
Constructor and Description |
---|
UserEntity(String name,
String firstName,
String lastName,
String displayName,
String emailAddress,
PasswordEntity password,
boolean active) |
UserEntity(String name,
String firstName,
String lastName,
String displayName,
String emailAddress,
PasswordEntity password,
boolean active,
boolean isPasswordEncrypted) |
UserEntity(String name,
String firstName,
String lastName,
String displayName,
String emailAddress,
PasswordEntity password,
boolean active,
String key,
Date createdDate,
Date updatedDate) |
UserEntity(String name,
String firstName,
String lastName,
String displayName,
String emailAddress,
PasswordEntity password,
boolean active,
String key,
Date createdDate,
Date updatedDate,
boolean isPasswordEncrypted) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(User user)
CompareTo must be compatible with the equals() and hashCode() methods
|
boolean |
equals(Object o)
Implementations must ensure equality based on
getDirectoryId() and case-insensitive getName().
|
MultiValuedAttributeEntityList |
getAttributes() |
Date |
getCreatedDate()
Returns the date the entity was created.
|
long |
getDirectoryId()
Deprecated.
this method has never returned the directoryId and its existence violates the directory
encapsulation. It will be removed in future versions.
|
String |
getDisplayName() |
String |
getEmailAddress() |
PasswordEntity |
getEncryptedPassword() |
String |
getExternalId()
The user key at the server is the externalId at the client.
|
String |
getFirstName() |
Set<String> |
getKeys()
Gets all the keys of the attributes.
|
String |
getLastName() |
String |
getName() |
PasswordEntity |
getPassword() |
Date |
getUpdatedDate()
Returns the date the entity was last updated.
|
String |
getValue(String key)
Returns any value associated with the given key, returns
null if there is no value. |
Set<String> |
getValues(String key)
Get all the values associated with a given key.
|
int |
hashCode()
Implementations must produce a hashcode based on
getDirectoryId() and case-insensitive getName().
|
boolean |
isActive() |
boolean |
isEmpty() |
static UserEntity |
newMinimalInstance(String username)
Creates a new minimal user instance.
|
void |
setAttributes(MultiValuedAttributeEntityList attributes) |
String |
toString() |
public UserEntity(String name, String firstName, String lastName, String displayName, String emailAddress, PasswordEntity password, boolean active, String key, Date createdDate, Date updatedDate)
public UserEntity(String name, String firstName, String lastName, String displayName, String emailAddress, PasswordEntity password, boolean active, String key, Date createdDate, Date updatedDate, boolean isPasswordEncrypted)
public UserEntity(String name, String firstName, String lastName, String displayName, String emailAddress, PasswordEntity password, boolean active)
public String getDisplayName()
getDisplayName
in interface User
public String getFirstName()
public String getLastName()
public String getEmailAddress()
getEmailAddress
in interface User
public PasswordEntity getPassword()
public PasswordEntity getEncryptedPassword()
public boolean isActive()
public String getName()
getName
in interface DirectoryEntity
getName
in interface Principal
@Nullable public Date getCreatedDate()
TimestampedEntity
getCreatedDate
in interface TimestampedEntity
@Nullable public Date getUpdatedDate()
TimestampedEntity
getUpdatedDate
in interface TimestampedEntity
public void setAttributes(MultiValuedAttributeEntityList attributes)
public MultiValuedAttributeEntityList getAttributes()
public Set<String> getValues(String key)
Attributes
getValues
in interface Attributes
key
- the key to retrieve the values forpublic String getValue(String key)
Attributes
null
if there is no value.getValue
in interface Attributes
key
- the key to retrieve the value fornull
if there is no valuepublic Set<String> getKeys()
Attributes
getKeys
in interface Attributes
public boolean isEmpty()
isEmpty
in interface Attributes
true
if there are no attributes@Deprecated public long getDirectoryId()
getDirectoryId
in interface User
getDirectoryId
in interface DirectoryEntity
0
public int compareTo(User user)
User
compareTo
in interface User
compareTo
in interface Comparable<User>
public String getExternalId()
public boolean equals(Object o)
DirectoryEntity
equals
in interface User
equals
in interface DirectoryEntity
equals
in interface Principal
equals
in class Object
o
- object to compare to.true
if and only if the directoryId
and the lowercase names of the directory entities match.public int hashCode()
DirectoryEntity
public String toString()
public static UserEntity newMinimalInstance(String username)
username
- username for the userCopyright © 2021 Atlassian. All rights reserved.
View cookie preferences