com.atlassian.crowd.integration.model.user
Class InternalUser

java.lang.Object
  extended by com.atlassian.crowd.integration.model.InternalEntity
      extended by com.atlassian.crowd.integration.model.InternalDirectoryEntity
          extended by com.atlassian.crowd.integration.model.user.InternalUser
All Implemented Interfaces:
DirectoryEntity, User, java.io.Serializable

public class InternalUser
extends InternalDirectoryEntity
implements User

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.atlassian.crowd.integration.model.InternalDirectoryEntity
directory
 
Fields inherited from class com.atlassian.crowd.integration.model.InternalEntity
active, createdDate, id, name, updatedDate
 
Constructor Summary
protected InternalUser()
           
  InternalUser(InternalEntityTemplate internalEntityTemplate, Directory directory, UserTemplate userTemplate, PasswordCredential credential)
          This constructor is used by the importer only.
  InternalUser(User user, Directory directory, PasswordCredential credential)
           
 
Method Summary
 boolean equals(java.lang.Object o)
          Implementations must ensure equality based on getDirectoryId() and case-insensitive getName().
 PasswordCredential getCredential()
           
 java.util.List<PasswordCredential> getCredentialHistory()
           
 java.util.List<InternalUserCredentialRecord> getCredentialRecords()
           
 java.lang.String getDisplayName()
           
 java.lang.String getEmailAddress()
           
 java.lang.String getFirstName()
           
 java.lang.String getIconLocation()
           
 java.lang.String getLastName()
           
 java.lang.String getLowerDisplayName()
           
 java.lang.String getLowerEmailAddress()
           
 java.lang.String getLowerFirstName()
           
 java.lang.String getLowerLastName()
           
 int hashCode()
          Implementations must produce a hashcode based on getDirectoryId() and case-insensitive getName().
 void renameTo(java.lang.String newUsername)
           
 java.lang.String toString()
           
 void updateCredentialTo(PasswordCredential newCredential, int maxCredentialHistory)
           
 void updateDetailsFrom(User user)
           
 
Methods inherited from class com.atlassian.crowd.integration.model.InternalDirectoryEntity
getDirectory, getDirectoryId
 
Methods inherited from class com.atlassian.crowd.integration.model.InternalEntity
getCreatedDate, getId, getName, getUpdatedDate, isActive, setActive, setCreatedDate, setCreatedDateToNow, setName, setUpdatedDate, setUpdatedDateToNow
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.crowd.integration.model.user.User
isActive
 
Methods inherited from interface com.atlassian.crowd.integration.model.DirectoryEntity
getDirectoryId, getName
 

Constructor Detail

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(User user,
                    Directory directory,
                    PasswordCredential credential)
Method Detail

updateDetailsFrom

public void updateDetailsFrom(User user)

renameTo

public void renameTo(java.lang.String newUsername)

updateCredentialTo

public void updateCredentialTo(PasswordCredential newCredential,
                               int maxCredentialHistory)

getEmailAddress

public java.lang.String getEmailAddress()
Specified by:
getEmailAddress in interface User
Returns:
primary email address of the principal.

getFirstName

public java.lang.String getFirstName()
Specified by:
getFirstName in interface User
Returns:
first name of the principal.

getLastName

public java.lang.String getLastName()
Specified by:
getLastName in interface User
Returns:
last name of the principal.

getDisplayName

public java.lang.String getDisplayName()
Specified by:
getDisplayName in interface User
Returns:
display name (eg. full name) of the principal.

getIconLocation

public java.lang.String getIconLocation()
Specified by:
getIconLocation in interface User
Returns:
icon location URL.

getLowerEmailAddress

public java.lang.String getLowerEmailAddress()

getLowerFirstName

public java.lang.String getLowerFirstName()

getLowerLastName

public java.lang.String getLowerLastName()

getLowerDisplayName

public java.lang.String getLowerDisplayName()

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 DirectoryEntity
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 DirectoryEntity
Specified by:
hashCode in class InternalEntity
Returns:
hashcode.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.