directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r918913 - in /directory/apacheds/trunk: core-api/src/main/java/org/apache/directory/server/core/interceptor/context/ core-mock/src/main/java/org/apache/directory/server/core/ core/src/main/java/org/apache/directory/server/core/
Date Thu, 04 Mar 2010 09:42:58 GMT
Author: elecharny
Date: Thu Mar  4 09:42:58 2010
New Revision: 918913

URL: http://svn.apache.org/viewvc?rev=918913&view=rev
Log:
Removed the constructor of OperationContext which take a AliasDeref argument. It's now set
using a setter.

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/ListOperationContext.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchOperationContext.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java
    directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockCoreSession.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/ListOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/ListOperationContext.java?rev=918913&r1=918912&r2=918913&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/ListOperationContext.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/ListOperationContext.java
Thu Mar  4 09:42:58 2010
@@ -65,7 +65,8 @@
      */
     public ListOperationContext( CoreSession session, DN dn, AliasDerefMode aliasDerefMode
)
     {
-        super( session, dn, aliasDerefMode );
+        super( session, dn );
+        this.aliasDerefMode = aliasDerefMode;
     }
 
     
@@ -80,7 +81,8 @@
     public ListOperationContext( CoreSession session, DN dn, AliasDerefMode aliasDerefMode,
         Set<AttributeTypeOptions> returningAttributes )
     {
-        super( session, dn, aliasDerefMode, returningAttributes );
+        super( session, dn, returningAttributes );
+        this.aliasDerefMode = aliasDerefMode;
     }
 
 

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchOperationContext.java?rev=918913&r1=918912&r2=918913&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchOperationContext.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchOperationContext.java
Thu Mar  4 09:42:58 2010
@@ -29,7 +29,6 @@
 import org.apache.directory.shared.ldap.codec.controls.ManageDsaITControl;
 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.internal.InternalSearchRequest;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeTypeOptions;
@@ -113,9 +112,9 @@
      * @param returningAttributes the attributes to return
      */
     public SearchOperationContext( CoreSession session, DN dn, SearchScope scope,
-        ExprNode filter, AliasDerefMode aliasDerefMode, Set<AttributeTypeOptions> returningAttributes
)
+        ExprNode filter, Set<AttributeTypeOptions> returningAttributes )
     {
-        super( session, dn, aliasDerefMode, returningAttributes );
+        super( session, dn, returningAttributes );
         super.setScope( scope );
         this.filter = filter;
     }

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java?rev=918913&r1=918912&r2=918913&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java
Thu Mar  4 09:42:58 2010
@@ -107,54 +107,13 @@
 
 
     /**
-     * Creates a new instance of SearchingOperationContext.
-     *
-     * @param dn The DN to get the suffix from
-     * @param aliasDerefMode the alias dereferencing mode to use
-     */
-    public SearchingOperationContext( CoreSession session, DN dn, AliasDerefMode aliasDerefMode
)
-    {
-        super( session, dn );
-        this.aliasDerefMode = aliasDerefMode;
-    }
-
-    
-    /**
      * Creates a new instance of ListOperationContext.
      *
      * @param dn The DN to get the suffix from
      * @param aliasDerefMode the alias dereferencing mode to use
      * @throws NamingException 
      */
-    public SearchingOperationContext( CoreSession session, DN dn, AliasDerefMode aliasDerefMode,

-        SearchControls searchControls ) throws Exception
-    {
-        super( session, dn );
-        this.aliasDerefMode = aliasDerefMode;
-        this.scope = SearchScope.getSearchScope( searchControls.getSearchScope() );
-        this.timeLimit = searchControls.getTimeLimit();
-        this.sizeLimit = searchControls.getCountLimit();
-        
-        if ( searchControls.getReturningAttributes() != null )
-        {
-            setReturningAttributes( searchControls.getReturningAttributes() );
-        }
-        else
-        {
-            setReturningAttributes( SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
-        }
-    }
-
-    
-    /**
-     * Creates a new instance of ListOperationContext.
-     *
-     * @param dn The DN to get the suffix from
-     * @param aliasDerefMode the alias dereferencing mode to use
-     * @throws NamingException 
-     */
-    public SearchingOperationContext( CoreSession session, DN dn, 
-        SearchControls searchControls ) throws Exception
+    public SearchingOperationContext( CoreSession session, DN dn, SearchControls searchControls
) throws Exception
     {
         super( session, dn );
         this.scope = SearchScope.getSearchScope( searchControls.getSearchScope() );
@@ -180,11 +139,9 @@
      * @param aliasDerefMode the alias dereferencing mode to use
      * @throws NamingException 
      */
-    public SearchingOperationContext( CoreSession session, DN dn, AliasDerefMode aliasDerefMode,
-        Set<AttributeTypeOptions> returningAttributes )
+    public SearchingOperationContext( CoreSession session, DN dn, Set<AttributeTypeOptions>
returningAttributes )
     {
         super( session, dn );
-        this.aliasDerefMode = aliasDerefMode;
         this.returningAttributes = returningAttributes;
     }
 

Modified: directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockCoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockCoreSession.java?rev=918913&r1=918912&r2=918913&view=diff
==============================================================================
--- directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockCoreSession.java
(original)
+++ directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockCoreSession.java
Thu Mar  4 09:42:58 2010
@@ -715,17 +715,12 @@
         OperationManager operationManager = directoryService.getOperationManager();
         ExprNode filterNode = FilterParser.parse( filter ); 
         
-        SearchOperationContext opContext = new SearchOperationContext( 
-            this, 
-            dn, 
-            SearchScope.OBJECT, 
-            filterNode, 
-            AliasDerefMode.DEREF_ALWAYS, 
-            null );
-        
-        setReferralHandling( opContext, ignoreReferrals );
+        SearchOperationContext searchOperationContext = new SearchOperationContext( this,
dn, SearchScope.OBJECT, 
+            filterNode, null );
+        searchOperationContext.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS );
+        setReferralHandling( searchOperationContext, ignoreReferrals );
 
-        return operationManager.search( opContext );
+        return operationManager.search( searchOperationContext );
     }
     
 
@@ -736,8 +731,12 @@
         Set<AttributeTypeOptions> returningAttributes ) throws Exception
     {
         OperationManager operationManager = directoryService.getOperationManager();
-        return operationManager.search( new SearchOperationContext( this, dn, scope, filter,

-            aliasDerefMode, returningAttributes ) );
+        
+        SearchOperationContext searchOperationContext = new SearchOperationContext( this,
dn, scope, 
+            filter, returningAttributes );
+        searchOperationContext.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS );
+
+        return operationManager.search( searchOperationContext );
     }
 
 
@@ -747,12 +746,14 @@
     public EntryFilteringCursor search( DN dn, SearchScope scope, ExprNode filter, AliasDerefMode
aliasDerefMode,
         Set<AttributeTypeOptions> returningAttributes, int sizeLimit, int timeLimit
) throws Exception
     {
-        SearchOperationContext opContext = new SearchOperationContext( this, dn, scope, filter,

-            aliasDerefMode, returningAttributes );
-        opContext.setSizeLimit( sizeLimit );
-        opContext.setTimeLimit( timeLimit );
         OperationManager operationManager = directoryService.getOperationManager();
-        return operationManager.search( opContext );
+        
+        SearchOperationContext searchOperationContext = new SearchOperationContext( this,
dn, scope, filter, returningAttributes );
+        searchOperationContext.setSizeLimit( sizeLimit );
+        searchOperationContext.setTimeLimit( timeLimit );
+        searchOperationContext.setAliasDerefMode( aliasDerefMode );
+
+        return operationManager.search( searchOperationContext );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java?rev=918913&r1=918912&r2=918913&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
Thu Mar  4 09:42:58 2010
@@ -716,17 +716,12 @@
         OperationManager operationManager = directoryService.getOperationManager();
         ExprNode filterNode = FilterParser.parse( filter ); 
         
-        SearchOperationContext opContext = new SearchOperationContext( 
-            this, 
-            dn, 
-            SearchScope.OBJECT, 
-            filterNode, 
-            AliasDerefMode.DEREF_ALWAYS, 
-            null );
-        
-        setReferralHandling( opContext, ignoreReferrals );
+        SearchOperationContext searchOperationContext = new SearchOperationContext( this,
dn, SearchScope.OBJECT, 
+            filterNode, null );
+        searchOperationContext.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS ); 
+        setReferralHandling( searchOperationContext, ignoreReferrals );
 
-        return operationManager.search( opContext );
+        return operationManager.search( searchOperationContext );
     }
     
 
@@ -737,8 +732,12 @@
         Set<AttributeTypeOptions> returningAttributes ) throws Exception
     {
         OperationManager operationManager = directoryService.getOperationManager();
-        return operationManager.search( new SearchOperationContext( this, dn, scope, filter,

-            aliasDerefMode, returningAttributes ) );
+
+        SearchOperationContext searchOperationContext = new SearchOperationContext( this,
dn, scope, filter, 
+            returningAttributes );
+        searchOperationContext.setAliasDerefMode( aliasDerefMode );
+
+        return operationManager.search( searchOperationContext );
     }
 
 
@@ -748,12 +747,15 @@
     public EntryFilteringCursor search( DN dn, SearchScope scope, ExprNode filter, AliasDerefMode
aliasDerefMode,
         Set<AttributeTypeOptions> returningAttributes, int sizeLimit, int timeLimit
) throws Exception
     {
-        SearchOperationContext opContext = new SearchOperationContext( this, dn, scope, filter,

-            aliasDerefMode, returningAttributes );
-        opContext.setSizeLimit( sizeLimit );
-        opContext.setTimeLimit( timeLimit );
         OperationManager operationManager = directoryService.getOperationManager();
-        return operationManager.search( opContext );
+
+        SearchOperationContext searchOperationContext = new SearchOperationContext( this,
dn, scope, filter, 
+            returningAttributes );
+        searchOperationContext.setAliasDerefMode( aliasDerefMode );
+        searchOperationContext.setSizeLimit( sizeLimit );
+        searchOperationContext.setTimeLimit( timeLimit );
+        
+        return operationManager.search( searchOperationContext );
     }
 
 



Mime
View raw message