> hello guys,
Hi Kiran,
>
> Here is my take on client-api starting with modify operation
>
> The proposed methods are
>
> blocking operations :-
>
> * ModifyResponse modify( Entry entry, ModificationOperation modOp )
> * ModifyResponse modify( ModifyRequest modRequest )
The modify() operation acts on a DN, and takes a list of modification,
each one of them being applied on an AttributeType.
The API should looks like :
ModifyResponse modify( LdapDN dn, Modification[] modifications );
>
> * ModifyResponse modify( Entry entry, ModificationOperation modOp,
> Control... controls )
> * ModifyResponse modify( ModifyRequest modRequest, Control... controls )
I don't remember if the other operations support the Control
parameter, or if it would be better to inject those controls into the
ModifyRequest.
> The ModifyRequest contains the following methods
>
> * ModifyRequest( LdapDN dn ) - constructor
+1
> * void add( EntryAttribute attr )
> * void add( String attributeName, String... attributeValue )
> * void add( String attributeName, byte[]... attributeValue ) - this is a
> overloaded version with byte[] values, same for
> replace and remove operations
Having such operations (add(), remove() and replace() ) is a good
idea. I'm just wondering what could be the parameters for the
replace() method.
> {same parameters are applied for all 'replace' and 'remove' methods,
> they were not mentioned here for the sake of
> brevity }
>
> requesting your comments
Sounds like a good start.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com