public class DefaultObjectDirectoryMapper extends Object implements ObjectDirectoryMapper
ObjectDirectoryMapper
. Unless you need to explicitly configure
converters there is typically no reason to explicitly consider yourself with this class.Constructor and Description |
---|
DefaultObjectDirectoryMapper() |
Modifier and Type | Method and Description |
---|---|
String |
attributeFor(Class<?> clazz,
String fieldName)
Get the attribute corresponding to the specified field name.
|
Filter |
filterFor(Class<?> clazz,
Filter baseFilter)
Use the specified search filter and return a new one that only applies to entries of the specified class.
|
Name |
getCalculatedId(Object entry) |
Name |
getId(Object entry)
Get the distinguished name for the specified object.
|
void |
manageClass(Class<?> clazz)
Check if the specified class is already managed by this instance; if not, check the metadata and add the class to the
managed classes.
|
<T> T |
mapFromLdapDataEntry(LdapDataEntry context,
Class<T> clazz)
Used to convert from the JNDI LDAP representation of an Entry to the Java representation when reading from LDAP.
|
void |
mapToLdapDataEntry(Object entry,
LdapDataEntry context)
Used to convert from Java representation of an Ldap Entry when writing to
the Ldap directory
|
void |
setConverterManager(ConverterManager converterManager) |
void |
setId(Object entry,
Name id)
Set the distinguished name for the specified object.
|
public void setConverterManager(ConverterManager converterManager)
public void manageClass(Class<?> clazz)
ObjectDirectoryMapper
manageClass
in interface ObjectDirectoryMapper
clazz
- the class to manage.public void mapToLdapDataEntry(Object entry, LdapDataEntry context)
ObjectDirectoryMapper
mapToLdapDataEntry
in interface ObjectDirectoryMapper
entry
- - The entry to convert.context
- - The LDAP context to store the converted entrypublic <T> T mapFromLdapDataEntry(LdapDataEntry context, Class<T> clazz)
ObjectDirectoryMapper
mapFromLdapDataEntry
in interface ObjectDirectoryMapper
public Name getId(Object entry)
ObjectDirectoryMapper
getId
in interface ObjectDirectoryMapper
entry
- the entry to get distinguished name for.public void setId(Object entry, Name id)
ObjectDirectoryMapper
setId
in interface ObjectDirectoryMapper
entry
- the entry to set the name onid
- the name to setpublic Name getCalculatedId(Object entry)
getCalculatedId
in interface ObjectDirectoryMapper
public Filter filterFor(Class<?> clazz, Filter baseFilter)
ObjectDirectoryMapper
filterFor
in interface ObjectDirectoryMapper
clazz
- the class.baseFilter
- the filter we want to use.public String attributeFor(Class<?> clazz, String fieldName)
ObjectDirectoryMapper
attributeFor
in interface ObjectDirectoryMapper
clazz
- the clazz.fieldName
- the field name.