directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r613608 [11/15] - in /directory/sandbox/akarasulu/bigbang/apacheds: ./ bootstrap-plugin/ bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/ core-entry/ core-entry/src/main/java/org/apache/directory/server/core...
Date Sun, 20 Jan 2008 16:59:36 GMT
Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/sp/StoredProcExecutionManager.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/sp/StoredProcExecutionManager.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/sp/StoredProcExecutionManager.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/sp/StoredProcExecutionManager.java Sun Jan 20 08:59:10 2008
@@ -22,11 +22,14 @@
 package org.apache.directory.server.core.sp;
 
 
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerEntryUtils;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
@@ -68,7 +71,7 @@
      * @return The entry associated with the SP Unit.
      * @throws NamingException If the unit cannot be located or any other error occurs.
      */
-    public Attributes findStoredProcUnit( LdapContext rootDSE, String fullSPName ) throws NamingException
+    public ServerEntry findStoredProcUnit( LdapContext rootDSE, String fullSPName, Registries registries ) throws NamingException
     {
         SearchControls controls = new SearchControls();
         controls.setReturningAttributes( SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
@@ -76,7 +79,7 @@
         String spUnitName = StoredProcUtils.extractStoredProcUnitName( fullSPName );
         String filter = "(storedProcUnitName=" + spUnitName + ")";
         NamingEnumeration<SearchResult> results = rootDSE.search( storedProcContainer, filter, controls );
-        return results.nextElement().getAttributes();
+        return ServerEntryUtils.toServerEntry( results.nextElement().getAttributes(), LdapDN.EMPTY_LDAPDN, registries );
     }
 
 
@@ -88,9 +91,9 @@
      * @return A {@link StoredProcEngine} associated with spUnitEntry.
      * @throws NamingException If no {@link StoredProcEngine} that can be associated with the language identifier in spUnitEntry can be found.
      */
-    public StoredProcEngine getStoredProcEngineInstance( Attributes spUnitEntry ) throws NamingException
+    public StoredProcEngine getStoredProcEngineInstance( ServerEntry spUnitEntry ) throws NamingException
     {
-        String spLangId = ( String ) spUnitEntry.get( "storedProcLangId" ).get();
+        String spLangId = ( String ) spUnitEntry.get( "storedProcLangId" ).getString();
 
         for ( StoredProcEngineConfig engineConfig : storedProcEngineConfigs )
         {
@@ -98,6 +101,7 @@
             {
                 Class<? extends StoredProcEngine> engineType = engineConfig.getStoredProcEngineType();
                 StoredProcEngine engine;
+                
                 try
                 {
                     engine = engineType.newInstance();
@@ -114,6 +118,7 @@
                     ne.setRootCause( e );
                     throw ne;
                 }
+                
                 engine.setSPUnitEntry( spUnitEntry );
                 return engine;
             }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/sp/java/JavaStoredProcEngine.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/sp/java/JavaStoredProcEngine.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/sp/java/JavaStoredProcEngine.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/sp/java/JavaStoredProcEngine.java Sun Jan 20 08:59:10 2008
@@ -28,10 +28,10 @@
 import java.util.List;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
 import javax.naming.ldap.LdapContext;
 
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.sp.StoredProcEngine;
 import org.apache.directory.server.core.sp.StoredProcUtils;
 import org.apache.directory.shared.ldap.util.DirectoryClassUtils;
@@ -48,7 +48,7 @@
 
     public static final String STORED_PROC_LANG_ID = "Java";
 
-    private Attributes spUnit;
+    private ServerEntry spUnit;
 
 
     /* (non-Javadoc)
@@ -56,12 +56,13 @@
      */
     public Object invokeProcedure( LdapContext rootCtx, String fullSPName, Object[] spArgs ) throws NamingException
     {
-        Attribute javaByteCode = spUnit.get( "javaByteCode" );
+        ServerAttribute javaByteCode = spUnit.get( "javaByteCode" );
         String spName = StoredProcUtils.extractStoredProcName( fullSPName );
         String className = StoredProcUtils.extractStoredProcUnitName( fullSPName );
 
         ClassLoader loader = new LdapJavaStoredProcClassLoader( javaByteCode );
-        Class clazz;
+        Class<?> clazz;
+        
         try
         {
             clazz = loader.loadClass( className );
@@ -73,7 +74,7 @@
             throw ne;
         }
 
-        Class[] types = getTypesFromValues( spArgs );
+        Class<?>[] types = getTypesFromValues( spArgs );
 
         Method proc;
         try
@@ -123,15 +124,15 @@
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.sp.StoredProcEngine#setSPUnitEntry(javax.naming.directory.Attributes)
      */
-    public void setSPUnitEntry( Attributes spUnit )
+    public void setSPUnitEntry( ServerEntry spUnit )
     {
         this.spUnit = spUnit;
     }
 
 
-    private Class[] getTypesFromValues( Object[] values )
+    private Class<?>[] getTypesFromValues( Object[] values )
     {
-        List<Class> types = new ArrayList<Class>();
+        List<Class<?>> types = new ArrayList<Class<?>>();
 
         for ( Object obj : values )
         {
@@ -141,6 +142,6 @@
         return types.toArray( EMPTY_CLASS_ARRAY );
     }
 
-    private static Class[] EMPTY_CLASS_ARRAY = new Class[ 0 ];
+    private static Class<?>[] EMPTY_CLASS_ARRAY = new Class[ 0 ];
 
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/sp/java/LdapJavaStoredProcClassLoader.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/sp/java/LdapJavaStoredProcClassLoader.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/sp/java/LdapJavaStoredProcClassLoader.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/sp/java/LdapJavaStoredProcClassLoader.java Sun Jan 20 08:59:10 2008
@@ -22,7 +22,8 @@
 
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
+
+import org.apache.directory.server.core.entry.ServerAttribute;
 
 
 /**
@@ -33,10 +34,10 @@
  */
 public class LdapJavaStoredProcClassLoader extends ClassLoader
 {
-    private Attribute javaByteCodeAttr;
+    private ServerAttribute javaByteCodeAttr;
 
 
-    public LdapJavaStoredProcClassLoader( Attribute javaByteCodeAttr )
+    public LdapJavaStoredProcClassLoader( ServerAttribute javaByteCodeAttr )
     {
         // Critical call to super class constructor. Required for true plumbing of class loaders.
         super( LdapJavaStoredProcClassLoader.class.getClassLoader() );
@@ -48,9 +49,10 @@
     public Class<?> findClass( String name ) throws ClassNotFoundException
     {
         byte[] classBytes;
+        
         try
         {
-            classBytes = ( byte[] ) javaByteCodeAttr.get();
+            classBytes = javaByteCodeAttr.getBytes();
         }
         catch ( NamingException e )
         {

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java Sun Jan 20 08:59:10 2008
@@ -24,15 +24,29 @@
 
 import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.entry.DefaultServerAttribute;
+import org.apache.directory.server.core.entry.DefaultServerEntry;
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerEntryUtils;
 import org.apache.directory.server.core.enumeration.SearchResultFilter;
 import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
 import org.apache.directory.server.core.interceptor.NextInterceptor;
-import org.apache.directory.server.core.interceptor.context.*;
+import org.apache.directory.server.core.interceptor.context.AddOperationContext;
+import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
+import org.apache.directory.server.core.interceptor.context.ListOperationContext;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
+import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
+import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
+import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
+import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 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.server.schema.registries.OidRegistry;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
@@ -40,7 +54,12 @@
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
-import org.apache.directory.shared.ldap.message.*;
+import org.apache.directory.shared.ldap.message.AliasDerefMode;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.message.SubentriesControl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.NormalizerMappingResolver;
@@ -54,7 +73,12 @@
 import javax.naming.Name;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.ModificationItem;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
 import javax.naming.ldap.Control;
 import javax.naming.ldap.LdapContext;
 import java.util.ArrayList;
@@ -79,7 +103,6 @@
 
     public static final String AC_AREA = "accessControlSpecificArea";
     public static final String AC_INNERAREA = "accessControlInnerArea";
-    //public static final String AC_SUBENTRIES = "accessControlSubentries";
 
     public static final String SCHEMA_AREA = "subschemaAdminSpecificArea";
 
@@ -105,7 +128,14 @@
     private SubtreeSpecificationParser ssParser;
     private SubtreeEvaluator evaluator;
     private PartitionNexus nexus;
-    private AttributeTypeRegistry attrRegistry;
+
+    /** The global registries */
+    private Registries registries;
+    
+    /** The AttributeType registry */
+    private AttributeTypeRegistry atRegistry;
+    
+    /** The OID registry */
     private OidRegistry oidRegistry;
     
     private AttributeType objectClassType;
@@ -114,22 +144,22 @@
     public void init( DirectoryService directoryService ) throws NamingException
     {
         super.init( directoryService );
-        this.nexus = directoryService.getPartitionNexus();
-        this.attrRegistry = directoryService.getRegistries().getAttributeTypeRegistry();
-        this.oidRegistry = directoryService.getRegistries().getOidRegistry();
+        nexus = directoryService.getPartitionNexus();
+        registries = directoryService.getRegistries();
+        atRegistry = registries.getAttributeTypeRegistry();
+        oidRegistry = registries.getOidRegistry();
         
         // setup various attribute type values
-        objectClassType = attrRegistry.lookup( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
+        objectClassType = atRegistry.lookup( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
         
         ssParser = new SubtreeSpecificationParser( new NormalizerMappingResolver()
         {
             public Map<String, OidNormalizer> getNormalizerMapping() throws NamingException
             {
-                return attrRegistry.getNormalizerMapping();
+                return atRegistry.getNormalizerMapping();
             }
-        }, attrRegistry.getNormalizerMapping() );
-        evaluator = new SubtreeEvaluator( directoryService.getRegistries().getOidRegistry(),
-                directoryService.getRegistries().getAttributeTypeRegistry() );
+        }, atRegistry.getNormalizerMapping() );
+        evaluator = new SubtreeEvaluator( oidRegistry, atRegistry );
 
         // prepare to find all subentries in all namingContexts
         Iterator<String> suffixes = this.nexus.listSuffixes( null );
@@ -143,16 +173,18 @@
         {
             LdapDN suffix = new LdapDN( suffixes.next() );
             //suffix = LdapDN.normalize( suffix, registry.getNormalizerMapping() );
-            suffix.normalize( attrRegistry.getNormalizerMapping() );
+            suffix.normalize( atRegistry.getNormalizerMapping() );
+            
             NamingEnumeration<SearchResult> subentries = nexus.search( 
-                new SearchOperationContext( suffix, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
+                new SearchOperationContext( registries, suffix, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
             
             while ( subentries.hasMore() )
             {
                 SearchResult result = subentries.next();
-                Attributes subentry = result.getAttributes();
-                String dn = result.getName();
-                String subtree = ( String ) subentry.get( SchemaConstants.SUBTREE_SPECIFICATION_AT ).get();
+                LdapDN dnName = new LdapDN( result.getName() );
+                
+                ServerEntry subentry = ServerEntryUtils.toServerEntry( result.getAttributes(), dnName, registries );
+                String subtree = subentry.get( SchemaConstants.SUBTREE_SPECIFICATION_AT ).getString();
                 SubtreeSpecification ss;
 
                 try
@@ -161,46 +193,45 @@
                 }
                 catch ( Exception e )
                 {
-                    LOG.warn( "Failed while parsing subtreeSpecification for " + dn );
+                    LOG.warn( "Failed while parsing subtreeSpecification for " + dnName );
                     continue;
                 }
 
-                LdapDN dnName = new LdapDN( dn );
-                //dnName = LdapDN.normalize( dnName, registry.getNormalizerMapping() );
-                dnName.normalize( attrRegistry.getNormalizerMapping() );
+                dnName.normalize( atRegistry.getNormalizerMapping() );
                 subentryCache.setSubentry( dnName.toString(), ss, getSubentryTypes( subentry ) );
             }
         }
     }
     
     
-    private int getSubentryTypes( Attributes subentry ) throws NamingException
+    private int getSubentryTypes( ServerEntry subentry ) throws NamingException
     {
         int types = 0;
         
-        Attribute oc = subentry.get( SchemaConstants.OBJECT_CLASS_AT );
+        ServerAttribute oc = subentry.get( SchemaConstants.OBJECT_CLASS_AT );
+        
         if ( oc == null )
         {
             throw new LdapSchemaViolationException( "A subentry must have an objectClass attribute", 
                 ResultCodeEnum.OBJECT_CLASS_VIOLATION );
         }
         
-        if ( AttributeUtils.containsValueCaseIgnore( oc, SchemaConstants.ACCESS_CONTROL_SUBENTRY_OC ) )
+        if ( oc.contains( SchemaConstants.ACCESS_CONTROL_SUBENTRY_OC ) )
         {
             types |= Subentry.ACCESS_CONTROL_SUBENTRY;
         }
         
-        if ( AttributeUtils.containsValueCaseIgnore( oc, "subschema" ) )
+        if ( oc.contains( "subschema" ) )
         {
             types |= Subentry.SCHEMA_SUBENTRY;
         }
         
-        if ( AttributeUtils.containsValueCaseIgnore( oc, "collectiveAttributeSubentry" ) )
+        if ( oc.contains( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRY_OC ) )
         {
             types |= Subentry.COLLECTIVE_SUBENTRY;
         }
         
-        if ( AttributeUtils.containsValueCaseIgnore( oc, ApacheSchemaConstants.TRIGGER_EXECUTION_SUBENTRY_OC ) )
+        if ( oc.contains( ApacheSchemaConstants.TRIGGER_EXECUTION_SUBENTRY_OC ) )
         {
             types |= Subentry.TRIGGER_SUBENTRY;
         }
@@ -298,9 +329,9 @@
      * @return the set of subentry op attrs for an entry
      * @throws NamingException if there are problems accessing entry information
      */
-    public Attributes getSubentryAttributes( Name dn, Attributes entryAttrs ) throws NamingException
+    public ServerEntry getSubentryAttributes( LdapDN dn, ServerEntry entryAttrs ) throws NamingException
     {
-        Attributes subentryAttrs = new AttributesImpl();
+        ServerEntry subentryAttrs = new DefaultServerEntry( registries, dn );
         Iterator<String> list = subentryCache.nameIterator();
         
         while ( list.hasNext() )
@@ -314,46 +345,62 @@
 
             if ( evaluator.evaluate( ss, apDn, dn, entryAttrs ) )
             {                
-                Attribute operational;
+                ServerAttribute operational;
                 
                 if ( subentry.isAccessControlSubentry() )
                 {
                     operational = subentryAttrs.get( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT );
+                    
                     if ( operational == null )
                     {
-                        operational = new AttributeImpl( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT );
+                        operational = new DefaultServerAttribute( 
+                                            SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT, 
+                                            atRegistry.lookup( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT ) );
                         subentryAttrs.put( operational );
                     }
+                    
                     operational.add( subentryDn.toString() );
                 }
                 if ( subentry.isSchemaSubentry() )
                 {
                     operational = subentryAttrs.get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT );
+                    
                     if ( operational == null )
                     {
-                        operational = new AttributeImpl( SchemaConstants.SUBSCHEMA_SUBENTRY_AT );
+                        operational = new DefaultServerAttribute( 
+                                            SchemaConstants.SUBSCHEMA_SUBENTRY_AT,
+                                            atRegistry.lookup( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ) );
                         subentryAttrs.put( operational );
                     }
+                    
                     operational.add( subentryDn.toString() );
                 }
                 if ( subentry.isCollectiveSubentry() )
                 {
                     operational = subentryAttrs.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
+                    
                     if ( operational == null )
                     {
-                        operational = new AttributeImpl( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
+                        operational = new DefaultServerAttribute( 
+                                            SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT,
+                                            atRegistry.lookup( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
                         subentryAttrs.put( operational );
                     }
+                    
                     operational.add( subentryDn.toString() );
                 } 
                 if ( subentry.isTriggerSubentry() )
                 {
                     operational = subentryAttrs.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT );
+                    
                     if ( operational == null )
                     {
-                        operational = new AttributeImpl( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT );
+                        operational = new DefaultServerAttribute( 
+                                            SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT,
+                                            atRegistry.lookup( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) );
                         subentryAttrs.put( operational );
                     }
+                    
                     operational.add( subentryDn.toString() );
                 }
             }
@@ -363,19 +410,19 @@
     }
 
 
-    public void add( NextInterceptor next, AddOperationContext opContext ) throws NamingException
+    public void add( NextInterceptor next, AddOperationContext addContext ) throws NamingException
     {
-    	LdapDN name = opContext.getDn();
-    	Attributes entry = opContext.getEntry();
+    	LdapDN name = addContext.getDn();
+        ServerEntry entry = addContext.getEntry();
     	
-        Attribute objectClasses = entry.get( SchemaConstants.OBJECT_CLASS_AT );
+        ServerAttribute objectClasses = entry.get( SchemaConstants.OBJECT_CLASS_AT );
 
-        if ( AttributeUtils.containsValueCaseIgnore( objectClasses, SchemaConstants.SUBENTRY_OC ) )
+        if ( objectClasses.contains( SchemaConstants.SUBENTRY_OC ) )
         {
             // get the name of the administrative point and its administrativeRole attributes
             LdapDN apName = ( LdapDN ) name.clone();
             apName.remove( name.size() - 1 );
-            Attributes ap = nexus.lookup( new LookupOperationContext( apName ) );
+            Attributes ap = nexus.lookup( new LookupOperationContext( registries, apName ) );
             Attribute administrativeRole = ap.get( "administrativeRole" );
 
             // check that administrativeRole has something valid in it for us
@@ -406,7 +453,7 @@
              * to modify the subentry operational attributes of.
              * ----------------------------------------------------------------
              */
-            String subtree = ( String ) entry.get( SchemaConstants.SUBTREE_SPECIFICATION_AT ).get();
+            String subtree = entry.get( SchemaConstants.SUBTREE_SPECIFICATION_AT ).getString();
             SubtreeSpecification ss;
             
             try
@@ -421,7 +468,8 @@
             }
             
             subentryCache.setSubentry( name.getNormName(), ss, getSubentryTypes( entry ) );
-            next.add( opContext );
+            
+            next.add( addContext );
 
             /* ----------------------------------------------------------------
              * Find the baseDn for the subentry and use that to search the tree
@@ -441,20 +489,22 @@
                 { SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, SchemaConstants.ALL_USER_ATTRIBUTES } );
 
             NamingEnumeration<SearchResult> subentries = nexus.search(
-                    new SearchOperationContext( baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
+                    new SearchOperationContext( registries, baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
 
             while ( subentries.hasMore() )
             {
                 SearchResult result = subentries.next();
                 Attributes candidate = result.getAttributes();
                 LdapDN dn = new LdapDN( result.getName() );
-                dn.normalize( attrRegistry.getNormalizerMapping() );
+                dn.normalize( atRegistry.getNormalizerMapping() );
 
-                if ( evaluator.evaluate( ss, apName, dn, candidate ) )
+                if ( evaluator.evaluate( ss, apName, dn, ServerEntryUtils.toServerEntry( candidate, dn, registries ) ) )
                 {
-                    nexus.modify( new ModifyOperationContext( dn, getOperationalModsForAdd( candidate, operational )  ));
+                    nexus.modify( new ModifyOperationContext( registries, dn, getOperationalModsForAdd( candidate, operational )  ));
                 }
             }
+
+            addContext.setEntry(  entry );
         }
         else
         {
@@ -471,7 +521,7 @@
 
                 if ( evaluator.evaluate( ss, apDn, name, entry ) )
                 {
-                    Attribute operational;
+                    ServerAttribute operational;
                     
                     if ( subentry.isAccessControlSubentry() )
                     {
@@ -479,7 +529,8 @@
                         
                         if ( operational == null )
                         {
-                            operational = new AttributeImpl( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT );
+                            operational = new DefaultServerAttribute( 
+                                atRegistry.lookup( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT ) );
                             entry.put( operational );
                         }
                         
@@ -492,7 +543,8 @@
                         
                         if ( operational == null )
                         {
-                            operational = new AttributeImpl( SchemaConstants.SUBSCHEMA_SUBENTRY_AT );
+                            operational = new DefaultServerAttribute( 
+                                atRegistry.lookup( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ) );
                             entry.put( operational );
                         }
                         
@@ -505,7 +557,8 @@
                         
                         if ( operational == null )
                         {
-                            operational = new AttributeImpl( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
+                            operational = new DefaultServerAttribute( 
+                                atRegistry.lookup( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
                             entry.put( operational );
                         }
                         
@@ -518,7 +571,8 @@
                         
                         if ( operational == null )
                         {
-                            operational = new AttributeImpl( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT );
+                            operational = new DefaultServerAttribute( 
+                                atRegistry.lookup( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) );
                             entry.put( operational );
                         }
                         
@@ -526,8 +580,10 @@
                     }
                 }
             }
+            
+            addContext.setEntry( entry );
 
-            next.add( opContext );
+            next.add( addContext );
         }
     }
 
@@ -539,7 +595,7 @@
     public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws NamingException
     {
     	LdapDN name = opContext.getDn();
-        Attributes entry = nexus.lookup( new LookupOperationContext( name ) );
+        Attributes entry = nexus.lookup( new LookupOperationContext( registries, name ) );
         Attribute objectClasses = AttributeUtils.getAttribute( entry, objectClassType );
 
         if ( AttributeUtils.containsValueCaseIgnore( objectClasses, SchemaConstants.SUBENTRY_OC ) )
@@ -567,18 +623,18 @@
                 { SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, SchemaConstants.ALL_USER_ATTRIBUTES } );
 
             NamingEnumeration<SearchResult> subentries = nexus.search(
-                    new SearchOperationContext( baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
+                    new SearchOperationContext( registries, baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
             
             while ( subentries.hasMore() )
             {
                 SearchResult result = subentries.next();
                 Attributes candidate = result.getAttributes();
                 LdapDN dn = new LdapDN( result.getName() );
-                dn.normalize( attrRegistry.getNormalizerMapping() );
+                dn.normalize( atRegistry.getNormalizerMapping() );
 
-                if ( evaluator.evaluate( ss, apName, dn, candidate ) )
+                if ( evaluator.evaluate( ss, apName, dn, ServerEntryUtils.toServerEntry( candidate, dn, registries ) ) )
                 {
-                    nexus.modify( new ModifyOperationContext( dn, getOperationalModsForRemove( name, candidate ) ) );
+                    nexus.modify( new ModifyOperationContext( registries, dn, getOperationalModsForRemove( name, candidate ) ) );
                 }
             }
         }
@@ -608,7 +664,7 @@
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         NamingEnumeration<SearchResult> aps = nexus.search(
-                new SearchOperationContext( name, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
+                new SearchOperationContext( registries, name, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
 
         if ( aps.hasMore() )
         {
@@ -620,7 +676,7 @@
     }
 
 
-    private List<ModificationItemImpl> getModsOnEntryRdnChange( Name oldName, Name newName, Attributes entry )
+    private List<ModificationItemImpl> getModsOnEntryRdnChange( Name oldName, Name newName, ServerEntry entry )
         throws NamingException
     {
         List<ModificationItemImpl> modList = new ArrayList<ModificationItemImpl>();
@@ -660,11 +716,11 @@
                 for ( String aSUBENTRY_OPATTRS : SUBENTRY_OPATTRS )
                 {
                     int op = DirContext.REPLACE_ATTRIBUTE;
-                    Attribute opAttr = entry.get( aSUBENTRY_OPATTRS );
+                    ServerAttribute opAttr = entry.get( aSUBENTRY_OPATTRS );
                     
                     if ( opAttr != null )
                     {
-                        opAttr = ( Attribute ) opAttr.clone();
+                        opAttr = ( ServerAttribute ) opAttr.clone();
                         opAttr.remove( subentryDn );
 
                         if ( opAttr.size() < 1 )
@@ -672,7 +728,7 @@
                             op = DirContext.REMOVE_ATTRIBUTE;
                         }
 
-                        modList.add( new ModificationItemImpl( op, opAttr ) );
+                        modList.add( new ModificationItemImpl( op, ServerEntryUtils.toAttributeImpl( opAttr ) ) );
                     }
                 }
             }
@@ -697,10 +753,14 @@
     {
         LdapDN name = opContext.getDn();
 
-        Attributes entry = nexus.lookup( new LookupOperationContext( name ) );
-        Attribute objectClasses = AttributeUtils.getAttribute( entry, objectClassType );
+        ServerEntry entry = ServerEntryUtils.toServerEntry( 
+            nexus.lookup( new LookupOperationContext( registries, name ) ),
+            name,
+            registries );
+        
+        ServerAttribute objectClasses = entry.get( objectClassType );
 
-        if ( AttributeUtils.containsValueCaseIgnore( objectClasses, SchemaConstants.SUBENTRY_OC ) )
+        if ( objectClasses.contains( SchemaConstants.SUBENTRY_OC ) )
         {
             Subentry subentry = subentryCache.getSubentry( name.toNormName() );
             SubtreeSpecification ss = subentry.getSubtreeSpecification();
@@ -723,18 +783,18 @@
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[] { SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, SchemaConstants.ALL_USER_ATTRIBUTES } );
             NamingEnumeration<SearchResult> subentries = nexus.search(
-                    new SearchOperationContext( baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
+                    new SearchOperationContext( registries, baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
             
             while ( subentries.hasMore() )
             {
                 SearchResult result = subentries.next();
                 Attributes candidate = result.getAttributes();
                 LdapDN dn = new LdapDN( result.getName() );
-                dn.normalize( attrRegistry.getNormalizerMapping() );
+                dn.normalize( atRegistry.getNormalizerMapping() );
 
-                if ( evaluator.evaluate( ss, apName, dn, candidate ) )
+                if ( evaluator.evaluate( ss, apName, dn, ServerEntryUtils.toServerEntry( candidate, dn, registries ) ) )
                 {
-                    nexus.modify( new ModifyOperationContext( dn, getOperationalModsForReplace( name, newName, subentry, candidate ) ) );
+                    nexus.modify( new ModifyOperationContext( registries, dn, getOperationalModsForReplace( name, newName, subentry, candidate ) ) );
                 }
             }
         }
@@ -754,12 +814,12 @@
             LdapDN newName = ( LdapDN ) name.clone();
             newName.remove( newName.size() - 1 );
             newName.add( opContext.getNewRdn() );
-            newName.normalize( attrRegistry.getNormalizerMapping() );
+            newName.normalize( atRegistry.getNormalizerMapping() );
             List<ModificationItemImpl> mods = getModsOnEntryRdnChange( name, newName, entry );
 
             if ( mods.size() > 0 )
             {
-                nexus.modify( new ModifyOperationContext( newName, mods ) );
+                nexus.modify( new ModifyOperationContext( registries, newName, mods ) );
             }
         }
     }
@@ -771,11 +831,14 @@
         LdapDN oriChildName = opContext.getDn();
         LdapDN parent = opContext.getParent();
 
+        ServerEntry entry = ServerEntryUtils.toServerEntry( 
+            nexus.lookup( new LookupOperationContext( registries, oriChildName ) ),
+            oriChildName,
+            registries );
         
-        Attributes entry = nexus.lookup( new LookupOperationContext( oriChildName ) );
-        Attribute objectClasses = AttributeUtils.getAttribute( entry, objectClassType );
+        ServerAttribute objectClasses = entry.get( objectClassType );
 
-        if ( AttributeUtils.containsValueCaseIgnore( objectClasses, SchemaConstants.SUBENTRY_OC ) )
+        if ( objectClasses.contains( SchemaConstants.SUBENTRY_OC ) )
         {
             Subentry subentry = subentryCache.getSubentry( oriChildName.toNormName() );
             SubtreeSpecification ss = subentry.getSubtreeSpecification();
@@ -799,18 +862,18 @@
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[] { SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, SchemaConstants.ALL_USER_ATTRIBUTES } );
             NamingEnumeration<SearchResult> subentries = nexus.search(
-                    new SearchOperationContext( baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
+                    new SearchOperationContext( registries, baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
             
             while ( subentries.hasMore() )
             {
                 SearchResult result = subentries.next();
                 Attributes candidate = result.getAttributes();
                 LdapDN dn = new LdapDN( result.getName() );
-                dn.normalize( attrRegistry.getNormalizerMapping() );
+                dn.normalize( atRegistry.getNormalizerMapping() );
 
-                if ( evaluator.evaluate( ss, apName, dn, candidate ) )
+                if ( evaluator.evaluate( ss, apName, dn, ServerEntryUtils.toServerEntry( candidate, dn, registries ) ) )
                 {
-                    nexus.modify( new ModifyOperationContext( dn, getOperationalModsForReplace( oriChildName, newName, subentry,
+                    nexus.modify( new ModifyOperationContext( registries, dn, getOperationalModsForReplace( oriChildName, newName, subentry,
                         candidate ) ) );
                 }
             }
@@ -830,12 +893,12 @@
             // attributes contained within this regular entry with name changes
             LdapDN newName = ( LdapDN ) parent.clone();
             newName.add( opContext.getNewRdn() );
-            newName.normalize( attrRegistry.getNormalizerMapping() );
+            newName.normalize( atRegistry.getNormalizerMapping() );
             List<ModificationItemImpl> mods = getModsOnEntryRdnChange( oriChildName, newName, entry );
 
             if ( mods.size() > 0 )
             {
-                nexus.modify( new ModifyOperationContext( newName, mods ) );
+                nexus.modify( new ModifyOperationContext( registries, newName, mods ) );
             }
         }
     }
@@ -846,10 +909,14 @@
         LdapDN oriChildName = opContext.getDn();
         LdapDN newParentName = opContext.getParent();
         
-        Attributes entry = nexus.lookup( new LookupOperationContext( oriChildName ) );
-        Attribute objectClasses = entry.get( SchemaConstants.OBJECT_CLASS_AT );
+        ServerEntry entry = ServerEntryUtils.toServerEntry( 
+            nexus.lookup( new LookupOperationContext( registries, oriChildName ) ),
+            oriChildName,
+            registries );
 
-        if ( AttributeUtils.containsValueCaseIgnore( objectClasses, SchemaConstants.SUBENTRY_OC ) )
+        ServerAttribute objectClasses = entry.get( SchemaConstants.OBJECT_CLASS_AT );
+
+        if ( objectClasses.contains( SchemaConstants.SUBENTRY_OC ) )
         {
             Subentry subentry = subentryCache.getSubentry( oriChildName.toString() );
             SubtreeSpecification ss = subentry.getSubtreeSpecification();
@@ -873,18 +940,18 @@
             controls.setReturningAttributes( new String[]
                 { SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, SchemaConstants.ALL_USER_ATTRIBUTES } );
             NamingEnumeration<SearchResult> subentries = nexus.search(
-                    new SearchOperationContext( baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
+                    new SearchOperationContext( registries, baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
             
             while ( subentries.hasMore() )
             {
                 SearchResult result = subentries.next();
                 Attributes candidate = result.getAttributes();
                 LdapDN dn = new LdapDN( result.getName() );
-                dn.normalize( attrRegistry.getNormalizerMapping() );
+                dn.normalize( atRegistry.getNormalizerMapping() );
 
-                if ( evaluator.evaluate( ss, apName, dn, candidate ) )
+                if ( evaluator.evaluate( ss, apName, dn, ServerEntryUtils.toServerEntry( candidate, dn, registries ) ) )
                 {
-                    nexus.modify( new ModifyOperationContext( dn, getOperationalModsForReplace( oriChildName, newName, subentry,
+                    nexus.modify( new ModifyOperationContext( registries, dn, getOperationalModsForReplace( oriChildName, newName, subentry,
                         candidate ) ) );
                 }
             }
@@ -908,7 +975,7 @@
 
             if ( mods.size() > 0 )
             {
-                nexus.modify( new ModifyOperationContext( newName, mods ) );
+                nexus.modify( new ModifyOperationContext( registries, newName, mods ) );
             }
         }
     }
@@ -919,9 +986,10 @@
     // -----------------------------------------------------------------------
 
     
-    private int getSubentryTypes( Attributes entry, List<ModificationItemImpl> mods ) throws NamingException
+    private int getSubentryTypes( ServerEntry entry, List<ModificationItemImpl> mods ) throws NamingException
     {
-        Attribute ocFinalState = ( Attribute ) entry.get( SchemaConstants.OBJECT_CLASS_AT ).clone();
+        ServerAttribute ocFinalState = ( ServerAttribute ) entry.get( SchemaConstants.OBJECT_CLASS_AT ).clone();
+        
         for ( ModificationItemImpl mod : mods )
         {
             if ( mod.getAttribute().getID().equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT ) )
@@ -931,25 +999,27 @@
                     case ( DirContext.ADD_ATTRIBUTE ):
                         for ( int jj = 0; jj < mod.getAttribute().size(); jj++ )
                         {
-                            ocFinalState.add( mod.getAttribute().get( jj ) );
+                            ocFinalState.add( (String)mod.getAttribute().get( jj ) );
                         }
                     
                         break;
+                        
                     case ( DirContext.REMOVE_ATTRIBUTE ):
                         for ( int jj = 0; jj < mod.getAttribute().size(); jj++ )
                         {
-                            ocFinalState.remove( mod.getAttribute().get( jj ) );
+                            ocFinalState.remove( (String)mod.getAttribute().get( jj ) );
                         }
                     
                         break;
+                        
                     case ( DirContext.REPLACE_ATTRIBUTE ):
-                        ocFinalState = mod.getAttribute();
+                        ocFinalState = ServerEntryUtils.toServerAttribute( mod.getAttribute(), atRegistry.lookup( SchemaConstants.OBJECT_CLASS_AT ) );
                         break;
                 }
             }
         }
         
-        Attributes attrs = new AttributesImpl();
+        ServerEntry attrs = new DefaultServerEntry( registries, LdapDN.EMPTY_LDAPDN );
         attrs.put( ocFinalState );
         return getSubentryTypes( attrs );
     }
@@ -959,9 +1029,13 @@
         LdapDN name = opContext.getDn();
         List<ModificationItemImpl> mods = opContext.getModItems();
         
-        Attributes entry = nexus.lookup( new LookupOperationContext( name ) );
-        Attributes oldEntry = (Attributes) entry.clone();
-        Attribute objectClasses = AttributeUtils.getAttribute( entry, objectClassType );
+        ServerEntry entry = ServerEntryUtils.toServerEntry( 
+            nexus.lookup( new LookupOperationContext( registries, name ) ),
+            name,
+            registries );
+        
+        ServerEntry oldEntry = (ServerEntry) entry.clone();
+        ServerAttribute objectClasses = entry.get( objectClassType );
         boolean isSubtreeSpecificationModification = false;
         ModificationItem subtreeMod = null;
 
@@ -974,7 +1048,7 @@
             }
         }
 
-        if ( AttributeUtils.containsValueCaseIgnore( objectClasses, SchemaConstants.SUBENTRY_OC ) && isSubtreeSpecificationModification )
+        if ( objectClasses.contains( SchemaConstants.SUBENTRY_OC ) && isSubtreeSpecificationModification )
         {
             SubtreeSpecification ssOld = subentryCache.removeSubentry( name.toString() ).getSubtreeSpecification();
             SubtreeSpecification ssNew;
@@ -1004,18 +1078,18 @@
             controls.setReturningAttributes( new String[]
                 { SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, SchemaConstants.ALL_USER_ATTRIBUTES } );
             NamingEnumeration<SearchResult> subentries = nexus.search(
-                    new SearchOperationContext( oldBaseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
+                    new SearchOperationContext( registries, oldBaseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
             
             while ( subentries.hasMore() )
             {
                 SearchResult result = subentries.next();
                 Attributes candidate = result.getAttributes();
                 LdapDN dn = new LdapDN( result.getName() );
-                dn.normalize( attrRegistry.getNormalizerMapping() );
+                dn.normalize( atRegistry.getNormalizerMapping() );
 
-                if ( evaluator.evaluate( ssOld, apName, dn, candidate ) )
+                if ( evaluator.evaluate( ssOld, apName, dn, ServerEntryUtils.toServerEntry( candidate, dn, registries ) ) )
                 {
-                    nexus.modify( new ModifyOperationContext( dn, getOperationalModsForRemove( name, candidate ) ) );
+                    nexus.modify( new ModifyOperationContext( registries, dn, getOperationalModsForRemove( name, candidate ) ) );
                 }
             }
 
@@ -1025,17 +1099,17 @@
             LdapDN newBaseDn = ( LdapDN ) apName.clone();
             newBaseDn.addAll( ssNew.getBase() );
             subentries = nexus.search(
-                    new SearchOperationContext( newBaseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
+                    new SearchOperationContext( registries, newBaseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
             while ( subentries.hasMore() )
             {
                 SearchResult result = subentries.next();
                 Attributes candidate = result.getAttributes();
                 LdapDN dn = new LdapDN( result.getName() );
-                dn.normalize( attrRegistry.getNormalizerMapping() );
+                dn.normalize( atRegistry.getNormalizerMapping() );
 
-                if ( evaluator.evaluate( ssNew, apName, dn, candidate ) )
+                if ( evaluator.evaluate( ssNew, apName, dn, ServerEntryUtils.toServerEntry( candidate, dn, registries ) ) )
                 {
-                    nexus.modify( new ModifyOperationContext( dn, getOperationalModsForAdd( candidate, operational ) )) ;
+                    nexus.modify( new ModifyOperationContext( registries, dn, getOperationalModsForAdd( candidate, operational ) )) ;
                 }
             }
         }
@@ -1043,15 +1117,18 @@
         {
             next.modify( opContext );
             
-            if ( !AttributeUtils.containsValueCaseIgnore( objectClasses, SchemaConstants.SUBENTRY_OC ) )
+            if ( !objectClasses.contains( SchemaConstants.SUBENTRY_OC ) )
             {
-	            Attributes newEntry = nexus.lookup( new LookupOperationContext( name ) );
-	            
+                ServerEntry newEntry = ServerEntryUtils.toServerEntry( 
+                    nexus.lookup( new LookupOperationContext( registries, name ) ),
+                    name,
+                    registries );
+
 	            List<ModificationItemImpl> subentriesOpAttrMods = getModsOnEntryModification( name, oldEntry, newEntry );
                 
 	            if ( subentriesOpAttrMods.size() > 0)
 	            {
-	            	nexus.modify( new ModifyOperationContext( name, subentriesOpAttrMods ) );
+	            	nexus.modify( new ModifyOperationContext( registries, name, subentriesOpAttrMods ) );
 	            }
             }
         }
@@ -1338,16 +1415,16 @@
             if ( !result.isRelative() )
             {
                 LdapDN ndn = new LdapDN( dn );
-                ndn.normalize( attrRegistry.getNormalizerMapping() );
+                ndn.normalize( atRegistry.getNormalizerMapping() );
                 String normalizedDn = ndn.toString();
                 return !subentryCache.hasSubentry( normalizedDn );
             }
 
             LdapDN name = new LdapDN( invocation.getCaller().getNameInNamespace() );
-            name.normalize( attrRegistry.getNormalizerMapping() );
+            name.normalize( atRegistry.getNormalizerMapping() );
 
             LdapDN rest = new LdapDN( result.getName() );
-            rest.normalize( attrRegistry.getNormalizerMapping() );
+            rest.normalize( atRegistry.getNormalizerMapping() );
             name.addAll( rest );
             return !subentryCache.hasSubentry( name.toString() );
         }
@@ -1399,22 +1476,22 @@
             if ( !result.isRelative() )
             {
                 LdapDN ndn = new LdapDN( dn );
-                ndn.normalize( attrRegistry.getNormalizerMapping() );
+                ndn.normalize( atRegistry.getNormalizerMapping() );
                 return subentryCache.hasSubentry( ndn.toNormName() );
             }
 
             LdapDN name = new LdapDN( invocation.getCaller().getNameInNamespace() );
-            name.normalize( attrRegistry.getNormalizerMapping() );
+            name.normalize( atRegistry.getNormalizerMapping() );
 
             LdapDN rest = new LdapDN( result.getName() );
-            rest.normalize( attrRegistry.getNormalizerMapping() );
+            rest.normalize( atRegistry.getNormalizerMapping() );
             name.addAll( rest );
             return subentryCache.hasSubentry( name.toNormName() );
         }
     }
     
     
-    private List<ModificationItemImpl> getModsOnEntryModification( LdapDN name, Attributes oldEntry, Attributes newEntry )
+    private List<ModificationItemImpl> getModsOnEntryModification( LdapDN name, ServerEntry oldEntry, ServerEntry newEntry )
     throws NamingException
 	{
 	    List<ModificationItemImpl> modList = new ArrayList<ModificationItemImpl>();
@@ -1441,10 +1518,11 @@
                 for ( String aSUBENTRY_OPATTRS : SUBENTRY_OPATTRS )
                 {
                     int op = DirContext.REPLACE_ATTRIBUTE;
-                    Attribute opAttr = oldEntry.get( aSUBENTRY_OPATTRS );
+                    ServerAttribute opAttr = oldEntry.get( aSUBENTRY_OPATTRS );
+                    
                     if ( opAttr != null )
                     {
-                        opAttr = ( Attribute ) opAttr.clone();
+                        opAttr = ( ServerAttribute ) opAttr.clone();
                         opAttr.remove( subentryDn );
 
                         if ( opAttr.size() < 1 )
@@ -1452,7 +1530,7 @@
                             op = DirContext.REMOVE_ATTRIBUTE;
                         }
 
-                        modList.add( new ModificationItemImpl( op, opAttr ) );
+                        modList.add( new ModificationItemImpl( op, ServerEntryUtils.toAttributeImpl( opAttr ) ) );
                     }
                 }
 	        }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubtreeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubtreeEvaluator.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubtreeEvaluator.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubtreeEvaluator.java Sun Jan 20 08:59:10 2008
@@ -24,8 +24,9 @@
 
 import javax.naming.Name;
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerEntryUtils;
 import org.apache.directory.server.core.event.Evaluator;
 import org.apache.directory.server.core.event.ExpressionEvaluator;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
@@ -56,7 +57,7 @@
      * @param attrRegistry registry to be looked up
      * @throws NamingException 
      */
-    public SubtreeEvaluator(OidRegistry oidRegistry, AttributeTypeRegistry attrRegistry)
+    public SubtreeEvaluator( OidRegistry oidRegistry, AttributeTypeRegistry attrRegistry )
     {
         evaluator = new ExpressionEvaluator(oidRegistry, attrRegistry );
     }
@@ -71,7 +72,7 @@
      * @return true if the entry is selected by the specification, false if it is not
      * @throws javax.naming.NamingException if errors are encountered while evaluating selection
      */
-    public boolean evaluate( SubtreeSpecification subtree, Name apDn, Name entryDn, Attributes entry )
+    public boolean evaluate( SubtreeSpecification subtree, Name apDn, Name entryDn, ServerEntry entry )
         throws NamingException
     {
         // TODO: Try to make this cast unnecessary.
@@ -94,6 +95,7 @@
          * distinguished name relative to the administrative point.
          */
         Name apRelativeRdn;
+        
         if ( !NamespaceTools.isDescendant( apDn, entryDn ) )
         {
             return false;
@@ -114,6 +116,7 @@
          * baseRelativeRdn we can later make comparisons with specific exclusions.
          */
         Name baseRelativeRdn;
+        
         if ( subtree.getBase() != null && subtree.getBase().size() == 0 )
         {
             baseRelativeRdn = apRelativeRdn;
@@ -163,9 +166,11 @@
          * as well and reject if the relative names are equal.
          */
         Iterator list = subtree.getChopBeforeExclusions().iterator();
+        
         while ( list.hasNext() )
         {
             Name chopBefore = ( Name ) list.next();
+            
             if ( NamespaceTools.isDescendant( chopBefore, baseRelativeRdn ) )
             {
                 return false;
@@ -173,9 +178,11 @@
         }
 
         list = subtree.getChopAfterExclusions().iterator();
+        
         while ( list.hasNext() )
         {
             Name chopAfter = ( Name ) list.next();
+            
             if ( NamespaceTools.isDescendant( chopAfter, baseRelativeRdn ) && !chopAfter.equals( baseRelativeRdn ) )
             {
                 return false;
@@ -189,7 +196,7 @@
          */
         if ( subtree.getRefinement() != null )
         {
-            return evaluator.evaluate( subtree.getRefinement(), entryLdapDn.toNormName(), entry );
+            return evaluator.evaluate( subtree.getRefinement(), entryLdapDn.toNormName(), ServerEntryUtils.toAttributesImpl( entry ) );
         }
 
         /*

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java Sun Jan 20 08:59:10 2008
@@ -33,6 +33,7 @@
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.jndi.ServerContext;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.trigger.StoredProcedureParameter;
 import org.apache.directory.shared.ldap.trigger.StoredProcedureParameter.Generic_LDAP_CONTEXT;
@@ -40,12 +41,12 @@
 public abstract class AbstractStoredProcedureParameterInjector implements StoredProcedureParameterInjector
 {
     private Invocation invocation;
-    private Map<Class, MicroInjector> injectors;
+    private Map<Class<?>, MicroInjector> injectors;
     
     public AbstractStoredProcedureParameterInjector( Invocation invocation )
     {
         this.invocation = invocation;
-        injectors = new HashMap<Class, MicroInjector>();
+        injectors = new HashMap<Class<?>, MicroInjector>();
         injectors.put( StoredProcedureParameter.Generic_OPERATION_PRINCIPAL.class, $operationPrincipalInjector );
         injectors.put( StoredProcedureParameter.Generic_LDAP_CONTEXT.class, $ldapContextInjector );
     }
@@ -57,7 +58,7 @@
         return userName;
     }
     
-    protected Map<Class, MicroInjector> getInjectors()
+    protected Map<Class<?>, MicroInjector> getInjectors()
     {
         return injectors;
     }
@@ -72,16 +73,17 @@
         this.invocation = invocation;
     }
     
-    public final List<Object> getArgumentsToInject( List<StoredProcedureParameter> parameterList ) throws NamingException
+    public final List<Object> getArgumentsToInject( Registries registries, List<StoredProcedureParameter> parameterList ) throws NamingException
     {
         List<Object> arguments = new ArrayList<Object>();
         
         Iterator<StoredProcedureParameter> it = parameterList.iterator();
+        
         while ( it.hasNext() )
         {
             StoredProcedureParameter spParameter = it.next();
             MicroInjector injector = injectors.get( spParameter.getClass() );
-            arguments.add( injector.inject( spParameter ) );
+            arguments.add( injector.inject( registries, spParameter ) );
         }
         
         return arguments;
@@ -89,7 +91,7 @@
     
     MicroInjector $operationPrincipalInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException
         {
             return getOperationPrincipal();
         }
@@ -97,7 +99,7 @@
     
     MicroInjector $ldapContextInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject(  Registries registries, StoredProcedureParameter param ) throws NamingException
         {
             Generic_LDAP_CONTEXT ldapCtxParam = ( Generic_LDAP_CONTEXT ) param;
             LdapDN ldapCtxName = ldapCtxParam.getCtxName();

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/AddStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/AddStoredProcedureParameterInjector.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/AddStoredProcedureParameterInjector.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/AddStoredProcedureParameterInjector.java Sun Jan 20 08:59:10 2008
@@ -23,30 +23,31 @@
 import java.util.Map;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.invocation.Invocation;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.trigger.StoredProcedureParameter;
 
 public class AddStoredProcedureParameterInjector extends AbstractStoredProcedureParameterInjector
 {
     private LdapDN addedEntryName;
-    private Attributes addedEntry;
+    private ServerEntry addedEntry;
     
-    public AddStoredProcedureParameterInjector( Invocation invocation, LdapDN addedEntryName, Attributes addedEntry )
+    public AddStoredProcedureParameterInjector( Invocation invocation, LdapDN addedEntryName, ServerEntry addedEntry )
     {
         super( invocation );
         this.addedEntryName = addedEntryName;
         this.addedEntry = addedEntry;
-        Map<Class, MicroInjector> injectors = super.getInjectors();
+        Map<Class<?>, MicroInjector> injectors = super.getInjectors();
         injectors.put( StoredProcedureParameter.Add_ENTRY.class, $entryInjector );
         injectors.put( StoredProcedureParameter.Add_ATTRIBUTES.class, $attributesInjector );
     }
     
     MicroInjector $entryInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException
         {
             // Return a safe copy constructed with user provided name.
             return new LdapDN( addedEntryName.getUpName() );
@@ -55,7 +56,7 @@
     
     MicroInjector $attributesInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException
         {
             return addedEntry.clone();
         }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java Sun Jan 20 08:59:10 2008
@@ -24,11 +24,13 @@
 import java.util.Map;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerEntryUtils;
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.trigger.StoredProcedureParameter;
 
@@ -36,21 +38,21 @@
 public class DeleteStoredProcedureParameterInjector extends AbstractStoredProcedureParameterInjector
 {
     private LdapDN deletedEntryName;
-    private Attributes deletedEntry;
+    private ServerEntry deletedEntry;
     
-    public DeleteStoredProcedureParameterInjector( Invocation invocation, LdapDN deletedEntryName ) throws NamingException
+    public DeleteStoredProcedureParameterInjector( Registries registries, Invocation invocation, LdapDN deletedEntryName ) throws NamingException
     {
         super( invocation );
         this.deletedEntryName = deletedEntryName;
-        this.deletedEntry = getDeletedEntry();
-        Map<Class, MicroInjector> injectors = super.getInjectors();
+        this.deletedEntry = getDeletedEntry( registries );
+        Map<Class<?>, MicroInjector> injectors = super.getInjectors();
         injectors.put( StoredProcedureParameter.Delete_NAME.class, $nameInjector );
         injectors.put( StoredProcedureParameter.Delete_DELETED_ENTRY.class, $deletedEntryInjector );
     }
     
     MicroInjector $nameInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException
         {
             // Return a safe copy constructed with user provided name.
             return new LdapDN( deletedEntryName.getUpName() );
@@ -59,20 +61,24 @@
     
     MicroInjector $deletedEntryInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException
         {
             return deletedEntry;
         }
     };
     
-    private Attributes getDeletedEntry() throws NamingException
+    private ServerEntry getDeletedEntry( Registries registries ) throws NamingException
     {
         PartitionNexusProxy proxy = getInvocation().getProxy();
         /**
          * Using LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS here to exclude operational attributes
          * especially subentry related ones like "triggerExecutionSubentries".
          */
-        Attributes deletedEntry = proxy.lookup( new LookupOperationContext( deletedEntryName ), PartitionNexusProxy.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS );
+        ServerEntry deletedEntry = ServerEntryUtils.toServerEntry( 
+            proxy.lookup( new LookupOperationContext( registries, deletedEntryName ), PartitionNexusProxy.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS ),
+            deletedEntryName,
+            registries );
+        
         return deletedEntry;
     }
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyDNStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyDNStoredProcedureParameterInjector.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyDNStoredProcedureParameterInjector.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyDNStoredProcedureParameterInjector.java Sun Jan 20 08:59:10 2008
@@ -21,6 +21,7 @@
 package org.apache.directory.server.core.trigger;
 
 import org.apache.directory.server.core.invocation.Invocation;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.trigger.StoredProcedureParameter;
@@ -51,7 +52,7 @@
 		this.oldDN = oldDN;
 		this.newDN = newDN;
 		
-		Map<Class, MicroInjector> injectors = super.getInjectors();
+		Map<Class<?>, MicroInjector> injectors = super.getInjectors();
 		injectors.put( StoredProcedureParameter.ModifyDN_ENTRY.class, $entryInjector );
 		injectors.put( StoredProcedureParameter.ModifyDN_NEW_RDN.class, $newrdnInjector );
 		injectors.put( StoredProcedureParameter.ModifyDN_DELETE_OLD_RDN.class, $deleteoldrdnInjector );
@@ -66,7 +67,7 @@
 	 */
 	MicroInjector $entryInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException
         {
             // Return a safe copy constructed with user provided name.
             return new LdapDN( oldDN.getUpName() );
@@ -78,7 +79,7 @@
      */
     MicroInjector $newrdnInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException
         {
             // Return a safe copy constructed with user provided name.
             return new LdapDN( newRDN.getUpName() );
@@ -90,7 +91,7 @@
      */
     MicroInjector $deleteoldrdnInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException
         {
             // Return a safe copy constructed with user provided name.
             return deleteOldRn;
@@ -102,7 +103,7 @@
      */
     MicroInjector $newSuperiorInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException
         {
             // Return a safe copy constructed with user provided name.
             return new LdapDN( newSuperiorDN.getUpName() );
@@ -114,7 +115,7 @@
      */
     MicroInjector $oldRDNInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException
         {
             // Return a safe copy constructed with user provided name.
             return new LdapDN( oldRDN.getUpName() );
@@ -126,7 +127,7 @@
      */
     MicroInjector $oldSuperiorDNInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException
         {
             // Return a safe copy constructed with user provided name.
             return new LdapDN( oldSuperiorDN.getUpName() );
@@ -138,7 +139,7 @@
      */
     MicroInjector $newDNInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException
         {
             // Return a safe copy constructed with user provided name.
             return new LdapDN( newDN.getUpName() );

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java Sun Jan 20 08:59:10 2008
@@ -25,13 +25,15 @@
 import java.util.Map;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 import javax.naming.directory.ModificationItem;
 
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerEntryUtils;
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.trigger.StoredProcedureParameter;
@@ -40,7 +42,7 @@
 {
     private LdapDN modifiedEntryName;
     private List<ModificationItemImpl> modifications;
-    private Attributes oldEntry;
+    private ServerEntry oldEntry;
     
     
     public ModifyStoredProcedureParameterInjector( Invocation invocation, ModifyOperationContext opContext ) throws NamingException
@@ -48,8 +50,8 @@
         super( invocation );
         modifiedEntryName = opContext.getDn();
         modifications = opContext.getModItems();
-        this.oldEntry = getEntry();
-        Map<Class, MicroInjector> injectors = super.getInjectors();
+        this.oldEntry = getEntry( opContext.getRegistries() );
+        Map<Class<?>, MicroInjector> injectors = super.getInjectors();
         injectors.put( StoredProcedureParameter.Modify_OBJECT.class, $objectInjector );
         injectors.put( StoredProcedureParameter.Modify_MODIFICATION.class, $modificationInjector );
         injectors.put( StoredProcedureParameter.Modify_OLD_ENTRY.class, $oldEntryInjector );
@@ -58,7 +60,7 @@
     
     MicroInjector $objectInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException
         {
             // Return a safe copy constructed with user provided name.
             return new LdapDN( modifiedEntryName.getUpName() );
@@ -67,7 +69,7 @@
     
     MicroInjector $modificationInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException
         {
             List<ModificationItem> newMods = new ArrayList<ModificationItem>();
             
@@ -89,7 +91,7 @@
     
     MicroInjector $oldEntryInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException
         {
             return oldEntry;
         }
@@ -97,20 +99,23 @@
     
     MicroInjector $newEntryInjector = new MicroInjector()
     {
-        public Object inject( StoredProcedureParameter param ) throws NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException
         {
-            return getEntry();
+            return getEntry( registries );
         }
     };
     
-    private Attributes getEntry() throws NamingException
+    private ServerEntry getEntry( Registries registries ) throws NamingException
     {
         PartitionNexusProxy proxy = getInvocation().getProxy();
         /**
          * Using LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS here to exclude operational attributes
          * especially subentry related ones like "triggerExecutionSubentries".
          */
-        return proxy.lookup( new LookupOperationContext( modifiedEntryName ), PartitionNexusProxy.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS );
+        return ServerEntryUtils.toServerEntry( 
+            proxy.lookup( new LookupOperationContext( registries, modifiedEntryName ), PartitionNexusProxy.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS ),
+            modifiedEntryName,
+            registries );
     }
 
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/StoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/StoredProcedureParameterInjector.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/StoredProcedureParameterInjector.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/StoredProcedureParameterInjector.java Sun Jan 20 08:59:10 2008
@@ -24,14 +24,15 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.trigger.StoredProcedureParameter;
 
 public interface StoredProcedureParameterInjector
 {
-    List<Object> getArgumentsToInject( List<StoredProcedureParameter> parameterList ) throws NamingException;
+    List<Object> getArgumentsToInject( Registries registries, List<StoredProcedureParameter> parameterList ) throws NamingException;
     
     public interface MicroInjector
     {
-        Object inject( StoredProcedureParameter param ) throws NamingException;
+        Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException;
     }
 }



Mime
View raw message