Package org.ldaptive.beans.spring
Class SpringLdapEntryMapper<T>
- java.lang.Object
-
- org.ldaptive.beans.AbstractLdapEntryMapper<T>
-
- org.ldaptive.beans.spring.SpringLdapEntryMapper<T>
-
- Type Parameters:
T
- type of object to map
- All Implemented Interfaces:
LdapEntryMapper<T>
public class SpringLdapEntryMapper<T> extends AbstractLdapEntryMapper<T>
Uses aSpringClassDescriptor
for ldap entry mapping.
-
-
Field Summary
Fields Modifier and Type Field Description private org.springframework.expression.TypeConverter
typeConverter
Type converter used by all contexts.-
Fields inherited from class org.ldaptive.beans.AbstractLdapEntryMapper
logger
-
-
Constructor Summary
Constructors Constructor Description SpringLdapEntryMapper()
Default constructor.SpringLdapEntryMapper(org.springframework.core.convert.converter.Converter<?,?>... c)
Creates a new spring ldap entry mapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addDefaultConverters(org.springframework.core.convert.support.GenericConversionService service)
Adds default converters to the supplied conversion service.protected org.springframework.expression.EvaluationContext
createEvaluationContext(Object object)
Creates an evaluation context to use in the spring class descriptor.protected org.springframework.expression.TypeConverter
createTypeConverter(org.springframework.core.convert.converter.Converter<?,?>... converters)
Returns a type converter that is initialized with the supplied converters and any converters supplied byaddDefaultConverters(GenericConversionService)
.protected ClassDescriptor
getClassDescriptor(Object object)
Returns the class descriptor.
-
-
-
Constructor Detail
-
SpringLdapEntryMapper
public SpringLdapEntryMapper()
Default constructor.
-
SpringLdapEntryMapper
public SpringLdapEntryMapper(org.springframework.core.convert.converter.Converter<?,?>... c)
Creates a new spring ldap entry mapper.- Parameters:
c
- additional converters to add to the spring conversion service.
-
-
Method Detail
-
getClassDescriptor
protected ClassDescriptor getClassDescriptor(Object object)
Description copied from class:AbstractLdapEntryMapper
Returns the class descriptor.- Specified by:
getClassDescriptor
in classAbstractLdapEntryMapper<T>
- Parameters:
object
- to return the class descriptor for- Returns:
- class descriptor
-
createEvaluationContext
protected org.springframework.expression.EvaluationContext createEvaluationContext(Object object)
Creates an evaluation context to use in the spring class descriptor. Adds the default converters from the default conversion service.- Parameters:
object
- to supply to the evaluation context- Returns:
- evaluation context
-
createTypeConverter
protected org.springframework.expression.TypeConverter createTypeConverter(org.springframework.core.convert.converter.Converter<?,?>... converters)
Returns a type converter that is initialized with the supplied converters and any converters supplied byaddDefaultConverters(GenericConversionService)
.- Parameters:
converters
- to add to the conversion service- Returns:
- type converter
-
addDefaultConverters
protected void addDefaultConverters(org.springframework.core.convert.support.GenericConversionService service)
Adds default converters to the supplied conversion service.- Parameters:
service
- to add default converters to
-
-