com.atlassian.crowd.model.user
Class InternalUser
java.lang.Object
com.atlassian.crowd.model.InternalEntity
com.atlassian.crowd.model.InternalDirectoryEntity
com.atlassian.crowd.model.user.InternalUser
- All Implemented Interfaces:
- User, DirectoryEntity, TimestampedEntity, TimestampedUser, java.io.Serializable, java.lang.Comparable<User>, java.security.Principal
public class InternalUser
- extends InternalDirectoryEntity
- implements TimestampedUser
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.security.Principal |
getName |
InternalUser
protected InternalUser()
InternalUser
public InternalUser(InternalEntityTemplate internalEntityTemplate,
Directory directory,
UserTemplate userTemplate,
PasswordCredential credential)
- This constructor is used by the importer only.
- Parameters:
internalEntityTemplate
- template.directory
- directory reference.userTemplate
- user template.credential
- encrypted credential.
InternalUser
public InternalUser(UserTemplateWithCredentialAndAttributes user,
Directory directory)
InternalUser
public InternalUser(User user,
Directory directory,
PasswordCredential credential)
- Constructor used for adding a new user.
- Parameters:
user
- user template.directory
- directory of user.credential
- password of user.
updateDetailsFrom
public void updateDetailsFrom(User user)
renameTo
public void renameTo(java.lang.String newUsername)
updateCredentialTo
public void updateCredentialTo(PasswordCredential newCredential,
int maxCredentialHistory)
setName
public void setName(java.lang.String name)
- Overrides:
setName
in class InternalEntity
getEmailAddress
public java.lang.String getEmailAddress()
- Specified by:
getEmailAddress
in interface User
- Returns:
- email address of the user.
getFirstName
public java.lang.String getFirstName()
getLastName
public java.lang.String getLastName()
getDisplayName
public java.lang.String getDisplayName()
- Specified by:
getDisplayName
in interface User
- Returns:
- display name (eg. full name) of the user, must never be null.
getLowerEmailAddress
public java.lang.String getLowerEmailAddress()
getLowerFirstName
public java.lang.String getLowerFirstName()
getLowerLastName
public java.lang.String getLowerLastName()
getLowerDisplayName
public java.lang.String getLowerDisplayName()
getLowerName
public java.lang.String getLowerName()
getCredential
public PasswordCredential getCredential()
getCredentialRecords
public java.util.List<InternalUserCredentialRecord> getCredentialRecords()
getCredentialHistory
public java.util.List<PasswordCredential> getCredentialHistory()
equals
public boolean equals(java.lang.Object o)
- Description copied from interface:
DirectoryEntity
- Implementations must ensure equality based on
getDirectoryId() and case-insensitive getName().
- Specified by:
equals
in interface User
- Specified by:
equals
in interface DirectoryEntity
- Specified by:
equals
in interface java.security.Principal
- Specified by:
equals
in class InternalEntity
- Parameters:
o
- object to compare to.
- Returns:
true
if and only if the directoryId
and name.toLowerCase() of the directory entities match.
hashCode
public int hashCode()
- Description copied from interface:
DirectoryEntity
- Implementations must produce a hashcode based on
getDirectoryId() and case-insensitive getName().
- Specified by:
hashCode
in interface User
- Specified by:
hashCode
in interface DirectoryEntity
- Specified by:
hashCode
in interface java.security.Principal
- Specified by:
hashCode
in class InternalEntity
- Returns:
- hashcode.
compareTo
public int compareTo(User other)
- Description copied from interface:
User
- CompareTo must be compatible with the equals() and hashCode() methods
- Specified by:
compareTo
in interface User
- Specified by:
compareTo
in interface java.lang.Comparable<User>
toString
public java.lang.String toString()
- Specified by:
toString
in interface java.security.Principal
- Overrides:
toString
in class java.lang.Object
Copyright © 2010 Atlassian. All Rights Reserved.