You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lecharny <el...@apache.org> on 2009/10/10 19:30:25 UTC

[Schema Refactoring] Some more heads up

Hi,

following my previous mail, I also have modified the way Registries are 
loaded.

I have added two flags in the Registries class, one to allow the 
Registries to be loaded with disabled elements (useful for Studio), and 
another one to allow the Registries to be loaded with SchemaObject even 
if it breaks the consistency (also useful for studio, but not only).

The second flag is very important in the loading process : it allows the 
SchemaObjects to be loaded in any order, as the referencial integrity is 
controlled after the loading is done. In this second pass, we 
recursively check ( and attach to their references) all the SchemaObject 
in this specific order :
1) Normalizers, Comparators and SyntaxCheckers (as they depend on nothing)
2) Syntaxes (depend on SyntaxCheckers)
3) MatchingRules (depend on Syntaxes, Normalizers and Comparators
4) AttributeTypes (depend on MatchingRules, Syntaxes and AttributeTypes 
: in this case, we first handle the superior)
5) ObjectClasses (depend on AttributeTypes and ObjectClasses)

Later, when we will support them :
6) MatchingRuleUses (depend on matchingRules and AttributeTypes)
7) DitContentRules (depend on ObjectClasses and AttributeTypes)
8) NameForms (depends on ObjectClasses and AttributeTypes)
9) DitStructureRules (depends onNameForms and DitStructureRules)

If we get one or more errors during this second phase, we will log them.

If the two phases are OK, the Registries is consistent.



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