directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r683759 - in /directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core: ./ interceptor/context/
Date Thu, 07 Aug 2008 23:49:18 GMT
Author: akarasulu
Date: Thu Aug  7 16:49:18 2008
New Revision: 683759

URL: http://svn.apache.org/viewvc?rev=683759&view=rev
Log:
changes for referral handling ...

 o cleaned up now useless referral handling mode property on search opContext
 o added explicit has ManageDsaIT lookup to search opContext


Modified:
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractOperationContext.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddOperationContext.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/DeleteOperationContext.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveOperationContext.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/OperationContext.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/SearchOperationContext.java

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java?rev=683759&r1=683758&r2=683759&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
Thu Aug  7 16:49:18 2008
@@ -387,7 +387,6 @@
         LdapDN authorized ) throws Exception
     {
         LookupOperationContext opContext = new LookupOperationContext( this, dn );
-        opContext.setReferralHandlingMode( refMode );
         opContext.addRequestControls( requestControls );
         return directoryService.getOperationManager().lookup( opContext );
     }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractOperationContext.java?rev=683759&r1=683758&r2=683759&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractOperationContext.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractOperationContext.java
Thu Aug  7 16:49:18 2008
@@ -29,13 +29,10 @@
 import javax.naming.ldap.Control;
 
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.ReferralHandlingMode;
 import org.apache.directory.server.core.authn.LdapPrincipal;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.shared.ldap.entry.Modification;
-import org.apache.directory.shared.ldap.message.ManageDsaITControl;
-import org.apache.directory.shared.ldap.message.Request;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 
@@ -67,9 +64,6 @@
     
     protected LdapPrincipal authorizedPrincipal;
     
-    /** an operation can override the session's referral handling mode */
-    protected ReferralHandlingMode referralHandlingMode;
-    
     protected CoreSession session;
     
     protected OperationContext next;
@@ -413,37 +407,6 @@
 
 
     /**
-     * @param referralHandlingMode the referralHandlingMode to set
-     */
-    public void setReferralHandlingMode( ReferralHandlingMode referralHandlingMode )
-    {
-        this.referralHandlingMode = referralHandlingMode;
-    }
-
-
-    /**
-     * @return the referralHandlingMode
-     */
-    public ReferralHandlingMode getReferralHandlingMode()
-    {
-        return referralHandlingMode;
-    }
-    
-    
-    protected void setReferralHandlingMode( Request req )
-    {
-        if ( req.hasControl( ManageDsaITControl.CONTROL_OID ) )
-        {
-            this.referralHandlingMode = ReferralHandlingMode.IGNORE;
-        }
-        else
-        {
-            this.referralHandlingMode = ReferralHandlingMode.THROW;
-        }
-    }
-
-
-    /**
      * @param entry the entry to set
      */
     public void setEntry( ClonedServerEntry entry )

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddOperationContext.java?rev=683759&r1=683758&r2=683759&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddOperationContext.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddOperationContext.java
Thu Aug  7 16:49:18 2008
@@ -21,7 +21,6 @@
 
 
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.changelog.ChangeLogEvent;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.entry.ServerEntryUtils;
@@ -96,7 +95,6 @@
             session.getDirectoryService().getRegistries() ) );
         this.dn = addRequest.getEntry();
         this.requestControls = addRequest.getControls();
-        setReferralHandlingMode( addRequest );
     }
 
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java?rev=683759&r1=683758&r2=683759&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java
Thu Aug  7 16:49:18 2008
@@ -108,7 +108,6 @@
         this.oid = compareRequest.getAttributeId();
         this.value = compareRequest.getAssertionValue();
         this.requestControls = compareRequest.getControls();
-        setReferralHandlingMode( compareRequest );
     }
 
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/DeleteOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/DeleteOperationContext.java?rev=683759&r1=683758&r2=683759&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/DeleteOperationContext.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/DeleteOperationContext.java
Thu Aug  7 16:49:18 2008
@@ -67,7 +67,6 @@
     {
         super( session, deleteRequest.getName() );
         this.requestControls = deleteRequest.getControls();
-        super.setReferralHandlingMode( deleteRequest );
     }
     
     

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveOperationContext.java?rev=683759&r1=683758&r2=683759&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveOperationContext.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveOperationContext.java
Thu Aug  7 16:49:18 2008
@@ -73,8 +73,6 @@
         {
             throw new IllegalArgumentException( modifyDnRequest + " represents a move and
rename operation." );
         }
-        
-        super.setReferralHandlingMode( modifyDnRequest );
     }
 
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/OperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/OperationContext.java?rev=683759&r1=683758&r2=683759&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/OperationContext.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/OperationContext.java
Thu Aug  7 16:49:18 2008
@@ -26,7 +26,6 @@
 import javax.naming.ldap.Control;
 
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.ReferralHandlingMode;
 import org.apache.directory.server.core.authn.LdapPrincipal;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
@@ -291,25 +290,6 @@
     CoreSession getSession();
     
     
-    /**
-     * Sets the {@link ReferralHandlingMode} session override for this 
-     * OperationContext.
-     *
-     * @param referralHandlingMode the ReferralHandlingMode override to apply
-     */
-    void setReferralHandlingMode( ReferralHandlingMode referralHandlingMode );
-    
-    
-    /**
-     * Gets the {@link ReferralHandlingMode} override for this 
-     * OperationContext, or if the override is not set it returns the 
-     * ReferralHandlingMode associated with the CoreSession if present.
-     *
-     * @return the {@link ReferralHandlingMode} to apply for this operation
-     */
-    ReferralHandlingMode getReferralHandlingMode();
-    
-    
     // -----------------------------------------------------------------------
     // Utility Factory Methods to Create New OperationContexts
     // -----------------------------------------------------------------------

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/SearchOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/SearchOperationContext.java?rev=683759&r1=683758&r2=683759&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/SearchOperationContext.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/SearchOperationContext.java
Thu Aug  7 16:49:18 2008
@@ -28,6 +28,7 @@
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
+import org.apache.directory.shared.ldap.message.ManageDsaITControl;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.SearchRequest;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -75,7 +76,6 @@
         this.timeLimit = searchRequest.getTimeLimit();
         this.noAttributes = searchRequest.getTypesOnly();
         setReturningAttributes( searchRequest.getAttributes() );
-        setReferralHandlingMode( searchRequest );
     }
 
 
@@ -115,6 +115,18 @@
 
 
     /**
+     * Checks whether or not the ManageDsaITControl is present.  If not 
+     * present then the filter is modified to force the return of all referral
+     * entries regardless of whether or not the filter matches the referral
+     * entry.
+     */
+    public boolean hasManageDsaItControl()
+    {
+        return super.hasRequestControl( ManageDsaITControl.CONTROL_OID );
+    }
+    
+    
+    /**
      * @return The filter
      */
     public ExprNode getFilter()



Mime
View raw message