Package org.ldaptive.beans
Class AbstractLdapEntryMapper<T>
java.lang.Object
org.ldaptive.beans.AbstractLdapEntryMapper<T>
- Type Parameters:
T- type of object to map
- All Implemented Interfaces:
LdapEntryMapper<T>
- Direct Known Subclasses:
DefaultLdapEntryMapper,SpringLdapEntryMapper
Base implementation of an ldap entry mapper. Uses a
ClassDescriptor for decoding and encoding of objects.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ClassDescriptorgetClassDescriptor(T object) Returns the class descriptor.voidInjects data from the supplied ldap entry into the supplied destination object.Injects data from the supplied source object into a new instance of ldap entry.voidInjects data from the supplied source object into the supplied ldap entry.protected voidmapDn(String dn, T dest, DnValueMutator mutator) Sets the supplied DN on the destination using the mutator.Returns the LDAP DN for the supplied object.protected StringmapDn(T source, DnValueMutator mutator) Creates a new DN using the supplied mutator and source.protected voidmapValue(LdapAttribute attr, T dest, AttributeValueMutator mutator) Sets the supplied attribute values on the destination using the mutator.protected LdapAttributemapValue(T source, AttributeValueMutator mutator) Creates a new ldap attribute using the supplied mutator and source.
-
Field Details
-
logger
Logger for this class.
-
-
Constructor Details
-
AbstractLdapEntryMapper
public AbstractLdapEntryMapper()
-
-
Method Details
-
getClassDescriptor
Returns the class descriptor.- Parameters:
object- to return the class descriptor for- Returns:
- class descriptor
-
mapDn
Description copied from interface:LdapEntryMapperReturns the LDAP DN for the supplied object.- Specified by:
mapDnin interfaceLdapEntryMapper<T>- Parameters:
object- to retrieve the DN from- Returns:
- LDAP DN
-
map
Injects data from the supplied source object into a new instance of ldap entry.- Parameters:
source- to read from- Returns:
- ldap entry
-
map
Description copied from interface:LdapEntryMapperInjects data from the supplied source object into the supplied ldap entry.- Specified by:
mapin interfaceLdapEntryMapper<T>- Parameters:
source- to read fromdest- to write to
-
mapDn
Creates a new DN using the supplied mutator and source.- Parameters:
source- to get DN frommutator- to invoke- Returns:
- mapped DN
-
mapValue
Creates a new ldap attribute using the supplied mutator and source.- Parameters:
source- to get attribute values frommutator- to invoke- Returns:
- new ldap attribute containing zero or more values
-
map
Description copied from interface:LdapEntryMapperInjects data from the supplied ldap entry into the supplied destination object.- Specified by:
mapin interfaceLdapEntryMapper<T>- Parameters:
source- to read fromdest- to write to
-
mapDn
Sets the supplied DN on the destination using the mutator.- Parameters:
dn- value to setdest- to set value onmutator- to invoke
-
mapValue
Sets the supplied attribute values on the destination using the mutator.- Parameters:
attr- values to setdest- to set values onmutator- to invoke
-