directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject [directory-studio] 01/01: DIRSTUDIO-648: core implementation and test for password modify extended operation (WIP)
Date Wed, 18 Mar 2020 21:50:02 GMT
This is an automated email from the ASF dual-hosted git repository.

seelmann pushed a commit to branch DIRSTUDIO-648-password-modify-extended-op
in repository https://gitbox.apache.org/repos/asf/directory-studio.git

commit e5f4c92e6e909cda845b1d72eed8936ef4e959a7
Author: Stefan Seelmann <mail@stefan-seelmann.de>
AuthorDate: Wed Mar 18 22:49:32 2020 +0100

    DIRSTUDIO-648: core implementation and test for password modify extended operation (WIP)
---
 ...directory.studio.eclipse-trgt-platform.template |  38 ++++----
 plugins/aciitemeditor/pom-first.xml                |   4 +-
 plugins/apacheds.configuration/pom-first.xml       |   6 +-
 plugins/connection.core/pom-first.xml              |  13 +--
 .../connection/core/io/ConnectionWrapper.java      |   6 ++
 .../core/io/api/DirectoryApiConnectionWrapper.java |  64 +++++++++++++
 plugins/connection.ui/pom-first.xml                |   4 +-
 plugins/edirectory/pom-first.xml                   |   2 +-
 plugins/ldapbrowser.common/pom-first.xml           |   4 +-
 plugins/ldapbrowser.core/pom-first.xml             |  10 +-
 plugins/ldapbrowser.ui/pom-first.xml               |   4 +-
 plugins/ldapservers.apacheds/pom-first.xml         |   2 +-
 plugins/ldapservers/pom-first.xml                  |   2 +-
 plugins/ldifeditor/pom-first.xml                   |   4 +-
 plugins/ldifparser/pom-first.xml                   |   2 +-
 plugins/openldap.acl.editor/pom-first.xml          |   4 +-
 plugins/openldap.common.ui/pom-first.xml           |   4 +-
 plugins/openldap.config.editor/pom-first.xml       |  10 +-
 plugins/openldap.syncrepl/pom-first.xml            |   2 +-
 plugins/schemaeditor/pom-first.xml                 |  10 +-
 plugins/valueeditors/pom-first.xml                 |   4 +-
 pom.xml                                            |  11 ++-
 tests/test.integration.core/pom-first.xml          |  13 +--
 .../core/ConnectionWrapperTestBase.java            | 104 +++++++++++++++++++--
 tests/test.integration.ui/pom-first.xml            |  12 +--
 25 files changed, 252 insertions(+), 87 deletions(-)

diff --git a/eclipse-trgt-platform/template/org.apache.directory.studio.eclipse-trgt-platform.template
b/eclipse-trgt-platform/template/org.apache.directory.studio.eclipse-trgt-platform.template
index 749a675..2625a9d 100644
--- a/eclipse-trgt-platform/template/org.apache.directory.studio.eclipse-trgt-platform.template
+++ b/eclipse-trgt-platform/template/org.apache.directory.studio.eclipse-trgt-platform.template
@@ -19,7 +19,7 @@
   @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
 -->
 <?pde version="3.8"?>
-<target name="Apache Directory Studio Platform" sequenceNumber="431">
+<target name="Apache Directory Studio Platform" sequenceNumber="439">
   <locations>
 
     <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner"
includeSource="true" type="InstallableUnit">
@@ -37,24 +37,24 @@
       <unit id="org.apache.commons.commons-pool2" version="${org.apache.commons.pool.bundleversion}"/>
 
       <!-- LDAP API modules -->
-      <unit id="org.apache.directory.api.asn1.api" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.asn1.ber" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.dsmlv2.engine" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.dsmlv2.parser" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.i18n" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.ldap.client.api" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.ldap.codec.core" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.ldap.extras.aci" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.ldap.extras.codec" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.ldap.extras.codec.api" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.ldap.extras.sp" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.ldap.extras.trigger" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.ldap.extras.util" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.ldap.model" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.ldap.net.mina" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.ldap.schema" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.ldap.schema.converter" version="${org.apache.directory.api.version}"/>
-      <unit id="org.apache.directory.api.util" version="${org.apache.directory.api.version}"/>
+      <unit id="org.apache.directory.api.asn1.api" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.asn1.ber" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.dsmlv2.engine" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.dsmlv2.parser" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.i18n" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.ldap.client.api" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.ldap.codec.core" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.ldap.extras.aci" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.ldap.extras.codec" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.ldap.extras.codec.api" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.ldap.extras.sp" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.ldap.extras.trigger" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.ldap.extras.util" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.ldap.model" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.ldap.net.mina" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.ldap.schema" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.ldap.schema.converter" version="${org.apache.directory.api.bundleversion}"/>
+      <unit id="org.apache.directory.api.util" version="${org.apache.directory.api.bundleversion}"/>
 
       <!-- LDAP server modules -->
       <unit id="org.apache.directory.server.core" version="${org.apache.directory.server.version}"
/>
diff --git a/plugins/aciitemeditor/pom-first.xml b/plugins/aciitemeditor/pom-first.xml
index e256f53..e8afae6 100644
--- a/plugins/aciitemeditor/pom-first.xml
+++ b/plugins/aciitemeditor/pom-first.xml
@@ -50,8 +50,8 @@
             <Export-Package>org.apache.directory.studio.aciitemeditor</Export-Package>
             
             <Require-Bundle>
- org.apache.directory.api.ldap.extras.aci;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.ldap.extras.aci;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.studio.common.ui,
  org.apache.directory.studio.connection.core,
  org.apache.directory.studio.connection.ui,
diff --git a/plugins/apacheds.configuration/pom-first.xml b/plugins/apacheds.configuration/pom-first.xml
index 98b2853..c457dff 100644
--- a/plugins/apacheds.configuration/pom-first.xml
+++ b/plugins/apacheds.configuration/pom-first.xml
@@ -55,9 +55,9 @@
  org.apache.directory.studio.apacheds.configuration.wizards</Export-Package>
             <Require-Bundle>
  com.github.ben-manes.caffeine;bundle-version="${com.github.ben-manes.caffeine.bundleversion}",
- org.apache.directory.api.util;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.schema;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.schema;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.server.config;bundle-version="${org.apache.directory.server.version}",
  org.apache.directory.server.core.api;bundle-version="${org.apache.directory.server.version}",
  org.apache.directory.server.core.constants;bundle-version="${org.apache.directory.server.version}",
diff --git a/plugins/connection.core/pom-first.xml b/plugins/connection.core/pom-first.xml
index d4fd1a0..5a128cb 100644
--- a/plugins/connection.core/pom-first.xml
+++ b/plugins/connection.core/pom-first.xml
@@ -62,12 +62,13 @@
             </Import-Package>
             
             <Require-Bundle>
- org.apache.directory.api.asn1.api;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.client.api;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.codec.core;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.net.mina;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.util;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.asn1.api;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.client.api;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.codec.core;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.extras.codec.api;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.net.mina;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.studio.common.core,
  org.apache.directory.studio.ldifparser,
  org.eclipse.core.runtime,
diff --git a/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
b/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
index f1b6fd8..3c6f919 100644
--- a/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
+++ b/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
@@ -27,6 +27,8 @@ import javax.naming.directory.SearchControls;
 import org.apache.directory.api.ldap.model.entry.Entry;
 import org.apache.directory.api.ldap.model.entry.Modification;
 import org.apache.directory.api.ldap.model.message.Control;
+import org.apache.directory.api.ldap.model.message.ExtendedRequest;
+import org.apache.directory.api.ldap.model.message.ExtendedResponse;
 import org.apache.directory.api.ldap.model.name.Dn;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.ReferralsInfo;
@@ -155,4 +157,8 @@ public interface ConnectionWrapper
      */
     void deleteEntry( final Dn dn, final Control[] controls, final StudioProgressMonitor
monitor,
         final ReferralsInfo referralsInfo );
+
+
+    ExtendedResponse extended( ExtendedRequest request, final StudioProgressMonitor monitor
);
+
 }
diff --git a/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
b/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
index 12dfda8..3a04d24 100644
--- a/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
+++ b/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
@@ -52,6 +52,8 @@ import org.apache.directory.api.ldap.model.message.Control;
 import org.apache.directory.api.ldap.model.message.DeleteRequest;
 import org.apache.directory.api.ldap.model.message.DeleteRequestImpl;
 import org.apache.directory.api.ldap.model.message.DeleteResponse;
+import org.apache.directory.api.ldap.model.message.ExtendedRequest;
+import org.apache.directory.api.ldap.model.message.ExtendedResponse;
 import org.apache.directory.api.ldap.model.message.LdapResult;
 import org.apache.directory.api.ldap.model.message.ModifyDnRequest;
 import org.apache.directory.api.ldap.model.message.ModifyDnRequestImpl;
@@ -1019,6 +1021,68 @@ public class DirectoryApiConnectionWrapper implements ConnectionWrapper
         }
     }
 
+    @Override
+    public ExtendedResponse extended( ExtendedRequest request, StudioProgressMonitor monitor
)
+    {
+        if ( connection.isReadOnly() )
+        {
+            monitor
+                .reportError(
+                    new Exception( NLS.bind( Messages.error__connection_is_readonly, connection.getName()
) ) );
+            return null;
+        }
+
+        ExtendedResponse[] outerResponse = new ExtendedResponse[1];
+        InnerRunnable runnable = new InnerRunnable()
+        {
+            public void run()
+            {
+                try
+                {
+                    ExtendedResponse response = ldapConnection.extended( request );
+                    outerResponse[0] = response;
+
+                    // TODO: handle referrals?
+
+                    // Checking the response
+                    checkResponse( response );
+                }
+                catch ( Exception e )
+                {
+                    exception = e;
+                }
+
+                LdapException le = toLdapException( exception );
+
+                for ( ILdapLogger logger : getLdapLoggers() )
+                {
+                    // TODO: logging
+                    // logger.log
+                }
+            }
+        };
+
+        try
+        {
+            checkConnectionAndRunAndMonitor( runnable, monitor );
+        }
+        catch ( Exception e )
+        {
+            monitor.reportError( e );
+        }
+
+        if ( runnable.isCanceled() )
+        {
+            monitor.setCanceled( true );
+        }
+        if ( runnable.getException() != null )
+        {
+            monitor.reportError( runnable.getException() );
+        }
+
+        return outerResponse[0];
+    }
+
     /**
      * Inner runnable used in connection wrapper operations.
      *
diff --git a/plugins/connection.ui/pom-first.xml b/plugins/connection.ui/pom-first.xml
index dc80f06..8011ae7 100644
--- a/plugins/connection.ui/pom-first.xml
+++ b/plugins/connection.ui/pom-first.xml
@@ -66,8 +66,8 @@
             </Import-Package>
             
             <Require-Bundle>
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.util;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.studio.common.core,
  org.apache.directory.studio.common.ui,
  org.apache.directory.studio.connection.core,
diff --git a/plugins/edirectory/pom-first.xml b/plugins/edirectory/pom-first.xml
index 86064f6..28a1829 100644
--- a/plugins/edirectory/pom-first.xml
+++ b/plugins/edirectory/pom-first.xml
@@ -50,7 +50,7 @@
             <Export-Package>org.apache.directory.studio.edirectory</Export-Package>
             
             <Require-Bundle>
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.studio.common.ui,
  org.apache.directory.studio.connection.core,
  org.apache.directory.studio.connection.ui,
diff --git a/plugins/ldapbrowser.common/pom-first.xml b/plugins/ldapbrowser.common/pom-first.xml
index 61fcd9e..7a367e2 100644
--- a/plugins/ldapbrowser.common/pom-first.xml
+++ b/plugins/ldapbrowser.common/pom-first.xml
@@ -66,8 +66,8 @@
             </Import-Package>
 
             <Require-Bundle>
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.util;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.studio.common.core,
  org.apache.directory.studio.common.ui,
  org.apache.directory.studio.connection.core,
diff --git a/plugins/ldapbrowser.core/pom-first.xml b/plugins/ldapbrowser.core/pom-first.xml
index 3d9abd7..cece9ab 100644
--- a/plugins/ldapbrowser.core/pom-first.xml
+++ b/plugins/ldapbrowser.core/pom-first.xml
@@ -136,11 +136,11 @@
             </Import-Package>
             
             <Require-Bundle>
- org.apache.directory.api.asn1.api;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.codec.core;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.dsmlv2.parser;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.util;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.asn1.api;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.codec.core;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.dsmlv2.parser;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.studio.common.core,
  org.apache.directory.studio.connection.core,
  org.apache.directory.studio.ldifparser,
diff --git a/plugins/ldapbrowser.ui/pom-first.xml b/plugins/ldapbrowser.ui/pom-first.xml
index 1c314f8..46b81b3 100644
--- a/plugins/ldapbrowser.ui/pom-first.xml
+++ b/plugins/ldapbrowser.ui/pom-first.xml
@@ -70,8 +70,8 @@
             </Import-Package>
             
             <Require-Bundle>
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.util;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.studio.common.core,
  org.apache.directory.studio.common.ui,
  org.apache.directory.studio.connection.core,
diff --git a/plugins/ldapservers.apacheds/pom-first.xml b/plugins/ldapservers.apacheds/pom-first.xml
index d8d93d2..7801a4b 100644
--- a/plugins/ldapservers.apacheds/pom-first.xml
+++ b/plugins/ldapservers.apacheds/pom-first.xml
@@ -54,7 +54,7 @@
             </Import-Package>
             
             <Require-Bundle>
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.server.config;bundle-version="${org.apache.directory.server.version}",
  org.apache.directory.server.core.api;bundle-version="${org.apache.directory.server.version}",
  org.apache.directory.server.xdbm.partition;bundle-version="${org.apache.directory.server.version}",
diff --git a/plugins/ldapservers/pom-first.xml b/plugins/ldapservers/pom-first.xml
index 5f84f9a..5de21f9 100644
--- a/plugins/ldapservers/pom-first.xml
+++ b/plugins/ldapservers/pom-first.xml
@@ -64,7 +64,7 @@
             </Import-Package>
             
             <Require-Bundle>
- org.apache.directory.api.util;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.studio.common.core,
  org.apache.directory.studio.common.ui,
  org.apache.directory.studio.connection.core,
diff --git a/plugins/ldifeditor/pom-first.xml b/plugins/ldifeditor/pom-first.xml
index aa493fb..60ebb33 100644
--- a/plugins/ldifeditor/pom-first.xml
+++ b/plugins/ldifeditor/pom-first.xml
@@ -60,8 +60,8 @@
             <Import-Package/>
             
             <Require-Bundle>
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.util;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.studio.common.core,
  org.apache.directory.studio.common.ui,
  org.apache.directory.studio.connection.core,
diff --git a/plugins/ldifparser/pom-first.xml b/plugins/ldifparser/pom-first.xml
index 9d30ae3..5e1885b 100644
--- a/plugins/ldifparser/pom-first.xml
+++ b/plugins/ldifparser/pom-first.xml
@@ -66,7 +66,7 @@
             </Import-Package>
             
             <Require-Bundle>
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}"
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}"
             </Require-Bundle>
           </instructions>
         </configuration>
diff --git a/plugins/openldap.acl.editor/pom-first.xml b/plugins/openldap.acl.editor/pom-first.xml
index 3ed03db..31a6d0d 100644
--- a/plugins/openldap.acl.editor/pom-first.xml
+++ b/plugins/openldap.acl.editor/pom-first.xml
@@ -77,8 +77,8 @@
  org.slf4j
             </Import-Package>
             <Require-Bundle>
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.util;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.studio.common.core,
  org.apache.directory.studio.common.ui,
  org.apache.directory.studio.connection.core,
diff --git a/plugins/openldap.common.ui/pom-first.xml b/plugins/openldap.common.ui/pom-first.xml
index be944d2..a6e9d92 100644
--- a/plugins/openldap.common.ui/pom-first.xml
+++ b/plugins/openldap.common.ui/pom-first.xml
@@ -53,8 +53,8 @@
  org.apache.directory.studio.openldap.common.ui.widgets</Export-Package>
  
             <Require-Bundle>
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.util;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.studio.common.core,
  org.apache.directory.studio.common.ui,
  org.apache.directory.studio.connection.core,
diff --git a/plugins/openldap.config.editor/pom-first.xml b/plugins/openldap.config.editor/pom-first.xml
index 2fcdafe..87a0044 100644
--- a/plugins/openldap.config.editor/pom-first.xml
+++ b/plugins/openldap.config.editor/pom-first.xml
@@ -60,11 +60,11 @@
  org.apache.directory.server.core.api;bundle-version="${org.apache.directory.server.version}",
  org.apache.directory.server.ldif.partition;bundle-version="${org.apache.directory.server.version}",
  org.apache.directory.server.xdbm.partition;bundle-version="${org.apache.directory.server.version}",
- org.apache.directory.api.asn1.api;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.schema;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.extras.util;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.util;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.asn1.api;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.schema;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.extras.util;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.studio.openldap.common.ui,
  org.apache.directory.studio.openldap.syncrepl,
  org.apache.directory.studio.common.core,
diff --git a/plugins/openldap.syncrepl/pom-first.xml b/plugins/openldap.syncrepl/pom-first.xml
index 70dab4e..732b0f7 100644
--- a/plugins/openldap.syncrepl/pom-first.xml
+++ b/plugins/openldap.syncrepl/pom-first.xml
@@ -46,7 +46,7 @@
             <Bundle-Localization>plugin</Bundle-Localization>
             <Eclipse-LazyStart>true</Eclipse-LazyStart>
             <Require-Bundle>
-              org.apache.directory.api.util;bundle-version="${org.apache.directory.api.version}"
+              org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}"
             </Require-Bundle>
             <Export-Package>org.apache.directory.studio.openldap.syncrepl</Export-Package>
           </instructions>
diff --git a/plugins/schemaeditor/pom-first.xml b/plugins/schemaeditor/pom-first.xml
index 8832bd3..d32627b 100644
--- a/plugins/schemaeditor/pom-first.xml
+++ b/plugins/schemaeditor/pom-first.xml
@@ -76,11 +76,11 @@
             </Import-Package>
 
             <Require-Bundle>
- org.apache.directory.api.asn1.api;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.schema;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.schema.converter;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.util;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.asn1.api;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.schema;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.schema.converter;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.studio.common.core,
  org.apache.directory.studio.common.ui,
  org.apache.directory.studio.connection.core,
diff --git a/plugins/valueeditors/pom-first.xml b/plugins/valueeditors/pom-first.xml
index 85ea2f8..95338de 100644
--- a/plugins/valueeditors/pom-first.xml
+++ b/plugins/valueeditors/pom-first.xml
@@ -68,8 +68,8 @@
             </Import-Package>
             
             <Require-Bundle>
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.util;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.directory.studio.common.ui,
  org.apache.directory.studio.connection.core,
  org.apache.directory.studio.connection.ui,
diff --git a/pom.xml b/pom.xml
index 07d675e..330bedf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,17 +79,18 @@
     <log4j.log4j.bundleversion>1.2.17</log4j.log4j.bundleversion>
     <com.github.ben-manes.caffeine.version>2.7.0</com.github.ben-manes.caffeine.version>
     <com.github.ben-manes.caffeine.bundleversion>2.7.0</com.github.ben-manes.caffeine.bundleversion>
-    <org.apache.commons.codec.version>1.13</org.apache.commons.codec.version>
-    <org.apache.commons.codec.bundleversion>1.13.0</org.apache.commons.codec.bundleversion>
+    <org.apache.commons.codec.version>1.14</org.apache.commons.codec.version>
+    <org.apache.commons.codec.bundleversion>1.14.0</org.apache.commons.codec.bundleversion>
     <org.apache.commons.collections4.version>4.4</org.apache.commons.collections4.version>
     <org.apache.commons.collections4.bundleversion>4.4.0</org.apache.commons.collections4.bundleversion>
     <org.apache.commons.io.version>2.6</org.apache.commons.io.version>
     <org.apache.commons.io.bundleversion>2.6.0</org.apache.commons.io.bundleversion>
     <org.apache.commons.lang3.version>3.9</org.apache.commons.lang3.version>
     <org.apache.commons.lang3.bundleversion>3.9</org.apache.commons.lang3.bundleversion>
-    <org.apache.commons.pool.version>2.7.0</org.apache.commons.pool.version>
-    <org.apache.commons.pool.bundleversion>2.7.0</org.apache.commons.pool.bundleversion>
-    <org.apache.directory.api.version>2.0.0</org.apache.directory.api.version>
+    <org.apache.commons.pool.version>2.8.0</org.apache.commons.pool.version>
+    <org.apache.commons.pool.bundleversion>2.8.0</org.apache.commons.pool.bundleversion>
+    <org.apache.directory.api.version>2.0.1-SNAPSHOT</org.apache.directory.api.version>
+    <org.apache.directory.api.bundleversion>2.0.1.SNAPSHOT</org.apache.directory.api.bundleversion>
     <org.apache.directory.server.version>2.0.0.AM26</org.apache.directory.server.version>
     <org.apache.mina.version>2.1.3</org.apache.mina.version>
     <org.apache.mina.bundleversion>2.1.3</org.apache.mina.bundleversion>
diff --git a/tests/test.integration.core/pom-first.xml b/tests/test.integration.core/pom-first.xml
index 192aa87..70a38f9 100644
--- a/tests/test.integration.core/pom-first.xml
+++ b/tests/test.integration.core/pom-first.xml
@@ -55,12 +55,13 @@
  org.apache.directory.server.core.annotations;bundle-version="${org.apache.directory.server.version}",
  org.apache.directory.server.core.api;bundle-version="${org.apache.directory.server.version}",
  org.apache.directory.server.protocol.ldap;bundle-version="${org.apache.directory.server.version}",
- org.apache.directory.api.asn1.api;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.client.api;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.codec.core;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.net.mina;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.util;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.asn1.api;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.client.api;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.codec.core;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.extras.codec.api;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.net.mina;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.mina.core;bundle-version="${org.apache.mina.bundleversion}",
  org.apache.directory.studio.connection.core,
  org.apache.directory.studio.common.core,
diff --git a/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/ConnectionWrapperTestBase.java
b/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/ConnectionWrapperTestBase.java
index 886d16b..80ebbdc 100644
--- a/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/ConnectionWrapperTestBase.java
+++ b/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/ConnectionWrapperTestBase.java
@@ -30,13 +30,9 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
-import java.io.ByteArrayInputStream;
 import java.net.ConnectException;
 import java.nio.channels.UnresolvedAddressException;
 import java.nio.charset.StandardCharsets;
-import java.security.cert.Certificate;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -44,6 +40,9 @@ import java.util.function.Function;
 
 import javax.naming.directory.SearchControls;
 
+import org.apache.directory.api.ldap.codec.api.LdapApiService;
+import org.apache.directory.api.ldap.codec.api.LdapApiServiceFactory;
+import org.apache.directory.api.ldap.extras.extended.pwdModify.PasswordModifyRequest;
 import org.apache.directory.api.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.api.ldap.model.entry.DefaultEntry;
 import org.apache.directory.api.ldap.model.entry.DefaultModification;
@@ -53,13 +52,17 @@ import org.apache.directory.api.ldap.model.entry.ModificationOperation;
 import org.apache.directory.api.ldap.model.exception.LdapAuthenticationException;
 import org.apache.directory.api.ldap.model.exception.LdapException;
 import org.apache.directory.api.ldap.model.exception.LdapLoopDetectedException;
+import org.apache.directory.api.ldap.model.message.ExtendedResponse;
+import org.apache.directory.api.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.api.ldap.model.name.Dn;
+import org.apache.directory.api.util.Strings;
 import org.apache.directory.ldap.client.api.exception.InvalidConnectionException;
 import org.apache.directory.server.annotations.CreateLdapServer;
 import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.annotations.ApplyLdifFiles;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.server.ldap.handlers.extended.PwdModifyHandler;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
@@ -76,7 +79,6 @@ import org.apache.mina.util.AvailablePortFinder;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.junit.After;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -89,7 +91,8 @@ import org.junit.runner.RunWith;
  */
 @RunWith(FrameworkRunner.class)
 @CreateLdapServer(transports =
-    { @CreateTransport(protocol = "LDAP"), @CreateTransport(protocol = "LDAPS") })
+    { @CreateTransport(protocol = "LDAP"), @CreateTransport(protocol = "LDAPS") }, extendedOpHandlers
=
+    { PwdModifyHandler.class })
 @ApplyLdifFiles(clazz = ConnectionWrapperTestBase.class, value = "org/apache/directory/studio/test/integration/core/TestData.ldif")
 public abstract class ConnectionWrapperTestBase extends AbstractLdapTestUnit
 {
@@ -467,6 +470,22 @@ public abstract class ConnectionWrapperTestBase extends AbstractLdapTestUnit
 
 
     @Test
+    public void testAdd() throws Exception
+    {
+        String dn = "uid=user.X,ou=users,ou=system";
+
+        StudioProgressMonitor monitor = getProgressMonitor();
+        Entry entry = new DefaultEntry( dn, "objectClass: inetOrgPerson", "sn: X", "cn: X",
"uid: user.X" );
+        getConnectionWrapper( monitor ).createEntry( entry, null, monitor, null );
+
+        // should have created entry
+        assertFalse( monitor.isCanceled() );
+        assertFalse( monitor.errorsReported() );
+        assertTrue( service.getAdminSession().exists( dn ) );
+    }
+
+
+    @Test
     public void testAddFollowsReferral_DirectReferral() throws Exception
     {
         String targetDn = "uid=user.X,ou=users,ou=system";
@@ -521,6 +540,30 @@ public abstract class ConnectionWrapperTestBase extends AbstractLdapTestUnit
 
 
     @Test
+    public void testModify() throws Exception
+    {
+        String dn = "uid=user.X,ou=users,ou=system";
+
+        // create entry
+        service.getAdminSession().add( new DefaultEntry( service.getSchemaManager(), dn,
+            "objectClass: inetOrgPerson", "sn: X", "cn: X", "uid: user.X" ) );
+
+        // modify entry
+        StudioProgressMonitor monitor = getProgressMonitor();
+        List<Modification> modifications = Collections.singletonList(
+            new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE,
+                new DefaultAttribute( "sn", "modified" ) ) );
+        getConnectionWrapper( monitor ).modifyEntry( new Dn( dn ), modifications, null, monitor,
null );
+
+        // should have modified the entry
+        assertFalse( monitor.isCanceled() );
+        assertFalse( monitor.errorsReported() );
+        Entry entry = service.getAdminSession().lookup( new Dn( dn ) );
+        assertEquals( "modified", entry.get( "sn" ).getString() );
+    }
+
+
+    @Test
     public void testModifyFollowsReferral_DirectReferral() throws Exception
     {
         String targetDn = "uid=user.X,ou=users,ou=system";
@@ -596,6 +639,26 @@ public abstract class ConnectionWrapperTestBase extends AbstractLdapTestUnit
 
 
     @Test
+    public void testDelete() throws Exception
+    {
+        String dn = "uid=user.X,ou=users,ou=system";
+
+        // create entry
+        service.getAdminSession().add( new DefaultEntry( service.getSchemaManager(), dn,
+            "objectClass: inetOrgPerson", "sn: X", "cn: X", "uid: user.X" ) );
+
+        // delete entry
+        StudioProgressMonitor monitor = getProgressMonitor();
+        getConnectionWrapper( monitor ).deleteEntry( new Dn( dn ), null, monitor, null );
+
+        // should have deleted the entry
+        assertFalse( monitor.isCanceled() );
+        assertFalse( monitor.errorsReported() );
+        assertFalse( service.getAdminSession().exists( dn ) );
+    }
+
+
+    @Test
     public void testDeleteFollowsReferral_DirectReferral() throws Exception
     {
         String targetDn = "uid=user.X,ou=users,ou=system";
@@ -692,4 +755,33 @@ public abstract class ConnectionWrapperTestBase extends AbstractLdapTestUnit
 
         return connectionWrapper;
     }
+
+
+    @Test
+    public void testPasswordModifyRequestExtendedOperation() throws Exception
+    {
+        String dn = "uid=user.X,ou=users,ou=system";
+
+        // create target entry
+        service.getAdminSession().add( new DefaultEntry( service.getSchemaManager(), dn,
+            "objectClass: inetOrgPerson", "sn: X", "cn: X", "uid: user.X", "userPassword:
 secret" ) );
+
+        // modify password
+        LdapApiService ldapApiService = LdapApiServiceFactory.getSingleton();
+        PasswordModifyRequest request = ( PasswordModifyRequest ) ldapApiService.getExtendedRequestFactories()
+            .get( PasswordModifyRequest.EXTENSION_OID ).newRequest();
+        request.setUserIdentity( Strings.getBytesUtf8( dn ) );
+        request.setOldPassword( Strings.getBytesUtf8( "secret" ) );
+        request.setNewPassword( Strings.getBytesUtf8( "s3cre3t" ) );
+        StudioProgressMonitor monitor = getProgressMonitor();
+        ExtendedResponse response = getConnectionWrapper( monitor ).extended( request, monitor
);
+
+        // should have modified password of the target entry
+        assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
+        assertFalse( monitor.isCanceled() );
+        assertFalse( monitor.errorsReported() );
+        Entry entry = service.getAdminSession().lookup( new Dn( dn ) );
+        assertEquals( "s3cre3t", Strings.utf8ToString( entry.get( "userPassword" ).getBytes()
) );
+    }
+
 }
diff --git a/tests/test.integration.ui/pom-first.xml b/tests/test.integration.ui/pom-first.xml
index d4e29d9..f577b20 100644
--- a/tests/test.integration.ui/pom-first.xml
+++ b/tests/test.integration.ui/pom-first.xml
@@ -64,12 +64,12 @@
  org.apache.directory.server.jdbm.partition;bundle-version="${org.apache.directory.server.version}",
  org.apache.directory.server.xdbm.partition;bundle-version="${org.apache.directory.server.version}",
  
- org.apache.directory.api.asn1.api;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.client.api;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.codec.core;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.ldap.net.mina;bundle-version="${org.apache.directory.api.version}",
- org.apache.directory.api.util;bundle-version="${org.apache.directory.api.version}",
+ org.apache.directory.api.asn1.api;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.client.api;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.codec.core;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.net.mina;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
  org.apache.mina.core;bundle-version="${org.apache.mina.bundleversion}",
  
  org.apache.directory.studio.aciitemeditor,


Mime
View raw message