directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject SchemaLoaders : another approach.
Date Mon, 06 Feb 2012 08:57:09 GMT
May be we are looking at the problem from the wrong side.

All in all, is the user interested into the class used to load the 
schema ? What about telling the SchemaManager to load the schema, and 
telling it to use a schemaLoader of our choice if needed ?

As of today, we do :

         SchemaLoader loader = new NetworkSchemaLoader( connection );

         // Load the schemas
         SchemaManager schemaManager = new DefaultSchemaManager( loader );

What if we do :

         SchemaManager schemaManager = new DefaultSchemaManager( loader );
         schemaManager.loadFromSubentry();

?

We would have :

         schemaManager.loadFromLdif();
         schemaManager.loadFromJar();
         schemaManager.loadFromSingleLdif();
         schemaManager.loadFromSubentry();
         schemaManager.loadFromAds();

And for those who would like to use another schemaLoader, we could also 
have :

         schemaManager.load( schemaLoader );

We then could 'hide' the existing SchemaLoader, ie not expose them to 
the public.
 From the user POV, that would probably be easier, no ?

-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.iktek.com


Mime
View raw message