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, java.io.Serializable
public class LDAPUserWithAttributes
- extends java.lang.Object
- implements UserWithAttributes, LDAPDirectoryEntity
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
LDAPUserWithAttributes
public LDAPUserWithAttributes(java.lang.String dn,
UserTemplateWithAttributes user)
getDn
public java.lang.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 java.lang.Long getDirectoryId()
- Specified by:
getDirectoryId in interface DirectoryEntity
- Returns:
- id of the directory in which the DirectoryEntity is stored.
getName
public java.lang.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 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.
getAttributes
public java.util.List<java.lang.String> getAttributes(java.lang.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 java.lang.String getAttribute(java.lang.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 java.util.Set<java.lang.String> getAttributeNames()
- Specified by:
getAttributeNames in interface AttributeAware
- Returns:
- set of attribute names.
hasAttribute
public boolean hasAttribute(java.lang.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(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- Overrides:
equals in class java.lang.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 java.lang.Object
- Returns:
- hashcode.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.