From 733045684a94c8bfebd7d7e42612254dd3d6e3cc Mon Sep 17 00:00:00 2001 From: Ulrik Sandberg Date: Sun, 28 Nov 2010 11:05:55 +0000 Subject: [PATCH] Broke a few lines in reference manual that caused overflow in PDF. --- src/docbkx/odm.xml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/docbkx/odm.xml b/src/docbkx/odm.xml index bebd65d5..0ee69dbb 100644 --- a/src/docbkx/odm.xml +++ b/src/docbkx/odm.xml @@ -9,7 +9,8 @@ developers the ability to use annotations to map database tables to Java objects for some time. The Spring Framework LDAP project now offers the same ability with respect to directories through the use of the - org.springframework.ldap.odm package. + org.springframework.ldap.odm package (sometimes abbreviated + as o.s.l.odm). @@ -61,7 +62,8 @@ <beans> ... - <bean id="odmManager" class="org.springframework.ldap.odm.core.impl.OdmManagerImplFactoryBean"> + <bean id="odmManager" + class="org.springframework.ldap.odm.core.impl.OdmManagerImplFactoryBean"> <property name="converterManager" ref="converterManager" /> <property name="contextSource" ref="contextSource" /> <property name="managedClasses"> @@ -158,13 +160,13 @@ If this fails, then if the toClass - isAssignableFrom the + isAssignableFrom the fromClass then just assign it. If this fails try to find and use a - Converter registered for the + Converter registered for the fromClass and the toClass ignoring the syntax. @@ -177,17 +179,17 @@ Implementations of the ConverterManager interface can be obtained from the - org.springframework.ldap.odm.typeconversion.impl.ConvertManagerFactoryBean. + o.s.l.odm.typeconversion.impl.ConvertManagerFactoryBean. The factory bean requires converter configurations to be declared in the bean configuration. The converterConfig property accepts a set of ConverterConfig classes, each one defining some conversion logic. A converter config is an instance of - org.springframework.ldap.odm.typeconversion.impl.ConverterManagerFactoryBean.ConverterConfig. + o.s.l.odm.typeconversion.impl.ConverterManagerFactoryBean.ConverterConfig. The config defines a set of source classes, the set of target classes, and an implementation of the - com.springframework.ldap.odm.typeconversion.impl.Converter + org.springframework.ldap.odm.typeconversion.impl.Converter interface which provides the logic to convert from the fromClass to the toClass. A sample configuration is provided in the following example: @@ -204,7 +206,8 @@ class="org.springframework.ldap.odm.typeconversion.impl.ConverterManagerFactoryBean"> <property name="converterConfig"> <set> - <bean class="org.springframework.ldap.odm.typeconversion.impl.ConverterManagerFactoryBean$ConverterConfig"> + <bean class="org.springframework.ldap.odm.\ + typeconversion.impl.ConverterManagerFactoryBean$ConverterConfig"> <property name="fromClasses"> <set> <value>java.lang.String</value> @@ -223,7 +226,8 @@ </property> <property name="converter" ref="fromStringConverter" /> </bean> - <bean class="org.springframework.ldap.odm.typeconversion.impl.ConverterManagerFactoryBean$ConverterConfig"> + <bean class="org.springframework.ldap.odm.\ + typeconversion.impl.ConverterManagerFactoryBean$ConverterConfig"> <property name="fromClasses"> <set> <value>java.lang.Byte</value> @@ -268,8 +272,8 @@ public class App { try { ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); OdmManager manager = (OdmManager) context.getBean("odmManager"); - List<SimplePerson> people = manager.search( - SimplePerson.class, new DistinguishedName("dc=example,dc=com"), "uid=*", searchControls); + List<SimplePerson> people = manager.search(SimplePerson.class, + new DistinguishedName("dc=example,dc=com"), "uid=*", searchControls); log.info("People found: " + people.size()); for (SimplePerson person : people) { log.info( person );