Class LDAPUserAttributesMapper
java.lang.Object
com.atlassian.crowd.directory.ldap.mapper.entity.LDAPUserAttributesMapper
- Direct Known Subclasses:
ActiveDirectoryUserAttributesMapper
Maps an LDAP
Attributes object to the Crowd {User} object type, and vice versa.
Populates missing name information as required.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final longprotected final LDAPPropertiesMapperprotected final org.slf4j.Logger -
Constructor Summary
ConstructorsConstructorDescriptionLDAPUserAttributesMapper(long directoryId, LDAPPropertiesMapper ldapPropertiesMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetExternalIdFromAttribute(Attributes directoryAttributes) protected booleangetUserActiveFromAttribute(Attributes directoryAttributes) protected StringgetUserDisplayNameFromAttribute(Attributes directoryAttributes) protected StringgetUserEmailFromAttribute(Attributes directoryAttributes) protected StringgetUserFirstNameFromAttribute(Attributes directoryAttributes) protected StringgetUserLastNameFromAttribute(Attributes directoryAttributes) protected StringgetUsernameFromAttributes(Attributes directoryAttributes) mapAttributesFromUser(User user) Creates an LDAPAttributesobject containing the information in theUserobject.mapUserFromAttributes(Attributes directoryAttributes) Creates aUserobject containing the information in theAttributesobject.
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
ldapPropertiesMapper
-
directoryId
protected final long directoryId
-
-
Constructor Details
-
LDAPUserAttributesMapper
-
-
Method Details
-
mapAttributesFromUser
Creates an LDAPAttributesobject containing the information in theUserobject.- 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 aUserobject containing the information in theAttributesobject.- Parameters:
directoryAttributes- The directory-specific {Attributes} object to take the values from- Returns:
- A populated {User} object.
- Throws:
org.springframework.ldap.NamingException
-
getUserDisplayNameFromAttribute
-
getUserLastNameFromAttribute
-
getUserFirstNameFromAttribute
-
getUserEmailFromAttribute
-
getUserActiveFromAttribute
-
getExternalIdFromAttribute
-
getUsernameFromAttributes
protected String getUsernameFromAttributes(Attributes directoryAttributes) throws org.springframework.ldap.NamingException - Throws:
org.springframework.ldap.NamingException
-
getRequiredLdapAttributes
-