public class LdapUserAttributesMapper extends LdapAttributesMapper<ExternalUserVO>
Constructor and Description |
---|
LdapUserAttributesMapper(LdapConfiguration config)
Creates a mapper from a string based mapping definition.
|
Modifier and Type | Method and Description |
---|---|
String[] |
getBinaryLdapAttributeName()
Returns an array of names of mapped LDAP attributes that are binary.
|
String |
getLdapAttributName(LdapUserAttribute attributeName)
Returns the LDAP attribute name for a Kenmei attribute.
|
protected Set<String> |
getRequiredAttributeNames()
Returns the subset with required Communote attribute names the mapper can map.
|
protected Set<String> |
getSupportedAttributeNames()
Returns the Kenmei attribute names the mapper can map.
|
static String |
getUserPropertyKeyGroup()
Return the user property key group.
|
static String |
getUserPropertyKeyName(String externalSystemId,
LdapUserAttribute attribute)
Return the user property key name.
|
protected void |
init(Map<String,String> mapping)
Initializes the mapper and validates that all required properties are contained in the
mapping.
|
ExternalUserVO |
mapAttributes(String dn,
Attributes ldapAttributes)
Maps the LDAP attributes to the generic type.
|
getAttributeValue, getAttributeValueForKenmeiAttributeName, getLdapAttributName, getMappedLdapAttributeNames, getMappingAsString, isKenmeiAttributeMapped
public LdapUserAttributesMapper(LdapConfiguration config) throws LdapAttributeMappingException
config
- an LDAP configurationLdapAttributeMappingException
- if an attribute is not supported or a required attribute is missingpublic static String getUserPropertyKeyGroup()
public static String getUserPropertyKeyName(String externalSystemId, LdapUserAttribute attribute)
externalSystemId
- the external system idattribute
- the ldap attributepublic String[] getBinaryLdapAttributeName()
getBinaryLdapAttributeName
in class LdapAttributesMapper<ExternalUserVO>
public String getLdapAttributName(LdapUserAttribute attributeName)
attributeName
- the nameprotected Set<String> getRequiredAttributeNames()
getRequiredAttributeNames
in class LdapAttributesMapper<ExternalUserVO>
protected Set<String> getSupportedAttributeNames()
getSupportedAttributeNames
in class LdapAttributesMapper<ExternalUserVO>
protected void init(Map<String,String> mapping) throws LdapAttributeMappingException
init
in class LdapAttributesMapper<ExternalUserVO>
mapping
- the mapping of Kenmei attribute names to LDAP counterparts to validateLdapAttributeMappingException
- if an attribute is not supported or a required attribute is missingpublic ExternalUserVO mapAttributes(String dn, Attributes ldapAttributes) throws LdapAttributeMappingException
mapAttributes
in class LdapAttributesMapper<ExternalUserVO>
dn
- the DN of the element providing the attributesldapAttributes
- The ldap attributes.LdapAttributeMappingException
- if the mapping failedCopyright © 2019 Communote team. All rights reserved.