directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <>
Subject Re: [Shared] [Schema API] Why have schemaObject.applyRegistries()
Date Sun, 30 Aug 2009 19:12:03 GMT
Alex Karasulu wrote:
> Can't this object be smart enough to manage itself?
Not really. This is not as simple as it seems toe be.
> I understand we have some String based SchemaObject properties that act as
> references to other functional SchemaObjects which they need access to for
> proper schema operation.  And sometimes we have delayed calls to set the
> Registries reference which is used by these SchemaObjects to resolve the
> String property to the functional SchemaObject they depend on.
> Why not allow the property setters to function in the presence or absence of
> Registries where:
>   (1) if no registries are present they just update the String reference
>   (2) if registries are present they update the String reference and their
> reference to the respective functional SchemaObject
> When the Registries reference is set or reset, the cached functional
> SchemaObjects are updated.  Or just merely delay lookups in the registries
> until the functional SchemaObjects are needed (think we do that now).
> However if the registries are not set and they are needed an
> IllegalStateException can be thrown.
Yo have three possible cases :
- The Registries is not present at first : the object can still be 
filed, and at some point, when the registries is available, we have to 
update the SchemaObject referenced elements.
- The Registries is present, then we can update the real fields on the fly
- Whatever the Registries is present or not at the beginning, we may 
have changed the schema, and need to update the various objects. As we 
are referencing other SO from a SO, we might have to apply the 
Registries again.

The last case is the reason we have this applyRegistries() method.
> Thoughts?

cordialement, regards,
Emmanuel L├ęcharny

View raw message