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, directory
Fields inherited from class com.atlassian.crowd.model.InternalEntity
active, createdDate, id, name, updatedDate
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
InternalUser
(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 TypeMethodDescriptionint
CompareTo must be compatible with the equals() and hashCode() methodsboolean
Implementations must ensure equality based on getDirectoryId() and case-insensitive getName().int
hashCode()
Implementations must produce a hashcode based on getDirectoryId() and case-insensitive getName().void
void
toString()
void
updateCredentialTo
(PasswordCredential newCredential, int maxCredentialHistory) updateDetailsFrom
(User user) Methods inherited from class com.atlassian.crowd.model.InternalDirectoryEntity
getAttributes, getDirectory, getDirectoryId
Methods inherited from class com.atlassian.crowd.model.InternalEntity
getCreatedDate, getId, getName, getUpdatedDate, isActive, setActive, setCreatedDate, setCreatedDateToNow, setUpdatedDate, setUpdatedDateToNow
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.atlassian.crowd.model.DirectoryEntity
getDirectoryId, getName
Methods inherited from interface com.atlassian.crowd.model.TimestampedEntity
getCreatedDate, getUpdatedDate
Methods 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:
setName
in classInternalEntity
-
getEmailAddress
- Specified by:
getEmailAddress
in interfaceUser
- Returns:
- email address of the user.
-
getFirstName
- Specified by:
getFirstName
in interfaceUser
-
getLastName
- Specified by:
getLastName
in interfaceUser
-
getExternalId
- Specified by:
getExternalId
in interfaceUser
-
getDisplayName
- Specified by:
getDisplayName
in 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:DirectoryEntity
Implementations must ensure equality based on getDirectoryId() and case-insensitive getName().- Specified by:
equals
in interfaceDirectoryEntity
- Specified by:
equals
in interfacePrincipal
- Specified by:
equals
in interfaceUser
- Specified by:
equals
in classInternalEntity
- Parameters:
o
- object to compare to.- Returns:
true
if and only if the directoryId and the lowercase names 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 interfaceDirectoryEntity
- Specified by:
hashCode
in interfacePrincipal
- Specified by:
hashCode
in interfaceUser
- Specified by:
hashCode
in classInternalEntity
- Returns:
- hashcode.
-
compareTo
Description copied from interface:User
CompareTo must be compatible with the equals() and hashCode() methods- Specified by:
compareTo
in interfaceComparable<User>
- Specified by:
compareTo
in interfaceUser
-
toString
-