A modification done on an AP may impact the AP hierarchy, and make it
becoming inconsistent. We will check that before updating the seqNulbers.
+--+
|AP|
+--+
We can only add or delete administrative roles from an AP. If a removal
let the AP hierarchy inconsistent, the the removal is rejected. This has
to be pre-checked before we actually apply the modification.
We don't support the replace change for APs
>>>-------------------------------------------
if operation == ADD
then
get a new seqNumber
store the seqNumber in the AP
update the AP cache
if the added AP is an IAP
then
propagate the seqNumber all its descendant IAP
else
if the added AP is an AAP
then
for each existing AP do
remove the AP
update the AP cache
done
else
if we have some subentry associated with the removed AP
then
reject the operation
else
if the deleted AP is an AAP
then
remove the AP
update the AP cache
else
if the deleted role is the last one
then
remove the AP
update the AP cache
else
get a new seqNumber
store the seqNumber in the AP
remove the role
update the AP cache
-------------------------------------------<<<
+--------+
|Subentry|
+--------+
Modifying a subentry is just about modifying the subtreeSpecification AT
or the ObjectClass (adding or removing some auxiliary classes) In both
cases, we have to update the parent AP. If the modification impact any
other attribute, then we don't d anything, as it won't change the
subtree, so no entry will be impacted
>>>-------------------------------------------
if modified attributes = ObjectClass or subtreeSpecification
then
if the modified attribute is ObjectClass
then
get new seqNumber
for each modified role do
get the parentAP( role )
update the parentAP( role ) seqNumber
update the APcache(role)
done
continue down the chain
else
get new seqNumber
for each existing role do
get the parentAP( role )
update the parentAP( role ) seqNumber
update the APcache(role)
done
else
continue down the chain
-------------------------------------------<<<
+-----+
|Entry|
+-----+
We have to check if the entry is up to date, or not. For that, we
compare its seqNumber (if any) with it's parents AP (IAP *and* SAP).
This is basically the same processing than for a search operation
>>>-------------------------------------------
if entry has a parent AP
then take the entry seqNumber (entrySN) and the AP seqNumber (apSN)
else
continue down the chain
if entry has a seqNumber
then
if the entrySN equals the apSN
then
continue down the chain
else
remove the entrySN
remove the entry references to Subentries
store the apSN in the entry
update the references to Subentries
continue down the chain
else
add the apSeqNumber to the entry
update the references to Subentries
continue down the chain
-------------------------------------------<<<
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com