directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r987611 [10/13] - in /directory/apacheds/trunk: ./ all/ core-annotations/ core-api/ core-api/src/main/java/org/apache/directory/server/core/ core-api/src/main/java/org/apache/directory/server/core/event/ core-api/src/main/java/org/apache/di...
Date Fri, 20 Aug 2010 19:32:02 GMT
Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java Fri Aug 20 19:31:58 2010
@@ -28,19 +28,19 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.handlers.extended.StartTlsHandler;
 import org.apache.directory.shared.ldap.exception.LdapOperationException;
 import org.apache.directory.shared.ldap.exception.LdapReferralException;
+import org.apache.directory.shared.ldap.message.AbandonRequest;
+import org.apache.directory.shared.ldap.message.BindRequest;
 import org.apache.directory.shared.ldap.message.BindRequestImpl;
+import org.apache.directory.shared.ldap.message.BindResponse;
 import org.apache.directory.shared.ldap.message.BindResponseImpl;
+import org.apache.directory.shared.ldap.message.ExtendedRequest;
+import org.apache.directory.shared.ldap.message.LdapResult;
+import org.apache.directory.shared.ldap.message.Referral;
 import org.apache.directory.shared.ldap.message.ReferralImpl;
+import org.apache.directory.shared.ldap.message.Request;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.message.internal.InternalAbandonRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalBindResponse;
-import org.apache.directory.shared.ldap.message.internal.InternalExtendedRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
-import org.apache.directory.shared.ldap.message.internal.InternalReferral;
-import org.apache.directory.shared.ldap.message.internal.InternalRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;
-import org.apache.directory.shared.ldap.message.internal.InternalResultResponseRequest;
+import org.apache.directory.shared.ldap.message.ResultResponse;
+import org.apache.directory.shared.ldap.message.ResultResponseRequest;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.mina.core.filterchain.IoFilterChain;
 import org.apache.mina.core.session.IoSession;
@@ -54,7 +54,7 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class LdapRequestHandler<T extends InternalRequest> implements MessageHandler<T>
+public abstract class LdapRequestHandler<T extends Request> implements MessageHandler<T>
 {
     /** The logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( LdapRequestHandler.class );
@@ -80,8 +80,8 @@ public abstract class LdapRequestHandler
     {
         this.ldapServer = ldapServer;
     }
-    
-    
+
+
     /**
      * Checks to see if confidentiality requirements are met.  If the 
      * LdapServer requires confidentiality and the SSLFilter is engaged
@@ -98,25 +98,26 @@ public abstract class LdapRequestHandler
      */
     public final boolean isConfidentialityRequirementSatisfied( IoSession session )
     {
-       
-       if ( ! ldapServer.isConfidentialityRequired() )
-       {
-           return true;
-       }
-       
+
+        if ( !ldapServer.isConfidentialityRequired() )
+        {
+            return true;
+        }
+
         IoFilterChain chain = session.getFilterChain();
         return chain.contains( "sslFilter" );
     }
 
-    
-    public void rejectWithoutConfidentiality( IoSession session, InternalResultResponse resp ) 
+
+    public void rejectWithoutConfidentiality( IoSession session, ResultResponse resp )
     {
-        InternalLdapResult result = resp.getLdapResult();
+        LdapResult result = resp.getLdapResult();
         result.setResultCode( ResultCodeEnum.CONFIDENTIALITY_REQUIRED );
         result.setErrorMessage( "Confidentiality (TLS secured connection) is required." );
         session.write( resp );
     }
 
+
     /**
      *{@inheritDoc} 
      */
@@ -125,63 +126,64 @@ public abstract class LdapRequestHandler
     public final void handleMessage( IoSession session, T message ) throws Exception
     {
         LdapSession ldapSession = ldapServer.getLdapSessionManager().getLdapSession( session );
-        
-        if( ldapSession == null )
+
+        if ( ldapSession == null )
         {
             // in some cases the session is becoming null though the client is sending the UnbindRequest
             // before closing
-            LOG.info( "ignoring the message {} received from null session", message  );
+            LOG.info( "ignoring the message {} received from null session", message );
             return;
         }
-        
+
         // First check that the client hasn't issued a previous BindRequest, unless it
         // was a SASL BindRequest
         if ( ldapSession.isAuthPending() )
         {
             // Only SASL BinRequest are allowed if we already are handling a 
             // SASL BindRequest
-            if ( !( message instanceof BindRequestImpl ) || 
-                 ((BindRequestImpl)message).isSimple() ||
-                 ldapSession.isSimpleAuthPending() )
+            if ( !( message instanceof BindRequestImpl ) || ( ( BindRequestImpl ) message ).isSimple()
+                || ldapSession.isSimpleAuthPending() )
             {
                 LOG.error( I18n.err( I18n.ERR_732 ) );
-                InternalBindResponse bindResponse = new BindResponseImpl( message.getMessageId() );
-                InternalLdapResult bindResult = bindResponse.getLdapResult();
+                BindResponse bindResponse = new BindResponseImpl( message.getMessageId() );
+                LdapResult bindResult = bindResponse.getLdapResult();
                 bindResult.setResultCode( ResultCodeEnum.UNWILLING_TO_PERFORM );
                 bindResult.setErrorMessage( I18n.err( I18n.ERR_732 ) );
                 ldapSession.getIoSession().write( bindResponse );
                 return;
             }
         }
-        
+
         // TODO - session you get from LdapServer should have the ldapServer 
         // member already set no?  Should remove these lines where ever they
         // may be if that's the case.
         ldapSession.setLdapServer( ldapServer );
-        
+
         // protect against insecure conns when confidentiality is required 
-        if ( ! isConfidentialityRequirementSatisfied( session ) )
+        if ( !isConfidentialityRequirementSatisfied( session ) )
         {
-            if ( message instanceof InternalExtendedRequest )
+            if ( message instanceof ExtendedRequest )
             {
                 // Reject all extended operations except StartTls  
-                InternalExtendedRequest req = ( InternalExtendedRequest ) message;
-                
-                if ( ! req.getOid().equals( StartTlsHandler.EXTENSION_OID ) )
+                ExtendedRequest req = ( ExtendedRequest ) message;
+
+                if ( !req.getRequestName().equals( StartTlsHandler.EXTENSION_OID ) )
                 {
                     rejectWithoutConfidentiality( session, req.getResultResponse() );
                     return;
                 }
-                
+
                 // Allow StartTls extended operations to go through
             }
-            else if ( message instanceof InternalResultResponseRequest )
+            else if ( message instanceof ResultResponseRequest )
             {
                 // Reject all other operations that have a result response  
-                rejectWithoutConfidentiality( session, ( ( InternalResultResponseRequest ) message ).getResultResponse() );
+                rejectWithoutConfidentiality( session, ( ( ResultResponseRequest ) message )
+                    .getResultResponse() );
                 return;
             }
-            else // Just return from unbind, and abandon immediately
+            else
+            // Just return from unbind, and abandon immediately
             {
                 return;
             }
@@ -189,14 +191,14 @@ public abstract class LdapRequestHandler
 
         // We should check that the server allows anonymous requests
         // only if it's not a BindRequest
-        if ( message instanceof InternalBindRequest )
+        if ( message instanceof BindRequest )
         {
             handle( ldapSession, message );
         }
         else
         {
             CoreSession coreSession = null;
-            
+
             /*
              * All requests except bind automatically presume the authentication 
              * is anonymous if the session has not been authenticated.  Hence a
@@ -208,20 +210,21 @@ public abstract class LdapRequestHandler
                 handle( ldapSession, message );
                 return;
             }
-            
+
             coreSession = getLdapServer().getDirectoryService().getSession();
             ldapSession.setCoreSession( coreSession );
 
-            if ( message instanceof InternalAbandonRequest )
+            if ( message instanceof AbandonRequest )
             {
                 return;
             }
-            
+
             handle( ldapSession, message );
             return;
         }
     }
-    
+
+
     /**
      * Handle a Ldap message associated with a session
      * 
@@ -230,14 +233,14 @@ public abstract class LdapRequestHandler
      * @throws Exception If there is an error during the processing of this message
      */
     public abstract void handle( LdapSession session, T message ) throws Exception;
-    
-    
+
+
     /**
      * Handles processing with referrals without ManageDsaIT control.
      */
-    public void handleException( LdapSession session, InternalResultResponseRequest req, Exception e )
+    public void handleException( LdapSession session, ResultResponseRequest req, Exception e )
     {
-        InternalLdapResult result = req.getResultResponse().getLdapResult();
+        LdapResult result = req.getResultResponse().getLdapResult();
 
         /*
          * Set the result code or guess the best option.
@@ -251,7 +254,7 @@ public abstract class LdapRequestHandler
         {
             code = ResultCodeEnum.getBestEstimate( e, req.getType() );
         }
-        
+
         result.setResultCode( code );
 
         /*
@@ -264,10 +267,10 @@ public abstract class LdapRequestHandler
         if ( LOG.isDebugEnabled() )
         {
             LOG.debug( msg, e );
-        
+
             msg += ":\n" + ExceptionUtils.getStackTrace( e );
         }
-        
+
         result.setErrorMessage( msg );
 
         if ( e instanceof LdapOperationException )
@@ -275,29 +278,26 @@ public abstract class LdapRequestHandler
             LdapOperationException ne = ( LdapOperationException ) e;
 
             // Add the matchedDN if necessary
-            boolean setMatchedDn = 
-                code == ResultCodeEnum.NO_SUCH_OBJECT             || 
-                code == ResultCodeEnum.ALIAS_PROBLEM              ||
-                code == ResultCodeEnum.INVALID_DN_SYNTAX          || 
-                code == ResultCodeEnum.ALIAS_DEREFERENCING_PROBLEM;
-            
+            boolean setMatchedDn = code == ResultCodeEnum.NO_SUCH_OBJECT || code == ResultCodeEnum.ALIAS_PROBLEM
+                || code == ResultCodeEnum.INVALID_DN_SYNTAX || code == ResultCodeEnum.ALIAS_DEREFERENCING_PROBLEM;
+
             if ( ( ne.getResolvedDn() != null ) && setMatchedDn )
             {
                 result.setMatchedDn( ( DN ) ne.getResolvedDn() );
             }
-            
+
             // Add the referrals if necessary
             if ( e instanceof LdapReferralException )
             {
-                InternalReferral referrals = new ReferralImpl();
-                
+                Referral referrals = new ReferralImpl();
+
                 do
                 {
-                    String ref = ((LdapReferralException)e).getReferralInfo();
+                    String ref = ( ( LdapReferralException ) e ).getReferralInfo();
                     referrals.addLdapUrl( ref );
                 }
-                while ( ((LdapReferralException)e).skipReferral() );
-                
+                while ( ( ( LdapReferralException ) e ).skipReferral() );
+
                 result.setReferral( referrals );
             }
         }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java Fri Aug 20 19:31:58 2010
@@ -22,9 +22,9 @@ package org.apache.directory.server.ldap
  
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.ldap.LdapSession;
+import org.apache.directory.shared.ldap.message.LdapResult;
+import org.apache.directory.shared.ldap.message.ModifyDnRequest;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
-import org.apache.directory.shared.ldap.message.internal.InternalModifyDnRequest;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.slf4j.Logger;
@@ -32,11 +32,11 @@ import org.slf4j.LoggerFactory;
 
 
 /**
- * A single reply handler for {@link InternalModifyDnRequest}s.
+ * A single reply handler for {@link ModifyDnRequest}s.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyDnHandler extends LdapRequestHandler<InternalModifyDnRequest>
+public class ModifyDnHandler extends LdapRequestHandler<ModifyDnRequest>
 {
     private static final Logger LOG = LoggerFactory.getLogger( ModifyDnHandler.class );
 
@@ -57,9 +57,9 @@ public class ModifyDnHandler extends Lda
      * - newSuperior : this is a move operation. The entry is removed from its
      * current location, and created in the new one.
      */
-    public void handle( LdapSession session, InternalModifyDnRequest req )
+    public void handle( LdapSession session, ModifyDnRequest req )
     {
-        InternalLdapResult result = req.getResultResponse().getLdapResult();
+        LdapResult result = req.getResultResponse().getLdapResult();
         LOG.debug( "Handling modify dn request while ignoring referrals: {}", req );
 
         if ( req.getName().isEmpty() )

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyHandler.java Fri Aug 20 19:31:58 2010
@@ -22,20 +22,20 @@ package org.apache.directory.server.ldap
 
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.ldap.LdapSession;
+import org.apache.directory.shared.ldap.message.LdapResult;
+import org.apache.directory.shared.ldap.message.ModifyRequest;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
-import org.apache.directory.shared.ldap.message.internal.InternalModifyRequest;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
 /**
- * A single reply handler for {@link InternalModifyRequest}s.
+ * A single reply handler for {@link ModifyRequest}s.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyHandler extends LdapRequestHandler<InternalModifyRequest>
+public class ModifyHandler extends LdapRequestHandler<ModifyRequest>
 {
     private static final Logger LOG = LoggerFactory.getLogger( ModifyHandler.class );
 
@@ -43,10 +43,10 @@ public class ModifyHandler extends LdapR
     /**
      * {@inheritDoc}
      */
-    public void handle( LdapSession session, InternalModifyRequest req )
+    public void handle( LdapSession session, ModifyRequest req )
     {
         LOG.debug( "Handling request : {}", req );
-        InternalLdapResult result = req.getResultResponse().getLdapResult();
+        LdapResult result = req.getResultResponse().getLdapResult();
 
         try
         {

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java Fri Aug 20 19:31:58 2010
@@ -35,10 +35,10 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.search.controls.persistentSearch.PersistentSearchControl;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.AbandonListener;
-import org.apache.directory.shared.ldap.message.SearchResponseEntryImpl;
-import org.apache.directory.shared.ldap.message.internal.InternalAbandonableRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalSearchRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalSearchResponseEntry;
+import org.apache.directory.shared.ldap.message.AbandonableRequest;
+import org.apache.directory.shared.ldap.message.SearchRequest;
+import org.apache.directory.shared.ldap.message.SearchResultEntry;
+import org.apache.directory.shared.ldap.message.SearchResultEntryImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -59,11 +59,11 @@ public class PersistentSearchListener im
 {
     private static final Logger LOG = LoggerFactory.getLogger( PersistentSearchListener.class );
     final LdapSession session;
-    final InternalSearchRequest req;
+    final SearchRequest req;
     final PersistentSearchControl control;
 
 
-    PersistentSearchListener( LdapSession session, InternalSearchRequest req )
+    PersistentSearchListener( LdapSession session, SearchRequest req )
     {
         this.session = session;
         this.req = req;
@@ -91,8 +91,8 @@ public class PersistentSearchListener im
          */
     }
 
-    
-    public void requestAbandoned( InternalAbandonableRequest req )
+
+    public void requestAbandoned( AbandonableRequest req )
     {
         try
         {
@@ -103,38 +103,38 @@ public class PersistentSearchListener im
             LOG.error( I18n.err( I18n.ERR_164 ), e );
         }
     }
-    
-    
-    private void setECResponseControl( InternalSearchResponseEntry response, ChangeOperationContext opContext, ChangeType type )
+
+
+    private void setECResponseControl( SearchResultEntry response, ChangeOperationContext opContext, ChangeType type )
     {
         if ( control.isReturnECs() )
         {
             EntryChangeControl ecControl = new EntryChangeControl();
             ecControl.setChangeType( type );
-            
+
             if ( opContext.getChangeLogEvent() != null )
             {
                 ecControl.setChangeNumber( opContext.getChangeLogEvent().getRevision() );
             }
-         
+
             if ( opContext instanceof RenameOperationContext || opContext instanceof MoveOperationContext )
             {
-                ecControl.setPreviousDn( opContext.getDn() ); 
+                ecControl.setPreviousDn( opContext.getDn() );
             }
-            
-            response.add( ecControl );
+
+            response.addControl( ecControl );
         }
     }
 
 
     public void entryAdded( AddOperationContext addContext )
     {
-        if ( ! control.isNotificationEnabled( ChangeType.ADD ) )
+        if ( !control.isNotificationEnabled( ChangeType.ADD ) )
         {
             return;
         }
-    
-        InternalSearchResponseEntry respEntry = new SearchResponseEntryImpl( req.getMessageId() );
+
+        SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
         respEntry.setObjectName( addContext.getDn() );
         respEntry.setEntry( addContext.getEntry() );
         setECResponseControl( respEntry, addContext, ChangeType.ADD );
@@ -144,12 +144,12 @@ public class PersistentSearchListener im
 
     public void entryDeleted( DeleteOperationContext deleteContext )
     {
-        if ( ! control.isNotificationEnabled( ChangeType.DELETE ) )
+        if ( !control.isNotificationEnabled( ChangeType.DELETE ) )
         {
             return;
         }
-    
-        InternalSearchResponseEntry respEntry = new SearchResponseEntryImpl( req.getMessageId() );
+
+        SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
         respEntry.setObjectName( deleteContext.getDn() );
         respEntry.setEntry( deleteContext.getEntry() );
         setECResponseControl( respEntry, deleteContext, ChangeType.DELETE );
@@ -159,12 +159,12 @@ public class PersistentSearchListener im
 
     public void entryModified( ModifyOperationContext modifyContext )
     {
-        if ( ! control.isNotificationEnabled( ChangeType.MODIFY ) )
+        if ( !control.isNotificationEnabled( ChangeType.MODIFY ) )
         {
             return;
         }
-    
-        InternalSearchResponseEntry respEntry = new SearchResponseEntryImpl( req.getMessageId() );
+
+        SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
         respEntry.setObjectName( modifyContext.getDn() );
         respEntry.setEntry( modifyContext.getAlteredEntry() );
         setECResponseControl( respEntry, modifyContext, ChangeType.MODIFY );
@@ -174,12 +174,12 @@ public class PersistentSearchListener im
 
     public void entryMoved( MoveOperationContext moveContext )
     {
-        if ( ! control.isNotificationEnabled( ChangeType.MODDN ) )
+        if ( !control.isNotificationEnabled( ChangeType.MODDN ) )
         {
             return;
         }
-    
-        InternalSearchResponseEntry respEntry = new SearchResponseEntryImpl( req.getMessageId() );
+
+        SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
         respEntry.setObjectName( moveContext.getDn() );
         respEntry.setEntry( moveContext.getEntry() );
         setECResponseControl( respEntry, moveContext, ChangeType.MODDN );
@@ -195,12 +195,12 @@ public class PersistentSearchListener im
 
     public void entryRenamed( RenameOperationContext renameContext )
     {
-        if ( ! control.isNotificationEnabled( ChangeType.MODDN ) )
+        if ( !control.isNotificationEnabled( ChangeType.MODDN ) )
         {
             return;
         }
-    
-        InternalSearchResponseEntry respEntry = new SearchResponseEntryImpl( req.getMessageId() );
+
+        SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
         respEntry.setObjectName( renameContext.getModifiedEntry().getDn() );
         respEntry.setEntry( renameContext.getModifiedEntry() );
         setECResponseControl( respEntry, renameContext, ChangeType.MODDN );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchAbandonListener.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchAbandonListener.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchAbandonListener.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchAbandonListener.java Fri Aug 20 19:31:58 2010
@@ -26,7 +26,7 @@ import org.apache.directory.server.i18n.
 import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.shared.ldap.exception.OperationAbandonedException;
 import org.apache.directory.shared.ldap.message.AbandonListener;
-import org.apache.directory.shared.ldap.message.internal.InternalAbandonableRequest;
+import org.apache.directory.shared.ldap.message.AbandonableRequest;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -70,7 +70,7 @@ public class SearchAbandonListener imple
     }
     
     
-    public void requestAbandoned( InternalAbandonableRequest req )
+    public void requestAbandoned( AbandonableRequest req )
     {
         if ( listener != null )
         {

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java Fri Aug 20 19:31:58 2010
@@ -57,18 +57,18 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.filter.OrNode;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.filter.SearchScope;
+import org.apache.directory.shared.ldap.message.LdapResult;
+import org.apache.directory.shared.ldap.message.Referral;
 import org.apache.directory.shared.ldap.message.ReferralImpl;
+import org.apache.directory.shared.ldap.message.Response;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.message.SearchResponseEntryImpl;
-import org.apache.directory.shared.ldap.message.SearchResponseReferenceImpl;
-import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
-import org.apache.directory.shared.ldap.message.internal.InternalReferral;
-import org.apache.directory.shared.ldap.message.internal.InternalResponse;
-import org.apache.directory.shared.ldap.message.internal.InternalResultResponseRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalSearchRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalSearchResponseDone;
-import org.apache.directory.shared.ldap.message.internal.InternalSearchResponseEntry;
-import org.apache.directory.shared.ldap.message.internal.InternalSearchResponseReference;
+import org.apache.directory.shared.ldap.message.ResultResponseRequest;
+import org.apache.directory.shared.ldap.message.SearchRequest;
+import org.apache.directory.shared.ldap.message.SearchResultDone;
+import org.apache.directory.shared.ldap.message.SearchResultEntry;
+import org.apache.directory.shared.ldap.message.SearchResultEntryImpl;
+import org.apache.directory.shared.ldap.message.SearchResultReference;
+import org.apache.directory.shared.ldap.message.SearchResultReferenceImpl;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.util.LdapURL;
@@ -82,7 +82,7 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SearchHandler extends LdapRequestHandler<InternalSearchRequest>
+public class SearchHandler extends LdapRequestHandler<SearchRequest>
 {
     private static final Logger LOG = LoggerFactory.getLogger( SearchHandler.class );
 
@@ -94,6 +94,7 @@ public class SearchHandler extends LdapR
 
     protected ReplicationProvider replicationProvider;
 
+
     /**
      * Constructs a new filter EqualityNode asserting that a candidate
      * objectClass is a referral.
@@ -106,12 +107,12 @@ public class SearchHandler extends LdapR
     {
         if ( OBJECT_CLASS_AT == null )
         {
-            OBJECT_CLASS_AT = session.getCoreSession().getDirectoryService().
-                getSchemaManager().getAttributeType( SchemaConstants.OBJECT_CLASS_AT );
+            OBJECT_CLASS_AT = session.getCoreSession().getDirectoryService().getSchemaManager().getAttributeType(
+                SchemaConstants.OBJECT_CLASS_AT );
         }
 
-        EqualityNode<String> ocIsReferral = new EqualityNode<String>( OBJECT_CLASS_AT,
-            new StringValue( OBJECT_CLASS_AT, SchemaConstants.REFERRAL_OC ) );
+        EqualityNode<String> ocIsReferral = new EqualityNode<String>( OBJECT_CLASS_AT, new StringValue(
+            OBJECT_CLASS_AT, SchemaConstants.REFERRAL_OC ) );
 
         return ocIsReferral;
     }
@@ -127,16 +128,16 @@ public class SearchHandler extends LdapR
      * @param psearchControl the persistent search control extracted
      * @throws Exception if failures are encountered while searching
      */
-    private void handlePersistentSearch( LdapSession session, InternalSearchRequest req,
+    private void handlePersistentSearch( LdapSession session, SearchRequest req,
         PersistentSearchControl psearchControl ) throws Exception
     {
         /*
          * We want the search to complete first before we start listening to
          * events when the control does NOT specify changes ONLY mode.
          */
-        if ( ! psearchControl.isChangesOnly() )
+        if ( !psearchControl.isChangesOnly() )
         {
-            InternalSearchResponseDone done = doSimpleSearch( session, req );
+            SearchResultDone done = doSimpleSearch( session, req );
 
             // ok if normal search beforehand failed somehow quickly abandon psearch
             if ( done.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
@@ -171,7 +172,7 @@ public class SearchHandler extends LdapR
     /**
      * {@inheritDoc}
      */
-    public final void handle( LdapSession session, InternalSearchRequest req ) throws Exception
+    public final void handle( LdapSession session, SearchRequest req ) throws Exception
     {
         LOG.debug( "Handling single reply request: {}", req );
 
@@ -219,7 +220,7 @@ public class SearchHandler extends LdapR
      * @param req the search request on the RootDSE
      * @throws Exception if failures are encountered while searching
      */
-    private void handleRootDseSearch( LdapSession session, InternalSearchRequest req ) throws Exception
+    private void handleRootDseSearch( LdapSession session, SearchRequest req ) throws Exception
     {
         EntryFilteringCursor cursor = null;
 
@@ -274,11 +275,12 @@ public class SearchHandler extends LdapR
      * the Cursor when either server mandated or request mandated time limits
      * are reached.
      *
-     * @param req the {@link InternalSearchRequest} issued
+     * @param req the {@link SearchRequest} issued
      * @param session the {@link LdapSession} on which search was requested
      * @param cursor the {@link EntryFilteringCursor} over the search results
      */
-    private void setTimeLimitsOnCursor( InternalSearchRequest req, LdapSession session, final EntryFilteringCursor cursor )
+    private void setTimeLimitsOnCursor( SearchRequest req, LdapSession session,
+        final EntryFilteringCursor cursor )
     {
         // Don't bother setting time limits for administrators
         if ( session.getCoreSession().isAnAdministrator() && req.getTimeLimit() == NO_TIME_LIMIT )
@@ -330,7 +332,7 @@ public class SearchHandler extends LdapR
     /**
      * Return the server size limit
      */
-    private long getServerSizeLimit( LdapSession session, InternalSearchRequest request )
+    private long getServerSizeLimit( LdapSession session, SearchRequest request )
     {
         if ( session.getCoreSession().isAnAdministrator() )
         {
@@ -357,27 +359,25 @@ public class SearchHandler extends LdapR
     }
 
 
-    private void readResults( LdapSession session, InternalSearchRequest req, InternalLdapResult ldapResult,
-    EntryFilteringCursor cursor, long sizeLimit ) throws Exception
+    private void readResults( LdapSession session, SearchRequest req, LdapResult ldapResult,
+        EntryFilteringCursor cursor, long sizeLimit ) throws Exception
     {
         long count = 0;
 
-        while ( (count < sizeLimit ) && cursor.next() )
+        while ( ( count < sizeLimit ) && cursor.next() )
         {
             // Handle closed session
             if ( session.getIoSession().isClosing() )
             {
                 // The client has closed the connection
-                LOG.debug( "Request terminated for message {}, the client has closed the session",
-                    req.getMessageId() );
+                LOG.debug( "Request terminated for message {}, the client has closed the session", req.getMessageId() );
                 break;
             }
 
             if ( req.isAbandoned() )
             {
                 // The cursor has been closed by an abandon request.
-                LOG.debug( "Request terminated by an AbandonRequest for message {}",
-                    req.getMessageId() );
+                LOG.debug( "Request terminated by an AbandonRequest for message {}", req.getMessageId() );
                 break;
             }
 
@@ -402,9 +402,9 @@ public class SearchHandler extends LdapR
     }
 
 
-    private void readPagedResults( LdapSession session, InternalSearchRequest req, InternalLdapResult ldapResult,
-        EntryFilteringCursor cursor, long sizeLimit, int pagedLimit,
-        PagedSearchContext pagedContext, PagedResultsControl pagedResultsControl ) throws Exception
+    private void readPagedResults( LdapSession session, SearchRequest req, LdapResult ldapResult,
+        EntryFilteringCursor cursor, long sizeLimit, int pagedLimit, PagedSearchContext pagedContext,
+        PagedResultsControl pagedResultsControl ) throws Exception
     {
         req.addAbandonListener( new SearchAbandonListener( ldapServer, cursor ) );
         setTimeLimitsOnCursor( req, session, cursor );
@@ -459,7 +459,7 @@ public class SearchHandler extends LdapR
             pagedResultsControl = new PagedResultsControl();
             pagedResultsControl.setCritical( true );
             pagedResultsControl.setSize( 0 );
-            req.getResultResponse().add( pagedResultsControl );
+            req.getResultResponse().addControl( pagedResultsControl );
 
             return;
         }
@@ -472,7 +472,7 @@ public class SearchHandler extends LdapR
                 // We stop here. We have to add a ResponseControl
                 // DO NOT WRITE THE RESPONSE - JUST RETURN IT
                 ldapResult.setResultCode( ResultCodeEnum.SUCCESS );
-                req.getResultResponse().add( pagedResultsControl );
+                req.getResultResponse().addControl( pagedResultsControl );
 
                 // Stores the cursor current position
                 pagedContext.incrementCurrentPosition( pageCount );
@@ -500,20 +500,19 @@ public class SearchHandler extends LdapR
      * Manage the abandoned Paged Search (when paged size = 0). We have to
      * remove the cookie and its associated cursor from the session.
      */
-    private InternalSearchResponseDone abandonPagedSearch( LdapSession session, InternalSearchRequest req )
-        throws Exception
+    private SearchResultDone abandonPagedSearch( LdapSession session, SearchRequest req ) throws Exception
     {
         PagedResultsControl pagedResultsControl = null;
-        PagedResultsControl pagedSearchControl =
-            ( PagedResultsControl )req.getControls().get( PagedResultsControl.CONTROL_OID );
-        byte [] cookie = pagedSearchControl.getCookie();
+        PagedResultsControl pagedSearchControl = ( PagedResultsControl ) req.getControls().get(
+            PagedResultsControl.CONTROL_OID );
+        byte[] cookie = pagedSearchControl.getCookie();
 
         if ( !StringTools.isEmpty( cookie ) )
         {
             // If the cookie is not null, we have to destroy the associated
             // cursor stored into the session (if any)
             int cookieValue = pagedSearchControl.getCookieValue();
-            PagedSearchContext psCookie =  session.removePagedSearchContext( cookieValue );
+            PagedSearchContext psCookie = session.removePagedSearchContext( cookieValue );
             pagedResultsControl = new PagedResultsControl();
             pagedResultsControl.setCookie( psCookie.getCookie() );
             pagedResultsControl.setSize( 0 );
@@ -536,10 +535,10 @@ public class SearchHandler extends LdapR
 
         // and return
         // DO NOT WRITE THE RESPONSE - JUST RETURN IT
-        InternalLdapResult ldapResult = req.getResultResponse().getLdapResult();
+        LdapResult ldapResult = req.getResultResponse().getLdapResult();
         ldapResult.setResultCode( ResultCodeEnum.SUCCESS );
-        req.getResultResponse().add( pagedResultsControl );
-        return ( InternalSearchResponseDone ) req.getResultResponse();
+        req.getResultResponse().addControl( pagedResultsControl );
+        return ( SearchResultDone ) req.getResultResponse();
     }
 
 
@@ -562,7 +561,7 @@ public class SearchHandler extends LdapR
     /**
      * Handle a Paged Search request.
      */
-    private InternalSearchResponseDone doPagedSearch( LdapSession session, InternalSearchRequest req, PagedResultsControl control )
+    private SearchResultDone doPagedSearch( LdapSession session, SearchRequest req, PagedResultsControl control )
         throws Exception
     {
         PagedResultsControl pagedSearchControl = control;
@@ -572,8 +571,7 @@ public class SearchHandler extends LdapR
         // Don't bother setting size limits for administrators that don't ask for it
         long serverLimit = getServerSizeLimit( session, req );
 
-        long requestLimit = req.getSizeLimit() == 0L ?
-            Long.MAX_VALUE : req.getSizeLimit();
+        long requestLimit = req.getSizeLimit() == 0L ? Long.MAX_VALUE : req.getSizeLimit();
         long sizeLimit = min( serverLimit, requestLimit );
 
         int pagedLimit = pagedSearchControl.getSize();
@@ -602,8 +600,8 @@ public class SearchHandler extends LdapR
         }
 
         // Now, depending on the cookie, we will deal with case 2, 3, 4 and 5
-        byte [] cookie= pagedSearchControl.getCookie();
-        InternalLdapResult ldapResult = req.getResultResponse().getLdapResult();
+        byte[] cookie = pagedSearchControl.getCookie();
+        LdapResult ldapResult = req.getResultResponse().getLdapResult();
 
         if ( StringTools.isEmpty( cookie ) )
         {
@@ -638,7 +636,7 @@ public class SearchHandler extends LdapR
 
                 // If we had a cookie in the session, remove it
                 removeContext( session, pagedContext );
-                return ( InternalSearchResponseDone ) req.getResultResponse();
+                return ( SearchResultDone ) req.getResultResponse();
             }
             else
             {
@@ -652,7 +650,6 @@ public class SearchHandler extends LdapR
                 pagedResultsControl.setSize( 0 );
                 pagedResultsControl.setCritical( true );
 
-
                 // No cursor : do a search.
                 cursor = session.getCoreSession().search( req );
 
@@ -677,7 +674,7 @@ public class SearchHandler extends LdapR
                 ldapResult.setErrorMessage( "Invalid cookie for this PagedSearch request." );
                 ldapResult.setResultCode( ResultCodeEnum.UNWILLING_TO_PERFORM );
 
-                return ( InternalSearchResponseDone ) req.getResultResponse();
+                return ( SearchResultDone ) req.getResultResponse();
             }
 
             if ( pagedContext.hasSameRequest( req, session ) )
@@ -725,7 +722,8 @@ public class SearchHandler extends LdapR
          */
         try
         {
-            readPagedResults( session, req, ldapResult, cursor, sizeLimit, pagedLimit, pagedContext, pagedResultsControl );
+            readPagedResults( session, req, ldapResult, cursor, sizeLimit, pagedLimit, pagedContext,
+                pagedResultsControl );
         }
         catch ( Exception e )
         {
@@ -742,7 +740,7 @@ public class SearchHandler extends LdapR
             }
         }
 
-        return ( InternalSearchResponseDone ) req.getResultResponse();
+        return ( SearchResultDone ) req.getResultResponse();
     }
 
 
@@ -757,10 +755,9 @@ public class SearchHandler extends LdapR
      * @return the result done
      * @throws Exception if there are failures while processing the request
      */
-    private InternalSearchResponseDone doSimpleSearch( LdapSession session, InternalSearchRequest req )
-        throws Exception
+    private SearchResultDone doSimpleSearch( LdapSession session, SearchRequest req ) throws Exception
     {
-        InternalLdapResult ldapResult = req.getResultResponse().getLdapResult();
+        LdapResult ldapResult = req.getResultResponse().getLdapResult();
 
         // Check if we are using the Paged Search Control
         Object control = req.getControls().get( PagedResultsControl.CONTROL_OID );
@@ -768,7 +765,7 @@ public class SearchHandler extends LdapR
         if ( control != null )
         {
             // Let's deal with the pagedControl
-            return doPagedSearch( session, req, (PagedResultsControl)control );
+            return doPagedSearch( session, req, ( PagedResultsControl ) control );
         }
 
         // A normal search
@@ -789,8 +786,7 @@ public class SearchHandler extends LdapR
             // Don't bother setting size limits for administrators that don't ask for it
             long serverLimit = getServerSizeLimit( session, req );
 
-            long requestLimit = req.getSizeLimit() == 0L ?
-                Long.MAX_VALUE : req.getSizeLimit();
+            long requestLimit = req.getSizeLimit() == 0L ? Long.MAX_VALUE : req.getSizeLimit();
 
             req.addAbandonListener( new SearchAbandonListener( ldapServer, cursor ) );
             setTimeLimitsOnCursor( req, session, cursor );
@@ -814,7 +810,7 @@ public class SearchHandler extends LdapR
             }
         }
 
-        return ( InternalSearchResponseDone ) req.getResultResponse();
+        return ( SearchResultDone ) req.getResultResponse();
     }
 
 
@@ -830,23 +826,23 @@ public class SearchHandler extends LdapR
      * @return the response for the entry
      * @throws Exception if there are problems in generating the response
      */
-    private InternalResponse generateResponse( LdapSession session, InternalSearchRequest req, Entry entry ) throws Exception
+    private Response generateResponse( LdapSession session, SearchRequest req, Entry entry ) throws Exception
     {
-        EntryAttribute ref = ((ClonedServerEntry)entry).getOriginalEntry().get( SchemaConstants.REF_AT );
+        EntryAttribute ref = ( ( ClonedServerEntry ) entry ).getOriginalEntry().get( SchemaConstants.REF_AT );
         boolean hasManageDsaItControl = req.getControls().containsKey( ManageDsaITControl.CONTROL_OID );
 
-        if ( ( ref != null ) && ! hasManageDsaItControl )
+        if ( ( ref != null ) && !hasManageDsaItControl )
         {
             // The entry is a referral.
-            InternalSearchResponseReference respRef;
-            respRef = new SearchResponseReferenceImpl( req.getMessageId() );
+            SearchResultReference respRef;
+            respRef = new SearchResultReferenceImpl( req.getMessageId() );
             respRef.setReferral( new ReferralImpl() );
 
             for ( Value<?> val : ref )
             {
                 String url = val.getString();
 
-                if ( ! url.startsWith( "ldap" ) )
+                if ( !url.startsWith( "ldap" ) )
                 {
                     respRef.getReferral().addLdapUrl( url );
                 }
@@ -862,7 +858,7 @@ public class SearchHandler extends LdapR
                     LOG.error( I18n.err( I18n.ERR_165, url, entry ) );
                 }
 
-                switch( req.getScope() )
+                switch ( req.getScope() )
                 {
                     case SUBTREE:
                         ldapUrl.setScope( SearchScope.SUBTREE.getScope() );
@@ -884,8 +880,8 @@ public class SearchHandler extends LdapR
         else
         {
             // The entry is not a referral, or the ManageDsaIt control is set
-            InternalSearchResponseEntry respEntry;
-            respEntry = new SearchResponseEntryImpl( req.getMessageId() );
+            SearchResultEntry respEntry;
+            respEntry = new SearchResultEntryImpl( req.getMessageId() );
             respEntry.setEntry( entry );
             respEntry.setObjectName( entry.getDn() );
 
@@ -920,7 +916,7 @@ public class SearchHandler extends LdapR
      * @param req the request to get the original filter from
      * @throws Exception if there are schema access problems
      */
-    private void modifyFilter( LdapSession session, InternalSearchRequest req ) throws Exception
+    private void modifyFilter( LdapSession session, SearchRequest req ) throws Exception
     {
         if ( req.hasControl( ManageDsaITControl.CONTROL_OID ) )
         {
@@ -952,8 +948,8 @@ public class SearchHandler extends LdapR
             {
                 String attribute = presenceNode.getAttribute();
 
-                if ( attribute.equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT ) ||
-                     attribute.equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT_OID ) )
+                if ( attribute.equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT )
+                    || attribute.equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT_OID ) )
                 {
                     return;
                 }
@@ -985,7 +981,7 @@ public class SearchHandler extends LdapR
      * @param session the associated session
      * @param req the received SearchRequest
      */
-    private void handleIgnoringReferrals( LdapSession session, InternalSearchRequest req )
+    private void handleIgnoringReferrals( LdapSession session, SearchRequest req )
     {
         if ( IS_DEBUG )
         {
@@ -1021,8 +1017,8 @@ public class SearchHandler extends LdapR
             // Handle psearch differently
             // ===============================================================
 
-            PersistentSearchControl psearchControl = ( PersistentSearchControl )
-                req.getControls().get( PersistentSearchControl.CONTROL_OID );
+            PersistentSearchControl psearchControl = ( PersistentSearchControl ) req.getControls().get(
+                PersistentSearchControl.CONTROL_OID );
 
             if ( psearchControl != null )
             {
@@ -1040,7 +1036,7 @@ public class SearchHandler extends LdapR
             // ===============================================================
 
             //long t0 = System.nanoTime();
-            InternalSearchResponseDone done = doSimpleSearch( session, req );
+            SearchResultDone done = doSimpleSearch( session, req );
             //long t1 = System.nanoTime();
             session.getIoSession().write( done );
             //.print( "Handler;" + ((t1-t0)/1000) + ";" );
@@ -1089,9 +1085,9 @@ public class SearchHandler extends LdapR
     /**
      * Handles processing with referrals without ManageDsaIT control.
      */
-    private void handleWithReferrals( LdapSession session, InternalSearchRequest req ) throws LdapException
+    private void handleWithReferrals( LdapSession session, SearchRequest req ) throws LdapException
     {
-        InternalLdapResult result = req.getResultResponse().getLdapResult();
+        LdapResult result = req.getResultResponse().getLdapResult();
         Entry entry = null;
         boolean isReferral = false;
         boolean isparentReferral = false;
@@ -1159,7 +1155,7 @@ public class SearchHandler extends LdapR
                 {
                     LOG.debug( "Entry is a referral: {}", entry );
 
-                    handleReferralEntryForSearch( session, req, ((ClonedServerEntry)entry) );
+                    handleReferralEntryForSearch( session, req, ( ( ClonedServerEntry ) entry ) );
 
                     return;
                 }
@@ -1203,7 +1199,8 @@ public class SearchHandler extends LdapR
                 // if we get here then we have a valid referral ancestor
                 try
                 {
-                    InternalReferral referral = getReferralOnAncestorForSearch( session, req, ((ClonedServerEntry)referralAncestor) );
+                    Referral referral = getReferralOnAncestorForSearch( session, req,
+                        ( ( ClonedServerEntry ) referralAncestor ) );
 
                     result.setResultCode( ResultCodeEnum.REFERRAL );
                     result.setReferral( referral );
@@ -1228,10 +1225,10 @@ public class SearchHandler extends LdapR
      * @param req the request
      * @param entry the entry associated with the request
      */
-    private void handleReferralEntryForSearch( LdapSession session, InternalSearchRequest req, ClonedServerEntry entry )
+    private void handleReferralEntryForSearch( LdapSession session, SearchRequest req, ClonedServerEntry entry )
         throws Exception
     {
-        InternalLdapResult result = req.getResultResponse().getLdapResult();
+        LdapResult result = req.getResultResponse().getLdapResult();
         ReferralImpl referral = new ReferralImpl();
         result.setReferral( referral );
         result.setResultCode( ResultCodeEnum.REFERRAL );
@@ -1245,7 +1242,7 @@ public class SearchHandler extends LdapR
             String refstr = refval.getString();
 
             // need to add non-ldap URLs as-is
-            if ( ! refstr.startsWith( "ldap" ) )
+            if ( !refstr.startsWith( "ldap" ) )
             {
                 referral.addLdapUrl( refstr );
                 continue;
@@ -1286,7 +1283,7 @@ public class SearchHandler extends LdapR
      * @param req the request issued
      * @return true if the search is on the RootDSE false otherwise
      */
-    private boolean isRootDSESearch( InternalSearchRequest req )
+    private boolean isRootDSESearch( SearchRequest req )
     {
         boolean isBaseIsRoot = req.getBase().isEmpty();
         boolean isBaseScope = req.getScope() == SearchScope.OBJECT;
@@ -1304,7 +1301,8 @@ public class SearchHandler extends LdapR
             else
             {
                 String attribute = ( ( PresenceNode ) req.getFilter() ).getAttribute();
-                isRootDSEFilter = attribute.equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT ) || attribute.equals( SchemaConstants.OBJECT_CLASS_AT_OID );
+                isRootDSEFilter = attribute.equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT )
+                    || attribute.equals( SchemaConstants.OBJECT_CLASS_AT_OID );
             }
         }
 
@@ -1335,7 +1333,7 @@ public class SearchHandler extends LdapR
      *
      * @throws Exception the exception
      */
-    private boolean isSubSchemaSubEntrySearch( LdapSession session, InternalSearchRequest req ) throws Exception
+    private boolean isSubSchemaSubEntrySearch( LdapSession session, SearchRequest req ) throws Exception
     {
         DN base = req.getBase();
         String baseNormForm = ( base.isNormalized() ? base.getNormName() : base.getNormName() );
@@ -1358,14 +1356,13 @@ public class SearchHandler extends LdapR
      * @param referralAncestor the farthest referral ancestor of the missing
      * entry
      */
-    public InternalReferral getReferralOnAncestorForSearch( LdapSession session, InternalSearchRequest req,
+    public Referral getReferralOnAncestorForSearch( LdapSession session, SearchRequest req,
         ClonedServerEntry referralAncestor ) throws Exception
     {
         LOG.debug( "Inside getReferralOnAncestor()" );
 
-        EntryAttribute refAttr = referralAncestor.getOriginalEntry()
-            .get( SchemaConstants.REF_AT );
-        InternalReferral referral = new ReferralImpl();
+        EntryAttribute refAttr = referralAncestor.getOriginalEntry().get( SchemaConstants.REF_AT );
+        Referral referral = new ReferralImpl();
 
         for ( Value<?> value : refAttr )
         {
@@ -1374,7 +1371,7 @@ public class SearchHandler extends LdapR
             LOG.debug( "Calculating LdapURL for referrence value {}", ref );
 
             // need to add non-ldap URLs as-is
-            if ( ! ref.startsWith( "ldap" ) )
+            if ( !ref.startsWith( "ldap" ) )
             {
                 referral.addLdapUrl( ref );
                 continue;
@@ -1392,7 +1389,8 @@ public class SearchHandler extends LdapR
             }
 
             // Normalize the DN to check for same dn
-            DN urlDn = new DN( ldapUrl.getDn().getName(), session.getCoreSession().getDirectoryService().getSchemaManager() );
+            DN urlDn = new DN( ldapUrl.getDn().getName(), session.getCoreSession().getDirectoryService()
+                .getSchemaManager() );
 
             if ( urlDn.getNormName().equals( req.getBase().getNormName() ) )
             {
@@ -1439,14 +1437,13 @@ public class SearchHandler extends LdapR
      * @param referralAncestor the farthest referral ancestor of the missing
      * entry
      */
-    public InternalReferral getReferralOnAncestor( LdapSession session, DN reqTargetDn, InternalSearchRequest req,
+    public Referral getReferralOnAncestor( LdapSession session, DN reqTargetDn, SearchRequest req,
         ClonedServerEntry referralAncestor ) throws Exception
     {
         LOG.debug( "Inside getReferralOnAncestor()" );
 
-        EntryAttribute refAttr =referralAncestor.getOriginalEntry()
-            .get( SchemaConstants.REF_AT );
-        InternalReferral referral = new ReferralImpl();
+        EntryAttribute refAttr = referralAncestor.getOriginalEntry().get( SchemaConstants.REF_AT );
+        Referral referral = new ReferralImpl();
 
         for ( Value<?> value : refAttr )
         {
@@ -1455,7 +1452,7 @@ public class SearchHandler extends LdapR
             LOG.debug( "Calculating LdapURL for referrence value {}", ref );
 
             // need to add non-ldap URLs as-is
-            if ( ! ref.startsWith( "ldap" ) )
+            if ( !ref.startsWith( "ldap" ) )
             {
                 referral.addLdapUrl( ref );
                 continue;
@@ -1472,7 +1469,8 @@ public class SearchHandler extends LdapR
                 LOG.error( I18n.err( I18n.ERR_165, ref, referralAncestor ) );
             }
 
-            DN urlDn = new DN( ldapUrl.getDn().getName(), session.getCoreSession().getDirectoryService().getSchemaManager() );
+            DN urlDn = new DN( ldapUrl.getDn().getName(), session.getCoreSession().getDirectoryService()
+                .getSchemaManager() );
 
             if ( urlDn.getNormName().equals( referralAncestor.getDn().getNormName() ) )
             {
@@ -1531,9 +1529,9 @@ public class SearchHandler extends LdapR
     /**
      * Handles processing with referrals without ManageDsaIT control.
      */
-    public void handleException( LdapSession session, InternalResultResponseRequest req, Exception e )
+    public void handleException( LdapSession session, ResultResponseRequest req, Exception e )
     {
-        InternalLdapResult result = req.getResultResponse().getLdapResult();
+        LdapResult result = req.getResultResponse().getLdapResult();
 
         /*
          * Set the result code or guess the best option.
@@ -1571,11 +1569,8 @@ public class SearchHandler extends LdapR
             LdapOperationException ne = ( LdapOperationException ) e;
 
             // Add the matchedDN if necessary
-            boolean setMatchedDn =
-                code == ResultCodeEnum.NO_SUCH_OBJECT             ||
-                code == ResultCodeEnum.ALIAS_PROBLEM              ||
-                code == ResultCodeEnum.INVALID_DN_SYNTAX          ||
-                code == ResultCodeEnum.ALIAS_DEREFERENCING_PROBLEM;
+            boolean setMatchedDn = code == ResultCodeEnum.NO_SUCH_OBJECT || code == ResultCodeEnum.ALIAS_PROBLEM
+                || code == ResultCodeEnum.INVALID_DN_SYNTAX || code == ResultCodeEnum.ALIAS_DEREFERENCING_PROBLEM;
 
             if ( ( ne.getResolvedDn() != null ) && setMatchedDn )
             {
@@ -1600,8 +1595,7 @@ public class SearchHandler extends LdapR
      */
     // This will suppress PMD.EmptyCatchBlock warnings in this method
     @SuppressWarnings("PMD.EmptyCatchBlock")
-    public static final Entry getFarthestReferralAncestor( LdapSession session, DN target )
-        throws Exception
+    public static final Entry getFarthestReferralAncestor( LdapSession session, DN target ) throws Exception
     {
         Entry entry;
         Entry farthestReferralAncestor = null;
@@ -1616,7 +1610,7 @@ public class SearchHandler extends LdapR
             // never thrown
         }
 
-        while ( ! dn.isEmpty() )
+        while ( !dn.isEmpty() )
         {
             LOG.debug( "Walking ancestors of {} to find referrals.", dn );
 
@@ -1624,7 +1618,8 @@ public class SearchHandler extends LdapR
             {
                 entry = session.getCoreSession().lookup( dn );
 
-                boolean isReferral = ((ClonedServerEntry)entry).getOriginalEntry().contains( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.REFERRAL_OC );
+                boolean isReferral = ( ( ClonedServerEntry ) entry ).getOriginalEntry().contains(
+                    SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.REFERRAL_OC );
 
                 if ( isReferral )
                 {
@@ -1667,7 +1662,7 @@ public class SearchHandler extends LdapR
      * @param req the request to be handled
      * @throws LdapException
      */
-    public void handleSyncreplSearch( LdapSession session, InternalSearchRequest req ) throws LdapException
+    public void handleSyncreplSearch( LdapSession session, SearchRequest req ) throws LdapException
     {
         replicationProvider.handleSyncRequest( session, req );
     }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/UnbindHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/UnbindHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/UnbindHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/UnbindHandler.java Fri Aug 20 19:31:58 2010
@@ -22,7 +22,7 @@ package org.apache.directory.server.ldap
 
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.ldap.LdapSession;
-import org.apache.directory.shared.ldap.message.internal.InternalUnbindRequest;
+import org.apache.directory.shared.ldap.message.UnbindRequest;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -30,16 +30,16 @@ import org.slf4j.LoggerFactory;
 
 /**
  * A no reply protocol handler implementation for LDAP {@link
- * org.apache.directory.shared.ldap.message.internal.InternalUnbindRequest}s.
+ * org.apache.directory.shared.ldap.message.UnbindRequest}s.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class UnbindHandler extends LdapRequestHandler<InternalUnbindRequest>
+public class UnbindHandler extends LdapRequestHandler<UnbindRequest>
 {
     private static final Logger LOG = LoggerFactory.getLogger( UnbindHandler.class );
 
 
-    public void handle( LdapSession session, InternalUnbindRequest unbindRequest ) throws Exception
+    public void handle( LdapSession session, UnbindRequest unbindRequest ) throws Exception
     {
         LOG.debug( "Received: {}", unbindRequest );
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java Fri Aug 20 19:31:58 2010
@@ -42,10 +42,10 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.exception.LdapOperationException;
 import org.apache.directory.shared.ldap.jndi.JndiUtils;
+import org.apache.directory.shared.ldap.message.BindRequest;
+import org.apache.directory.shared.ldap.message.LdapResult;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.mina.core.session.IoSession;
@@ -81,7 +81,7 @@ public abstract class AbstractSaslCallba
     protected final DirectoryService directoryService;
     
     /** The associated BindRequest */
-    protected final InternalBindRequest bindRequest;
+    protected final BindRequest bindRequest;
 
 
     /**
@@ -89,7 +89,7 @@ public abstract class AbstractSaslCallba
      *
      * @param directoryService
      */
-    protected AbstractSaslCallbackHandler( DirectoryService directoryService, InternalBindRequest bindRequest )
+    protected AbstractSaslCallbackHandler( DirectoryService directoryService, BindRequest bindRequest )
     {
         this.directoryService = directoryService;
         this.bindRequest = bindRequest;
@@ -230,9 +230,9 @@ public abstract class AbstractSaslCallba
      * @param env An environment to be used to acquire an {@link LdapContext}.
      * @return An {@link LdapContext} for the client.
      */
-    protected LdapContext getContext( IoSession session, InternalBindRequest bindRequest, Hashtable<String, Object> env )
+    protected LdapContext getContext( IoSession session, BindRequest bindRequest, Hashtable<String, Object> env )
     {
-        InternalLdapResult result = bindRequest.getResultResponse().getLdapResult();
+        LdapResult result = bindRequest.getResultResponse().getLdapResult();
 
         LdapContext ctx = null;
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslServer.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslServer.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslServer.java Fri Aug 20 19:31:58 2010
@@ -24,7 +24,7 @@ import javax.security.sasl.SaslServer;
 
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.ldap.LdapSession;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
+import org.apache.directory.shared.ldap.message.BindRequest;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 
@@ -37,7 +37,7 @@ import org.apache.directory.shared.ldap.
 public abstract class AbstractSaslServer implements SaslServer 
 {
     /** The associated BindRequest */
-    private final InternalBindRequest bindRequest;
+    private final BindRequest bindRequest;
     
     /** The associated LdapSession instance */
     private final LdapSession ldapSession;
@@ -46,7 +46,7 @@ public abstract class AbstractSaslServer
     private CoreSession adminSession;
     
     
-    public AbstractSaslServer( LdapSession ldapSession, CoreSession adminSession, InternalBindRequest bindRequest )
+    public AbstractSaslServer( LdapSession ldapSession, CoreSession adminSession, BindRequest bindRequest )
     {
         this.bindRequest = bindRequest;
         this.ldapSession = ldapSession;
@@ -79,7 +79,7 @@ public abstract class AbstractSaslServer
     /**
      *  @return the associated BindRequest object
      */
-    public InternalBindRequest getBindRequest()
+    public BindRequest getBindRequest()
     {
         return bindRequest;
     }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/MechanismHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/MechanismHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/MechanismHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/MechanismHandler.java Fri Aug 20 19:31:58 2010
@@ -23,7 +23,7 @@ package org.apache.directory.server.ldap
 import javax.security.sasl.SaslServer;
 
 import org.apache.directory.server.ldap.LdapSession;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
+import org.apache.directory.shared.ldap.message.BindRequest;
 
 
 /**
@@ -43,7 +43,7 @@ public interface MechanismHandler
      * @return The {@link SaslServer} to use for the duration of the bound session.
      * @throws Exception
      */
-    public SaslServer handleMechanism( LdapSession session, InternalBindRequest bindRequest ) throws Exception;
+    public SaslServer handleMechanism( LdapSession session, BindRequest bindRequest ) throws Exception;
     
     
     /**

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/SimpleMechanismHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/SimpleMechanismHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/SimpleMechanismHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/SimpleMechanismHandler.java Fri Aug 20 19:31:58 2010
@@ -30,10 +30,10 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.shared.ldap.exception.LdapAuthenticationException;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapOperationException;
+import org.apache.directory.shared.ldap.message.BindRequest;
+import org.apache.directory.shared.ldap.message.BindResponse;
+import org.apache.directory.shared.ldap.message.LdapResult;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
-import org.apache.directory.shared.ldap.message.internal.InternalBindResponse;
-import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
 import org.apache.directory.shared.ldap.name.DN;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -51,7 +51,7 @@ public class SimpleMechanismHandler impl
     private static final Logger LOG = LoggerFactory.getLogger( SimpleMechanismHandler.class );
 
     
-    public SaslServer handleMechanism( LdapSession ldapSession, InternalBindRequest bindRequest ) throws Exception
+    public SaslServer handleMechanism( LdapSession ldapSession, BindRequest bindRequest ) throws Exception
     {
         // create a new Bind context, with a null session, as we don't have 
         // any context yet.
@@ -75,7 +75,7 @@ public class SimpleMechanismHandler impl
             ldapSession.setCoreSession( bindContext.getSession() );
             
             // Return the successful response
-            InternalBindResponse response = ( InternalBindResponse ) bindRequest.getResultResponse();
+            BindResponse response = ( BindResponse ) bindRequest.getResultResponse();
             response.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
             LdapProtocolUtils.setResponseControls( bindContext, response );
             
@@ -87,7 +87,7 @@ public class SimpleMechanismHandler impl
         {
             // Something went wrong. Write back an error message            
             ResultCodeEnum code = null;
-            InternalLdapResult result = bindRequest.getResultResponse().getLdapResult();
+            LdapResult result = bindRequest.getResultResponse().getLdapResult();
 
             if ( e instanceof LdapOperationException )
             {

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5CallbackHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5CallbackHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5CallbackHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5CallbackHandler.java Fri Aug 20 19:31:58 2010
@@ -40,7 +40,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.filter.FilterParser;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
+import org.apache.directory.shared.ldap.message.BindRequest;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.AttributeTypeOptions;
@@ -69,7 +69,7 @@ public class CramMd5CallbackHandler exte
      * @param bindRequest the bind message
      * @param directoryService the directory service core
      */
-    public CramMd5CallbackHandler( LdapSession ldapSession, CoreSession adminSession, InternalBindRequest bindRequest )
+    public CramMd5CallbackHandler( LdapSession ldapSession, CoreSession adminSession, BindRequest bindRequest )
     {
         super( adminSession.getDirectoryService(), bindRequest );
         this.ldapSession = ldapSession;

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5MechanismHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5MechanismHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5MechanismHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5MechanismHandler.java Fri Aug 20 19:31:58 2010
@@ -32,7 +32,7 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.handlers.bind.AbstractMechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.SaslConstants;
 import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
+import org.apache.directory.shared.ldap.message.BindRequest;
 
 
 /**
@@ -42,7 +42,7 @@ import org.apache.directory.shared.ldap.
  */
 public class CramMd5MechanismHandler extends AbstractMechanismHandler
 {
-    public SaslServer handleMechanism( LdapSession ldapSession, InternalBindRequest bindRequest ) throws Exception
+    public SaslServer handleMechanism( LdapSession ldapSession, BindRequest bindRequest ) throws Exception
     {
         SaslServer ss = (SaslServer)ldapSession.getSaslProperty( SaslConstants.SASL_SERVER );
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/digestMD5/DigestMd5CallbackHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/digestMD5/DigestMd5CallbackHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/digestMD5/DigestMd5CallbackHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/digestMD5/DigestMd5CallbackHandler.java Fri Aug 20 19:31:58 2010
@@ -40,7 +40,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.filter.FilterParser;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
+import org.apache.directory.shared.ldap.message.BindRequest;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.AttributeTypeOptions;
@@ -70,7 +70,7 @@ public class DigestMd5CallbackHandler ex
      * @param bindRequest the bind message
      * @param directoryService the directory service core
      */
-    public DigestMd5CallbackHandler( LdapSession ldapSession, CoreSession adminSession, InternalBindRequest bindRequest )
+    public DigestMd5CallbackHandler( LdapSession ldapSession, CoreSession adminSession, BindRequest bindRequest )
     {
         super( adminSession.getDirectoryService(), bindRequest );
         this.ldapSession = ldapSession;

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/digestMD5/DigestMd5MechanismHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/digestMD5/DigestMd5MechanismHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/digestMD5/DigestMd5MechanismHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/digestMD5/DigestMd5MechanismHandler.java Fri Aug 20 19:31:58 2010
@@ -33,7 +33,7 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.handlers.bind.AbstractMechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.SaslConstants;
 import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
+import org.apache.directory.shared.ldap.message.BindRequest;
 
 
 /**
@@ -73,7 +73,7 @@ public class DigestMd5MechanismHandler e
 
 
     
-    public SaslServer handleMechanism( LdapSession ldapSession, InternalBindRequest bindRequest ) throws Exception
+    public SaslServer handleMechanism( LdapSession ldapSession, BindRequest bindRequest ) throws Exception
     {
         SaslServer ss = (SaslServer)ldapSession.getSaslProperty( SaslConstants.SASL_SERVER );
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiCallbackHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiCallbackHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiCallbackHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiCallbackHandler.java Fri Aug 20 19:31:58 2010
@@ -33,7 +33,7 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.handlers.bind.SaslConstants;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
+import org.apache.directory.shared.ldap.message.BindRequest;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -55,7 +55,7 @@ public class GssapiCallbackHandler exten
      * @param bindRequest the bind message
      * @param directoryService the directory service core
      */
-    public GssapiCallbackHandler( LdapSession ldapSession, CoreSession adminSession, InternalBindRequest bindRequest )
+    public GssapiCallbackHandler( LdapSession ldapSession, CoreSession adminSession, BindRequest bindRequest )
     {
         super( adminSession.getDirectoryService(), bindRequest );
         this.ldapSession = ldapSession;

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiMechanismHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiMechanismHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiMechanismHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiMechanismHandler.java Fri Aug 20 19:31:58 2010
@@ -43,7 +43,7 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.handlers.bind.SaslConstants;
 import org.apache.directory.server.protocol.shared.ServiceConfigurationException;
 import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
+import org.apache.directory.shared.ldap.message.BindRequest;
 import org.apache.directory.shared.ldap.name.DN;
 
 
@@ -54,7 +54,7 @@ import org.apache.directory.shared.ldap.
  */
 public class GssapiMechanismHandler extends AbstractMechanismHandler
 {
-    public SaslServer handleMechanism( LdapSession ldapSession, InternalBindRequest bindRequest ) throws Exception
+    public SaslServer handleMechanism( LdapSession ldapSession, BindRequest bindRequest ) throws Exception
     {
         SaslServer ss = ( SaslServer ) ldapSession.getSaslProperty( SaslConstants.SASL_SERVER );
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmMechanismHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmMechanismHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmMechanismHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmMechanismHandler.java Fri Aug 20 19:31:58 2010
@@ -25,7 +25,7 @@ import javax.security.sasl.SaslServer;
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.server.ldap.handlers.bind.AbstractMechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.SaslConstants;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
+import org.apache.directory.shared.ldap.message.BindRequest;
 
 
 /**
@@ -53,7 +53,7 @@ public class NtlmMechanismHandler extend
     }
 
 
-    public SaslServer handleMechanism( LdapSession ldapSession, InternalBindRequest bindRequest ) throws Exception
+    public SaslServer handleMechanism( LdapSession ldapSession, BindRequest bindRequest ) throws Exception
     {
         SaslServer ss = ( SaslServer ) ldapSession.getSaslProperty( SaslConstants.SASL_SERVER );
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java Fri Aug 20 19:31:58 2010
@@ -33,7 +33,7 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.handlers.bind.SaslConstants;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
+import org.apache.directory.shared.ldap.message.BindRequest;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.StringTools;
 
@@ -55,7 +55,7 @@ public class NtlmSaslServer extends Abst
     private final NtlmProvider provider;
 
 
-    public NtlmSaslServer( NtlmProvider provider, InternalBindRequest bindRequest, LdapSession ldapSession )
+    public NtlmSaslServer( NtlmProvider provider, BindRequest bindRequest, LdapSession ldapSession )
     {
         super( ldapSession, null, bindRequest );
         this.provider = provider;

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/plain/PlainMechanismHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/plain/PlainMechanismHandler.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/plain/PlainMechanismHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/plain/PlainMechanismHandler.java Fri Aug 20 19:31:58 2010
@@ -26,7 +26,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.server.ldap.handlers.bind.AbstractMechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.SaslConstants;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
+import org.apache.directory.shared.ldap.message.BindRequest;
 
 
 /**
@@ -40,7 +40,7 @@ public class PlainMechanismHandler exten
     /**
      * {@inheritDoc}
      */
-    public SaslServer handleMechanism( LdapSession ldapSession, InternalBindRequest bindRequest ) throws Exception
+    public SaslServer handleMechanism( LdapSession ldapSession, BindRequest bindRequest ) throws Exception
     {
         SaslServer ss = ( SaslServer ) ldapSession.getSaslProperty( SaslConstants.SASL_SERVER );
         

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/plain/PlainSaslServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/plain/PlainSaslServer.java?rev=987611&r1=987610&r2=987611&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/plain/PlainSaslServer.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/plain/PlainSaslServer.java Fri Aug 20 19:31:58 2010
@@ -28,7 +28,7 @@ import org.apache.directory.server.i18n.
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.server.ldap.handlers.bind.AbstractSaslServer;
 import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
-import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
+import org.apache.directory.shared.ldap.message.BindRequest;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.PrepareString;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -88,7 +88,7 @@ public class PlainSaslServer extends Abs
      * @param bindRequest The associated BindRequest object
      * @param ldapSession The associated LdapSession instance 
      */
-    public PlainSaslServer( LdapSession ldapSession, CoreSession adminSession, InternalBindRequest bindRequest )
+    public PlainSaslServer( LdapSession ldapSession, CoreSession adminSession, BindRequest bindRequest )
     {
         super( ldapSession, adminSession, bindRequest );
         state = NegotiationState.INITIALIZED;



Mime
View raw message