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() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitisMarkedAsDeletedpublic 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 Userpublic String getFirstName()
public String getLastName()
public String getEmailAddress()
getEmailAddress in interface Userpublic PasswordEntity getPassword()
public PasswordEntity getEncryptedPassword()
public boolean isActive()
public String getName()
getName in interface DirectoryEntitygetName in interface Principal@Nullable public Date getCreatedDate()
TimestampedEntitygetCreatedDate in interface TimestampedEntity@Nullable public Date getUpdatedDate()
TimestampedEntitygetUpdatedDate in interface TimestampedEntitypublic void setAttributes(MultiValuedAttributeEntityList attributes)
public MultiValuedAttributeEntityList getAttributes()
public Set<String> getValues(String key)
AttributesgetValues in interface Attributeskey - the key to retrieve the values forpublic String getValue(String key)
Attributesnull if there is no value.getValue in interface Attributeskey - the key to retrieve the value fornull if there is no valuepublic Set<String> getKeys()
AttributesgetKeys in interface Attributespublic boolean isEmpty()
isEmpty in interface Attributestrue if there are no attributes@Deprecated public long getDirectoryId()
getDirectoryId in interface UsergetDirectoryId in interface DirectoryEntity0public int compareTo(User user)
UsercompareTo in interface UsercompareTo in interface Comparable<User>public String getExternalId()
public boolean equals(Object o)
DirectoryEntityequals in interface Userequals in interface DirectoryEntityequals in interface Principalequals in class Objecto - object to compare to.true if and only if the directoryId
and the lowercase names of the directory entities match.public int hashCode()
DirectoryEntitypublic String toString()
public static UserEntity newMinimalInstance(String username)
username - username for the userCopyright © 2022 Atlassian. All rights reserved.