directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre-Arnaud Marcelot ...@marcelot.net>
Subject Re: [AdminPoint] Delete operation
Date Fri, 17 Dec 2010 15:30:15 GMT
Hi Emmanuel,

More inline...

On 17 déc. 2010, at 14:38, Emmanuel Lecharny wrote:

> Here is the description of a Delete operation, and how it's handled by the AdministrativePoint
handler. The parts between >>>--- and ---<<< are pseudo code.
> 
> Deleting an entry is somehow easier, as we don't update anything, except when we delete
a Subentry.
> 
> +--+
> |AP|
> +--+
> We can't delete an AP if it has any child. So deleting an AP is a straightforward operation
: we just remove the AP, and update the AP cache.
> 
> >>>-------------------------------------------
> check that the AP has no children
> 
> if the AP is an AAP
>  then
>    for each role do
>      remove the AP(role) from the AP(role) cache
>    done
>  else
>    remove the AP(role) from the AP(role) cache
> 
> remove the AP from the backend
> -------------------------------------------<<<

100% agreed

> +--------+
> |Subentry|
> +--------+
> Removing a subentry is slightly more complex, as we will have to update the associated
AP SeqNumber, so that the entries part of the subtree can be updated later.
> 
> >>>-------------------------------------------
> get a new seqNumber
> update the parentAP(role) with the new seqNumber
> 
> if the parentAP(role) is an IAP
>  then
>    update the parentAP(role) descendant with the new seqNumber
> 
> remove the subentry from the backend
> -------------------------------------------<<<

I disagree. In the second part of the pseudo code we don't need to check if the parentAP(role)
is an IAP. It also works if it's a SAP.

My version of the pseudo code would be:
>>>-------------------------------------------
get a new seqNumber
update the parentAP(role) with the new seqNumber

for each parentAP IAP descendant
  update IAP with  new seqNumber
done

remove the subentry from the backend
-------------------------------------------<<<

> 
> 
> +-----+
> |Entry|
> +-----+
> 
> Deleting an entry is a straightforward operation. Nothing has to be done
> 
> >>>-------------------------------------------
> continue down the chain
> -------------------------------------------<<<

Agreed.

Regards,
Pierre-Arnaud


> 
> -- 
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
> 


Mime
View raw message