directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [directory-ldap-api] branch master updated: o Added the startTransaction extended operation
Date Wed, 24 Jan 2018 07:44:42 GMT
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-ldap-api.git


The following commit(s) were added to refs/heads/master by this push:
     new 06c5fcb  o Added the startTransaction extended operation
06c5fcb is described below

commit 06c5fcb86da3aa9fc210b08cec09cfc98d5d4b18
Author: Emmanuel L├ęcharny <elecharny@symas.com>
AuthorDate: Wed Jan 24 08:44:13 2018 +0100

    o Added the startTransaction extended operation
---
 .../api/osgi/ApiLdapExtrasCodecApiOsgiTest.java    |  5 +++-
 .../codec/api/StandaloneLdapCodecServiceTest.java  | 10 +++++---
 .../ldap/codec/standalone/CodecFactoryUtil.java    | 30 +++++++++++++---------
 .../codec/standalone/AbstractCodecServiceTest.java |  9 ++++---
 ldap/extras/codec-api/pom.xml                      |  1 +
 .../StartTransactionResponseImpl.java              | 11 +++++---
 ldap/extras/codec/pom.xml                          |  2 ++
 .../api/ldap/extras/ExtrasBundleActivator.java     | 27 +++++++++++--------
 .../startTransaction/StartTransactionFactory.java  | 13 +++-------
 .../StartTransactionRequestDecorator.java          |  3 +--
 10 files changed, 65 insertions(+), 46 deletions(-)

diff --git a/integ-osgi/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasCodecApiOsgiTest.java
b/integ-osgi/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasCodecApiOsgiTest.java
index df31b6b..b8595b7 100644
--- a/integ-osgi/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasCodecApiOsgiTest.java
+++ b/integ-osgi/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasCodecApiOsgiTest.java
@@ -40,6 +40,8 @@ import org.apache.directory.api.ldap.extras.extended.pwdModify.PasswordModifyReq
 import org.apache.directory.api.ldap.extras.extended.pwdModify.PasswordModifyResponseImpl;
 import org.apache.directory.api.ldap.extras.extended.startTls.StartTlsRequestImpl;
 import org.apache.directory.api.ldap.extras.extended.startTls.StartTlsResponseImpl;
+import org.apache.directory.api.ldap.extras.extended.startTransaction.StartTransactionRequestImpl;
+import org.apache.directory.api.ldap.extras.extended.startTransaction.StartTransactionResponseImpl;
 import org.apache.directory.api.ldap.extras.extended.whoAmI.WhoAmIRequestImpl;
 import org.apache.directory.api.ldap.extras.extended.whoAmI.WhoAmIResponseImpl;
 import org.apache.directory.api.ldap.model.name.Dn;
@@ -78,6 +80,7 @@ public class ApiLdapExtrasCodecApiOsgiTest extends ApiOsgiTestBase
         new WhoAmIResponseImpl().setDn( new Dn( "uid=admin,ou=system" ) );
         new StartTlsRequestImpl();
         new StartTlsResponseImpl();
+        new StartTransactionRequestImpl();
+        new StartTransactionResponseImpl();
     }
-
 }
diff --git a/integ/src/test/java/org/apache/directory/api/ldap/codec/api/StandaloneLdapCodecServiceTest.java
b/integ/src/test/java/org/apache/directory/api/ldap/codec/api/StandaloneLdapCodecServiceTest.java
index fa4c21f..6c7eda1 100644
--- a/integ/src/test/java/org/apache/directory/api/ldap/codec/api/StandaloneLdapCodecServiceTest.java
+++ b/integ/src/test/java/org/apache/directory/api/ldap/codec/api/StandaloneLdapCodecServiceTest.java
@@ -72,12 +72,14 @@ public class StandaloneLdapCodecServiceTest
                 StandaloneLdapApiService.EXTENDED_OPERATIONS_LIST,
                 "org.apache.directory.api.ldap.extras.extended.ads_impl.cancel.CancelFactory,"
                     + "org.apache.directory.api.ldap.extras.extended.ads_impl.certGeneration.CertGenerationFactory,"
+                    + "org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnectFactory,"
                     + "org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulShutdown.GracefulShutdownFactory,"
-                    + "org.apache.directory.api.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureFactory,"
                     + "org.apache.directory.api.ldap.extras.extended.ads_impl.pwdModify.PasswordModifyFactory,"
-                    + "org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnectFactory,"
-                    + "org.apache.directory.api.ldap.extras.extended.ads_impl.whoAmI.WhoAmIFactory,"
-                    + "org.apache.directory.api.ldap.extras.extended.ads_impl.startTls.StartTlsFactory"
);
+                    + "org.apache.directory.api.ldap.extras.extended.ads_impl.startTls.StartTlsFactory,"
+                    + "org.apache.directory.api.ldap.extras.extended.ads_impl.startTransaction.StartTransactionFactory,"
+                    + "org.apache.directory.api.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureFactory,"
+                    + "org.apache.directory.api.ldap.extras.extended.ads_impl.whoAmI.WhoAmIFactory"
+                    );
     }
 
 
diff --git a/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java
b/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java
index 045c20b..46d17bf 100644
--- a/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java
+++ b/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java
@@ -67,6 +67,7 @@ import org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulDisconnect
 import org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulShutdown.GracefulShutdownFactory;
 import org.apache.directory.api.ldap.extras.extended.ads_impl.pwdModify.PasswordModifyFactory;
 import org.apache.directory.api.ldap.extras.extended.ads_impl.startTls.StartTlsFactory;
+import org.apache.directory.api.ldap.extras.extended.ads_impl.startTransaction.StartTransactionFactory;
 import org.apache.directory.api.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureFactory;
 import org.apache.directory.api.ldap.extras.extended.ads_impl.whoAmI.WhoAmIFactory;
 import org.apache.directory.api.ldap.model.message.controls.Cascade;
@@ -210,6 +211,7 @@ public final class CodecFactoryUtil
      * <li>passwordModify</li>
      * <li>whoAmI</li>
      * <li>startTls</li>
+     * <li>startTransaction</li>
      * </ul>
      * 
      * @param extendendOperationsFactories The map of extended operation factories
@@ -226,28 +228,32 @@ public final class CodecFactoryUtil
         extendendOperationsFactories.put( certGenerationFactory.getOid(), certGenerationFactory
);
         LOG.info( "Registered pre-bundled extended operation factory: {}", certGenerationFactory.getOid()
);
 
-        GracefulShutdownFactory gracefulShutdownFactory = new GracefulShutdownFactory( apiService
);
-        extendendOperationsFactories.put( gracefulShutdownFactory.getOid(), gracefulShutdownFactory
);
-        LOG.info( "Registered pre-bundled extended operation factory: {}", gracefulShutdownFactory.getOid()
);
-
-        StoredProcedureFactory storedProcedureFactory = new StoredProcedureFactory( apiService
);
-        extendendOperationsFactories.put( storedProcedureFactory.getOid(), storedProcedureFactory
);
-        LOG.info( "Registered pre-bundled extended operation factory: {}", storedProcedureFactory.getOid()
);
-
         GracefulDisconnectFactory gracefulDisconnectFactory = new GracefulDisconnectFactory(
apiService );
         extendendOperationsFactories.put( gracefulDisconnectFactory.getOid(), gracefulDisconnectFactory
);
         LOG.info( "Registered pre-bundled extended operation factory: {}", gracefulDisconnectFactory.getOid()
);
 
+        GracefulShutdownFactory gracefulShutdownFactory = new GracefulShutdownFactory( apiService
);
+        extendendOperationsFactories.put( gracefulShutdownFactory.getOid(), gracefulShutdownFactory
);
+        LOG.info( "Registered pre-bundled extended operation factory: {}", gracefulShutdownFactory.getOid()
);
+
         PasswordModifyFactory passwordModifyFactory = new PasswordModifyFactory( apiService
);
         extendendOperationsFactories.put( passwordModifyFactory.getOid(), passwordModifyFactory
);
         LOG.info( "Registered pre-bundled extended operation factory: {}", passwordModifyFactory.getOid()
);
 
-        WhoAmIFactory whoAmIFactory = new WhoAmIFactory( apiService );
-        extendendOperationsFactories.put( whoAmIFactory.getOid(), whoAmIFactory );
-        LOG.info( "Registered pre-bundled extended operation factory: {}", whoAmIFactory.getOid()
);
-
         StartTlsFactory startTlsFactory = new StartTlsFactory( apiService );
         extendendOperationsFactories.put( startTlsFactory.getOid(), startTlsFactory );
         LOG.info( "Registered pre-bundled extended operation factory: {}", startTlsFactory.getOid()
);
+
+        StartTransactionFactory startTransactionFactory = new StartTransactionFactory( apiService
);
+        extendendOperationsFactories.put( startTransactionFactory.getOid(), startTransactionFactory
);
+        LOG.info( "Registered pre-bundled extended operation factory: {}", startTransactionFactory.getOid()
);
+
+        StoredProcedureFactory storedProcedureFactory = new StoredProcedureFactory( apiService
);
+        extendendOperationsFactories.put( storedProcedureFactory.getOid(), storedProcedureFactory
);
+        LOG.info( "Registered pre-bundled extended operation factory: {}", storedProcedureFactory.getOid()
);
+
+        WhoAmIFactory whoAmIFactory = new WhoAmIFactory( apiService );
+        extendendOperationsFactories.put( whoAmIFactory.getOid(), whoAmIFactory );
+        LOG.info( "Registered pre-bundled extended operation factory: {}", whoAmIFactory.getOid()
);
     }
 }
diff --git a/ldap/codec/standalone/src/test/java/org/apache/directory/api/ldap/codec/standalone/AbstractCodecServiceTest.java
b/ldap/codec/standalone/src/test/java/org/apache/directory/api/ldap/codec/standalone/AbstractCodecServiceTest.java
index ae7ad4b..e8c1811 100644
--- a/ldap/codec/standalone/src/test/java/org/apache/directory/api/ldap/codec/standalone/AbstractCodecServiceTest.java
+++ b/ldap/codec/standalone/src/test/java/org/apache/directory/api/ldap/codec/standalone/AbstractCodecServiceTest.java
@@ -74,12 +74,13 @@ public abstract class AbstractCodecServiceTest
         System.setProperty( StandaloneLdapApiService.EXTENDED_OPERATIONS_LIST,
             "org.apache.directory.api.ldap.extras.extended.ads_impl.cancel.CancelFactory,"
+
                 "org.apache.directory.api.ldap.extras.extended.ads_impl.certGeneration.CertGenerationFactory,"
+
+                "org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnectFactory"
+
                 "org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulShutdown.GracefulShutdownFactory,"
+
-                "org.apache.directory.api.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureFactory,"
+
                 "org.apache.directory.api.ldap.extras.extended.ads_impl.pwdModify.PasswordModifyFactory,"
+
-                "org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnectFactory"
+
-                "org.apache.directory.api.ldap.extras.extended.ads_impl.whoAmI.WhoAmIFactory,"
+
-                "org.apache.directory.api.ldap.extras.extended.ads_impl.startTls.StartTlsFactory"
);
+                "org.apache.directory.api.ldap.extras.extended.ads_impl.startTls.StartTlsFactory"
+
+                "org.apache.directory.api.ldap.extras.extended.ads_impl.startTransaction.StartTransactionFactory"
+
+                "org.apache.directory.api.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureFactory,"
+
+                "org.apache.directory.api.ldap.extras.extended.ads_impl.whoAmI.WhoAmIFactory"
);
 
         codec = LdapApiServiceFactory.getSingleton();
         encoder = new LdapEncoder( codec );
diff --git a/ldap/extras/codec-api/pom.xml b/ldap/extras/codec-api/pom.xml
index 17c5f4b..6db0e3d 100644
--- a/ldap/extras/codec-api/pom.xml
+++ b/ldap/extras/codec-api/pom.xml
@@ -79,6 +79,7 @@
               org.apache.directory.api.ldap.extras.extended.gracefulShutdown;version=${project.version};-noimport:=true,
               org.apache.directory.api.ldap.extras.extended.pwdModify;version=${project.version};-noimport:=true,
               org.apache.directory.api.ldap.extras.extended.startTls;version=${project.version};-noimport:=true,
+              org.apache.directory.api.ldap.extras.extended.startTransaction;version=${project.version};-noimport:=true,
               org.apache.directory.api.ldap.extras.extended.storedProcedure;version=${project.version};-noimport:=true,
               org.apache.directory.api.ldap.extras.extended.whoAmI;version=${project.version};-noimport:=true
             </Export-Package>
diff --git a/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/startTransaction/StartTransactionResponseImpl.java
b/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/startTransaction/StartTransactionResponseImpl.java
index 61f8f2f..904dc92 100644
--- a/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/startTransaction/StartTransactionResponseImpl.java
+++ b/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/extended/startTransaction/StartTransactionResponseImpl.java
@@ -20,6 +20,8 @@
 package org.apache.directory.api.ldap.extras.extended.startTransaction;
 
 
+import java.util.Arrays;
+
 import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.model.message.ExtendedResponseImpl;
 import org.apache.directory.api.ldap.model.message.ResultCodeEnum;
@@ -139,8 +141,6 @@ public class StartTransactionResponseImpl extends ExtendedResponseImpl
implement
     public int hashCode()
     {
         int hash = 37;
-        // Seems simple but look at the equals() method ...
-        hash = hash * 17;
         
         if ( transactionId != null )
         {
@@ -167,7 +167,12 @@ public class StartTransactionResponseImpl extends ExtendedResponseImpl
implement
             return true;
         }
 
-        return obj instanceof StartTransactionResponseImpl;
+        if ( !( obj instanceof StartTransactionResponseImpl ) )
+        {
+            return false;
+        }
+        
+        return Arrays.equals( transactionId, ( ( StartTransactionResponseImpl ) obj ).transactionId
);
     }
     
     
diff --git a/ldap/extras/codec/pom.xml b/ldap/extras/codec/pom.xml
index fc73236..b6c4fcb 100644
--- a/ldap/extras/codec/pom.xml
+++ b/ldap/extras/codec/pom.xml
@@ -117,6 +117,7 @@
               org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulShutdown;version=${project.version};-noimport:=true,
               org.apache.directory.api.ldap.extras.extended.ads_impl.pwdModify;version=${project.version};-noimport:=true,
               org.apache.directory.api.ldap.extras.extended.ads_impl.startTls;version=${project.version};-noimport:=true,
+              org.apache.directory.api.ldap.extras.extended.ads_impl.startTransaction;version=${project.version};-noimport:=true,
               org.apache.directory.api.ldap.extras.extended.ads_impl.storedProcedure;version=${project.version};-noimport:=true,
               org.apache.directory.api.ldap.extras.extended.ads_impl.whoAmI;version=${project.version};-noimport:=true
             </Export-Package>
@@ -144,6 +145,7 @@
               org.apache.directory.api.ldap.extras.extended.gracefulShutdown;version=${project.version},
               org.apache.directory.api.ldap.extras.extended.pwdModify;version=${project.version},
               org.apache.directory.api.ldap.extras.extended.startTls;version=${project.version},
+              org.apache.directory.api.ldap.extras.extended.startTransaction;version=${project.version},
               org.apache.directory.api.ldap.extras.extended.storedProcedure;version=${project.version},
               org.apache.directory.api.ldap.extras.extended.whoAmI;version=${project.version},
               org.apache.directory.api.ldap.model.exception;version=${project.version},
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/ExtrasBundleActivator.java
b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/ExtrasBundleActivator.java
index bf0e48f..f2ff0a0 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/ExtrasBundleActivator.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/ExtrasBundleActivator.java
@@ -54,6 +54,7 @@ import org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulDisconnect
 import org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulShutdown.GracefulShutdownFactory;
 import org.apache.directory.api.ldap.extras.extended.ads_impl.pwdModify.PasswordModifyFactory;
 import org.apache.directory.api.ldap.extras.extended.ads_impl.startTls.StartTlsFactory;
+import org.apache.directory.api.ldap.extras.extended.ads_impl.startTransaction.StartTransactionFactory;
 import org.apache.directory.api.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureFactory;
 import org.apache.directory.api.ldap.extras.extended.ads_impl.whoAmI.WhoAmIFactory;
 import org.apache.directory.api.ldap.extras.extended.cancel.CancelRequest;
@@ -62,6 +63,7 @@ import org.apache.directory.api.ldap.extras.extended.gracefulDisconnect.Graceful
 import org.apache.directory.api.ldap.extras.extended.gracefulShutdown.GracefulShutdownRequest;
 import org.apache.directory.api.ldap.extras.extended.pwdModify.PasswordModifyRequest;
 import org.apache.directory.api.ldap.extras.extended.startTls.StartTlsRequest;
+import org.apache.directory.api.ldap.extras.extended.startTransaction.StartTransactionRequest;
 import org.apache.directory.api.ldap.extras.extended.storedProcedure.StoredProcedureRequest;
 import org.apache.directory.api.ldap.extras.extended.whoAmI.WhoAmIRequest;
 import org.osgi.framework.BundleActivator;
@@ -128,30 +130,32 @@ public class ExtrasBundleActivator implements BundleActivator
             // --------------------------------------------------------------------
             // Register Extended Request Factories
             // --------------------------------------------------------------------
-
             CancelFactory cancelFactory = new CancelFactory( codec );
             codec.registerExtendedRequest( cancelFactory );
 
             CertGenerationFactory certGenerationFactory = new CertGenerationFactory( codec
);
             codec.registerExtendedRequest( certGenerationFactory );
 
+            GracefulDisconnectFactory gracefulDisconnectFactory = new GracefulDisconnectFactory(
codec );
+            codec.registerExtendedRequest( gracefulDisconnectFactory );
+
             GracefulShutdownFactory gracefulShutdownFactory = new GracefulShutdownFactory(
codec );
             codec.registerExtendedRequest( gracefulShutdownFactory );
 
-            StoredProcedureFactory storedProcedureFactory = new StoredProcedureFactory( codec
);
-            codec.registerExtendedRequest( storedProcedureFactory );
-
             PasswordModifyFactory passwordModifyFactory = new PasswordModifyFactory( codec
);
             codec.registerExtendedRequest( passwordModifyFactory );
 
-            GracefulDisconnectFactory gracefulDisconnectFactory = new GracefulDisconnectFactory(
codec );
-            codec.registerExtendedRequest( gracefulDisconnectFactory );
+            StartTlsFactory startTlsFactory = new StartTlsFactory( codec );
+            codec.registerExtendedRequest( startTlsFactory );
+
+            StartTransactionFactory startTransactionFactory = new StartTransactionFactory(
codec );
+            codec.registerExtendedRequest( startTransactionFactory );
+
+            StoredProcedureFactory storedProcedureFactory = new StoredProcedureFactory( codec
);
+            codec.registerExtendedRequest( storedProcedureFactory );
 
             WhoAmIFactory whoAmIFactory = new WhoAmIFactory( codec );
             codec.registerExtendedRequest( whoAmIFactory );
-
-            StartTlsFactory startTlsFactory = new StartTlsFactory( codec );
-            codec.registerExtendedRequest( startTlsFactory );
         }
 
 
@@ -178,11 +182,12 @@ public class ExtrasBundleActivator implements BundleActivator
             codec.unregisterExtendedRequest( CancelRequest.EXTENSION_OID );
             codec.unregisterExtendedRequest( CertGenerationRequest.EXTENSION_OID );
             codec.unregisterExtendedRequest( GracefulShutdownRequest.EXTENSION_OID );
-            codec.unregisterExtendedRequest( StoredProcedureRequest.EXTENSION_OID );
             codec.unregisterExtendedRequest( GracefulDisconnectResponse.EXTENSION_OID );
             codec.unregisterExtendedRequest( PasswordModifyRequest.EXTENSION_OID );
-            codec.unregisterExtendedRequest( WhoAmIRequest.EXTENSION_OID );
             codec.unregisterExtendedRequest( StartTlsRequest.EXTENSION_OID );
+            codec.unregisterExtendedRequest( StartTransactionRequest.EXTENSION_OID );
+            codec.unregisterExtendedRequest( StoredProcedureRequest.EXTENSION_OID );
+            codec.unregisterExtendedRequest( WhoAmIRequest.EXTENSION_OID );
         }
 
 
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/startTransaction/StartTransactionFactory.java
b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/startTransaction/StartTransactionFactory.java
index 3328347..e004585 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/startTransaction/StartTransactionFactory.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/startTransaction/StartTransactionFactory.java
@@ -25,7 +25,9 @@ import org.apache.directory.api.ldap.codec.api.ExtendedOperationFactory;
 import org.apache.directory.api.ldap.codec.api.LdapApiService;
 import org.apache.directory.api.ldap.extras.extended.cancel.CancelRequest;
 import org.apache.directory.api.ldap.extras.extended.startTransaction.StartTransactionRequest;
+import org.apache.directory.api.ldap.extras.extended.startTransaction.StartTransactionRequestImpl;
 import org.apache.directory.api.ldap.extras.extended.startTransaction.StartTransactionResponse;
+import org.apache.directory.api.ldap.extras.extended.startTransaction.StartTransactionResponseImpl;
 import org.apache.directory.api.ldap.model.message.ExtendedRequest;
 import org.apache.directory.api.ldap.model.message.ExtendedResponse;
 
@@ -68,7 +70,7 @@ public class StartTransactionFactory implements ExtendedOperationFactory
     @Override
     public StartTransactionResponse newResponse( byte[] encodedValue ) throws DecoderException
     {
-        StartTransactionResponseDecorator response = new StartTransactionResponseDecorator(
codec, null );
+        StartTransactionResponseDecorator response = new StartTransactionResponseDecorator(
codec, new StartTransactionResponseImpl() );
         response.setResponseValue( encodedValue );
 
         return response;
@@ -81,14 +83,7 @@ public class StartTransactionFactory implements ExtendedOperationFactory
     @Override
     public StartTransactionRequest newRequest( byte[] value )
     {
-        /*
-        StartTransactionRequestDecorator req = new StartTransactionResponseDecorator( codec,
new StartTransactionResponseImpl() );
-        req.setRequestValue( value );
-
-        return req;
-        */
-        
-        return null;
+        return new StartTransactionRequestDecorator( codec, new StartTransactionRequestImpl()
);
     }
 
 
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/startTransaction/StartTransactionRequestDecorator.java
b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/startTransaction/StartTransactionRequestDecorator.java
index aff0a04..3212f03 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/startTransaction/StartTransactionRequestDecorator.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/startTransaction/StartTransactionRequestDecorator.java
@@ -20,7 +20,6 @@
 package org.apache.directory.api.ldap.extras.extended.ads_impl.startTransaction;
 
 
-import org.apache.directory.api.asn1.Asn1Object;
 import org.apache.directory.api.ldap.codec.api.ExtendedRequestDecorator;
 import org.apache.directory.api.ldap.codec.api.LdapApiService;
 import org.apache.directory.api.ldap.extras.extended.startTransaction.StartTransactionRequest;
@@ -33,7 +32,7 @@ import org.apache.directory.api.ldap.extras.extended.startTransaction.StartTrans
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class StartTransactionRequestDecorator extends ExtendedRequestDecorator<StartTransactionRequest>
implements
-    StartTransactionRequest, Asn1Object
+    StartTransactionRequest
 {
     /** The internal startTransaction request */
     private StartTransactionRequest startTransactionRequest;

-- 
To stop receiving notification emails like this one, please contact
elecharny@apache.org.

Mime
View raw message