directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1065466 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java
Date Mon, 31 Jan 2011 01:58:35 GMT
Author: akarasulu
Date: Mon Jan 31 01:58:35 2011
New Revision: 1065466

URL: http://svn.apache.org/viewvc?rev=1065466&view=rev
Log:
adding missing methods

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

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java?rev=1065466&r1=1065465&r2=1065466&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java
Mon Jan 31 01:58:35 2011
@@ -263,6 +263,17 @@ public class DefaultLdapCodecService imp
 
     public Control fromJndiControl( javax.naming.ldap.Control control ) throws DecoderException
     {
-        return null;
+        IControlFactory factory = controlFactories.get( control.getID() );
+        
+        if ( factory == null )
+        {
+            BasicControl ourControl = new BasicControl( control.getID() );
+            ourControl.setCritical( control.isCritical() );
+            BasicControlDecorator decorator = new BasicControlDecorator( this, ourControl
);
+            decorator.setValue( control.getEncodedValue() );
+            return decorator;
+        }
+        
+        return factory.fromJndiControl( control );
     }
 }



Mime
View raw message