directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1200409 - in /directory/apacheds/branches/apacheds-txns/core-shared: ./ src/main/java/org/apache/directory/server/core/shared/DefaultCoreSession.java src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java
Date Thu, 10 Nov 2011 16:22:06 GMT
Author: elecharny
Date: Thu Nov 10 16:22:05 2011
New Revision: 1200409

URL: http://svn.apache.org/viewvc?rev=1200409&view=rev
Log:
Merged back trunks into saya's branch

Modified:
    directory/apacheds/branches/apacheds-txns/core-shared/   (props changed)
    directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/DefaultCoreSession.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java

Propchange: directory/apacheds/branches/apacheds-txns/core-shared/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Nov 10 16:22:05 2011
@@ -0,0 +1,10 @@
+/directory/apacheds/branches/apacheds-codec-merge/core-shared:982369-987590
+/directory/apacheds/branches/apacheds-config/core-shared:1023442-1029077
+/directory/apacheds/branches/apacheds-kerberos-codec-2.0/core-shared:1040956-1043765
+/directory/apacheds/branches/apacheds-replication/core-shared:749790-764110
+/directory/apacheds/branches/apacheds-schema/core-shared:806623-896441
+/directory/apacheds/branches/apacheds-subtree/core-shared:965203-965686
+/directory/apacheds/branches/milestones/core-shared:1072812-1075328
+/directory/apacheds/branches/xdbm-refactoring/core-shared:945827-946347
+/directory/apacheds/trunk/core-shared:1066126-1067785,1068026-1072718,1072800-1075329,1183559-1200380
+/directory/studio/trunk/core-shared:1067786-1067997

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/DefaultCoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/DefaultCoreSession.java?rev=1200409&r1=1200408&r2=1200409&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/DefaultCoreSession.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/DefaultCoreSession.java
Thu Nov 10 16:22:05 2011
@@ -87,17 +87,29 @@ import org.apache.directory.shared.util.
  */
 public class DefaultCoreSession implements CoreSession
 {
+	/** The DirectoryService we are connected to */
     private final DirectoryService directoryService;
+    
+    /** The Principal used to process operations */
     private final LdapPrincipal authenticatedPrincipal;
+    
+    /** The anonymous principal, if we have to process operation as anonymous */
     private final LdapPrincipal anonymousPrincipal;
+    
+    /** The authorized principal, which will be used when a user has been authorized */
     private LdapPrincipal authorizedPrincipal;
 
 
+    /**
+     * Creates a new instance of a DefaultCoreSession
+     * @param principal The principal to use to process operation for this session
+     * @param directoryService The DirectoryService to which we will send requests
+     */
     public DefaultCoreSession( LdapPrincipal principal, DirectoryService directoryService
)
     {
         this.directoryService = directoryService;
-        this.authenticatedPrincipal = principal;
-        this.anonymousPrincipal = new LdapPrincipal( directoryService.getSchemaManager()
);
+        authenticatedPrincipal = principal;
+        anonymousPrincipal = new LdapPrincipal( directoryService.getSchemaManager() );
     }
 
 
@@ -877,6 +889,7 @@ public class DefaultCoreSession implemen
         deleteContext.setLogChange( log );
 
         OperationManager operationManager = directoryService.getOperationManager();
+        
         try
         {
             operationManager.delete( deleteContext );
@@ -907,6 +920,7 @@ public class DefaultCoreSession implemen
     {
         EntryOperationContext hasEntryContext = new EntryOperationContext( this, dn );
         OperationManager operationManager = directoryService.getOperationManager();
+        
         return operationManager.hasEntry( hasEntryContext );
     }
 
@@ -1070,15 +1084,26 @@ public class DefaultCoreSession implemen
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void unbind() throws LdapException
     {
+    	UnbindOperationContext unbindContext = new UnbindOperationContext( this );
+    	
         OperationManager operationManager = directoryService.getOperationManager();
-        operationManager.unbind( new UnbindOperationContext( this ) );
+        operationManager.unbind( unbindContext );
     }
 
 
-    public void unbind( UnbindRequest unbindRequest )
+    /**
+     * {@inheritDoc}
+     */
+    public void unbind( UnbindRequest unbindRequest ) throws LdapException
     {
-        // TODO Auto-generated method stub
+    	UnbindOperationContext unbindContext = new UnbindOperationContext( this, unbindRequest
);
+    	
+        OperationManager operationManager = directoryService.getOperationManager();
+        operationManager.unbind( unbindContext );
     }
 }

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java?rev=1200409&r1=1200408&r2=1200409&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java
Thu Nov 10 16:22:05 2011
@@ -796,7 +796,8 @@ public class DefaultPartitionNexus exten
                 for ( Partition partition : partitions.values() )
                 {
                     Dn contextDn = partition.getSuffixDn();
-                    EntryOperationContext hasEntryContext = new EntryOperationContext( null,
contextDn );
+                    EntryOperationContext hasEntryContext = new EntryOperationContext( searchContext.getSession(),
contextDn );
+                    
                     // search only if the context entry exists
                     if( partition.hasEntry( hasEntryContext ) )
                     {



Mime
View raw message