Spring LDAP

org.springframework.ldap.odm.typeconversion.impl
Class ConversionServiceConverterManager

java.lang.Object
  extended by org.springframework.ldap.odm.typeconversion.impl.ConversionServiceConverterManager
All Implemented Interfaces:
ConverterManager

public class ConversionServiceConverterManager
extends Object
implements ConverterManager

Since:
2.0
Author:
Mattias Hellborg Arthursson

Nested Class Summary
static class ConversionServiceConverterManager.NameToStringConverter
           
static class ConversionServiceConverterManager.StringToNameConverter
           
 
Constructor Summary
ConversionServiceConverterManager()
           
ConversionServiceConverterManager(GenericConversionService conversionService)
           
 
Method Summary
 boolean canConvert(Class<?> fromClass, String syntax, Class<?> toClass)
          Determine whether this converter manager is able to carry out a specified conversion.
<T> T
convert(Object source, String syntax, Class<T> toClass)
          Convert a given source object with an optional LDAP syntax to an instance of a given class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConversionServiceConverterManager

public ConversionServiceConverterManager(GenericConversionService conversionService)

ConversionServiceConverterManager

public ConversionServiceConverterManager()
Method Detail

canConvert

public boolean canConvert(Class<?> fromClass,
                          String syntax,
                          Class<?> toClass)
Description copied from interface: ConverterManager
Determine whether this converter manager is able to carry out a specified conversion.

Specified by:
canConvert in interface ConverterManager
Parameters:
fromClass - Convert from the fromClass.
syntax - Using the LDAP syntax (may be null).
toClass - To the toClass.
Returns:
True if the conversion is supported, false otherwise.

convert

public <T> T convert(Object source,
                     String syntax,
                     Class<T> toClass)
Description copied from interface: ConverterManager
Convert a given source object with an optional LDAP syntax to an instance of a given class.

Specified by:
convert in interface ConverterManager
Type Parameters:
T - The class to convert to.
Parameters:
source - The object to convert.
syntax - The LDAP syntax to use (may be null).
toClass - The class to convert to.
Returns:
The converted object.

Spring LDAP