From b1bff2c44870f9e4fcd5d4d84443f0c9965ed370 Mon Sep 17 00:00:00 2001 From: Ulrik Sandberg Date: Fri, 12 Jan 2007 12:32:17 +0000 Subject: [PATCH] IN PROGRESS - issue LDAP-33: Remove package dependency cycle between ldap.core and ldap.support http://opensource.atlassian.com/projects/spring/browse/LDAP-33 Remove package dependency cycle --- .../images/org.springframework.ldap.png | Bin 0 -> 3942 bytes spring-ldap/docs/reference/src/basic.xml | 4 +- .../docs/reference/src/configuration.xml | 10 +- .../docs/reference/src/dirobjectfactory.xml | 6 +- spring-ldap/docs/reference/src/index.xml | 4 +- spring-ldap/docs/reference/src/overview.xml | 134 +++++++++++------- 6 files changed, 92 insertions(+), 66 deletions(-) create mode 100644 spring-ldap/docs/reference/images/org.springframework.ldap.png diff --git a/spring-ldap/docs/reference/images/org.springframework.ldap.png b/spring-ldap/docs/reference/images/org.springframework.ldap.png new file mode 100644 index 0000000000000000000000000000000000000000..c1a6d152ef8618c515d1f951975dbdbae76d1409 GIT binary patch literal 3942 zcmai1c{Ei2`ya}ZRzgUW7=25&EMBSc}tTkj-jIqxw}5$Jo#o`U-)9i(yW-MXXWvJu6Kj< z>5e+HPYK`a>P~B*KZPC@B}-{2n0@k9Ff)0UP|-*3bzh6z!~yRI=kD7k$Dd|Zjuz9x z411S1!nu0o3?2-&#wZYmsZ0O2fqbz4*#GB#p@r1vID8cs7nr^b&cLKHPVcV3XKb(7 zpZu-9!7x33ek~fgGcH>`$*K-Eh`jugBoXo?mV>w79VCp>_TuGn;v>fi$$a7ml@qN|DFVKTwD>hLlK$^-s`r@=UsB3q3UK`ot zT5|=&3!z9sID^QS1Z;0qi(_D3RN-fdkm6X^6=IW$q4T#O=blW%9_jsozqlpWb=cY? zpWQ}`v>I(>4|tkCDdlaOb9`@j^Aw93srj-4OzGu4#ok1B@+(O%TGD&crcAlr$=SKY z_EzL_W|~nPUb^<^0<*vPUc)85rdbswJo`ng8^WXM6#|i`N2e&QdAv6EK0PJ^FaIMy zt8;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|dC#iTwJAV5i|;};nca!hzHGX;8XpwEZj<*Rd1iEEoOE4V`BM*w;zWBE&Lc1dIF z-tY%hH+6bCUn&&0xQGTz5=APYSK;qb#z7GD)%vUrMQB?zs51~$19j=TH~ZA-L^x|X zO!d4V0=NT=Lrw8{%23wm9tfz-?PztWhWdK6AOwZ8rffks;x-IU(WC^`j71u0*G^62G7oBnc9})4PytHRU7B%LqPt zSov5vdnq)BkMMx{J~%k|)#L@6zB2!+EQ1ScX`CV#mDQy%B?rp*EDPO?xqif`{Z`7x zSPd5Bn%1pM#_Z%MHpb{U!3LxQ>V88 zq$hG}2uPzO&{b94!W-c5K?cP7KhW0VsubG{@o8Nhs3Hn|0WB^6wq^|Mf7*ZC|L4vB eb_eg<-7~Z60j75pFrfVzW@&0`QuY@r_P+o`2k0vR literal 0 HcmV?d00001 diff --git a/spring-ldap/docs/reference/src/basic.xml b/spring-ldap/docs/reference/src/basic.xml index ed0efa86..668216dd 100644 --- a/spring-ldap/docs/reference/src/basic.xml +++ b/spring-ldap/docs/reference/src/basic.xml @@ -99,7 +99,7 @@ public class PersonDaoImpl implements PersonDao { Building Dynamic Filters We can build dynamic filters to use in searches, using the classes - from the org.springframework.ldap.support.filter + from the org.springframework.ldap.filter package. Let's say that we want the following filter: (&(objectclass=person)(sn=?)), where we want the ? to be replaced with the value of the parameter @@ -177,7 +177,7 @@ filter.and(new WhitespaceWildcardsFilter("cn", cn)); package com.example.dao; -import org.springframework.ldap.support.DistinguishedName; +import org.springframework.ldap.core.support.DistinguishedName; import javax.naming.Name; public class PersonDaoImpl implements PersonDao { diff --git a/spring-ldap/docs/reference/src/configuration.xml b/spring-ldap/docs/reference/src/configuration.xml index 3e769463..7ddcaa8a 100644 --- a/spring-ldap/docs/reference/src/configuration.xml +++ b/spring-ldap/docs/reference/src/configuration.xml @@ -71,14 +71,14 @@ <beans> ... - <bean id="contextSource" class="org.springframework.ldap.support.LdapContextSource"> + <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource"> <property name="url" value="ldap://localhost:389" /> <property name="base" value="dc=example,dc=com" /> <property name="acegiAuthenticationSource" ref="authenticationSource" /> </bean> <bean id="acegiAuthenticationSource" - class="org.springframework.ldap.support.authentication.AcegiAuthenticationSource" /> + class="org.springframework.ldap.authentication.AcegiAuthenticationSource" /> ... </beans> @@ -114,21 +114,21 @@ <beans> ... - <bean id="contextSource" class="org.springframework.ldap.support.LdapContextSource"> + <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource"> <property name="url" value="ldap://localhost:389" /> <property name="base" value="dc=example,dc=com" /> <property name="authenticationSource" ref="authenticationSource" /> </bean> <bean id="authenticationSource" - class="org.springframework.ldap.support.DefaultValuesAuthenticationSourceDecorator"> + class="org.springframework.ldap.authentication.DefaultValuesAuthenticationSourceDecorator"> <property name="target" ref="acegiAuthenticationSource" /> <property name="defaultUser" value="cn=myDefaultUser" /> <property name="defaultPassword" value="pass" /> </bean> <bean id="acegiAuthenticationSource" - class="org.springframework.ldap.support.authentication.AcegiAuthenticationSource" /> + class="org.springframework.ldap.authentication.AcegiAuthenticationSource" /> ... </beans> diff --git a/spring-ldap/docs/reference/src/dirobjectfactory.xml b/spring-ldap/docs/reference/src/dirobjectfactory.xml index 922096be..adef7454 100644 --- a/spring-ldap/docs/reference/src/dirobjectfactory.xml +++ b/spring-ldap/docs/reference/src/dirobjectfactory.xml @@ -195,9 +195,9 @@ import javax.naming.directory.Attributes; import org.springframework.ldap.core.AttributesMapper; import org.springframework.ldap.core.ContextMapper; import org.springframework.ldap.core.LdapTemplate; -import org.springframework.ldap.support.DirContextAdapter; -import org.springframework.ldap.support.DistinguishedName; -import org.springframework.ldap.support.filter.EqualsFilter; +import org.springframework.ldap.core.DirContextAdapter; +import org.springframework.ldap.core.support.DistinguishedName; +import org.springframework.ldap.filter.EqualsFilter; public class PersonDaoImpl implements PersonDao { private LdapTemplate ldapTemplate; diff --git a/spring-ldap/docs/reference/src/index.xml b/spring-ldap/docs/reference/src/index.xml index b313a684..0669e9a8 100644 --- a/spring-ldap/docs/reference/src/index.xml +++ b/spring-ldap/docs/reference/src/index.xml @@ -17,8 +17,8 @@ Spring LDAP Reference Documentation - Version 1.1.2 - December 2006 + Version 1.2-dev + Sometime 2007 Mattias diff --git a/spring-ldap/docs/reference/src/overview.xml b/spring-ldap/docs/reference/src/overview.xml index 4d3c5640..a5b46e15 100644 --- a/spring-ldap/docs/reference/src/overview.xml +++ b/spring-ldap/docs/reference/src/overview.xml @@ -154,6 +154,10 @@ public class PersonDaoImpl implements PersonDao { commons-collections (tools for working with collections, used internally) + + + ldapbp (Sun LDAP Boosetr Pack, for required controls) + If your application is wired up using the Spring ApplicationContext, @@ -181,7 +185,7 @@ public class PersonDaoImpl implements PersonDao { <beans> ... - <bean id="contextSource" class="org.springframework.ldap.support.LdapContextSource"> + <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource"> <property name="url" value="ldap://localhost:389" /> <property name="base" value="dc=example,dc=com" /> <property name="userDn" value="cn=Manager" /> @@ -209,14 +213,35 @@ public class PersonDaoImpl implements PersonDao { that the dependency is needed to compile the package but is optionally needed at runtime (depending on your use of the package). For example, use of Spring LDAP together with Acegi Security entails use of the - org.acegisecurity package. Cyclic package dependencies - are noted with (cycle). These are candidates for - removal in future releases. + org.acegisecurity package. + +
+ Spring LDAP package structure + + + + + +
org.springframework.ldap - The ldap package contains the central + The ldap package contains the exceptions of + the library. These exceptions form an unchecked hierarchy that mirrors + the NamingException hierarchy. + + + + Dependencies: spring-core, spring-dao + + + + + + org.springframework.ldap.core + + The ldap.core package contains the central abstractions of the library. These abstractions include AuthenticationSource, ContextSource, DirContextProcessor, and NameClassPairCallbackHandler. This package also contains the central @@ -224,8 +249,23 @@ public class PersonDaoImpl implements PersonDao { - Dependencies: ldap.support (cycle), spring-beans, spring-dao, - commons-lang, commons-logging + Dependencies: ldap, ldap.support, spring-beans, spring-dao, + commons-collections, commons-lang, commons-logging + + + + + + org.springframework.ldap.core.support + + The ldap.core.support package contains + supporting implementations of the central interfaces as well as the + DirContextAdapter abstraction. + + + + Dependencies: ldap.core, ldap.support, spring-core, + spring-beans, commons-lang, commons-logging @@ -233,75 +273,61 @@ public class PersonDaoImpl implements PersonDao { org.springframework.ldap.support - The support package contains supporting + The ldap.support package contains supporting implementations of the central interfaces as well as the DirContextAdapter abstraction. - Dependencies: ldap, - ldap.util, spring-core, spring-beans, commons-lang, - commons-collections, commons-logging - - - - - - org.springframework.ldap.support.authentication - - The support.authentication package contains - an implementation of the AuthenticationSource interface that can be used - with Acegi - Security. - - - - Dependencies: ldap, acegi-security (optional), spring-beans, - commons-lang, commons-logging - - - - - - org.springframework.ldap.support.control - - The support.control package contains an - abstract implementation of the DirContextProcessor interface that can be - used as a basis for processing RequestControls and ResponseControls. - There is also a concrete implementation that handles paged search - results. The LDAP - Booster Pack is used to get support for controls. - - - - Dependencies: ldap, LDAP booster pack, spring-core, + Dependencies: ldap, spring-core, spring-dao, commons-logging - - org.springframework.ldap.support.filter + + org.springframework.ldap.authentication - The support.filter package contains the - Filter abstraction and several implementations of it. + The ldap.authentication package contains an + implementation of the AuthenticationSource interface that can be used + with Acegi Security, + as well as related helper classes. - Dependencies: ldap.support, commons-lang + Dependencies: ldap.core, acegi-security (optional), + spring-beans, commons-lang, commons-logging - - org.springframework.ldap.util + + org.springframework.ldap.control - The util package contains utility - classes that are used internally. + The ldap.control package contains an abstract + implementation of the DirContextProcessor interface that can be used as + a basis for processing RequestControls and ResponseControls. There is + also a concrete implementation that handles paged search results. The + LDAP Booster + Pack is used to get support for controls. - Dependencies: none + Dependencies: ldap.core, ldap.support, LDAP booster pack, + spring-core, commons-lang, commons-logging + + + + + + org.springframework.ldap.filter + + The ldap.filter package contains the Filter + abstraction and several implementations of it. + + + + Dependencies: ldap.core, commons-lang