You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even with ODM there is no built-in conversion from the String representation of date values from LDAP to native Date types (see #167).
Please support a conversion from String to ZonedDateTime by default when leveraging ODM.
Currently it is particularly hard to register custom converters with ODM as you have to do something like this
DefaultObjectDirectoryMapper objectDirectoryMapper = (DefaultObjectDirectoryMapper) ldapTemplate.getObjectDirectoryMapper();
DefaultConversionService conversionService = new DefaultConversionService();
conversionService.addConverter(new StringToZonedDateTimeConverter());
conversionService.addConverter(new ZonedDateTimeToStringConverter());
conversionService.addConverter(new ConversionServiceConverterManager.StringToNameConverter()); // default converter from string to name
ConversionServiceConverterManager converterManager = new ConversionServiceConverterManager(conversionService);
objectDirectoryMapper.setConverterManager(converterManager);
You even to register the built-in string to name converts as the constructor ConversionServiceConverterManager(GenericConversionService conversionService) does not automatically register those.
Maybe at the same time providing a simple way of registering new/custom converters could be simplified.
The text was updated successfully, but these errors were encountered:
kwin
changed the title
Support conversion of Generalized Date to ZonedDateTime
Support conversion of Generalized Date as String to ZonedDateTime
Oct 12, 2016
Even with ODM there is no built-in conversion from the String representation of date values from LDAP to native Date types (see #167).
Please support a conversion from
String
toZonedDateTime
by default when leveraging ODM.An example source code for the conversion can be found in https://github.com/vt-middleware/ldaptive/blob/master/beans/src/main/java/org/ldaptive/beans/spring/convert/StringToZonedDateTimeConverter.java.
Currently it is particularly hard to register custom converters with ODM as you have to do something like this
You even to register the built-in string to name converts as the constructor
ConversionServiceConverterManager(GenericConversionService conversionService)
does not automatically register those.Maybe at the same time providing a simple way of registering new/custom converters could be simplified.
The text was updated successfully, but these errors were encountered: