Package com.atlassian.crowd.model.user
Class InternalUser
java.lang.Object
com.atlassian.crowd.model.InternalEntity
com.atlassian.crowd.model.InternalDirectoryEntity<InternalUserAttribute>
com.atlassian.crowd.model.user.InternalUser
- All Implemented Interfaces:
User,DirectoryEntity,TimestampedEntity,TimestampedUser,User,Serializable,Comparable<User>,Principal
public class InternalUser
extends InternalDirectoryEntity<InternalUserAttribute>
implements TimestampedUser
Encapsulates the concept of crowd user.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.atlassian.crowd.model.InternalDirectoryEntity
attributes, directoryFields inherited from class com.atlassian.crowd.model.InternalEntity
active, createdDate, id, name, updatedDate -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInternalUser(InternalEntityTemplate internalEntityTemplate, Directory directory, UserTemplate userTemplate, PasswordCredential credential) This constructor is used by the importer only.InternalUser(User user, Directory directory, PasswordCredential credential) Constructor used for adding a new user.InternalUser(UserTemplateWithCredentialAndAttributes user, Directory directory) -
Method Summary
Modifier and TypeMethodDescriptionintCompareTo must be compatible with the equals() and hashCode() methodsbooleanImplementations must ensure equality based on getDirectoryId() and case-insensitive getName().inthashCode()Implementations must produce a hashcode based on getDirectoryId() and case-insensitive getName().voidvoidtoString()voidupdateCredentialTo(PasswordCredential newCredential, int maxCredentialHistory) updateDetailsFrom(User user) Methods inherited from class com.atlassian.crowd.model.InternalDirectoryEntity
getAttributes, getDirectory, getDirectoryIdMethods inherited from class com.atlassian.crowd.model.InternalEntity
getCreatedDate, getId, getName, getUpdatedDate, isActive, setActive, setCreatedDate, setCreatedDateToNow, setUpdatedDate, setUpdatedDateToNowMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.atlassian.crowd.model.DirectoryEntity
getDirectoryId, getNameMethods inherited from interface com.atlassian.crowd.model.TimestampedEntity
getCreatedDate, getUpdatedDateMethods inherited from interface com.atlassian.crowd.embedded.api.User
getDirectoryId, isActive, isMarkedAsDeleted
-
Constructor Details
-
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
-
InternalUser
Constructor used for adding a new user.- Parameters:
user- user template.directory- directory of user.credential- password of user.
-
-
Method Details
-
updateDetailsFrom
-
renameTo
-
updateCredentialTo
-
setName
- Overrides:
setNamein classInternalEntity
-
getEmailAddress
- Specified by:
getEmailAddressin interfaceUser- Returns:
- email address of the user.
-
getFirstName
- Specified by:
getFirstNamein interfaceUser
-
getLastName
- Specified by:
getLastNamein interfaceUser
-
getExternalId
- Specified by:
getExternalIdin interfaceUser
-
getDisplayName
- Specified by:
getDisplayNamein interfaceUser- Returns:
- display name (eg. full name) of the user, must never be null.
-
getLowerEmailAddress
-
getLowerFirstName
-
getLowerLastName
-
getLowerDisplayName
-
getLowerName
-
getCredential
-
getCredentialRecords
-
getCredentialHistory
-
equals
Description copied from interface:DirectoryEntityImplementations must ensure equality based on getDirectoryId() and case-insensitive getName().- Specified by:
equalsin interfaceDirectoryEntity- Specified by:
equalsin interfacePrincipal- Specified by:
equalsin interfaceUser- Specified by:
equalsin classInternalEntity- Parameters:
o- object to compare to.- Returns:
trueif and only if the directoryId and the lowercase names of the directory entities match.
-
hashCode
public int hashCode()Description copied from interface:DirectoryEntityImplementations must produce a hashcode based on getDirectoryId() and case-insensitive getName().- Specified by:
hashCodein interfaceDirectoryEntity- Specified by:
hashCodein interfacePrincipal- Specified by:
hashCodein interfaceUser- Specified by:
hashCodein classInternalEntity- Returns:
- hashcode.
-
compareTo
Description copied from interface:UserCompareTo must be compatible with the equals() and hashCode() methods- Specified by:
compareToin interfaceComparable<User>- Specified by:
compareToin interfaceUser
-
toString
-