directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r903467 [1/3] - in /directory/shared/trunk: ./ all/ dsml-parser/ ldap-convert/ ldap-jndi/ ldap-jndi/src/main/java/org/apache/directory/shared/ldap/jndi/ ldap-schema-loader/ ldap-schema/ ldap/src/main/java/org/apache/directory/shared/ldap/co...
Date Tue, 26 Jan 2010 22:50:33 GMT
Author: elecharny
Date: Tue Jan 26 22:50:30 2010
New Revision: 903467

URL: http://svn.apache.org/viewvc?rev=903467&view=rev
Log:
Replaced Jndi Control by ADS Control \ 
o Moved LDIF files to the new subproject ldap-ldifo Updated some pom.xml

Added:
    directory/shared/trunk/ldap-jndi/src/main/java/org/apache/directory/shared/ldap/jndi/JndiUtils.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/AbstractControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/Control.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/ControlImpl.java
Removed:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/InternalControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/InternalAbstractControl.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/
Modified:
    directory/shared/trunk/all/pom.xml
    directory/shared/trunk/dsml-parser/pom.xml
    directory/shared/trunk/ldap-convert/pom.xml
    directory/shared/trunk/ldap-jndi/pom.xml
    directory/shared/trunk/ldap-schema-loader/pom.xml
    directory/shared/trunk/ldap-schema/pom.xml
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/InternalAbstractMessage.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/InternalMessage.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/CascadeControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/EntryChangeControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/ManageDsaITControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/PagedSearchControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/PersistentSearchControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/SubentriesControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/replication/SyncDoneValueControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/replication/SyncInfoValueNewCookieControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/replication/SyncInfoValueRefreshDeleteControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/replication/SyncInfoValueRefreshPresentControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/replication/SyncInfoValueSyncIdSetControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/replication/SyncRequestValueControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/control/replication/SyncStateValueControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractMessageTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/AttributeUtilsTest.java
    directory/shared/trunk/pom.xml

Modified: directory/shared/trunk/all/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/all/pom.xml?rev=903467&r1=903466&r2=903467&view=diff
==============================================================================
--- directory/shared/trunk/all/pom.xml (original)
+++ directory/shared/trunk/all/pom.xml Tue Jan 26 22:50:30 2010
@@ -35,79 +35,85 @@
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-asn1</artifactId>
-      <version>${pom.version}</version>
+      <version>${version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-asn1-codec</artifactId>
-      <version>${pom.version}</version>
+      <version>${version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-cursor</artifactId>
-      <version>${pom.version}</version>
+      <version>${version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-dsml-parser</artifactId>
-      <version>${pom.version}</version>
+      <version>${version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-ldap</artifactId>
-      <version>${pom.version}</version>
+      <version>${version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.directory.shared</groupId>
+      <artifactId>shared-ldif</artifactId>
+      <version>${version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-ldap-client-api</artifactId>
-      <version>${pom.version}</version>
+      <version>${version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-ldap-constants</artifactId>
-      <version>${pom.version}</version>
+      <version>${version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-ldap-converter</artifactId>
-      <version>${pom.version}</version>
+      <version>${version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-ldap-jndi</artifactId>
-      <version>${pom.version}</version>
+      <version>${version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-ldap-schema</artifactId>
-      <version>${pom.version}</version>
+      <version>${version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-ldap-schema-dao</artifactId>
-      <version>${pom.version}</version>
+      <version>${version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-ldap-schema-loader</artifactId>
-      <version>${pom.version}</version>
+      <version>${version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-ldap-schema-manager</artifactId>
-      <version>${pom.version}</version>
+      <version>${version}</version>
     </dependency>
   </dependencies>
 

Modified: directory/shared/trunk/dsml-parser/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/pom.xml?rev=903467&r1=903466&r2=903467&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/pom.xml (original)
+++ directory/shared/trunk/dsml-parser/pom.xml Tue Jan 26 22:50:30 2010
@@ -35,14 +35,22 @@
 
   <dependencies>
     <dependency>
-      <groupId>${pom.groupId}</groupId>
-      <version>${pom.version}</version>
+      <groupId>${groupId}</groupId>
+      <version>${version}</version>
       <artifactId>shared-ldap</artifactId>
     </dependency>
+    
+    <dependency>
+      <artifactId>shared-ldif</artifactId>
+      <groupId>${groupId}</groupId>
+      <version>${version}</version>
+    </dependency> 
+    
     <dependency>
       <groupId>dom4j</groupId>
       <artifactId>dom4j</artifactId>
     </dependency>
+    
     <dependency>
       <groupId>xpp3</groupId>
       <artifactId>xpp3</artifactId>

Modified: directory/shared/trunk/ldap-convert/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-convert/pom.xml?rev=903467&r1=903466&r2=903467&view=diff
==============================================================================
--- directory/shared/trunk/ldap-convert/pom.xml (original)
+++ directory/shared/trunk/ldap-convert/pom.xml Tue Jan 26 22:50:30 2010
@@ -41,9 +41,15 @@
 
   <dependencies>
     <dependency>
-      <groupId>org.apache.directory.shared</groupId>
+      <artifactId>shared-ldif</artifactId>
+      <groupId>${groupId}</groupId>
+      <version>${version}</version>
+    </dependency> 
+
+    <dependency>
+      <groupId>${groupId}</groupId>
       <artifactId>shared-ldap</artifactId>
-      <version>${pom.version}</version>
+      <version>${version}</version>
     </dependency>
   </dependencies>
 

Modified: directory/shared/trunk/ldap-jndi/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-jndi/pom.xml?rev=903467&r1=903466&r2=903467&view=diff
==============================================================================
--- directory/shared/trunk/ldap-jndi/pom.xml (original)
+++ directory/shared/trunk/ldap-jndi/pom.xml Tue Jan 26 22:50:30 2010
@@ -26,6 +26,7 @@
     <artifactId>shared-parent</artifactId>
     <version>0.9.18-SNAPSHOT</version>
   </parent>
+  
   <artifactId>shared-ldap-jndi</artifactId>
   <name>Apache Directory Shared JNDI</name>
   <packaging>jar</packaging>  
@@ -34,5 +35,13 @@
     Shared libraries for client side JNDI handling that may be used 
     both in the server and in studio.
   </description>
+
+  <dependencies>
+    <dependency>
+      <artifactId>shared-ldap</artifactId>
+      <groupId>${groupId}</groupId>
+      <version>${version}</version>
+    </dependency>
+  </dependencies>
 </project>
 

Added: directory/shared/trunk/ldap-jndi/src/main/java/org/apache/directory/shared/ldap/jndi/JndiUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-jndi/src/main/java/org/apache/directory/shared/ldap/jndi/JndiUtils.java?rev=903467&view=auto
==============================================================================
--- directory/shared/trunk/ldap-jndi/src/main/java/org/apache/directory/shared/ldap/jndi/JndiUtils.java
(added)
+++ directory/shared/trunk/ldap-jndi/src/main/java/org/apache/directory/shared/ldap/jndi/JndiUtils.java
Tue Jan 26 22:50:30 2010
@@ -0,0 +1,110 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+package org.apache.directory.shared.ldap.jndi;
+
+import javax.naming.NamingException;
+import javax.naming.ldap.BasicControl;
+
+import org.apache.directory.shared.ldap.message.control.Control;
+import org.apache.directory.shared.ldap.message.control.ControlImpl;
+
+/**
+ * An utility class to convert back and forth JNDI classes to ADS classes.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class JndiUtils
+{
+    public static javax.naming.ldap.Control toJndiControl( Control control )
+    {
+        byte[] value = control.getValue();
+        javax.naming.ldap.Control jndiControl = new BasicControl( control.getOid(), control.isCritical(),
value );
+        
+        return jndiControl;
+    }
+    
+    
+    public static javax.naming.ldap.Control[] toJndiControls( Control... controls )
+    {
+        if ( controls != null )
+        {
+            javax.naming.ldap.Control[] jndiControls = new javax.naming.ldap.Control[controls.length];
+            int i = 0;
+            
+            for ( Control control : controls )
+            {
+                jndiControls[i++] = toJndiControl( control );
+            }
+            
+            return jndiControls;
+        }
+        else
+        {
+            return null;
+        }
+    }
+    
+    
+    public static Control fromJndiControl( javax.naming.ldap.Control jndiControl )
+    {
+        Control control = new ControlImpl( jndiControl.getID() );
+        
+        control.setOid( jndiControl.getID() );
+        control.setValue( jndiControl.getEncodedValue() );
+
+        return control;
+    }
+    
+    
+    public static Control[] fromJndiControls( javax.naming.ldap.Control... jndiControls )
+    {
+        if ( jndiControls != null )
+        {
+            Control[] controls = new Control[jndiControls.length];
+            int i = 0;
+            
+            for ( javax.naming.ldap.Control jndiControl : jndiControls )
+            {
+                controls[i++] = fromJndiControl( jndiControl );
+            }
+            
+            return controls;
+        }
+        else
+        {
+            return null;
+        }
+    }
+    
+    
+    public static void wrap( Throwable t ) throws NamingException
+    {
+        if ( t instanceof NamingException )
+        {
+            throw ( NamingException ) t;
+        }
+        
+        NamingException ne = new NamingException( t.getLocalizedMessage() );
+        ne.setRootCause( t );
+        throw ne;
+    }
+
+}

Modified: directory/shared/trunk/ldap-schema-loader/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-loader/pom.xml?rev=903467&r1=903466&r2=903467&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema-loader/pom.xml (original)
+++ directory/shared/trunk/ldap-schema-loader/pom.xml Tue Jan 26 22:50:30 2010
@@ -26,6 +26,7 @@
     <artifactId>shared-parent</artifactId>
     <version>0.9.18-SNAPSHOT</version>
   </parent>
+  
   <artifactId>shared-ldap-schema-loader</artifactId>
   <name>Apache Directory Shared LDAP Schema Loader</name>
   <packaging>jar</packaging>
@@ -38,14 +39,20 @@
   <dependencies>
     <dependency>
       <artifactId>shared-ldap</artifactId>
-      <groupId>${pom.groupId}</groupId>
-      <version>${pom.version}</version>
+      <groupId>${groupId}</groupId>
+      <version>${version}</version>
     </dependency>
 
     <dependency>
+      <artifactId>shared-ldif</artifactId>
+      <groupId>${groupId}</groupId>
+      <version>${version}</version>
+    </dependency> 
+
+    <dependency>
       <artifactId>shared-ldap-schema</artifactId>
-      <groupId>${pom.groupId}</groupId>
-      <version>${pom.version}</version>
+      <groupId>${groupId}</groupId>
+      <version>${version}</version>
     </dependency> 
   </dependencies>
 

Modified: directory/shared/trunk/ldap-schema/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema/pom.xml?rev=903467&r1=903466&r2=903467&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema/pom.xml (original)
+++ directory/shared/trunk/ldap-schema/pom.xml Tue Jan 26 22:50:30 2010
@@ -45,15 +45,21 @@
     </dependency>
     
     <dependency>
-      <groupId>${pom.groupId}</groupId>
+      <groupId>${groupId}</groupId>
       <artifactId>shared-ldap</artifactId>
-      <version>${pom.version}</version>
+      <version>${version}</version>
     </dependency>
 
-        <dependency>
-      <groupId>${pom.groupId}</groupId>
+    <dependency>
+      <artifactId>shared-ldif</artifactId>
+      <groupId>${groupId}</groupId>
+      <version>${version}</version>
+    </dependency> 
+
+    <dependency>
+      <groupId>${groupId}</groupId>
       <artifactId>shared-ldap-constants</artifactId>
-      <version>${pom.version}</version>
+      <version>${version}</version>
     </dependency>
   </dependencies>
 



Mime
View raw message