Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Register the AttributeType into the AttributeTypeRegistry :
update the AttributeTypeRegistry.byOid : add <oid, AttributeType>
for all the attributeType names, plus the oid,
update the AttributeTypeRegistry.byName : add <name, AttributeType>
update the AttributeTypeRegistry.byName : add <oid, AttributeType>
associate the AttributeType with the schema : <schema, set<SchemaObject>> += AttributeType

Modifying an AttributeType

Deleting an AttributeType

the schema : <schema, set<SchemaObject>> += AttributeType
update the Registries.globalOidRegistry : add <oid, AttributeType>

When all the schema modifications will be done, do the additional updates :

update the AttributeType.syntax : SyntaxRegistry.lookup( syntaxOid )
update the AttributeType.equality : MatchingRuleRegistry.lookup( equalityOid )
update the AttributeType.ordering : MatchingRuleRegistry.lookup( orderingOid )
update the AttributeType.substring : MatchingRuleRegistry.lookup( substringOid )
update the AttributeType.sup : AttributeType.lookup( superiorOid )
update the Registries.using map : <AttributeType.oid, set<SchemaObject>> +=
syntax, equality, ordering, substring, superior
update the Registries.usedBy map :
<Syntax.oid, set<SchemaObject>> += AttributeType
<equalityOid, set<SchemaObject>> += AttributeType
<orderingOid, set<SchemaObject>> += AttributeType
<substringOid, set<SchemaObject>> += AttributeType
<superiorOid, set<SchemaObject>> += AttributeType

There are special cases to deal with :

  • if the Syntax is null, then inherit it from the superior, whcih must not be null
  • if the equality is null, and if we have a superior, inherit the equality from it
  • if there is a superior, the Usage must be the same than its superior's
  • if the superior is COLLECTIVE, the it must also be COLLECTIVE
  • if it's COLLECTIVE, then the Usage must be operational

Modifying an AttributeType

We won't create a new object, but will update the existing one. The OID can't be changed

If we have changed one of the MRs, or the S, or the superior AT, when all the schema
modifications will be done, do the additional updates :
update the AttributeType.<MR/S/sup> : <MR/S/AT>Registry.lookup( oid )
update the Registries.using map : <AttributeType.oid, set<SchemaObject>> -= old <MR/S/AT>
update the Registries.using map : <AttributeType.oid, set<SchemzObject>> += new <MR/S/AT>
update the Registries.usedBy map : <old <MR/S/AT>.oid, set<SchemaObject>> -= AttributeType
update the Registries.usedBy map : <new <MR/S/AT>.oid, set<SchemaObject>> += AttributeType

We will also have to check that the modified AT is still valid

Deleting an AttributeType

We can't delete an AttributeType if it's refered by an ObjectClass, or another AttributeType.
This is checked by verifying inthe usedBy table :

if usedBy.get( attributeType.oid ) is not empty, generate an error.

remove the oid from the AttributeTypeRegistry.byOid
for each AttributeType's name,
remove the AttributeType.name from the AttributeTypeRegistry.byName
+ remove the AttributeType.oid from the AttributeTypeRegistry.byName
remove all the names and the oid from the AttributeTypeRegistry.byName
remove the AttributeType from the bySchemaNameSchemaObject map : <schema, set<SchemaObject>> -= AttributeType
remove the AttributeType.oid from the globalOidRegistry : remove <oid, AttributeType>

When all the schema modifications will be done, do the additional updates :

update the Registries.using map : remove the relation <AttributeType.oid, set<SchemaObject>>
update the Registries.usedBy map for each AT/MR/S referenced in the AttributeType :
<<AT/MR/S>.oid, set<SchemaObject>> -= AttributeType

Comparator

Here are the fields stored in a Comparator instance :

...

Otherwise, here are the operations we have to conduct :
remove the MatchingRule.oid from the MatchingRuleRegistry.byOid
for each MatchingRule's name,
remove the MatchingRule.name from the MatchingRuleRegistry.byName
+ remove the MatchingRule.oid from the MatchingRuleRegistry.byName
remove the MatchingRule from the bySchemaNameSchemaObject map : <schema, set<SchemaObject>> -= MatchingRule
remove the Registries.globalOidRegistry : remove <oid, MatchingRule>

When all the schema modifications will be done, do the additional updates :

...

Otherwise, here are the operations we have to conduct :
remove the Syntax.oid from the SyntaxRegistry.byOid
for each Syntax' name,
remove the Syntax.name from the SyntaxRegistry.byName
+ remove the Syntax.oid from the SyntaxRegistry.byName
remove the Syntax from the bySchemaNameSchemaObject map : <schema, set<SchemaObject>> -= Syntax
remove the Registries.globalOidRegistry : remove <oid, Syntax>

When all the schema modifications will be done, do the additional updates :

...