You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2009/08/23 18:44:03 UTC

svn commit: r806991 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageCodec.java

Author: kayyagari
Date: Sun Aug 23 16:44:02 2009
New Revision: 806991

URL: http://svn.apache.org/viewvc?rev=806991&view=rev
Log:
added a method to set a list of controls

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageCodec.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageCodec.java?rev=806991&r1=806990&r2=806991&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageCodec.java Sun Aug 23 16:44:02 2009
@@ -165,6 +165,25 @@
 
 
     /**
+     * Set or add a list of controls to the Controls array. If the existing
+     * control array is not null then the given controls will be added
+     * 
+     * @param controls The list of Controls to set or add
+     */
+    public void addControls( List<ControlCodec> controls )
+    {
+        if( this.controls == null )
+        {
+            this.controls = controls;
+        }
+        else if( controls != null )
+        {
+            this.controls.addAll( controls );
+        }
+    }
+    
+    
+    /**
      * Init the controls array
      */
     public void initControls()