Hi guys,
as I'm reviewing the configuration, and as I want to cover the
LdapService class, I'm a bit concerned with the current hierarchy of
class we are using. Let me explain :
We have two categories of elements : Services and Servers.
Services : Ldap and Ldaps, plus a DirectoryBackedService
Servers : ApacheDS, KdcServer, DnsServer, NtpServer, ChangePasswordServer
The current inheritence scheme is :
(ProtocolService) o--- [AbstractProtocolService] <-- [NtpServer]
(ProtocolService) o--- [AbstractProtocolService] <--
[DirectoryBackedService] <-- [LdapService]
(ProtocolService) o--- [AbstractProtocolService] <--
[DirectoryBackedService] <-- [KdcServer]
(ProtocolService) o--- [AbstractProtocolService] <--
[DirectoryBackedService] <-- [DnsServer]
(ProtocolService) o--- [AbstractProtocolService] <--
[DirectoryBackedService] <-- [ChangePasswordServer]
The [ApacheDS] class is just the LDAP server, containing two services :
Ldap and Ldaps, instances of the [LdapService] class, plus a reference
to the underlying DirectoryService.
I think we could have a better scheme. Here are some of the conceptual
problems I have :
1) The [LdapService] class has nothing to do with the
[DirectoryBackedService], which shares some information we don't need
for a Ldap server.
2) The [NtpServer] is not depending on a DirectoryService, but extends
the [AbstractProtocolService] class, which holds the DirectoryService
instance
3) The ApacheDS class is the LDAP server, relying on two instances of
the [LdapService] class, one for LDAP, the other one of LDAPS, plus has
a reference to the DirectoryService, which is already present in the
[AbstractProtocolService] instance
4) Last, not least, the ApacheDS class is still in a
apacheds-server-jndi project when we don't have any more JNDI in the picture
How can we fix all those concerns ?
Item #4 should be easy to fix : rename the project to
apacheds-server-ldap instead of apacheds-server-jndi
For item #3, I would suggest to get rid of the DirectoryService
reference, as it's already present in the LdapService instances.
I would add an intermediate class between the [AbstractProtocolService]
class and the [DirectoryBackedService] class :
(ProtocolService) o--- [AbstractProtocolService] <--
[AbstractDirectoryBackedService] <-- [DirectoryBackedService] <--
[KdcServer]
(ProtocolService) o--- [AbstractProtocolService] <--
[AbstractDirectoryBackedService] <-- [DirectoryBackedService] <--
[DnsServer]
(ProtocolService) o--- [AbstractProtocolService] <--
[AbstractDirectoryBackedService] <-- [DirectoryBackedService] <--
[ChangePasswordServer]
(ProtocolService) o--- [AbstractProtocolService] <--
[AbstractDirectoryBackedService] <-- [LdapService]
(ProtocolService) o--- [AbstractProtocolService] <-- [NtpServer]
Regarding item #1, I would also removed the DirectoryService reference,
as it's already present into the [AbstractProtocolService] instance.
Does it makes sense to you ?
Thanks !
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org