directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <seelm...@apache.org>
Subject Re: [Client API] ModifyDN and Delete operations
Date Sun, 07 Jun 2009 16:13:39 GMT
Hi,

> 
> 
> Emmanuel Lecharny wrote:
>>>    * modifyDn( String entryDn, String newRdn, boolean deleteOldRdn )
>>>    * modifyDn( String entryDn, String newRdn, String newParentDn,
>>> boolean
>>> deleteOldRdn )
>>>    * modifyDn( LdapDN entryDn, Rdn newRDN, boolean deleteOldRDN )
>>>    * modifyDn( LdapDN entry, Rdn newRDN, LdapDN newParentDn, boolean
>>> deleteOldRDN )
>>>    * modifyDn( ModifyDNRequest modDnRequest, ModifyDnListener listener )
>>
>> Sounds good. I'm wondering if offering methods like :
>> rename( LdapDN oldDN, RDN newRdn)
>> move( LdapDN oldDN, LdapDN newDn)
>>
>> would be better or not ?
> same here, and finally thought of going with the 'modifyDn' name as per
> RFC but
> really prefer the move and rename methods.
> what do you say again, should we go for these names? from my side +1.
> Want to hear from others too, who might have used different client
> libraries.

+1

> 
>>
>> Also, I think it's probably better to have the same method without the
>> deleteOldRdn flag (it's not really frequently used, and it can default
>> to true).

Yes, a overload without this flag would be good.

>>
>> Last, not least, accepting String could be cool, but we can extend the
>> API later.
> yeah, the list of overloaded methods for this operation is higher than
> any other
> operation.
>>> Delete operation:
>>>
>>>    * delete( String dn )
>>>    * delete( LdapDN dn )
>>>    * delete( DeleteRequest delRequest, DeleteListener listener )
>>
>> Loks fine to me.
>>
>> What about another method to allow deletion of children ?
>>
>> deleteChildren( String/LdapDN dn) ?

What would be the exact meaning of this method?
- only the immediate children
- recursively all children
- the DN plus recursively all children

But what would be tricky is the implementation:
- Use tree delete control
- try to delete parent first, if error delete children first
- check for children first
- what about following aliases and referrals, could be


Kind Regards,
Stefan


Mime
View raw message