directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@apache.org>
Subject [Schema refactoring] Progress
Date Sun, 23 Aug 2009 12:06:41 GMT
Hi,

so here is where I am from now on :

o A new hierarchy has been defined for the schema objects. The base 
class is SchemaObject. It defines the following attributes :
    String oid : The SchemaObject numeric OID
    List<String> names : The optional names for this SchemaObject
    boolean isEnabled : Whether or not this SchemaObject is enabled
    boolean isReadOnly : Whether or not this SchemaObject can be modified
    boolean isObsolete : Whether or not this SchemaObject is obsolete
    String description : A short description of this SchemaObject
    String schemaName : The name of the schema this object is associated 
with
    SchemaObjectType objectType : The SchemaObjectType (AT, OC, N, C, 
LS, etc)
    Map<String, List<String>> extensions A map containing the list of 
supported extensions

All those attributes may not be used by all the inherit classes (like 
the Obsolete field is not used for C, N, LS, SC), but it's easier to 
have it here.

Another class has been used for SO which define some behavior, namely C, 
N and SC. As one user can define its own set of such SO, with specific 
implementation,  and as they can be classLoaded, we have defined a 
LoadableSchemaObject. This class define two new attributes :
    private String fqcn : The Full Qualified Class Name
    private String bytecode : The base64 encoded bytecode for this schema

This class inherits from ScvhemaObject

All the SchemaObject children extends either SchemaObject or 
LoadableSchemaObject.

o Registries have been moved to shared.
As registries just hold Map containing relation between an OID and a 
SchemaObject, plus a Map relating a Name with a SchemaObject, it's 
better to have them in a place a client can use them

o A lot of refactoring is going on to get the OIDs of SO instance being 
passed as an argument of the SO constructors, as we want each SO to have 
its own OID. That also mean we should make the C and N have their 
associated MR's OID, and the SC has its LS's OID.

o The remaining String representing OIDs hard coded are slowly moved to 
shared SchemaConstants class.

o The Syntax has been renamed to LdapSyntax to reflect the naming used 
in the RFC

o Comparator has also be renamed LdapComparator, to avoid any confusion 
with the Java Comparator class

o An heavy use of generics has been done, especially for Comparators

o Of course, the impact on the whole server is enourmous, and t will 
take time to complete the full migration, but right now, Normalizers, 
Comparators and SyntaxCheckers have been completed.

o We also have to add the missing Comparators (a lot of them needs to be 
added)

That's pretty much it for today, I'm continuing with MR, expecting it to 
be done in the afternoon.

Completion of the full change is expected to be around the middle of 
next week. Any help is welcomed, of course, and as everything is don in 
a branch 
(https://svn.apache.org/repos/asf/directory/apacheds/branches/apacheds-schema-with-dependencies/),

and as I'm committing code as fast as I can, there is room for othe 
rpeople than just me to review or code.

Thanks !

-- 
--
cordialement, regards,
Emmanuel L├ęcharny
www.iktek.com
directory.apache.org



Mime
View raw message