com.atlassian.crowd.integration.directory.connector.mapper.entity
Class LDAPUserAttributesMapper
java.lang.Object
com.atlassian.crowd.integration.directory.connector.mapper.entity.LDAPUserAttributesMapper
public class LDAPUserAttributesMapper
- extends java.lang.Object
Maps an LDAP Attributes object to the Crowd {User} object type, and vice versa.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.apache.log4j.Logger logger
ldapPropertiesMapper
protected final LDAPPropertiesMapper ldapPropertiesMapper
directoryId
protected final long directoryId
LDAPUserAttributesMapper
public LDAPUserAttributesMapper(long directoryId,
LDAPPropertiesMapper ldapPropertiesMapper)
mapFromAttributes
public java.lang.Object mapFromAttributes(javax.naming.directory.Attributes attributes)
throws org.springframework.ldap.NamingException
- Maps an LDAP object to the Crowd
User object type. Implementation of AttributesMapper from Spring
LDAP framework.
- Parameters:
attributes - The principal from the LDAP server to map into a {User} object.
- Returns:
- The populated {User}.
- Throws:
org.springframework.ldap.NamingException - A mapping exception occured.- See Also:
AttributesMapper.mapFromAttributes(javax.naming.directory.Attributes)
mapAttributesFromUser
public javax.naming.directory.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(javax.naming.directory.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 java.lang.String getUserDisplayNameFromAttribute(javax.naming.directory.Attributes directoryAttributes)
getUserLastNameFromAttribute
protected java.lang.String getUserLastNameFromAttribute(javax.naming.directory.Attributes directoryAttributes)
getUserFirstNameFromAttribute
protected java.lang.String getUserFirstNameFromAttribute(javax.naming.directory.Attributes directoryAttributes)
getUserEmailFromAttribute
protected java.lang.String getUserEmailFromAttribute(javax.naming.directory.Attributes directoryAttributes)
getUserActiveFromAttribute
protected boolean getUserActiveFromAttribute(javax.naming.directory.Attributes directoryAttributes)
getUsernameFromAttributes
protected java.lang.String getUsernameFromAttributes(javax.naming.directory.Attributes directoryAttributes)
throws org.springframework.ldap.NamingException
- Throws:
org.springframework.ldap.NamingException
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.