directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1067019 - in /directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls: ppolicy_impl/ syncrepl_impl/
Date Thu, 03 Feb 2011 22:48:31 GMT
Author: akarasulu
Date: Thu Feb  3 22:48:31 2011
New Revision: 1067019

URL: http://svn.apache.org/viewvc?rev=1067019&view=rev
Log:
DIRSHARED-81:

  o cleaning up, documentation
  o removing unnecessary JNDI converstion methods


Modified:
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/ppolicy_impl/PasswordPolicyFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueFactory.java

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/ppolicy_impl/PasswordPolicyFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/ppolicy_impl/PasswordPolicyFactory.java?rev=1067019&r1=1067018&r2=1067019&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/ppolicy_impl/PasswordPolicyFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/ppolicy_impl/PasswordPolicyFactory.java
Thu Feb  3 22:48:31 2011
@@ -20,13 +20,6 @@
 package org.apache.directory.shared.ldap.extras.controls.ppolicy_impl;
 
 
-import java.nio.ByteBuffer;
-
-import javax.naming.ldap.BasicControl;
-import javax.naming.ldap.Control;
-
-import org.apache.directory.shared.asn1.DecoderException;
-import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.ldap.codec.IControlFactory;
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.extras.controls.PasswordPolicy;
@@ -75,6 +68,10 @@ public class PasswordPolicyFactory imple
     }
     
 
+    /**
+     * 
+     * {@inheritDoc}
+     */
     public PasswordPolicyDecorator decorate( PasswordPolicy control )
     {
         PasswordPolicyDecorator decorator = null;
@@ -93,39 +90,12 @@ public class PasswordPolicyFactory imple
     }
 
     
+    /**
+     * 
+     * {@inheritDoc}
+     */
     public PasswordPolicy newControl()
     {
         return new PasswordPolicyImpl();
     }
-    
-
-    public Control toJndiControl( PasswordPolicy control ) throws EncoderException
-    {
-        PasswordPolicyDecorator decorator = decorate( control );
-        ByteBuffer bb = ByteBuffer.allocate( decorator.computeLength() );
-        decorator.encode( bb );
-        bb.flip();
-        return new BasicControl( control.getOid(), control.isCritical(), decorator.getValue()
);
-    }
-
-    
-    public PasswordPolicy fromJndiControl( Control jndi ) throws DecoderException
-    {
-        PasswordPolicyDecorator decorator = null;
-        
-        if ( jndi.getEncodedValue() == null || jndi.getEncodedValue().length == 0 )
-        {
-            decorator = new PasswordPolicyDecorator( codec, false );
-        }
-        else
-        {
-            decorator = new PasswordPolicyDecorator( codec, true );
-        }
-        
-        decorator.setCritical( jndi.isCritical() );
-        decorator.setValue( jndi.getEncodedValue() );
-        byte[] controlBytes = new byte[ decorator.computeLength() ];
-        decorator.decode( controlBytes );
-        return decorator.getDecorated();
-    }
 }

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueFactory.java?rev=1067019&r1=1067018&r2=1067019&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueFactory.java
Thu Feb  3 22:48:31 2011
@@ -20,13 +20,6 @@
 package org.apache.directory.shared.ldap.extras.controls.syncrepl_impl;
 
 
-import java.nio.ByteBuffer;
-
-import javax.naming.ldap.BasicControl;
-import javax.naming.ldap.Control;
-
-import org.apache.directory.shared.asn1.DecoderException;
-import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.ldap.codec.IControlFactory;
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.extras.controls.SyncDoneValue;
@@ -97,26 +90,4 @@ public class SyncDoneValueFactory implem
     {
         return new SyncDoneValueImpl();
     }
-    
-
-    public Control toJndiControl( SyncDoneValue control ) throws EncoderException
-    {
-        SyncDoneValueDecorator decorator = decorate( control );
-        ByteBuffer bb = ByteBuffer.allocate( decorator.computeLength() );
-        decorator.encode( bb );
-        bb.flip();
-        return new BasicControl( control.getOid(), control.isCritical(), decorator.getValue()
);
-    }
-
-    
-    public SyncDoneValue fromJndiControl( Control jndi ) throws DecoderException
-    {
-        SyncDoneValueDecorator decorator = newCodecControl();
-        decorator.setCritical( jndi.isCritical() );
-        decorator.setValue( jndi.getEncodedValue() );
-        byte[] controlBytes = new byte[ decorator.computeLength() ];
-        decorator.decode( controlBytes );
-        return decorator.getDecorated();
-    }
-
 }

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueFactory.java?rev=1067019&r1=1067018&r2=1067019&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueFactory.java
Thu Feb  3 22:48:31 2011
@@ -20,13 +20,6 @@
 package org.apache.directory.shared.ldap.extras.controls.syncrepl_impl;
 
 
-import java.nio.ByteBuffer;
-
-import javax.naming.ldap.BasicControl;
-import javax.naming.ldap.Control;
-
-import org.apache.directory.shared.asn1.DecoderException;
-import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.ldap.codec.IControlFactory;
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.extras.controls.SyncInfoValue;
@@ -97,26 +90,4 @@ public class SyncInfoValueFactory implem
     {
         return new SyncInfoValueImpl();
     }
-    
-
-    public Control toJndiControl( SyncInfoValue control ) throws EncoderException
-    {
-        SyncInfoValueDecorator decorator = decorate( control );
-        ByteBuffer bb = ByteBuffer.allocate( decorator.computeLength() );
-        decorator.encode( bb );
-        bb.flip();
-        return new BasicControl( control.getOid(), control.isCritical(), decorator.getValue()
);
-    }
-
-    
-    public SyncInfoValue fromJndiControl( Control jndi ) throws DecoderException
-    {
-        SyncInfoValueDecorator decorator = newCodecControl();
-        decorator.setCritical( jndi.isCritical() );
-        decorator.setValue( jndi.getEncodedValue() );
-        byte[] controlBytes = new byte[ decorator.computeLength() ];
-        decorator.decode( controlBytes );
-        return decorator.getDecorated();
-    }
-
 }

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnFactory.java?rev=1067019&r1=1067018&r2=1067019&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnFactory.java
Thu Feb  3 22:48:31 2011
@@ -20,13 +20,6 @@
 package org.apache.directory.shared.ldap.extras.controls.syncrepl_impl;
 
 
-import java.nio.ByteBuffer;
-
-import javax.naming.ldap.BasicControl;
-import javax.naming.ldap.Control;
-
-import org.apache.directory.shared.asn1.DecoderException;
-import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.ldap.codec.IControlFactory;
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.extras.controls.SyncModifyDn;
@@ -97,26 +90,4 @@ public class SyncModifyDnFactory impleme
     {
         return new SyncModifyDnImpl();
     }
-    
-
-    public Control toJndiControl( SyncModifyDn control ) throws EncoderException
-    {
-        SyncModifyDnDecorator decorator = decorate( control );
-        ByteBuffer bb = ByteBuffer.allocate( decorator.computeLength() );
-        decorator.encode( bb );
-        bb.flip();
-        return new BasicControl( control.getOid(), control.isCritical(), decorator.getValue()
);
-    }
-
-    
-    public SyncModifyDn fromJndiControl( Control jndi ) throws DecoderException
-    {
-        SyncModifyDnDecorator decorator = newCodecControl();
-        decorator.setCritical( jndi.isCritical() );
-        decorator.setValue( jndi.getEncodedValue() );
-        byte[] controlBytes = new byte[ decorator.computeLength() ];
-        decorator.decode( controlBytes );
-        return decorator.getDecorated();
-    }
-
 }

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueFactory.java?rev=1067019&r1=1067018&r2=1067019&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueFactory.java
Thu Feb  3 22:48:31 2011
@@ -20,13 +20,6 @@
 package org.apache.directory.shared.ldap.extras.controls.syncrepl_impl;
 
 
-import java.nio.ByteBuffer;
-
-import javax.naming.ldap.BasicControl;
-import javax.naming.ldap.Control;
-
-import org.apache.directory.shared.asn1.DecoderException;
-import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.ldap.codec.IControlFactory;
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.extras.controls.SyncRequestValue;
@@ -97,26 +90,4 @@ public class SyncRequestValueFactory imp
     {
         return new SyncRequestValueImpl();
     }
-    
-
-    public Control toJndiControl( SyncRequestValue control ) throws EncoderException
-    {
-        SyncRequestValueDecorator decorator = decorate( control );
-        ByteBuffer bb = ByteBuffer.allocate( decorator.computeLength() );
-        decorator.encode( bb );
-        bb.flip();
-        return new BasicControl( control.getOid(), control.isCritical(), decorator.getValue()
);
-    }
-
-    
-    public SyncRequestValue fromJndiControl( Control jndi ) throws DecoderException
-    {
-        SyncRequestValueDecorator decorator = newCodecControl();
-        decorator.setCritical( jndi.isCritical() );
-        decorator.setValue( jndi.getEncodedValue() );
-        byte[] controlBytes = new byte[ decorator.computeLength() ];
-        decorator.decode( controlBytes );
-        return decorator.getDecorated();
-    }
-
 }

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueFactory.java?rev=1067019&r1=1067018&r2=1067019&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueFactory.java
Thu Feb  3 22:48:31 2011
@@ -20,13 +20,6 @@
 package org.apache.directory.shared.ldap.extras.controls.syncrepl_impl;
 
 
-import java.nio.ByteBuffer;
-
-import javax.naming.ldap.BasicControl;
-import javax.naming.ldap.Control;
-
-import org.apache.directory.shared.asn1.DecoderException;
-import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.ldap.codec.IControlFactory;
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 
@@ -94,25 +87,4 @@ public class SyncStateValueFactory imple
     {
         return new SyncStateValueImpl();
     }
-    
-
-    public Control toJndiControl( SyncStateValue control ) throws EncoderException
-    {
-        SyncStateValueDecorator decorator = decorate( control );
-        ByteBuffer bb = ByteBuffer.allocate( decorator.computeLength() );
-        decorator.encode( bb );
-        bb.flip();
-        return new BasicControl( control.getOid(), control.isCritical(), decorator.getValue()
);
-    }
-
-    
-    public SyncStateValue fromJndiControl( Control jndi ) throws DecoderException
-    {
-        SyncStateValueDecorator decorator = newCodecControl();
-        decorator.setCritical( jndi.isCritical() );
-        decorator.setValue( jndi.getEncodedValue() );
-        byte[] controlBytes = new byte[ decorator.computeLength() ];
-        decorator.decode( controlBytes );
-        return decorator.getDecorated();
-    }
 }



Mime
View raw message