directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r903678 - in /directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message: AbstractControl.java control/Control.java control/ControlImpl.java
Date Wed, 27 Jan 2010 15:25:47 GMT
Author: kayyagari
Date: Wed Jan 27 15:25:47 2010
New Revision: 903678

URL: http://svn.apache.org/viewvc?rev=903678&view=rev
Log:
o added getValue() method
o renamed the encodedValue field to value
o added a new contructor in ControlImpl

Modified:
    directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/AbstractControl.java
    directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/control/Control.java
    directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/control/ControlImpl.java

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/AbstractControl.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/AbstractControl.java?rev=903678&r1=903677&r2=903678&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/AbstractControl.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/AbstractControl.java
Wed Jan 27 15:25:47 2010
@@ -19,8 +19,7 @@
  */
 package org.apache.directory.ldap.client.api.message;
 
-import javax.naming.ldap.Control;
-
+import org.apache.directory.ldap.client.api.message.control.Control;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 
@@ -39,7 +38,7 @@
     private boolean isCritical;
     
     /** The encoded value */
-    private byte[] encodedValue;
+    private byte[] value;
 
 
     /**
@@ -50,7 +49,7 @@
     public AbstractControl( String oid )
     {
         this.oid = oid;
-        encodedValue = StringTools.EMPTY_BYTES;
+        value = StringTools.EMPTY_BYTES;
         isCritical = false;
     }
     
@@ -64,7 +63,7 @@
     public AbstractControl( String oid, byte[] encodedValue )
     {
         this.oid = oid;
-        this.encodedValue = encodedValue;
+        this.value = encodedValue;
         this.isCritical = false;
     }
     
@@ -78,7 +77,7 @@
     public AbstractControl( String oid, boolean isCritical )
     {
         this.oid = oid;
-        encodedValue = StringTools.EMPTY_BYTES;
+        value = StringTools.EMPTY_BYTES;
         this.isCritical = isCritical;
     }
     
@@ -93,7 +92,7 @@
     public AbstractControl( String oid, byte[] encodedValue, boolean isCritical )
     {
         this.oid = oid;
-        this.encodedValue = encodedValue;
+        this.value = encodedValue;
         this.isCritical = isCritical;
     }
     
@@ -140,17 +139,17 @@
     /**
      * {@inheritDoc}
      */
-    public byte[] getEncodedValue()
+    public byte[] getValue()
     {
-        return encodedValue;
+        return value;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void getEncodedValue( byte[] encodedValue )
+    public void setValue( byte[] value )
     {
-        this.encodedValue = encodedValue;
+        this.value = value;
     }
 }

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/control/Control.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/control/Control.java?rev=903678&r1=903677&r2=903678&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/control/Control.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/control/Control.java
Wed Jan 27 15:25:47 2010
@@ -32,7 +32,7 @@
     /**
      * @return The Control's OID
      */
-    String getId();
+    String getID();
     
     
     /**
@@ -59,4 +59,11 @@
      * @param isCritical true if the control is critical false otherwise.
      */
     void setCritical( boolean isCritical );
+    
+    /**
+     * Gives the value associated with this control 
+     * 
+     * @return control's value
+     */
+    byte[] getValue();
 }

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/control/ControlImpl.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/control/ControlImpl.java?rev=903678&r1=903677&r2=903678&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/control/ControlImpl.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/control/ControlImpl.java
Wed Jan 27 15:25:47 2010
@@ -9,4 +9,10 @@
     {
         super( oid );
     }
+    
+    
+    public ControlImpl( String oid, byte[] encodedValue, boolean isCritical )
+    {
+       super( oid, encodedValue, isCritical ); 
+    }
 }



Mime
View raw message