directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r764357 [3/3] - in /directory/apacheds/branches/ldif-partition: core-api/src/main/java/org/apache/directory/server/core/ core-api/src/main/java/org/apache/directory/server/core/changelog/ core-api/src/main/java/org/apache/directory/server/c...
Date Mon, 13 Apr 2009 04:50:30 GMT
Modified: directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/CertGenerationRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/CertGenerationRequestHandler.java?rev=764357&r1=764356&r2=764357&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/CertGenerationRequestHandler.java
(original)
+++ directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/CertGenerationRequestHandler.java
Mon Apr 13 04:50:28 2009
@@ -32,16 +32,17 @@
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.asn1.codec.DecoderException;
-import org.apache.directory.shared.ldap.codec.extended.operations.CertGenerationContainer;
-import org.apache.directory.shared.ldap.codec.extended.operations.CertGenerationDecoder;
-import org.apache.directory.shared.ldap.codec.extended.operations.CertGenerationObject;
-import org.apache.directory.shared.ldap.message.ExtendedRequest;
+import org.apache.directory.shared.ldap.codec.extended.operations.certGeneration.CertGenerationContainer;
+import org.apache.directory.shared.ldap.codec.extended.operations.certGeneration.CertGenerationDecoder;
+import org.apache.directory.shared.ldap.codec.extended.operations.certGeneration.CertGenerationObject;
+import org.apache.directory.shared.ldap.message.InternalExtendedRequest;
 import org.apache.directory.shared.ldap.message.extended.CertGenerationRequest;
 import org.apache.directory.shared.ldap.message.extended.CertGenerationResponse;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 /**
  * An extended handler for digital certificate generation
  * 
@@ -78,7 +79,7 @@
     }
 
 
-    public void handleExtendedOperation( LdapSession session, ExtendedRequest req ) throws
Exception
+    public void handleExtendedOperation( LdapSession session, InternalExtendedRequest req
) throws Exception
     {
         ByteBuffer bb = ByteBuffer.wrap( req.getPayload() );
         Asn1Decoder decoder = new CertGenerationDecoder();

Modified: directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/GracefulShutdownHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/GracefulShutdownHandler.java?rev=764357&r1=764356&r2=764357&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/GracefulShutdownHandler.java
(original)
+++ directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/GracefulShutdownHandler.java
Mon Apr 13 04:50:28 2009
@@ -30,7 +30,7 @@
 import org.apache.directory.server.ldap.ExtendedOperationHandler;
 import org.apache.directory.server.ldap.LdapService;
 import org.apache.directory.server.ldap.LdapSession;
-import org.apache.directory.shared.ldap.message.ExtendedRequest;
+import org.apache.directory.shared.ldap.message.InternalExtendedRequest;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.extended.GracefulDisconnect;
 import org.apache.directory.shared.ldap.message.extended.GracefulShutdownRequest;
@@ -68,7 +68,7 @@
     }
 
 
-    public void handleExtendedOperation( LdapSession requestor, ExtendedRequest req ) throws
Exception
+    public void handleExtendedOperation( LdapSession requestor, InternalExtendedRequest req
) throws Exception
     {
         // make sue only the administrator can issue this shutdown request if 
         // not we respond to the requestor with with insufficientAccessRights(50)

Modified: directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/LaunchDiagnosticUiHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/LaunchDiagnosticUiHandler.java?rev=764357&r1=764356&r2=764357&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/LaunchDiagnosticUiHandler.java
(original)
+++ directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/LaunchDiagnosticUiHandler.java
Mon Apr 13 04:50:28 2009
@@ -43,7 +43,7 @@
 import org.apache.directory.server.xdbm.XdbmPartition;
 import org.apache.directory.server.xdbm.tools.ui.PartitionFrame;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
-import org.apache.directory.shared.ldap.message.ExtendedRequest;
+import org.apache.directory.shared.ldap.message.InternalExtendedRequest;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.extended.LaunchDiagnosticUiRequest;
 import org.apache.directory.shared.ldap.message.extended.LaunchDiagnosticUiResponse;
@@ -75,7 +75,7 @@
     }
 
 
-    public void handleExtendedOperation( LdapSession requestor, ExtendedRequest req )
+    public void handleExtendedOperation( LdapSession requestor, InternalExtendedRequest req
)
         throws Exception
     {
         DirectoryService service = requestor.getCoreSession().getDirectoryService();

Modified: directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StartTlsHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StartTlsHandler.java?rev=764357&r1=764356&r2=764357&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StartTlsHandler.java
(original)
+++ directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StartTlsHandler.java
Mon Apr 13 04:50:28 2009
@@ -39,10 +39,10 @@
 import org.apache.directory.server.ldap.ExtendedOperationHandler;
 import org.apache.directory.server.ldap.LdapService;
 import org.apache.directory.server.ldap.LdapSession;
-import org.apache.directory.shared.ldap.message.ExtendedRequest;
-import org.apache.directory.shared.ldap.message.ExtendedResponse;
+import org.apache.directory.shared.ldap.message.InternalExtendedRequest;
+import org.apache.directory.shared.ldap.message.InternalExtendedResponse;
 import org.apache.directory.shared.ldap.message.ExtendedResponseImpl;
-import org.apache.directory.shared.ldap.message.LdapResult;
+import org.apache.directory.shared.ldap.message.InternalLdapResult;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.mina.core.filterchain.IoFilterChain;
 import org.apache.mina.filter.ssl.SslFilter;
@@ -77,7 +77,7 @@
     }
     
 
-    public void handleExtendedOperation( LdapSession session, ExtendedRequest req ) throws
Exception
+    public void handleExtendedOperation( LdapSession session, InternalExtendedRequest req
) throws Exception
     {
         LOG.info( "Handling StartTLS request." );
         
@@ -93,8 +93,8 @@
             sslFilter.startSsl( session.getIoSession() );
         }
         
-        ExtendedResponse res = new ExtendedResponseImpl( req.getMessageId() );
-        LdapResult result = res.getLdapResult();
+        InternalExtendedResponse res = new ExtendedResponseImpl( req.getMessageId() );
+        InternalLdapResult result = res.getLdapResult();
         result.setResultCode( ResultCodeEnum.SUCCESS );
         res.setResponseName( EXTENSION_OID );
         res.setResponse( new byte[ 0 ] );

Modified: directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StoredProcedureExtendedOperationHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StoredProcedureExtendedOperationHandler.java?rev=764357&r1=764356&r2=764357&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StoredProcedureExtendedOperationHandler.java
(original)
+++ directory/apacheds/branches/ldif-partition/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StoredProcedureExtendedOperationHandler.java
Mon Apr 13 04:50:28 2009
@@ -41,12 +41,12 @@
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
-import org.apache.directory.shared.ldap.codec.extended.operations.StoredProcedure;
-import org.apache.directory.shared.ldap.codec.extended.operations.StoredProcedureContainer;
-import org.apache.directory.shared.ldap.codec.extended.operations.StoredProcedureDecoder;
-import org.apache.directory.shared.ldap.codec.extended.operations.StoredProcedure.StoredProcedureParameter;
-import org.apache.directory.shared.ldap.message.ExtendedRequest;
-import org.apache.directory.shared.ldap.message.ExtendedResponse;
+import org.apache.directory.shared.ldap.codec.extended.operations.storedProcedure.StoredProcedure;
+import org.apache.directory.shared.ldap.codec.extended.operations.storedProcedure.StoredProcedureContainer;
+import org.apache.directory.shared.ldap.codec.extended.operations.storedProcedure.StoredProcedureDecoder;
+import org.apache.directory.shared.ldap.codec.extended.operations.storedProcedure.StoredProcedure.StoredProcedureParameter;
+import org.apache.directory.shared.ldap.message.InternalExtendedRequest;
+import org.apache.directory.shared.ldap.message.InternalExtendedResponse;
 import org.apache.directory.shared.ldap.message.extended.StoredProcedureRequest;
 import org.apache.directory.shared.ldap.message.extended.StoredProcedureResponse;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -79,7 +79,7 @@
     }
 
 
-    public void handleExtendedOperation( LdapSession session, ExtendedRequest req ) throws
Exception
+    public void handleExtendedOperation( LdapSession session, InternalExtendedRequest req
) throws Exception
     {
         StoredProcedure spBean = decodeBean( req.getPayload() );
         
@@ -108,7 +108,7 @@
         Object response = engine.invokeProcedure( session.getCoreSession(), procedure, values
);
         
         byte[] serializedResponse = SerializationUtils.serialize( ( Serializable ) response
);
-        ( ( ExtendedResponse )( req.getResultResponse() ) ).setResponse( serializedResponse
);
+        ( ( InternalExtendedResponse )( req.getResultResponse() ) ).setResponse( serializedResponse
);
         session.getIoSession().write( req.getResultResponse() );
         
     }

Modified: directory/apacheds/branches/ldif-partition/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java?rev=764357&r1=764356&r2=764357&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java
(original)
+++ directory/apacheds/branches/ldif-partition/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java
Mon Apr 13 04:50:28 2009
@@ -34,15 +34,15 @@
 import org.apache.directory.server.ldap.handlers.UnbindHandler;
 import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
-import org.apache.directory.shared.ldap.message.AbandonRequest;
-import org.apache.directory.shared.ldap.message.AddRequest;
-import org.apache.directory.shared.ldap.message.BindRequest;
-import org.apache.directory.shared.ldap.message.CompareRequest;
-import org.apache.directory.shared.ldap.message.DeleteRequest;
-import org.apache.directory.shared.ldap.message.ModifyDnRequest;
-import org.apache.directory.shared.ldap.message.ModifyRequest;
-import org.apache.directory.shared.ldap.message.SearchRequest;
-import org.apache.directory.shared.ldap.message.UnbindRequest;
+import org.apache.directory.shared.ldap.message.InternalAbandonRequest;
+import org.apache.directory.shared.ldap.message.InternalAddRequest;
+import org.apache.directory.shared.ldap.message.InternalBindRequest;
+import org.apache.directory.shared.ldap.message.InternalCompareRequest;
+import org.apache.directory.shared.ldap.message.InternalDeleteRequest;
+import org.apache.directory.shared.ldap.message.InternalModifyDnRequest;
+import org.apache.directory.shared.ldap.message.InternalModifyRequest;
+import org.apache.directory.shared.ldap.message.InternalSearchRequest;
+import org.apache.directory.shared.ldap.message.InternalUnbindRequest;
 import org.apache.mina.core.session.IoSession;
 
 
@@ -113,7 +113,7 @@
     
     public static class BogusAbandonHandler extends AbandonHandler
     {
-        public void abandonMessageReceived( IoSession session, AbandonRequest request )
+        public void abandonMessageReceived( IoSession session, InternalAbandonRequest request
)
         {
             throw new NotImplementedException( "handler not implemented!" );
         }
@@ -122,7 +122,7 @@
     
     public static class BogusUnbindHandler extends UnbindHandler
     {
-        public void unbindMessageReceived( IoSession session, UnbindRequest request )
+        public void unbindMessageReceived( IoSession session, InternalUnbindRequest request
)
         {
             throw new NotImplementedException( "handler not implemented!" );
         }
@@ -130,7 +130,7 @@
 
     public static class BogusAddHandler extends AddHandler
     {
-        public void addMessageReceived( IoSession session, AddRequest request )
+        public void addMessageReceived( IoSession session, InternalAddRequest request )
         {
             throw new NotImplementedException( "handler not implemented!" );
         }
@@ -143,7 +143,7 @@
         }
 
 
-        public void bindMessageReceived( IoSession session, BindRequest request )
+        public void bindMessageReceived( IoSession session, InternalBindRequest request )
         {
             throw new NotImplementedException( "handler not implemented!" );
         }
@@ -151,7 +151,7 @@
 
     public static class BogusCompareHandler extends CompareHandler
     {
-        public void compareMessageReceived( IoSession session, CompareRequest request )
+        public void compareMessageReceived( IoSession session, InternalCompareRequest request
)
         {
             throw new NotImplementedException( "handler not implemented!" );
         }
@@ -159,7 +159,7 @@
 
     public static class BogusDeleteHandler extends  DeleteHandler
     {
-        public void deleteMessageReceived( IoSession session, DeleteRequest request )
+        public void deleteMessageReceived( IoSession session, InternalDeleteRequest request
)
         {
             throw new NotImplementedException( "handler not implemented!" );
         }
@@ -167,7 +167,7 @@
 
     public static class BogusModifyDnHandler extends  ModifyDnHandler
     {
-        public void modifyDnMessageReceived( IoSession session, ModifyDnRequest request )
+        public void modifyDnMessageReceived( IoSession session, InternalModifyDnRequest request
)
         {
             throw new NotImplementedException( "handler not implemented!" );
         }
@@ -175,7 +175,7 @@
 
     public static class BogusModifyHandler extends ModifyHandler
     {
-        public void modifyMessageReceived( IoSession session, ModifyRequest request )
+        public void modifyMessageReceived( IoSession session, InternalModifyRequest request
)
         {
             throw new NotImplementedException( "handler not implemented!" );
         }
@@ -183,7 +183,7 @@
 
     public static class BogusSearchHandler extends SearchHandler
     {
-        public void searchMessageReceived( IoSession session, SearchRequest request )
+        public void searchMessageReceived( IoSession session, InternalSearchRequest request
)
         {
             throw new NotImplementedException( "handler not implemented!" );
         }

Modified: directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java?rev=764357&r1=764356&r2=764357&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java
(original)
+++ directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java
Mon Apr 13 04:50:28 2009
@@ -61,7 +61,7 @@
 import org.apache.directory.server.core.partition.jdbm.JdbmPartition;
 import org.apache.directory.shared.asn1.util.Asn1StringUtils;
 import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
-import org.apache.directory.shared.ldap.message.MutableControl;
+import org.apache.directory.shared.ldap.message.InternalControl;
 import org.apache.directory.shared.ldap.util.ArrayUtils;
 import org.apache.mina.util.AvailablePortFinder;
 import org.junit.After;
@@ -394,7 +394,7 @@
     @Test
     public void testFailureWithUnsupportedControl() throws Exception
     {
-        MutableControl unsupported = new MutableControl()
+        InternalControl unsupported = new InternalControl()
         {
             boolean isCritical = true;
             private static final long serialVersionUID = 1L;
@@ -470,7 +470,7 @@
         user.put( oc );
         user.put( "sn", "Bush" );
         user.put( "userPassword", "Aerial" );
-        ctx.setRequestControls( new MutableControl[]
+        ctx.setRequestControls( new InternalControl[]
                 {unsupported} );
 
         try

Modified: directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java?rev=764357&r1=764356&r2=764357&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
(original)
+++ directory/apacheds/branches/ldif-partition/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
Mon Apr 13 04:50:28 2009
@@ -63,7 +63,7 @@
 import org.apache.directory.server.protocol.shared.transport.TcpTransport;
 import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
 import org.apache.directory.shared.ldap.message.BindRequestImpl;
-import org.apache.directory.shared.ldap.message.BindResponse;
+import org.apache.directory.shared.ldap.message.InternalBindResponse;
 import org.apache.directory.shared.ldap.message.MessageDecoder;
 import org.apache.directory.shared.ldap.message.MessageEncoder;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
@@ -516,13 +516,13 @@
      public void testNtlmBind() throws Exception
      {
          NtlmSaslBindClient client = new NtlmSaslBindClient( SupportedSaslMechanisms.NTLM
);
-         BindResponse type2response = client.bindType1( "type1_test".getBytes() );
+         InternalBindResponse type2response = client.bindType1( "type1_test".getBytes() );
          assertEquals( 1, type2response.getMessageId() );
          assertEquals( ResultCodeEnum.SASL_BIND_IN_PROGRESS, type2response.getLdapResult().getResultCode()
);
          assertTrue( ArrayUtils.isEquals( "type1_test".getBytes(), provider.getType1Response()
) );
          assertTrue( ArrayUtils.isEquals( "challenge".getBytes(), type2response.getServerSaslCreds()
) );
          
-         BindResponse finalResponse = client.bindType3( "type3_test".getBytes() );
+         InternalBindResponse finalResponse = client.bindType3( "type3_test".getBytes() );
          assertEquals( 2, finalResponse.getMessageId() );
          assertEquals( ResultCodeEnum.SUCCESS, finalResponse.getLdapResult().getResultCode()
);
          assertTrue( ArrayUtils.isEquals( "type3_test".getBytes(), provider.getType3Response()
) );
@@ -536,13 +536,13 @@
      public void testGssSpnegoBind() throws Exception
      {
          NtlmSaslBindClient client = new NtlmSaslBindClient( SupportedSaslMechanisms.GSS_SPNEGO
);
-         BindResponse type2response = client.bindType1( "type1_test".getBytes() );
+         InternalBindResponse type2response = client.bindType1( "type1_test".getBytes() );
          assertEquals( 1, type2response.getMessageId() );
          assertEquals( ResultCodeEnum.SASL_BIND_IN_PROGRESS, type2response.getLdapResult().getResultCode()
);
          assertTrue( ArrayUtils.isEquals( "type1_test".getBytes(), provider.getType1Response()
) );
          assertTrue( ArrayUtils.isEquals( "challenge".getBytes(), type2response.getServerSaslCreds()
) );
          
-         BindResponse finalResponse = client.bindType3( "type3_test".getBytes() );
+         InternalBindResponse finalResponse = client.bindType3( "type3_test".getBytes() );
          assertEquals( 2, finalResponse.getMessageId() );
          assertEquals( ResultCodeEnum.SUCCESS, finalResponse.getLdapResult().getResultCode()
);
          assertTrue( ArrayUtils.isEquals( "type3_test".getBytes(), provider.getType3Response()
) );
@@ -611,7 +611,7 @@
          }
 
          
-         BindResponse bindType1( byte[] type1response ) throws Exception
+         InternalBindResponse bindType1( byte[] type1response ) throws Exception
          {
              if ( ! isConnected() )
              {
@@ -645,11 +645,11 @@
              }
              
              // Retrieve the response back from server to my last request.
-             return ( BindResponse ) decoder.decode( null, _input_ );
+             return ( InternalBindResponse ) decoder.decode( null, _input_ );
          }
          
          
-         BindResponse bindType3( byte[] type3response ) throws Exception
+         InternalBindResponse bindType3( byte[] type3response ) throws Exception
          {
              if ( ! isConnected() )
              {
@@ -664,7 +664,7 @@
              request.setSaslMechanism( mechanism );
              request.setVersion3( true ) ;
              
-             // Setup the ASN1 Enoder and Decoder
+             // Setup the ASN1 Encoder and Decoder
              MessageEncoder encoder = new MessageEncoder();
              MessageDecoder decoder = new MessageDecoder( new BinaryAttributeDetector() {
                  public boolean isBinary( String attributeId )
@@ -684,7 +684,7 @@
              }
              
              // Retrieve the response back from server to my last request.
-             return ( BindResponse ) decoder.decode( null, _input_ );
+             return ( InternalBindResponse ) decoder.decode( null, _input_ );
          }
      }
 }

Modified: directory/apacheds/branches/ldif-partition/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java?rev=764357&r1=764356&r2=764357&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java
(original)
+++ directory/apacheds/branches/ldif-partition/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java
Mon Apr 13 04:50:28 2009
@@ -41,19 +41,19 @@
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.ldap.codec.LdapDecoder;
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
-import org.apache.directory.shared.ldap.codec.LdapResult;
-import org.apache.directory.shared.ldap.codec.add.AddRequest;
-import org.apache.directory.shared.ldap.codec.bind.BindRequest;
-import org.apache.directory.shared.ldap.codec.bind.BindResponse;
+import org.apache.directory.shared.ldap.codec.LdapResultCodec;
+import org.apache.directory.shared.ldap.codec.add.AddRequestCodec;
+import org.apache.directory.shared.ldap.codec.bind.BindRequestCodec;
+import org.apache.directory.shared.ldap.codec.bind.BindResponseCodec;
 import org.apache.directory.shared.ldap.codec.bind.LdapAuthentication;
 import org.apache.directory.shared.ldap.codec.bind.SimpleAuthentication;
-import org.apache.directory.shared.ldap.codec.del.DelRequest;
-import org.apache.directory.shared.ldap.codec.extended.ExtendedResponse;
-import org.apache.directory.shared.ldap.codec.modify.ModifyRequest;
-import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNRequest;
-import org.apache.directory.shared.ldap.codec.unbind.UnBindRequest;
+import org.apache.directory.shared.ldap.codec.del.DelRequestCodec;
+import org.apache.directory.shared.ldap.codec.extended.ExtendedResponseCodec;
+import org.apache.directory.shared.ldap.codec.modify.ModifyRequestCodec;
+import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNRequestCodec;
+import org.apache.directory.shared.ldap.codec.unbind.UnBindRequestCodec;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
@@ -145,10 +145,10 @@
     }
 
 
-    private LdapMessage readResponse( ByteBuffer bb ) throws IOException, DecoderException,
NamingException
+    private LdapMessageCodec readResponse( ByteBuffer bb ) throws IOException, DecoderException,
NamingException
     {
 
-        LdapMessage messageResp = null;
+        LdapMessageCodec messageResp = null;
 
         while ( true )
         {
@@ -169,9 +169,9 @@
                 {
                     messageResp = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
 
-                    if ( messageResp instanceof BindResponse )
+                    if ( messageResp instanceof BindResponseCodec )
                     {
-                        BindResponse resp = ( ( LdapMessageContainer ) ldapMessageContainer
).getLdapMessage()
+                        BindResponseCodec resp = ( ( LdapMessageContainer ) ldapMessageContainer
).getLdapMessage()
                             .getBindResponse();
 
                         if ( resp.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS
)
@@ -179,9 +179,9 @@
                             System.out.println( "Error : " + resp.getLdapResult().getErrorMessage()
);
                         }
                     }
-                    else if ( messageResp instanceof ExtendedResponse )
+                    else if ( messageResp instanceof ExtendedResponseCodec )
                     {
-                        ExtendedResponse resp = ( ( LdapMessageContainer ) ldapMessageContainer
).getLdapMessage()
+                        ExtendedResponseCodec resp = ( ( LdapMessageContainer ) ldapMessageContainer
).getLdapMessage()
                             .getExtendedResponse();
 
                         if ( resp.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS
)
@@ -207,7 +207,7 @@
 
     /**
      * Send the entry to the encoder, then wait for a
-     * reponse from the LDAP server on the results of the operation.
+     * response from the LDAP server on the results of the operation.
      * 
      * @param ldifEntry
      *            The entry to add
@@ -217,7 +217,7 @@
     private int addEntry( LdifEntry ldifEntry, int messageId ) throws IOException, DecoderException,
InvalidNameException,
         NamingException, EncoderException
     {
-        AddRequest addRequest = new AddRequest();
+        AddRequestCodec addRequest = new AddRequestCodec();
 
         String dn = ldifEntry.getDn().getUpName();
 
@@ -241,7 +241,7 @@
             }
         }
 
-        LdapMessage message = new LdapMessage();
+        LdapMessageCodec message = new LdapMessageCodec();
 
         message.setProtocolOP( addRequest );
         message.setMessageId( messageId );
@@ -255,9 +255,9 @@
         bb.clear();
 
         // Get the response
-        LdapMessage response = readResponse( bb );
+        LdapMessageCodec response = readResponse( bb );
 
-        LdapResult result = response.getAddResponse().getLdapResult();
+        LdapResultCodec result = response.getAddResponse().getLdapResult();
 
         if ( result.getResultCode() == ResultCodeEnum.SUCCESS )
         {
@@ -290,7 +290,7 @@
     private int deleteEntry( LdifEntry entry, int messageId ) throws IOException, DecoderException,
         InvalidNameException, NamingException, EncoderException
     {
-        DelRequest delRequest = new DelRequest();
+        DelRequestCodec delRequest = new DelRequestCodec();
 
         String dn = entry.getDn().getUpName();
 
@@ -301,7 +301,7 @@
 
         delRequest.setEntry( new LdapDN( dn ) );
 
-        LdapMessage message = new LdapMessage();
+        LdapMessageCodec message = new LdapMessageCodec();
 
         message.setProtocolOP( delRequest );
         message.setMessageId( messageId );
@@ -315,9 +315,9 @@
         bb.clear();
 
         // Get the response
-        LdapMessage response = readResponse( bb );
+        LdapMessageCodec response = readResponse( bb );
 
-        LdapResult result = response.getDelResponse().getLdapResult();
+        LdapResultCodec result = response.getDelResponse().getLdapResult();
 
         if ( result.getResultCode() == ResultCodeEnum.SUCCESS )
         {
@@ -349,7 +349,7 @@
     private int changeModRDNEntry( LdifEntry entry, int messageId ) throws IOException, DecoderException,
         InvalidNameException, NamingException, EncoderException
     {
-        ModifyDNRequest modifyDNRequest = new ModifyDNRequest();
+        ModifyDNRequestCodec modifyDNRequest = new ModifyDNRequestCodec();
 
         String dn = entry.getDn().getUpName();
 
@@ -367,7 +367,7 @@
             modifyDNRequest.setNewSuperior( new LdapDN( entry.getNewSuperior() ) );
         }
 
-        LdapMessage message = new LdapMessage();
+        LdapMessageCodec message = new LdapMessageCodec();
 
         message.setProtocolOP( modifyDNRequest );
         message.setMessageId( messageId );
@@ -381,9 +381,9 @@
         bb.clear();
 
         // Get the response
-        LdapMessage response = readResponse( bb );
+        LdapMessageCodec response = readResponse( bb );
 
-        LdapResult result = response.getModifyDNResponse().getLdapResult();
+        LdapResultCodec result = response.getModifyDNResponse().getLdapResult();
 
         if ( result.getResultCode() == ResultCodeEnum.SUCCESS )
         {
@@ -405,7 +405,7 @@
 
     /**
      * Send the entry to the encoder, then wait for a
-     * reponse from the LDAP server on the results of the operation.
+     * response from the LDAP server on the results of the operation.
      * 
      * @param entry The entry to modify
      * @param msgId message id number
@@ -413,7 +413,7 @@
     private int changeModifyEntry( LdifEntry entry, int messageId ) throws IOException, DecoderException,
         InvalidNameException, NamingException, EncoderException
     {
-        ModifyRequest modifyRequest = new ModifyRequest();
+        ModifyRequestCodec modifyRequest = new ModifyRequestCodec();
 
         String dn = entry.getDn().getUpName();
 
@@ -436,7 +436,7 @@
             }
         }
 
-        LdapMessage message = new LdapMessage();
+        LdapMessageCodec message = new LdapMessageCodec();
 
         message.setProtocolOP( modifyRequest );
         message.setMessageId( messageId );
@@ -450,9 +450,9 @@
         bb.clear();
 
         // Get the response
-        LdapMessage response = readResponse( bb );
+        LdapMessageCodec response = readResponse( bb );
 
-        LdapResult result = response.getModifyResponse().getLdapResult();
+        LdapResultCodec result = response.getModifyResponse().getLdapResult();
 
         if ( result.getResultCode() == ResultCodeEnum.SUCCESS )
         {
@@ -474,7 +474,7 @@
 
     /**
      * Send the change operation to the encoder, then wait for a
-     * reponse from the LDAP server on the results of the operation.
+     * response from the LDAP server on the results of the operation.
      * 
      * @param entry
      *            The entry to add
@@ -513,8 +513,8 @@
      */
     private void bind( int messageId ) throws NamingException, EncoderException, DecoderException,
IOException
     {
-        BindRequest bindRequest = new BindRequest();
-        LdapMessage message = new LdapMessage();
+        BindRequestCodec bindRequest = new BindRequestCodec();
+        LdapMessageCodec message = new LdapMessageCodec();
         LdapAuthentication authentication = null;
 
         if ( "simple".equals( auth ) )
@@ -540,9 +540,9 @@
         bb.clear();
 
         // Get the bind response
-        LdapMessage response = readResponse( bb );
+        LdapMessageCodec response = readResponse( bb );
 
-        LdapResult result = response.getBindResponse().getLdapResult();
+        LdapResultCodec result = response.getBindResponse().getLdapResult();
 
         if ( result.getResultCode() == ResultCodeEnum.SUCCESS )
         {
@@ -572,8 +572,8 @@
      */
     private void unbind( int messageId ) throws InvalidNameException, EncoderException, DecoderException,
IOException
     {
-        UnBindRequest unbindRequest = new UnBindRequest();
-        LdapMessage message = new LdapMessage();
+        UnBindRequestCodec unbindRequest = new UnBindRequestCodec();
+        LdapMessageCodec message = new LdapMessageCodec();
 
         message.setProtocolOP( unbindRequest );
         message.setMessageId( messageId );



Mime
View raw message