com.atlassian.crowd.directory.ldap.mapper.entity
Class LDAPUserAttributesMapper
java.lang.Object
com.atlassian.crowd.directory.ldap.mapper.entity.LDAPUserAttributesMapper
public class LDAPUserAttributesMapper
- extends Object
Maps an LDAP Attributes
object to the Crowd {User} object type, and vice versa.
Populates missing name information as required.
- See Also:
UserUtils.populateNames(com.atlassian.crowd.model.user.User)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.slf4j.Logger logger
ldapPropertiesMapper
protected final LDAPPropertiesMapper ldapPropertiesMapper
directoryId
protected final long directoryId
LDAPUserAttributesMapper
public LDAPUserAttributesMapper(long directoryId,
LDAPPropertiesMapper ldapPropertiesMapper)
mapAttributesFromUser
public Attributes mapAttributesFromUser(User user)
throws org.springframework.ldap.NamingException
- Creates an LDAP
Attributes
object containing the information in the User
object.
- Parameters:
user
- The object to take the values from
- Returns:
- A populated directory-specific Attributes object.
- Throws:
org.springframework.ldap.NamingException
mapUserFromAttributes
public UserTemplateWithAttributes mapUserFromAttributes(Attributes directoryAttributes)
throws org.springframework.ldap.NamingException
- Creates a
User
object containing the information in the Attributes
object.
- Parameters:
directoryAttributes
- The directory-specific {Attributes} object to take the values from
- Returns:
- A populated {User} object.
- Throws:
org.springframework.ldap.NamingException
getUserDisplayNameFromAttribute
protected String getUserDisplayNameFromAttribute(Attributes directoryAttributes)
getUserLastNameFromAttribute
protected String getUserLastNameFromAttribute(Attributes directoryAttributes)
getUserFirstNameFromAttribute
protected String getUserFirstNameFromAttribute(Attributes directoryAttributes)
getUserEmailFromAttribute
protected String getUserEmailFromAttribute(Attributes directoryAttributes)
getUserActiveFromAttribute
protected boolean getUserActiveFromAttribute(Attributes directoryAttributes)
getUsernameFromAttributes
protected String getUsernameFromAttributes(Attributes directoryAttributes)
throws org.springframework.ldap.NamingException
- Throws:
org.springframework.ldap.NamingException
getRequiredLdapAttributes
public Set<String> getRequiredLdapAttributes()
Copyright © 2013 Atlassian. All Rights Reserved.