directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1125432 [1/2] - in /directory/shared/trunk: dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/ dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/...
Date Fri, 20 May 2011 15:32:51 GMT
Author: elecharny
Date: Fri May 20 15:32:49 2011
New Revision: 1125432

URL: http://svn.apache.org/viewvc?rev=1125432&view=rev
Log:
Made all the requests setters returning a reference to yhe current isntance, to be able to chain commands (see DIRSHARED-118)

Modified:
    directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/AbstractDsmlMessageDecorator.java
    directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbandonRequestDsml.java
    directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractResultResponseRequestDsml.java
    directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java
    directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/BindRequestDsml.java
    directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/CompareRequestDsml.java
    directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/DelRequestDsml.java
    directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ExtendedRequestDsml.java
    directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyDNRequestDsml.java
    directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyRequestDsml.java
    directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/SearchRequestDsml.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/api/MessageDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/BindRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/CompareRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/DeleteRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SingleReplyRequestDecorator.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonListener.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonableRequest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractAbandonableRequest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractExtendedRequest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractMessage.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/Message.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyDnRequest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyDnRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/SearchRequest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/SearchRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/UnbindRequestImpl.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/AddRequestImplTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/BindRequestImplTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/CompareRequestImplTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/DeleteRequestImplTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/ExtendedRequestImplTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/ExtendedResponseImplTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/ModifyDnRequestImplTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImplTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/SearchResponseDoneImplTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/message/SearchResponseReferenceImplTest.java

Modified: directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/AbstractDsmlMessageDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/AbstractDsmlMessageDecorator.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/AbstractDsmlMessageDecorator.java (original)
+++ directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/AbstractDsmlMessageDecorator.java Fri May 20 15:32:49 2011
@@ -115,7 +115,7 @@ public abstract class AbstractDsmlMessag
     /**
      * {@inheritDoc}
      */
-    public void addControl( Control control ) throws MessageException
+    public Message addControl( Control control ) throws MessageException
     {
         Control decorated;
         DsmlControl<? extends Control> decorator;
@@ -134,28 +134,34 @@ public abstract class AbstractDsmlMessag
         message.addControl( decorated );
         controls.put( control.getOid(), decorator );
         currentControl = decorator;
+        
+        return this;
     }
 
     
     /**
      * {@inheritDoc}
      */
-    public void addAllControls( Control[] controls ) throws MessageException
+    public Message addAllControls( Control[] controls ) throws MessageException
     {
         for ( Control control : controls )
         {
             addControl( control );
         }
+        
+        return this;
     }
 
     
     /**
      * {@inheritDoc}
      */
-    public void removeControl( Control control ) throws MessageException
+    public Message removeControl( Control control ) throws MessageException
     {
         controls.remove( control.getOid() );
         message.removeControl( control );
+        
+        return this;
     }
 
     
@@ -189,9 +195,11 @@ public abstract class AbstractDsmlMessag
     /**
      * {@inheritDoc}
      */
-    public void setMessageId( int messageId )
+    public Message setMessageId( int messageId )
     {
         message.setMessageId( messageId );
+        
+        return this;
     }
 
     

Modified: directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbandonRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbandonRequestDsml.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbandonRequestDsml.java (original)
+++ directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbandonRequestDsml.java Fri May 20 15:32:49 2011
@@ -97,9 +97,11 @@ public class AbandonRequestDsml extends 
      * 
      * @param abandonedMessageId The abandoned messageID to set.
      */
-    public void setAbandonedMessageId( int abandonedMessageId )
+    public AbandonRequest setAbandonedMessageId( int abandonedMessageId )
     {
         getDecorated().setAbandoned( abandonedMessageId );
+        
+        return this;
     }
 
 
@@ -115,8 +117,10 @@ public class AbandonRequestDsml extends 
     /**
      * {@inheritDoc}
      */
-    public void setAbandoned( int requestId )
+    public AbandonRequest setAbandoned( int requestId )
     {
         getDecorated().setAbandoned( requestId );
+        
+        return this;
     }
 }

Modified: directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractResultResponseRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractResultResponseRequestDsml.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractResultResponseRequestDsml.java (original)
+++ directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractResultResponseRequestDsml.java Fri May 20 15:32:49 2011
@@ -164,8 +164,10 @@ public abstract class AbstractResultResp
     /**
      * {@inheritDoc}
      */
-    public void addAbandonListener( AbandonListener listener )
+    public AbandonableRequest addAbandonListener( AbandonListener listener )
     {
         ( ( AbandonableRequest ) getDecorated() ).addAbandonListener( listener );
+        
+        return this;
     }
 }

Modified: directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java (original)
+++ directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java Fri May 20 15:32:49 2011
@@ -22,9 +22,9 @@ package org.apache.directory.shared.dsml
 
 import org.apache.directory.shared.dsmlv2.ParserUtils;
 import org.apache.directory.shared.ldap.codec.api.LdapApiService;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Value;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.message.AddRequest;
@@ -247,25 +247,24 @@ public class AddRequestDsml 
 
 
     /**
-     * Set the added Dn.
-     * 
-     * @param entryDn The entry Dn to set.
+     * {@inheritDoc}
      */
-    public void setEntryDn( Dn entryDn )
+    public AddRequest setEntryDn( Dn entryDn )
     {
         getDecorated().setEntryDn( entryDn );
+        
+        return this;
     }
 
 
     /**
-     * Sets the entry.
-     *
-     * @param entry
-     *      the entry
+     * {@inheritDoc}
      */
-    public void setEntry( Entry entry )
+    public AddRequest setEntry( Entry entry )
     {
         getDecorated().setEntry( entry );
+        
+        return this;
     }
 
 

Modified: directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/BindRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/BindRequestDsml.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/BindRequestDsml.java (original)
+++ directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/BindRequestDsml.java Fri May 20 15:32:49 2011
@@ -118,9 +118,11 @@ public class BindRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setSimple( boolean isSimple )
+    public BindRequest setSimple( boolean isSimple )
     {
         getDecorated().setSimple( isSimple );
+
+        return this;
     }
 
 
@@ -136,18 +138,22 @@ public class BindRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setCredentials( String credentials )
+    public BindRequest setCredentials( String credentials )
     {
         getDecorated().setCredentials( credentials );
+
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void setCredentials( byte[] credentials )
+    public BindRequest setCredentials( byte[] credentials )
     {
         getDecorated().setCredentials( credentials );
+
+        return this;
     }
 
 
@@ -163,9 +169,11 @@ public class BindRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setName( Dn name )
+    public BindRequest setName( Dn name )
     {
         getDecorated().setName( name );
+
+        return this;
     }
 
 
@@ -190,9 +198,11 @@ public class BindRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setVersion3( boolean isVersion3 )
+    public BindRequest setVersion3( boolean isVersion3 )
     {
         getDecorated().setVersion3( isVersion3 );
+
+        return this;
     }
 
 
@@ -208,8 +218,10 @@ public class BindRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setSaslMechanism( String saslMechanism )
+    public BindRequest setSaslMechanism( String saslMechanism )
     {
         getDecorated().setSaslMechanism( saslMechanism );
+
+        return this;
     }
 }

Modified: directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/CompareRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/CompareRequestDsml.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/CompareRequestDsml.java (original)
+++ directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/CompareRequestDsml.java Fri May 20 15:32:49 2011
@@ -115,9 +115,11 @@ public class CompareRequestDsml 
      * 
      * @param entry The entry to set.
      */
-    public void setName( Dn entry )
+    public CompareRequest setName( Dn entry )
     {
         getDecorated().setName( entry );
+        
+        return this;
     }
 
 
@@ -173,18 +175,22 @@ public class CompareRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setAssertionValue( String value )
+    public CompareRequest setAssertionValue( String value )
     {
         getDecorated().setAssertionValue( value );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void setAssertionValue( byte[] value )
+    public CompareRequest setAssertionValue( byte[] value )
     {
         getDecorated().setAssertionValue( value );
+        
+        return this;
     }
 
 
@@ -200,9 +206,11 @@ public class CompareRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setAttributeId( String attrId )
+    public CompareRequest setAttributeId( String attrId )
     {
         getDecorated().setAttributeId( attrId );
+        
+        return this;
     }
 
 

Modified: directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/DelRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/DelRequestDsml.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/DelRequestDsml.java (original)
+++ directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/DelRequestDsml.java Fri May 20 15:32:49 2011
@@ -128,8 +128,10 @@ public class DelRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setName( Dn name )
+    public DeleteRequest setName( Dn name )
     {
         getDecorated().setName( name );
+    
+        return this;
     }
 }

Modified: directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ExtendedRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ExtendedRequestDsml.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ExtendedRequestDsml.java (original)
+++ directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ExtendedRequestDsml.java Fri May 20 15:32:49 2011
@@ -149,8 +149,10 @@ public class ExtendedRequestDsml<Q exten
     /**
      * {@inheritDoc}
      */
-    public void setRequestName( String oid )
+    public ExtendedRequest<P> setRequestName( String oid )
     {
         getDecorated().setRequestName( oid );
+        
+        return this;
     }
 }

Modified: directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyDNRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyDNRequestDsml.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyDNRequestDsml.java (original)
+++ directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyDNRequestDsml.java Fri May 20 15:32:49 2011
@@ -185,9 +185,11 @@ public class ModifyDNRequestDsml 
      * 
      * @param newSuperior The newSuperior to set.
      */
-    public void setNewSuperior( Dn newSuperior )
+    public ModifyDnRequest setNewSuperior( Dn newSuperior )
     {
         getDecorated().setNewSuperior( newSuperior );
+        
+        return this;
     }
 
 
@@ -203,9 +205,11 @@ public class ModifyDNRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setName( Dn name )
+    public ModifyDnRequest setName( Dn name )
     {
         getDecorated().setName( name );
+        
+        return this;
     }
 
 
@@ -221,9 +225,11 @@ public class ModifyDNRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setNewRdn( Rdn newRdn )
+    public ModifyDnRequest setNewRdn( Rdn newRdn )
     {
         getDecorated().setNewRdn( newRdn );
+        
+        return this;
     }
 
 
@@ -239,9 +245,11 @@ public class ModifyDNRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setDeleteOldRdn( boolean deleteOldRdn )
+    public ModifyDnRequest setDeleteOldRdn( boolean deleteOldRdn )
     {
         getDecorated().setDeleteOldRdn( deleteOldRdn );
+        
+        return this;
     }
 
 

Modified: directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyRequestDsml.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyRequestDsml.java (original)
+++ directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyRequestDsml.java Fri May 20 15:32:49 2011
@@ -231,9 +231,11 @@ public class ModifyRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setName( Dn name )
+    public ModifyRequest setName( Dn name )
     {
         getDecorated().setName( name );
+        
+        return this;
     }
 
 
@@ -249,116 +251,142 @@ public class ModifyRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void addModification( Modification mod )
+    public ModifyRequest addModification( Modification mod )
     {
         getDecorated().addModification( mod );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void removeModification( Modification mod )
+    public ModifyRequest removeModification( Modification mod )
     {
         getDecorated().removeModification( mod );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void remove( String attributeName, String... attributeValue )
+    public ModifyRequest remove( String attributeName, String... attributeValue )
     {
         getDecorated().remove( attributeName, attributeValue );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void remove( String attributeName, byte[]... attributeValue )
+    public ModifyRequest remove( String attributeName, byte[]... attributeValue )
     {
         getDecorated().remove( attributeName, attributeValue );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void remove( Attribute attr )
+    public ModifyRequest remove( Attribute attr )
     {
         getDecorated().remove( attr );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void addModification( Attribute attr, ModificationOperation modOp )
+    public ModifyRequest addModification( Attribute attr, ModificationOperation modOp )
     {
         getDecorated().addModification( attr, modOp );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void add( String attributeName, String... attributeValue )
+    public ModifyRequest add( String attributeName, String... attributeValue )
     {
         getDecorated().add( attributeName, attributeValue );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void add( String attributeName, byte[]... attributeValue )
+    public ModifyRequest add( String attributeName, byte[]... attributeValue )
     {
         getDecorated().add( attributeName, attributeValue );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void add( Attribute attr )
+    public ModifyRequest add( Attribute attr )
     {
         getDecorated().add( attr );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void replace( String attributeName )
+    public ModifyRequest replace( String attributeName )
     {
         getDecorated().replace( attributeName );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void replace( String attributeName, String... attributeValue )
+    public ModifyRequest replace( String attributeName, String... attributeValue )
     {
         getDecorated().replace( attributeName, attributeValue );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void replace( String attributeName, byte[]... attributeValue )
+    public ModifyRequest replace( String attributeName, byte[]... attributeValue )
     {
         getDecorated().replace( attributeName, attributeValue );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void replace( Attribute attr )
+    public ModifyRequest replace( Attribute attr )
     {
         getDecorated().replace( attr );
+        
+        return this;
     }
 }

Modified: directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/SearchRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/SearchRequestDsml.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/SearchRequestDsml.java (original)
+++ directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/SearchRequestDsml.java Fri May 20 15:32:49 2011
@@ -21,7 +21,7 @@ package org.apache.directory.shared.dsml
 
 
 import java.util.ArrayList;
-import java.util.List; 
+import java.util.List;
 
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.dsmlv2.ParserUtils;
@@ -635,9 +635,11 @@ public class SearchRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setBase( Dn baseDn )
+    public SearchRequest setBase( Dn baseDn )
     {
         getDecorated().setBase( baseDn );
+        
+        return this;
     }
 
 
@@ -653,9 +655,11 @@ public class SearchRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setScope( SearchScope scope )
+    public SearchRequest setScope( SearchScope scope )
     {
         getDecorated().setScope( scope );
+        
+        return this;
     }
 
 
@@ -671,9 +675,11 @@ public class SearchRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setDerefAliases( AliasDerefMode aliasDerefAliases )
+    public SearchRequest setDerefAliases( AliasDerefMode aliasDerefAliases )
     {
         getDecorated().setDerefAliases( aliasDerefAliases );
+        
+        return this;
     }
 
 
@@ -689,9 +695,11 @@ public class SearchRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setSizeLimit( long entriesMax )
+    public SearchRequest setSizeLimit( long entriesMax )
     {
         getDecorated().setSizeLimit( entriesMax );
+        
+        return this;
     }
 
 
@@ -707,9 +715,11 @@ public class SearchRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setTimeLimit( int secondsMax )
+    public SearchRequest setTimeLimit( int secondsMax )
     {
         getDecorated().setTimeLimit( secondsMax );
+        
+        return this;
     }
 
 
@@ -725,9 +735,11 @@ public class SearchRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setTypesOnly( boolean typesOnly )
+    public SearchRequest setTypesOnly( boolean typesOnly )
     {
         getDecorated().setTypesOnly( typesOnly );
+        
+        return this;
     }
 
 
@@ -743,18 +755,22 @@ public class SearchRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void setFilter( ExprNode filter )
+    public SearchRequest setFilter( ExprNode filter )
     {
         getDecorated().setFilter( filter );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void setFilter( String filter ) throws LdapException
+    public SearchRequest setFilter( String filter ) throws LdapException
     {
         getDecorated().setFilter( filter );
+        
+        return this;
     }
 
 
@@ -770,17 +786,21 @@ public class SearchRequestDsml 
     /**
      * {@inheritDoc}
      */
-    public void addAttributes( String... attributes )
+    public SearchRequest addAttributes( String... attributes )
     {
         getDecorated().addAttributes( attributes );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void removeAttribute( String attribute )
+    public SearchRequest removeAttribute( String attribute )
     {
         getDecorated().removeAttribute( attribute );
+        
+        return this;
     }
 }

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedRequestDecorator.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedRequestDecorator.java Fri May 20 15:32:49 2011
@@ -119,9 +119,11 @@ public class ExtendedRequestDecorator<Q 
     /**
      * {@inheritDoc}
      */
-    public void setRequestName( String oid )
+    public ExtendedRequest<P> setRequestName( String oid )
     {
         getDecorated().setRequestName( oid );
+        
+        return this;
     }
 
 

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/api/MessageDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/api/MessageDecorator.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/api/MessageDecorator.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/api/MessageDecorator.java Fri May 20 15:32:49 2011
@@ -312,7 +312,7 @@ public abstract class MessageDecorator<E
      * {@inheritDoc}
      */
     @SuppressWarnings("unchecked")
-    public void addControl( Control control ) throws MessageException
+    public Message addControl( Control control ) throws MessageException
     {
         Control decorated;
         CodecControl<? extends Control> controlDecorator;
@@ -331,28 +331,34 @@ public abstract class MessageDecorator<E
         decoratedMessage.addControl( decorated );
         controls.put( control.getOid(), controlDecorator );
         currentControl = controlDecorator;
+
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void addAllControls( Control[] controls ) throws MessageException
+    public Message addAllControls( Control[] controls ) throws MessageException
     {
         for ( Control control : controls )
         {
             addControl( control );
         }
+
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void removeControl( Control control ) throws MessageException
+    public Message removeControl( Control control ) throws MessageException
     {
         decoratedMessage.removeControl( control );
         controls.remove( control.getOid() );
+
+        return this;
     }
 
 
@@ -386,9 +392,11 @@ public abstract class MessageDecorator<E
     /**
      * {@inheritDoc}
      */
-    public void setMessageId( int messageId )
+    public Message setMessageId( int messageId )
     {
         decoratedMessage.setMessageId( messageId );
+        
+        return this;
     }
 
 

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonRequestDecorator.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonRequestDecorator.java Fri May 20 15:32:49 2011
@@ -67,9 +67,11 @@ public final class AbandonRequestDecorat
     /**
      * {@inheritDoc}
      */
-    public void setAbandoned( int requestId )
+    public AbandonRequest setAbandoned( int requestId )
     {
         getDecorated().setAbandoned( requestId );
+        
+        return this;
     }
 
     

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableRequestDecorator.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableRequestDecorator.java Fri May 20 15:32:49 2011
@@ -78,8 +78,10 @@ public abstract class AbandonableRequest
     /**
      * {@inheritDoc}
      */
-    public void addAbandonListener( AbandonListener listener )
+    public AbandonableRequest addAbandonListener( AbandonListener listener )
     {
         getAbandonableRequest().addAbandonListener( listener );
+        
+        return this;
     }
 }

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java Fri May 20 15:32:49 2011
@@ -31,9 +31,9 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.api.LdapApiService;
 import org.apache.directory.shared.ldap.codec.api.LdapConstants;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Value;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.message.AddRequest;
@@ -168,9 +168,11 @@ public final class AddRequestDecorator e
     /**
      * {@inheritDoc}
      */
-    public void setEntryDn( Dn entry )
+    public AddRequest setEntryDn( Dn entry )
     {
         getDecorated().setEntryDn( entry );
+        
+        return this;
     }
 
 
@@ -186,9 +188,11 @@ public final class AddRequestDecorator e
     /**
      * {@inheritDoc}
      */
-    public void setEntry( Entry entry )
+    public AddRequest setEntry( Entry entry )
     {
         getDecorated().setEntry( entry );
+        
+        return this;
     }
 
     

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/BindRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/BindRequestDecorator.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/BindRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/BindRequestDecorator.java Fri May 20 15:32:49 2011
@@ -147,9 +147,11 @@ public class BindRequestDecorator extend
     /**
      * {@inheritDoc}
      */
-    public void setSimple( boolean isSimple )
+    public BindRequest setSimple( boolean isSimple )
     {
         getDecorated().setSimple( isSimple );
+        
+        return this;
     }
 
 
@@ -165,18 +167,22 @@ public class BindRequestDecorator extend
     /**
      * {@inheritDoc}
      */
-    public void setCredentials( String credentials )
+    public BindRequest setCredentials( String credentials )
     {
         getDecorated().setCredentials( credentials );
+
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void setCredentials( byte[] credentials )
+    public BindRequest setCredentials( byte[] credentials )
     {
         getDecorated().setCredentials( credentials );
+
+        return this;
     }
 
 
@@ -192,9 +198,11 @@ public class BindRequestDecorator extend
     /**
      * {@inheritDoc}
      */
-    public void setName( Dn name )
+    public BindRequest setName( Dn name )
     {
         getDecorated().setName( name );
+
+        return this;
     }
 
 
@@ -219,9 +227,11 @@ public class BindRequestDecorator extend
     /**
      * {@inheritDoc}
      */
-    public void setVersion3( boolean isVersion3 )
+    public BindRequest setVersion3( boolean isVersion3 )
     {
         getDecorated().setVersion3( isVersion3 );
+
+        return this;
     }
 
 
@@ -237,9 +247,11 @@ public class BindRequestDecorator extend
     /**
      * {@inheritDoc}
      */
-    public void setSaslMechanism( String saslMechanism )
+    public BindRequest setSaslMechanism( String saslMechanism )
     {
         getDecorated().setSaslMechanism( saslMechanism );
+        
+        return this;
     }
 
 

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/CompareRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/CompareRequestDecorator.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/CompareRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/CompareRequestDecorator.java Fri May 20 15:32:49 2011
@@ -168,9 +168,11 @@ public class CompareRequestDecorator ext
     /**
      * {@inheritDoc}
      */
-    public void setName( Dn name )
+    public CompareRequest setName( Dn name )
     {
         getDecorated().setName( name );
+        
+        return this;
     }
 
 
@@ -186,18 +188,22 @@ public class CompareRequestDecorator ext
     /**
      * {@inheritDoc}
      */
-    public void setAssertionValue( String value )
+    public CompareRequest setAssertionValue( String value )
     {
         getDecorated().setAssertionValue( value );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void setAssertionValue( byte[] value )
+    public CompareRequest setAssertionValue( byte[] value )
     {
         getDecorated().setAssertionValue( value );
+        
+        return this;
     }
 
 
@@ -213,9 +219,11 @@ public class CompareRequestDecorator ext
     /**
      * {@inheritDoc}
      */
-    public void setAttributeId( String attrId )
+    public CompareRequest setAttributeId( String attrId )
     {
         getDecorated().setAttributeId( attrId );
+        
+        return this;
     }
 
     

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/DeleteRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/DeleteRequestDecorator.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/DeleteRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/DeleteRequestDecorator.java Fri May 20 15:32:49 2011
@@ -69,9 +69,11 @@ public class DeleteRequestDecorator exte
     /**
      * {@inheritDoc}
      */
-    public void setName( Dn name )
+    public DeleteRequest setName( Dn name )
     {
         getDecorated().setName( name );
+        
+        return this;
     }
 
     

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnRequestDecorator.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnRequestDecorator.java Fri May 20 15:32:49 2011
@@ -95,9 +95,11 @@ public class ModifyDnRequestDecorator ex
     /**
      * {@inheritDoc}
      */
-    public void setName( Dn name )
+    public ModifyDnRequest setName( Dn name )
     {
         getDecorated().setName( name );
+        
+        return this;
     }
 
 
@@ -113,9 +115,11 @@ public class ModifyDnRequestDecorator ex
     /**
      * {@inheritDoc}
      */
-    public void setNewRdn( Rdn newRdn )
+    public ModifyDnRequest setNewRdn( Rdn newRdn )
     {
         getDecorated().setNewRdn( newRdn );
+        
+        return this;
     }
 
 
@@ -131,9 +135,11 @@ public class ModifyDnRequestDecorator ex
     /**
      * {@inheritDoc}
      */
-    public void setDeleteOldRdn( boolean deleteOldRdn )
+    public ModifyDnRequest setDeleteOldRdn( boolean deleteOldRdn )
     {
         getDecorated().setDeleteOldRdn( deleteOldRdn );
+        
+        return this;
     }
 
 
@@ -149,9 +155,11 @@ public class ModifyDnRequestDecorator ex
     /**
      * {@inheritDoc}
      */
-    public void setNewSuperior( Dn newSuperior )
+    public ModifyDnRequest setNewSuperior( Dn newSuperior )
     {
         getDecorated().setNewSuperior( newSuperior );
+        
+        return this;
     }
 
 

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyRequestDecorator.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyRequestDecorator.java Fri May 20 15:32:49 2011
@@ -33,9 +33,9 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.api.LdapApiService;
 import org.apache.directory.shared.ldap.codec.api.LdapConstants;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
-import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
@@ -249,9 +249,11 @@ public class ModifyRequestDecorator exte
     /**
      * {@inheritDoc}
      */
-    public void setName( Dn name )
+    public ModifyRequest setName( Dn name )
     {
         getDecorated().setName( name );
+        
+        return this;
     }
 
 
@@ -267,117 +269,143 @@ public class ModifyRequestDecorator exte
     /**
      * {@inheritDoc}
      */
-    public void addModification( Modification mod )
+    public ModifyRequest addModification( Modification mod )
     {
         getDecorated().addModification( mod );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void removeModification( Modification mod )
+    public ModifyRequest removeModification( Modification mod )
     {
         getDecorated().removeModification( mod );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void remove( String attributeName, String... attributeValue )
+    public ModifyRequest remove( String attributeName, String... attributeValue )
     {
         getDecorated().remove( attributeName, attributeValue );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void remove( String attributeName, byte[]... attributeValue )
+    public ModifyRequest remove( String attributeName, byte[]... attributeValue )
     {
         getDecorated().remove( attributeName, attributeValue );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void remove( Attribute attr )
+    public ModifyRequest remove( Attribute attr )
     {
         getDecorated().remove( attr );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void addModification( Attribute attr, ModificationOperation modOp )
+    public ModifyRequest addModification( Attribute attr, ModificationOperation modOp )
     {
         getDecorated().addModification( attr, modOp );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void add( String attributeName, String... attributeValue )
+    public ModifyRequest add( String attributeName, String... attributeValue )
     {
         getDecorated().add( attributeName, attributeValue );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void add( String attributeName, byte[]... attributeValue )
+    public ModifyRequest add( String attributeName, byte[]... attributeValue )
     {
         getDecorated().add( attributeName, attributeValue );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void add( Attribute attr )
+    public ModifyRequest add( Attribute attr )
     {
         getDecorated().add( attr );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void replace( String attributeName )
+    public ModifyRequest replace( String attributeName )
     {
         getDecorated().replace( attributeName );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void replace( String attributeName, String... attributeValue )
+    public ModifyRequest replace( String attributeName, String... attributeValue )
     {
         getDecorated().replace( attributeName, attributeValue );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void replace( String attributeName, byte[]... attributeValue )
+    public ModifyRequest replace( String attributeName, byte[]... attributeValue )
     {
         getDecorated().replace( attributeName, attributeValue );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void replace( Attribute attr )
+    public ModifyRequest replace( Attribute attr )
     {
         getDecorated().replace( attr );
+        
+        return this;
     }
 
 

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchRequestDecorator.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchRequestDecorator.java Fri May 20 15:32:49 2011
@@ -211,19 +211,23 @@ public class SearchRequestDecorator exte
     /**
      * {@inheritDoc}
      */
-    public void setFilter( ExprNode filter )
+    public SearchRequest setFilter( ExprNode filter )
     {
         topFilter = transform( filter );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void setFilter( String filter ) throws LdapException
+    public SearchRequest setFilter( String filter ) throws LdapException
     {
         getDecorated().setFilter( filter );
         this.currentFilter = transform( getDecorated().getFilter() );
+        
+        return this;
     }
 
 
@@ -752,9 +756,11 @@ public class SearchRequestDecorator exte
     /**
      * {@inheritDoc}
      */
-    public void setBase( Dn baseDn )
+    public SearchRequest setBase( Dn baseDn )
     {
         getDecorated().setBase( baseDn );
+        
+        return this;
     }
 
 
@@ -770,9 +776,11 @@ public class SearchRequestDecorator exte
     /**
      * {@inheritDoc}
      */
-    public void setScope( SearchScope scope )
+    public SearchRequest setScope( SearchScope scope )
     {
         getDecorated().setScope( scope );
+        
+        return this;
     }
 
 
@@ -788,9 +796,11 @@ public class SearchRequestDecorator exte
     /**
      * {@inheritDoc}
      */
-    public void setDerefAliases( AliasDerefMode aliasDerefAliases )
+    public SearchRequest setDerefAliases( AliasDerefMode aliasDerefAliases )
     {
         getDecorated().setDerefAliases( aliasDerefAliases );
+        
+        return this;
     }
 
 
@@ -806,9 +816,11 @@ public class SearchRequestDecorator exte
     /**
      * {@inheritDoc}
      */
-    public void setSizeLimit( long entriesMax )
+    public SearchRequest setSizeLimit( long entriesMax )
     {
         getDecorated().setSizeLimit( entriesMax );
+        
+        return this;
     }
 
 
@@ -824,9 +836,11 @@ public class SearchRequestDecorator exte
     /**
      * {@inheritDoc}
      */
-    public void setTimeLimit( int secondsMax )
+    public SearchRequest setTimeLimit( int secondsMax )
     {
         getDecorated().setTimeLimit( secondsMax );
+        
+        return this;
     }
 
 
@@ -842,9 +856,11 @@ public class SearchRequestDecorator exte
     /**
      * {@inheritDoc}
      */
-    public void setTypesOnly( boolean typesOnly )
+    public SearchRequest setTypesOnly( boolean typesOnly )
     {
         getDecorated().setTypesOnly( typesOnly );
+        
+        return this;
     }
 
 
@@ -869,18 +885,22 @@ public class SearchRequestDecorator exte
     /**
      * {@inheritDoc}
      */
-    public void addAttributes( String... attributes )
+    public SearchRequest addAttributes( String... attributes )
     {
         getDecorated().addAttributes( attributes );
+        
+        return this;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void removeAttribute( String attribute )
+    public SearchRequest removeAttribute( String attribute )
     {
         getDecorated().removeAttribute( attribute );
+        
+        return this;
     }
 
 
@@ -1059,8 +1079,10 @@ public class SearchRequestDecorator exte
     }
 
 
-    public void addAbandonListener( AbandonListener listener )
+    public SearchRequest addAbandonListener( AbandonListener listener )
     {
         getDecorated().addAbandonListener( listener );
+        
+        return this;
     }
 }

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SingleReplyRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SingleReplyRequestDecorator.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SingleReplyRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SingleReplyRequestDecorator.java Fri May 20 15:32:49 2011
@@ -68,8 +68,10 @@ public abstract class SingleReplyRequest
     }
 
 
-    public void addAbandonListener( AbandonListener listener )
+    public AbandonableRequest addAbandonListener( AbandonListener listener )
     {
         ( ( AbandonableRequest ) getDecorated() ).addAbandonListener( listener );
+        
+        return this;
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonListener.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonListener.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonListener.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonListener.java Fri May 20 15:32:49 2011
@@ -31,8 +31,7 @@ public interface AbandonListener
     /**
      * Notifies that a request has been abandoned.
      * 
-     * @param req
-     *            the request which is abandoned.
+     * @param req the request which is abandoned.
      */
     void requestAbandoned( AbandonableRequest req );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequest.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequest.java Fri May 20 15:32:49 2011
@@ -44,6 +44,7 @@ public interface AbandonRequest extends 
      * Sets the id of the request operation to terminate.
      * 
      * @param requestId the sequence id of the request message to abandon
+     * @return The AbandonRequest instance
      */
-    void setAbandoned( int requestId );
+    AbandonRequest setAbandoned( int requestId );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequestImpl.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonRequestImpl.java Fri May 20 15:32:49 2011
@@ -66,13 +66,13 @@ public class AbandonRequestImpl extends 
 
 
     /**
-     * Sets the id of the request operation to terminate.
-     * 
-     * @param abandonId the sequence id of the request message to abandon
+     * {@inheritDoc}
      */
-    public void setAbandoned( int abandonId )
+    public AbandonRequest setAbandoned( int abandonId )
     {
         this.abandonId = abandonId;
+        
+        return this;
     }
 
 
@@ -84,8 +84,19 @@ public class AbandonRequestImpl extends 
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_04185 ) );
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public AbandonRequest setMessageId( int messageId )
+    {
+        super.setMessageId( messageId );
+        
+        return this;
+    }
 
-
+    
     /**
      * Checks for equality first by asking the super method which should compare
      * all but the Abandoned request's Id. It then compares this to determine

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonableRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonableRequest.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonableRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbandonableRequest.java Fri May 20 15:32:49 2011
@@ -45,8 +45,8 @@ public interface AbandonableRequest exte
     /**
      * Adds listener to be notified if this request gets abandoned.
      * 
-     * @param listener
-     *            to be notified if this request gets abandoned.
+     * @param listener to be notified if this request gets abandoned.
+     * @return An AbandonableRequest reference
      */
-    void addAbandonListener( AbandonListener listener );
+    AbandonableRequest addAbandonListener( AbandonListener listener );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractAbandonableRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractAbandonableRequest.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractAbandonableRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractAbandonableRequest.java Fri May 20 15:32:49 2011
@@ -78,7 +78,10 @@ public class AbstractAbandonableRequest 
     }
 
 
-    public void addAbandonListener( final AbandonListener listener )
+    /**
+     * {@inheritDoc}
+     */
+    public AbandonableRequest addAbandonListener( final AbandonListener listener )
     {
         if ( o == null )
         {
@@ -92,6 +95,8 @@ public class AbstractAbandonableRequest 
                 listener.requestAbandoned( AbstractAbandonableRequest.this );
             }
         } );
+        
+        return this;
     }
 
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractExtendedRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractExtendedRequest.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractExtendedRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractExtendedRequest.java Fri May 20 15:32:49 2011
@@ -80,9 +80,11 @@ public abstract class AbstractExtendedRe
      * 
      * @param newOid the dotted-decimal representation as a String of the OID
      */
-    public void setRequestName( String newOid )
+    public ExtendedRequest<R> setRequestName( String newOid )
     {
         this.oid = newOid;
+        
+        return this;
     }
 
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractMessage.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractMessage.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractMessage.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractMessage.java Fri May 20 15:32:49 2011
@@ -78,9 +78,14 @@ public abstract class AbstractMessage im
     }
 
 
-    public void setMessageId( int id )
+    /**
+     * {@inheritDoc}
+     */
+    public Message setMessageId( int id )
     {
         this.id = id;
+        
+        return this;
     }
 
 
@@ -114,9 +119,11 @@ public abstract class AbstractMessage im
     /**
      * {@inheritDoc}
      */
-    public void addControl( Control control ) throws MessageException
+    public Message addControl( Control control ) throws MessageException
     {
         controls.put( control.getOid(), control );
+        
+        return this;
     }
 
 
@@ -127,9 +134,11 @@ public abstract class AbstractMessage im
      * @throws MessageException if controls cannot be added to this Message or the control is
      *             not known etc.
      */
-    public void removeControl( Control control ) throws MessageException
+    public Message removeControl( Control control ) throws MessageException
     {
         controls.remove( control.getOid() );
+        
+        return this;
     }
 
 
@@ -250,12 +259,14 @@ public abstract class AbstractMessage im
     /**
      * {@inheritDoc}
      */
-    public void addAllControls( Control[] controls ) throws MessageException
+    public Message addAllControls( Control[] controls ) throws MessageException
     {
         for ( Control c : controls )
         {
             this.controls.put( c.getOid(), c );
         }
+        
+        return this;
     }
 
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequest.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequest.java Fri May 20 15:32:49 2011
@@ -51,8 +51,9 @@ public interface AddRequest extends Sing
      * Sets the distinguished name of the entry to add.
      * 
      * @param entry the Dn of the added entry.
+     * @return The AddRequest instance
      */
-    void setEntryDn( Dn entry );
+    AddRequest setEntryDn( Dn entry );
 
 
     /**
@@ -67,6 +68,7 @@ public interface AddRequest extends Sing
      * Sets the Entry to add.
      * 
      * @param entry the added Entry
+     * @return The AddRequest instance
      */
-    void setEntry( Entry entry );
+    AddRequest setEntry( Entry entry );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java Fri May 20 15:32:49 2011
@@ -141,20 +141,18 @@ public class AddRequestImpl extends Abst
 
 
     /**
-     * Sets the distinguished name of the entry to add.
-     * 
-     * @param dn the Dn of the added entry.
+     * {@inheritDoc}
      */
-    public void setEntryDn( Dn dn )
+    public AddRequest setEntryDn( Dn dn )
     {
         entry.setDn( dn );
+        
+        return this;
     }
 
 
     /**
-     * Gets the entry to add.
-     * 
-     * @return the added Entry
+     * {@inheritDoc}
      */
     public Entry getEntry()
     {
@@ -163,16 +161,27 @@ public class AddRequestImpl extends Abst
 
 
     /**
-     * Sets the Entry to add.
-     * 
-     * @param entry the added Entry
+     * {@inheritDoc}
      */
-    public void setEntry( Entry entry )
+    public AddRequest setEntry( Entry entry )
     {
         this.entry = entry;
+        
+        return this;
     }
     
     
+    /**
+     * {@inheritDoc}
+     */
+    public AddRequest setMessageId( int messageId )
+    {
+        super.setMessageId( messageId );
+        
+        return this;
+    }
+
+    
     // ------------------------------------------------------------------------
     // SingleReplyRequest Interface Method Implementations
     // ------------------------------------------------------------------------

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequest.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequest.java Fri May 20 15:32:49 2011
@@ -61,8 +61,9 @@ public interface BindRequest extends Sin
      * authentication.
      * 
      * @param isSimple true if authentication is simple, false otherwise.
+     * @return The BindRequest instance
      */
-    void setSimple( boolean isSimple );
+    BindRequest setSimple( boolean isSimple );
 
 
     /**
@@ -79,8 +80,9 @@ public interface BindRequest extends Sin
      * attempt. Ignored if this request uses SASL authentication mechanisms.
      * 
      * @param credentials the credentials if authentication is simple
+     * @return The BindRequest instance
      */
-    void setCredentials( String credentials );
+    BindRequest setCredentials( String credentials );
 
 
     /**
@@ -88,8 +90,9 @@ public interface BindRequest extends Sin
      * attempt. Ignored if this request uses SASL authentication mechanisms.
      * 
      * @param credentials the credentials if authentication is simple
+     * @return The BindRequest instance
      */
-    void setCredentials( byte[] credentials );
+    BindRequest setCredentials( byte[] credentials );
 
 
     /**
@@ -112,8 +115,9 @@ public interface BindRequest extends Sin
      * mechanism that includes the Dn in the credentials.
      * 
      * @param name the Dn of the authenticating user - leave null for annonymous user.
+     * @return The BindRequest instance
      */
-    void setName( Dn name );
+    BindRequest setName( Dn name );
 
 
     /**
@@ -155,8 +159,9 @@ public interface BindRequest extends Sin
      * 
      * @param isVersion3 if true the client will be exhibiting version 3 bind behavior,
      *  If false is used version 2 behavior will be exhibited.
+     * @return The BindRequest instance
      */
-    void setVersion3( boolean isVersion3 );
+    BindRequest setVersion3( boolean isVersion3 );
 
 
     /**
@@ -173,6 +178,7 @@ public interface BindRequest extends Sin
      * bind operation is using SASL.
      * 
      * @param saslMechanism the SASL mechanism
+     * @return The BindRequest instance
      */
-    void setSaslMechanism( String saslMechanism );
+    BindRequest setSaslMechanism( String saslMechanism );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequestImpl.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequestImpl.java Fri May 20 15:32:49 2011
@@ -98,9 +98,11 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
-    public void setSimple( boolean simple )
+    public BindRequest setSimple( boolean simple )
     {
         this.isSimple = simple;
+        
+        return this;
     }
 
 
@@ -116,16 +118,16 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
-    public void setCredentials( String credentials )
+    public BindRequest setCredentials( String credentials )
     {
-        setCredentials( Strings.getBytesUtf8(credentials) );
+        return setCredentials( Strings.getBytesUtf8(credentials) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void setCredentials( byte[] credentials )
+    public BindRequest setCredentials( byte[] credentials )
     {
         if ( credentials != null )
         {
@@ -151,6 +153,8 @@ public class BindRequestImpl extends Abs
         {
             hCredentials = 0;
         }
+        
+        return this;
     }
 
 
@@ -166,10 +170,12 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
-    public void setSaslMechanism( String saslMechanism )
+    public BindRequest setSaslMechanism( String saslMechanism )
     {
         this.isSimple = false;
         this.mechanism = saslMechanism;
+        
+        return this;
     }
 
 
@@ -185,9 +191,11 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
-    public void setName( Dn name )
+    public BindRequest setName( Dn name )
     {
         this.name = name;
+        
+        return this;
     }
 
 
@@ -212,9 +220,22 @@ public class BindRequestImpl extends Abs
     /**
      * {@inheritDoc}
      */
-    public void setVersion3( boolean version3 )
+    public BindRequest setVersion3( boolean version3 )
     {
         this.isVersion3 = version3;
+        
+        return this;
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public BindRequest setMessageId( int messageId )
+    {
+        super.setMessageId( messageId );
+        
+        return this;
     }
 
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequest.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequest.java Fri May 20 15:32:49 2011
@@ -52,8 +52,9 @@ public interface CompareRequest extends 
      * attribute value assertion.
      * 
      * @param name the Dn of the compared entry.
+     * @return The CompareRequest instance
      */
-    void setName( Dn name );
+    CompareRequest setName( Dn name );
 
 
     /**
@@ -68,16 +69,18 @@ public interface CompareRequest extends 
      * Sets the attribute value to use in the comparison.
      * 
      * @param value the attribute value used in comparison.
+     * @return The CompareRequest instance
      */
-    void setAssertionValue( String value );
+    CompareRequest setAssertionValue( String value );
 
 
     /**
      * Sets the attribute value to use in the comparison.
      * 
      * @param value the attribute value used in comparison.
+     * @return The CompareRequest instance
      */
-    void setAssertionValue( byte[] value );
+    CompareRequest setAssertionValue( byte[] value );
 
 
     /**
@@ -92,6 +95,7 @@ public interface CompareRequest extends 
      * Sets the attribute id used in the comparison.
      * 
      * @param attrId the attribute id used in comparison.
+     * @return The CompareRequest instance
      */
-    void setAttributeId( String attrId );
+    CompareRequest setAttributeId( String attrId );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequestImpl.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequestImpl.java Fri May 20 15:32:49 2011
@@ -79,14 +79,13 @@ public class CompareRequestImpl extends 
 
 
     /**
-     * Sets the distinguished name of the entry to be compared using the
-     * attribute value assertion.
-     * 
-     * @param name the Dn of the compared entry.
+     * {@inheritDoc}
      */
-    public void setName( Dn name )
+    public CompareRequest setName( Dn name )
     {
         this.name = name;
+        
+        return this;
     }
 
 
@@ -102,22 +101,20 @@ public class CompareRequestImpl extends 
 
 
     /**
-     * Sets the attribute value to use in the comparison.
-     * 
-     * @param value the attribute value used in comparison.
+     * {@inheritDoc}
      */
-    public void setAssertionValue( String value )
+    public CompareRequest setAssertionValue( String value )
     {
         this.attrVal = new StringValue( value );
+        
+        return this;
     }
 
 
     /**
-     * Sets the attribute value to use in the comparison.
-     * 
-     * @param value the attribute value used in comparison.
+     * {@inheritDoc}
      */
-    public void setAssertionValue( byte[] value )
+    public CompareRequest setAssertionValue( byte[] value )
     {
         if ( value != null )
         {
@@ -127,6 +124,8 @@ public class CompareRequestImpl extends 
         {
             this.attrVal = null;
         }
+        
+        return this;
     }
 
 
@@ -142,13 +141,24 @@ public class CompareRequestImpl extends 
 
 
     /**
-     * Sets the attribute id used in the comparison.
-     * 
-     * @param attributeId the attribute id used in comparison.
+     * {@inheritDoc}
      */
-    public void setAttributeId( String attributeId )
+    public CompareRequest setAttributeId( String attributeId )
     {
         this.attrId = attributeId;
+        
+        return this;
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public CompareRequest setMessageId( int messageId )
+    {
+        super.setMessageId( messageId );
+        
+        return this;
     }
 
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequest.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequest.java Fri May 20 15:32:49 2011
@@ -51,6 +51,7 @@ public interface DeleteRequest extends S
      * request.
      * 
      * @param name the Dn of the leaf entry to delete.
+     * @return The DeleteRequest instance
      */
-    void setName( Dn name );
+    DeleteRequest setName( Dn name );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequestImpl.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequestImpl.java Fri May 20 15:32:49 2011
@@ -69,14 +69,24 @@ public class DeleteRequestImpl extends A
 
 
     /**
-     * Sets the distinguished name of the leaf entry to be deleted by this
-     * request.
-     * 
-     * @param name the Dn of the leaf entry to delete.
+     * {@inheritDoc}
      */
-    public void setName( Dn name )
+    public DeleteRequest setName( Dn name )
     {
         this.name = name;
+        
+        return this;
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public DeleteRequest setMessageId( int messageId )
+    {
+        super.setMessageId( messageId );
+        
+        return this;
     }
 
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequest.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequest.java Fri May 20 15:32:49 2011
@@ -74,6 +74,7 @@ public interface ExtendedRequest<R exten
      * Sets the Object Identifier corresponding to the extended request type.
      * 
      * @param oid the dotted-decimal representation as a String of the OID
+     * @return The ExtendedRequest instance
      */
-    void setRequestName( String oid );
+    ExtendedRequest<R> setRequestName( String oid );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequestImpl.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequestImpl.java Fri May 20 15:32:49 2011
@@ -68,12 +68,25 @@ public class ExtendedRequestImpl extends
      * 
      * @param newOid the dotted-decimal representation as a String of the OID
      */
-    public void setRequestName( String newOid )
+    public ExtendedRequest<ExtendedResponse> setRequestName( String newOid )
     {
         this.oid = newOid;
+        
+        return this;
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public ExtendedRequest<ExtendedResponse> setMessageId( int messageId )
+    {
+        super.setMessageId( messageId );
+        
+        return this;
     }
 
-
+    
     // ------------------------------------------------------------------------
     // SingleReplyRequest Interface Method Implementations
     // ------------------------------------------------------------------------

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/Message.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/Message.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/Message.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/Message.java Fri May 20 15:32:49 2011
@@ -72,29 +72,32 @@ public interface Message
      * Adds a control to this Message.
      * 
      * @param control the control to add.
+     * @return A Message reference
      * @throws org.apache.directory.shared.ldap.model.exception.MessageException if controls cannot be added to this Message or the control is
      *             not known etc.
      */
-    void addControl( Control control ) throws MessageException;
+    Message addControl( Control control ) throws MessageException;
 
 
     /**
      * Adds an array of controls to this Message.
      * 
      * @param controls the controls to add.
+     * @return A Message reference
      * @throws MessageException if controls cannot be added to this Message or they are not known etc.
      */
-    void addAllControls( Control[] controls ) throws MessageException;
+    Message addAllControls( Control[] controls ) throws MessageException;
 
 
     /**
      * Deletes a control removing it from this Message.
      * 
      * @param control the control to remove.
+     * @return A Message reference
      * @throws MessageException if controls cannot be added to this Message or the control is
      *             not known etc.
      */
-    void removeControl( Control control ) throws MessageException;
+    Message removeControl( Control control ) throws MessageException;
 
 
     /**
@@ -139,6 +142,7 @@ public interface Message
     /**
      * Sets the Message ID for this request
      * @param messageId The message Id
+     * @return A Message reference
      */
-    void setMessageId( int messageId );
+    Message setMessageId( int messageId );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyDnRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyDnRequest.java?rev=1125432&r1=1125431&r2=1125432&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyDnRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyDnRequest.java Fri May 20 15:32:49 2011
@@ -87,10 +87,10 @@ public interface ModifyDnRequest extends
      * Sets the entry's distinguished name representing the <b>entry</b> PDU
      * field.
      * 
-     * @param name
-     *            the distinguished name of the entry.
+     * @param name the distinguished name of the entry.
+     * @return The ModifyDnRequest instance
      */
-    void setName( Dn name );
+    ModifyDnRequest setName( Dn name );
 
 
     /**
@@ -106,10 +106,10 @@ public interface ModifyDnRequest extends
      * Sets the new relative distinguished name for the entry which represents
      * the PDU's <b>newrdn</b> field.
      * 
-     * @param newRdn
-     *            the relative dn with one component
+     * @param newRdn the relative dn with one component
+     * @return The ModifyDnRequest instance
      */
-    void setNewRdn( Rdn newRdn );
+    ModifyDnRequest setNewRdn( Rdn newRdn );
 
 
     /**
@@ -127,10 +127,10 @@ public interface ModifyDnRequest extends
      * from the entry when the new Rdn is used in its stead. This property
      * corresponds to the <b>deleteoldrdn</b>.
      * 
-     * @param deleteOldRdn
-     *            true if the old rdn is to be deleted, false if it is not
+     * @param deleteOldRdn true if the old rdn is to be deleted, false if it is not
+     * @return The ModifyDnRequest instance
      */
-    void setDeleteOldRdn( boolean deleteOldRdn );
+    ModifyDnRequest setDeleteOldRdn( boolean deleteOldRdn );
 
 
     /**
@@ -151,11 +151,11 @@ public interface ModifyDnRequest extends
      * rather than a move operation. Setting this property to a non-null value
      * toggles the move flag obtained via the <code>isMove</code> method.
      * 
-     * @param newSuperior
-     *            the dn of the superior entry the candidate entry for Dn
-     *            modification is moved under.
+     * @param newSuperior the dn of the superior entry the candidate entry for Dn
+     * modification is moved under.
+     * @return The ModifyDnRequest instance
      */
-    void setNewSuperior( Dn newSuperior );
+    ModifyDnRequest setNewSuperior( Dn newSuperior );
 
 
     /**
@@ -164,7 +164,7 @@ public interface ModifyDnRequest extends
      * this flag.
      * 
      * @return true if the newSuperior property is <b>NOT</b> null, false
-     *         otherwise.
+     * otherwise.
      */
     boolean isMove();
 }



Mime
View raw message