com.atlassian.crowd.integration.model.user
Class LDAPUserWithAttributes
java.lang.Object
com.atlassian.crowd.integration.model.user.LDAPUserWithAttributes
- All Implemented Interfaces:
- AttributeAware, DirectoryEntity, LDAPDirectoryEntity, User, UserWithAttributes, Serializable
public class LDAPUserWithAttributes
- extends Object
- implements UserWithAttributes, LDAPDirectoryEntity
- See Also:
- Serialized Form
LDAPUserWithAttributes
public LDAPUserWithAttributes(String dn,
UserTemplateWithAttributes user)
getDn
public String getDn()
- Description copied from interface:
LDAPDirectoryEntity
- Gets the standardised distinguished name for the LDAP entity.
- Specified by:
getDn in interface LDAPDirectoryEntity
- Returns:
- distinguished name.
getDirectoryId
public Long getDirectoryId()
- Specified by:
getDirectoryId in interface DirectoryEntity
- Returns:
- id of the directory in which the DirectoryEntity is stored.
getName
public String getName()
- Specified by:
getName in interface DirectoryEntity
- Returns:
- name of the entity.
isActive
public boolean isActive()
- Specified by:
isActive in interface User
- Returns:
true if and only if the user is allowed to authenticate.
getEmailAddress
public String getEmailAddress()
- Specified by:
getEmailAddress in interface User
- Returns:
- primary email address of the principal.
getFirstName
public String getFirstName()
- Specified by:
getFirstName in interface User
- Returns:
- first name of the principal.
getLastName
public String getLastName()
- Specified by:
getLastName in interface User
- Returns:
- last name of the principal.
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName in interface User
- Returns:
- display name (eg. full name) of the principal.
getIconLocation
public String getIconLocation()
- Specified by:
getIconLocation in interface User
- Returns:
- icon location URL.
getAttributes
public List<String> getAttributes(String name)
- Specified by:
getAttributes in interface AttributeAware
- Parameters:
name - attribute name.
- Returns:
- collection of attribute values or an empty list
if the attribute with the given name does not exist.
getAttribute
public String getAttribute(String name)
- Specified by:
getAttribute in interface AttributeAware
- Parameters:
name - attribute name.
- Returns:
- single attribute value or
null
if the attribute with the given name does not exist.
If multiple attribute values exist, any one could be
returned.
getAttributeNames
public Set<String> getAttributeNames()
- Specified by:
getAttributeNames in interface AttributeAware
- Returns:
- set of attribute names.
hasAttribute
public boolean hasAttribute(String name)
- Specified by:
hasAttribute in interface AttributeAware
- Parameters:
name - attribute name.
- Returns:
true if an only if the
user has an attribute with the supplied name
and has one or more values.
equals
public boolean equals(Object o)
- Description copied from interface:
DirectoryEntity
- Implementations must ensure equality based on
getDirectoryId() and case-insensitive getName().
- Specified by:
equals in interface DirectoryEntity- Overrides:
equals in class Object
- 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- Overrides:
hashCode in class Object
- Returns:
- hashcode.
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2010 Atlassian Pty Ltd. All Rights Reserved.