directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r601097 - /directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
Date Tue, 04 Dec 2007 21:46:24 GMT
Author: akarasulu
Date: Tue Dec  4 13:46:24 2007
New Revision: 601097

URL: http://svn.apache.org/viewvc?rev=601097&view=rev
Log:
made it so setting change for denomalizing operational attributes is 
immediately felt without a restart 

Modified:
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java?rev=601097&r1=601096&r2=601097&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
Tue Dec  4 13:46:24 2007
@@ -29,7 +29,6 @@
 import org.apache.directory.server.core.interceptor.context.*;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
-import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
@@ -85,14 +84,11 @@
         }
     };
 
-    /**
-     * the root nexus of the system
-     */
-    private PartitionNexus nexus;
 
     private AttributeTypeRegistry registry;
 
-    private boolean isDenormalizeOpAttrsEnabled;
+    private DirectoryService service;
+
     private LdapDN subschemaSubentryDn;
 
 
@@ -106,12 +102,12 @@
 
     public void init( DirectoryService directoryService ) throws NamingException
     {
-        nexus = directoryService.getPartitionNexus();
+        service = directoryService;
         registry = directoryService.getRegistries().getAttributeTypeRegistry();
-        isDenormalizeOpAttrsEnabled = directoryService.isDenormalizeOpAttrsEnabled();
 
         // stuff for dealing with subentries (garbage for now)
-        String subschemaSubentry = ( String ) nexus.getRootDSE( null ).get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT
).get();
+        String subschemaSubentry = ( String ) service.getPartitionNexus()
+                .getRootDSE( null ).get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
         subschemaSubentryDn = new LdapDN( subschemaSubentry );
         subschemaSubentryDn.normalize( directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping()
);
     }
@@ -176,7 +172,7 @@
         // -------------------------------------------------------------------
 
         ModifyOperationContext newModify = new ModifyOperationContext( opContext.getDn(),
modItemList );
-        nexus.modify( newModify );
+        service.getPartitionNexus().modify( newModify );
     }
 
 
@@ -204,7 +200,7 @@
 
         ModifyOperationContext newModify = new ModifyOperationContext( newDn, items );
         
-        nexus.modify( newModify );
+        service.getPartitionNexus().modify( newModify );
     }
 
 
@@ -228,7 +224,7 @@
         ModifyOperationContext newModify = 
             new ModifyOperationContext( opContext.getParent(), items );
         
-        nexus.modify( newModify );
+        service.getPartitionNexus().modify( newModify );
     }
 
 
@@ -253,7 +249,7 @@
             new ModifyOperationContext( 
         		opContext.getParent(), items );
         
-        nexus.modify( newModify );
+        service.getPartitionNexus().modify( newModify );
     }
 
 
@@ -296,7 +292,7 @@
         
         if ( searchCtls.getReturningAttributes() != null )
         {
-            if ( isDenormalizeOpAttrsEnabled )
+            if ( service.isDenormalizeOpAttrsEnabled() )
             {
                 return new SearchResultFilteringEnumeration( result, searchCtls, invocation,
DENORMALIZING_SEARCH_FILTER, "Search Operational Filter denormalized" );
             }
@@ -385,7 +381,7 @@
     
     public void denormalizeEntryOpAttrs( Attributes entry ) throws NamingException
     {
-        if ( isDenormalizeOpAttrsEnabled )
+        if ( service.isDenormalizeOpAttrsEnabled() )
         {
             AttributeType type = registry.lookup( SchemaConstants.CREATORS_NAME_AT );
             Attribute attr = AttributeUtils.getAttribute( entry, type );



Mime
View raw message