On 09/16/2015 01:12 PM, Emmanuel Lécharny wrote:
3) This all not very user-friendly. The modifications that Emmanuel
suggested seem to be a good improvements.
4) We have quirks mode and relaxed mode. I've realized that quicks
mode is for parsing and relaxed mode is for schema processing and
validation. But, do we need to expose both to the API user? Maybe
relaxed mode should imply quirks mode.
I was thinking about something slightly different : a constant that can
take 4 values :
- STRICT_MODE
- QUIRK_MODE
- RELAXED_MODE
- QUIRK_RELAXED_MODE
we can pass that as an argument. OTOH, yes, relaxed might also imply
quick_mode (and to be frank, I prefer 'relaxed' to 'quirk_mode', it's
more explicit).
Yes. I do not like "quirks" either. It can be used inside the API
implementation, but it should not be exposed to API user. I like using
the enumeration instead of boolean. But I would suggest slightly
different names:
- STRICT_MODE
- RELAXED_MODE
- LAX_MODE
Sounds good to me. Should we still have a loadSchema() method that
implies a Strict mode ?
I think this is OK. It probably won't work with anything else than
ApacheDS ... but I like it anyway.
Fully agreed. I *wish* I had time to get this correct the very first
time. I wasn't expecting OpenLDAP or some other LDAP Server to be so
permissive... :/ My bad.
Do not blame yourself. I'm meddling with LDAP for more than 15 years
myself. And I have never suspected this magnitude of schema
inconsistencies either. I guess that the real world always has a bunch
of surprises in store, no matter how experienced you are.
--
Radovan Semancik
Software Architect
evolveum.com