Interface AttributeMapper
- All Known Implementing Classes:
MemberOfOverlayMapper
,ObjectGUIDMapper
,ObjectSIDMapper
,PrimaryGroupIdMapper
,RFC2307GidNumberMapper
,RFC2307MemberUidMapper
,RFC4519MemberDnMapper
,RFC4519MemberDnRangedMapper
,RFC4519MemberDnRangeOffsetMapper
,UserAccountControlMapper
,USNChangedMapper
Maps a single attribute for an entity from an LDAP
NameAttributesPair
to a set of string values.
This is used for non-core attributes, such as membership for specific
directory types and for custom attributes.
Mandatory or field-level attributes are mapped via the
LDAPUserAttributesMapper
and the
LDAPGroupAttributesMapper
.
-
Method Summary
Modifier and TypeMethodDescriptiongetKey()
Get the key to use when storing the attribute on an entity withAttributes
.Returns the LDAP attributes that should be requested in a search wheregetValues(NameAttributesPair)
will be called on the results.getValues
(NameAttributesPair nameAttributesPair) Map the value of the key from a directory entry.
-
Method Details
-
getKey
String getKey()Get the key to use when storing the attribute on an entity withAttributes
.- Returns:
- non-null key.
-
getValues
Map the value of the key from a directory entry.- Parameters:
nameAttributesPair
- directory entry containing attributes.- Returns:
- the set of attribute values associated with the key. If no values are present an empty set will be returned
- Throws:
Exception
- error retrieving value. The attribute will not be set.
-
getRequiredLdapAttributes
Returns the LDAP attributes that should be requested in a search wheregetValues(NameAttributesPair)
will be called on the results. If an implementation returnsnull
then all attributes will be requested.- Returns:
- the LDAP attributes that should be requested, or
null
for all
-