Versions Compared

Key

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

...

It's a bit more complex. We have to take care of multiple value RDN (RDN like cn=small+sn=test) and also to the existing attributes. The deleteOldRdn flag must also be take into account when dealing with the revert operation.

There are five cases :

Generally speaking, the revert operation may be a simple one or a combinaison of a moddn and a add/delete operation, depending on the case.

There are 14 cases :

  1. The initial RDN is simple, the target RDN is simplewe change the RDN, we don't change the superior and we don't delete the old RDN : This is a rename
  2. we change the RDN, we don't change the superior and we delete the old RDN : This is a rename, with cleaning
  3. we change the RDN, we change the superior and we don't delete the old RDN : This is a move and rename
  4. we change the RDN, we change the superior and we delete the old RDN : This is a move and rename, with cleaning
  5. we don't change the RDN, we change the superior : this is a Move operation

We have also a few extra cases for 1 to 4, depending on the RDN composition (ie, wether it's a simple RDN or a composite RDN)

a.1  The initial RDN is simple, so is the target RDN (oldRdn: A, newRdn: B)

a.2 The initial RDN is simple, and the target RDN is composite, but they have different values (oldRdn: A, newRdn: B+C)

a.3 The initial RDN is simple, and the target RDN is composite, but they have overlaping values (oldRdn: A, newRdn: A+B)

a.4 The initial RDN is composite, and the taret RDN is simple, but they have different values (oldRdn: A+B, newRdn: C)

a.5 The initial RDN is composite, and the taret RDN is simple, but they have overlaping values (oldRdn: A+B, newRdn: A)

a.6 Both RDN are composite, but don't overlap (oldRdn: A+B, newRdn: C+D)

a.7 Both RDN are composite, and they overlap (oldRdn: A+B, newRdn: B+C)

All those special cases applies to each of the rename operation. We can use this algorithjm to handle them :

- Create all the attributes which are present in the newRdn but not in the oldRdn

- Suppress all the attributes which are present in the oldRdn but not in the newRdn if the deleteOldRdn flag is true

To compute the revert operation, we do the opposite :

- remove all the attributes which are present in the newRdn but not in the oldRdn

- create all the attributes which are present in the oldRdn but not in the newRdn (if they are already present, it won't be a problem)

In any case, we don't have to take care of the deleteOldRdn flag to compute the revert operation.

...

  1. oldRDN : We just have to remove the newly added AVA if it's not present into the original entry
  2. The initial RDN is simple, the target RDN is simple, we delete the oldRDN : We have to add the old AVA and to remove the newly added AVA if it's not present into the original entry
  3. The initial RDN is composite, the target is simple, they don't overlap, we don't delete the oldRDN : We just have to remove the newly added AVA if it's not present into the original entry
  4. The initial RDN is composite, the target is simple, they don't overlap, we delete the oldRDN : We have to add the original AVAs, and to remove the newly added AVAs if it's not present into the original entry
  5. The initial RDN is composite, the target is simple, they overlap, we don't delete the oldRDN : Nothing special to do
  6. The initial RDN is composite, the target is simple, they overlap, we delete the oldRDN : We have to add the removed AVAs except the one which is in the new RDN
  7. The initial RDN is simple, the target RDN is composite, they don't overlap, we don't delete the oldRDN : We have to remove all the new AVAs
  8. The initial RDN is simple, the target RDN is composite, they don't overlap, we delete the oldRDN : We have to remove all the new AVAs and to add the old AVA
  9. The initial RDN is simple, the target RDN is composite, they overlap, we don't delete the oldRDN : We have to remove all the new AVAs except the one whgich is in the old RDN
  10. The initial RDN is simple, the target RDN is composite, they overlap, we delete the oldRDN : We have to remove all the new AVAs except the one which is in the old RDN
  11. The initial RDN is composite, the target RDN is composite, they don't overlap, we don't delete the oldRDN : We have to remove all the new AVAs which are not present in the original entry
  12. The initial RDN is composite, the target RDN is composite, they don't overlap, we delete the oldRDN : We have to remove all the new AVAs which are not present in the original entry and add all the removed AVAs from the original entry
  13. The initial RDN is composite, the target RDN is composite, they overlap, we don't delete the oldRDN : We have to remove all the new AVAs which are not present in the original entry.
  14. The initial RDN is composite, the target RDN is composite, they overlap, we delete the oldRDN : We have to remove all the new AVAs which are not present in the original entry and add all the removed AVAs from the original entry
    Case 11 and 13 are equivalent, so are case 12 and 14. They need two operations to be applied.

The following table gives an example for each of those cases applied on the initial entries :

...