directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r530861 [2/2] - in /directory/apacheds/trunk/core/src: main/java/org/apache/directory/server/core/authn/ main/java/org/apache/directory/server/core/authz/ main/java/org/apache/directory/server/core/collective/ main/java/org/apache/directory...
Date Fri, 20 Apr 2007 17:25:44 GMT
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java?view=diff&rev=530861&r1=530860&r2=530861
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
Fri Apr 20 10:25:42 2007
@@ -461,7 +461,7 @@
 
                 if ( evaluator.evaluate( ss, apName, dn, candidate ) )
                 {
-                    nexus.modify( dn, getOperationalModsForAdd( candidate, operational )
);
+                    nexus.modify( new ModifyOperationContext( dn, getOperationalModsForAdd(
candidate, operational )  ));
                 }
             }
         }
@@ -586,7 +586,7 @@
 
                 if ( evaluator.evaluate( ss, apName, dn, candidate ) )
                 {
-                    nexus.modify( dn, getOperationalModsForRemove( name, candidate ) );
+                    nexus.modify( new ModifyOperationContext( dn, getOperationalModsForRemove(
name, candidate ) ) );
                 }
             }
         }
@@ -743,7 +743,7 @@
 
                 if ( evaluator.evaluate( ss, apName, dn, candidate ) )
                 {
-                    nexus.modify( dn, getOperationalModsForReplace( name, newName, subentry,
candidate ) );
+                    nexus.modify( new ModifyOperationContext( dn, getOperationalModsForReplace(
name, newName, subentry, candidate ) ) );
                 }
             }
         }
@@ -768,7 +768,7 @@
 
             if ( mods.length > 0 )
             {
-                nexus.modify( newName, mods );
+                nexus.modify( new ModifyOperationContext( newName, mods ) );
             }
         }
     }
@@ -822,8 +822,8 @@
 
                 if ( evaluator.evaluate( ss, apName, dn, candidate ) )
                 {
-                    nexus.modify( dn, getOperationalModsForReplace( oriChildName, newName,
subentry,
-                        candidate ) );
+                    nexus.modify( new ModifyOperationContext( dn, getOperationalModsForReplace(
oriChildName, newName, subentry,
+                        candidate ) ) );
                 }
             }
         }
@@ -847,7 +847,7 @@
 
             if ( mods.length > 0 )
             {
-                nexus.modify( newName, mods );
+                nexus.modify( new ModifyOperationContext( newName, mods ) );
             }
         }
     }
@@ -895,8 +895,8 @@
 
                 if ( evaluator.evaluate( ss, apName, dn, candidate ) )
                 {
-                    nexus.modify( dn, getOperationalModsForReplace( oriChildName, newName,
subentry,
-                        candidate ) );
+                    nexus.modify( new ModifyOperationContext( dn, getOperationalModsForReplace(
oriChildName, newName, subentry,
+                        candidate ) ) );
                 }
             }
         }
@@ -919,7 +919,7 @@
 
             if ( mods.length > 0 )
             {
-                nexus.modify( newName, mods );
+                nexus.modify( new ModifyOperationContext( newName, mods ) );
             }
         }
     }
@@ -1000,102 +1000,11 @@
         return getSubentryTypes( attrs );
     }
 
-
     public void modify( NextInterceptor next, OperationContext opContext ) throws NamingException
     {
-    	LdapDN name = opContext.getDn(); 
-    	int modOp = ((ModifyOperationContext)opContext).getModOp(); 
-    	Attributes mods = ((ModifyOperationContext)opContext).getMods(); 
-    	
-        Attributes entry = nexus.lookup( new LookupOperationContext( name ) );
-        Attributes oldEntry = (Attributes) entry.clone();
-        Attribute objectClasses = AttributeUtils.getAttribute( entry, objectClassType );
-
-        if ( AttributeUtils.containsValueCaseIgnore( objectClasses, SchemaConstants.SUBENTRY_OC
)  && mods.get( SchemaConstants.SUBTREE_SPECIFICATION_AT ) != null )
-        {
-            SubtreeSpecification ssOld = subentryCache.removeSubentry( name.toNormName()
).getSubtreeSpecification();
-            SubtreeSpecification ssNew;
-
-            try
-            {
-                ssNew = ssParser.parse( ( String ) mods.get( SchemaConstants.SUBTREE_SPECIFICATION_AT
).get() );
-            }
-            catch ( Exception e )
-            {
-                String msg = "failed to parse the new subtreeSpecification";
-                log.error( msg, e );
-                throw new LdapInvalidAttributeValueException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX
);
-            }
-
-            subentryCache.setSubentry( name.toNormName(), ssNew, getSubentryTypes( entry,
modOp, mods ) );
-            next.modify( opContext );
-
-            // search for all entries selected by the old SS and remove references to subentry
-            LdapDN apName = ( LdapDN ) name.clone();
-            apName.remove( apName.size() - 1 );
-            LdapDN oldBaseDn = ( LdapDN ) apName.clone();
-            oldBaseDn.addAll( ssOld.getBase() );
-            ExprNode filter = new PresenceNode( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT
) );
-            SearchControls controls = new SearchControls();
-            controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-            controls.setReturningAttributes( new String[]
-                { "+", "*" } );
-            NamingEnumeration subentries = nexus.search( oldBaseDn, factoryCfg.getEnvironment(),
filter, controls );
-
-            while ( subentries.hasMore() )
-            {
-                SearchResult result = ( SearchResult ) subentries.next();
-                Attributes candidate = result.getAttributes();
-                LdapDN dn = new LdapDN( result.getName() );
-                dn.normalize( attrRegistry.getNormalizerMapping() );
-
-                if ( evaluator.evaluate( ssOld, apName, dn, candidate ) )
-                {
-                    nexus.modify( dn, getOperationalModsForRemove( name, candidate ) );
-                }
-            }
-
-            // search for all selected entries by the new SS and add references to subentry
-            Subentry subentry = subentryCache.getSubentry( name.toNormName() );
-            Attributes operational = getSubentryOperatationalAttributes( name, subentry );
-            LdapDN newBaseDn = ( LdapDN ) apName.clone();
-            newBaseDn.addAll( ssNew.getBase() );
-            subentries = nexus.search( newBaseDn, factoryCfg.getEnvironment(), filter, controls
);
-            
-            while ( subentries.hasMore() )
-            {
-                SearchResult result = ( SearchResult ) subentries.next();
-                Attributes candidate = result.getAttributes();
-                LdapDN dn = new LdapDN( result.getName() );
-                dn.normalize( attrRegistry.getNormalizerMapping() );
-
-                if ( evaluator.evaluate( ssNew, apName, dn, candidate ) )
-                {
-                    nexus.modify( dn, getOperationalModsForAdd( candidate, operational )
);
-                }
-            }
-        }
-        else
-        {
-            next.modify( opContext );
-            
-            if ( !AttributeUtils.containsValueCaseIgnore( objectClasses, SchemaConstants.SUBENTRY_OC
) )
-            {
-	            Attributes newEntry = nexus.lookup( new LookupOperationContext( name ) );
-	            
-	            ModificationItemImpl[] subentriesOpAttrMods =  getModsOnEntryModification(name,
oldEntry, newEntry);
-	            
-	            if ( subentriesOpAttrMods.length > 0)
-	            {
-	            	nexus.modify(name, subentriesOpAttrMods);
-	            }
-            }
-        }
-    }
-
-
-    public void modify( NextInterceptor next, LdapDN name, ModificationItemImpl[] mods )
throws NamingException
-    {
+        LdapDN name = opContext.getDn();
+        ModificationItemImpl[] mods = ((ModifyOperationContext)opContext).getModItems();
+        
         Attributes entry = nexus.lookup( new LookupOperationContext( name ) );
         Attributes oldEntry = (Attributes) entry.clone();
         Attribute objectClasses = AttributeUtils.getAttribute( entry, objectClassType );
@@ -1128,7 +1037,7 @@
             }
 
             subentryCache.setSubentry( name.toNormName(), ssNew, getSubentryTypes( entry,
mods ) );
-            next.modify( name, mods );
+            next.modify( opContext );
 
             // search for all entries selected by the old SS and remove references to subentry
             LdapDN apName = ( LdapDN ) name.clone();
@@ -1141,6 +1050,7 @@
             controls.setReturningAttributes( new String[]
                 { "+", "*" } );
             NamingEnumeration subentries = nexus.search( oldBaseDn, factoryCfg.getEnvironment(),
filter, controls );
+            
             while ( subentries.hasMore() )
             {
                 SearchResult result = ( SearchResult ) subentries.next();
@@ -1150,7 +1060,7 @@
 
                 if ( evaluator.evaluate( ssOld, apName, dn, candidate ) )
                 {
-                    nexus.modify( dn, getOperationalModsForRemove( name, candidate ) );
+                    nexus.modify( new ModifyOperationContext( dn, getOperationalModsForRemove(
name, candidate ) ) );
                 }
             }
 
@@ -1169,22 +1079,23 @@
 
                 if ( evaluator.evaluate( ssNew, apName, dn, candidate ) )
                 {
-                    nexus.modify( dn, getOperationalModsForAdd( candidate, operational )
);
+                    nexus.modify( new ModifyOperationContext( dn, getOperationalModsForAdd(
candidate, operational ) )) ;
                 }
             }
         }
         else
         {
-            next.modify( name, mods );
+            next.modify( opContext );
             
             if ( !AttributeUtils.containsValueCaseIgnore( objectClasses, SchemaConstants.SUBENTRY_OC
) )
             {
 	            Attributes newEntry = nexus.lookup( new LookupOperationContext( name ) );
 	            
-	            ModificationItemImpl[] subentriesOpAttrMods =  getModsOnEntryModification(name,
oldEntry, newEntry);
+	            ModificationItemImpl[] subentriesOpAttrMods =  getModsOnEntryModification( name,
oldEntry, newEntry );
+                
 	            if ( subentriesOpAttrMods.length > 0)
 	            {
-	            	nexus.modify(name, subentriesOpAttrMods);
+	            	nexus.modify( new ModifyOperationContext( name, subentriesOpAttrMods ) );
 	            }
             }
         }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java?view=diff&rev=530861&r1=530860&r2=530861
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java
Fri Apr 20 10:25:42 2007
@@ -40,12 +40,12 @@
 public abstract class AbstractStoredProcedureParameterInjector implements StoredProcedureParameterInjector
 {
     private Invocation invocation;
-    private Map injectors;
+    private Map<Class, MicroInjector> injectors;
     
     public AbstractStoredProcedureParameterInjector( Invocation invocation ) throws NamingException
     {
         this.invocation = invocation;
-        injectors = new HashMap();
+        injectors = new HashMap<Class, MicroInjector>();
         injectors.put( StoredProcedureParameter.Generic_OPERATION_PRINCIPAL.class, $operationPrincipalInjector
);
         injectors.put( StoredProcedureParameter.Generic_LDAP_CONTEXT.class, $ldapContextInjector
);
     }
@@ -57,7 +57,7 @@
         return userName;
     }
     
-    protected Map getInjectors()
+    protected Map<Class, MicroInjector> getInjectors()
     {
         return injectors;
     }
@@ -80,7 +80,7 @@
         while ( it.hasNext() )
         {
             StoredProcedureParameter spParameter = ( StoredProcedureParameter ) it.next();
-            MicroInjector injector = ( MicroInjector ) injectors.get( spParameter.getClass()
);
+            MicroInjector injector = injectors.get( spParameter.getClass() );
             arguments.add( injector.inject( spParameter ) );
         }
         

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java?view=diff&rev=530861&r1=530860&r2=530861
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
Fri Apr 20 10:25:42 2007
@@ -22,9 +22,7 @@
 
 import java.util.Map;
 
-import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
@@ -39,43 +37,18 @@
 public class ModifyStoredProcedureParameterInjector extends AbstractStoredProcedureParameterInjector
 {
     private LdapDN modifiedEntryName;
+    
     private ModificationItemImpl[] modifications;
     
     private Attributes oldEntry;
     
-    private Map injectors;
-    
-    public ModifyStoredProcedureParameterInjector( Invocation invocation, LdapDN modifiedEntryName,
ModificationItemImpl[] modifications ) throws NamingException
-    {
-        super( invocation );
-        init( modifiedEntryName, modifications );
-    }
+    private Map<Class, MicroInjector> injectors;
     
-    public ModifyStoredProcedureParameterInjector( Invocation invocation, OperationContext
modifyContext ) throws NamingException
+    public ModifyStoredProcedureParameterInjector( Invocation invocation, OperationContext
opContext ) throws NamingException
     {
         super( invocation );
-        Attributes modifications = ((ModifyOperationContext)modifyContext).getMods();
-        int modOp = ((ModifyOperationContext)modifyContext).getModOp();
-
-        ModificationItemImpl[] mods = new ModificationItemImpl[ modifications.size() ];
-        NamingEnumeration modEnum = modifications.getAll();
-        int i = 0;
-        
-        while ( modEnum.hasMoreElements() )
-        {
-            Attribute attribute = ( Attribute ) modEnum.nextElement();
-            mods[ i++ ] = new ModificationItemImpl( modOp, attribute ); 
-        }
-        
-        modifiedEntryName = modifyContext.getDn();
-        
-        init( modifiedEntryName, mods );
-    }
-    
-    private void init( LdapDN modifiedEntryName, ModificationItemImpl[] modifications ) throws
NamingException
-    {
-        this.modifiedEntryName = modifiedEntryName;
-        this.modifications = modifications;
+        modifiedEntryName = opContext.getDn();
+        modifications = ((ModifyOperationContext)opContext).getModItems();
         this.oldEntry = getEntry();
         injectors = super.getInjectors();
         injectors.put( StoredProcedureParameter.Modify_OBJECT.class, $objectInjector );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java?view=diff&rev=530861&r1=530860&r2=530861
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java
Fri Apr 20 10:25:42 2007
@@ -42,6 +42,7 @@
 import org.apache.directory.server.core.interceptor.NextInterceptor;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 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.RenameOperationContext;
 import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
 import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
@@ -308,54 +309,24 @@
         executeTriggers( afterTriggerSpecs, injector, callerRootCtx );
     }
     
-    public void modify( NextInterceptor next, OperationContext modifyContext ) throws NamingException
+    public void modify( NextInterceptor next, OperationContext opContext ) throws NamingException
     {
         // Bypass trigger handling if the service is disabled.
         if ( !enabled )
         {
-            next.modify( modifyContext );
+            next.modify( opContext );
             return;
         }
         
-        // Gather supplementary data.
-        Invocation invocation = InvocationStack.getInstance().peek();
-        PartitionNexusProxy proxy = invocation.getProxy();
-        Attributes modifiedEntry = proxy.lookup( new LookupOperationContext( modifyContext.getDn()
), PartitionNexusProxy.LOOKUP_BYPASS );
-        ServerLdapContext callerRootCtx = ( ServerLdapContext ) ( ( ServerLdapContext ) invocation.getCaller()
).getRootContext();
-        StoredProcedureParameterInjector injector = new ModifyStoredProcedureParameterInjector(
invocation, modifyContext );
-
-        // Gather Trigger Specifications which apply to the entry being modified.
-        List triggerSpecs = new ArrayList();
-        addPrescriptiveTriggerSpecs( triggerSpecs, proxy, modifyContext.getDn(), modifiedEntry
);
-        addEntryTriggerSpecs( triggerSpecs, modifiedEntry );
-        
-        // Gather a Map<ActionTime,TriggerSpecification> where TriggerSpecification.ldapOperation
= LdapOperation.MODIFY.
-        Map triggerMap = getActionTimeMappedTriggerSpecsForOperation( triggerSpecs, LdapOperation.MODIFY
);
-        
-        next.modify( modifyContext );
-        triggerSpecCache.subentryModified( modifyContext, modifiedEntry );
-        
-        // Fire AFTER Triggers.
-        List afterTriggerSpecs = ( List ) triggerMap.get( ActionTime.AFTER );
-        executeTriggers( afterTriggerSpecs, injector, callerRootCtx );
-    }
-
-
-    public void modify( NextInterceptor next, LdapDN normName, ModificationItemImpl[] mods
) throws NamingException
-    {
-        // Bypass trigger handling if the service is disabled.
-        if ( !enabled )
-        {
-            next.modify( normName, mods );
-            return;
-        }
+        LdapDN normName = opContext.getDn();
+        ModificationItemImpl[] mods = ((ModifyOperationContext)opContext).getModItems();
         
         // Gather supplementary data.
         Invocation invocation = InvocationStack.getInstance().peek();
         PartitionNexusProxy proxy = invocation.getProxy();
         Attributes modifiedEntry = proxy.lookup( new LookupOperationContext( normName ),
PartitionNexusProxy.LOOKUP_BYPASS );
         ServerLdapContext callerRootCtx = ( ServerLdapContext ) ( ( ServerLdapContext ) invocation.getCaller()
).getRootContext();
-        StoredProcedureParameterInjector injector = new ModifyStoredProcedureParameterInjector(
invocation, normName, mods );
+        StoredProcedureParameterInjector injector = new ModifyStoredProcedureParameterInjector(
invocation, opContext );
 
         // Gather Trigger Specifications which apply to the entry being modified.
         List triggerSpecs = new ArrayList();
@@ -365,8 +336,8 @@
         // Gather a Map<ActionTime,TriggerSpecification> where TriggerSpecification.ldapOperation
= LdapOperation.MODIFY.
         Map triggerMap = getActionTimeMappedTriggerSpecsForOperation( triggerSpecs, LdapOperation.MODIFY
);
         
-        next.modify( normName, mods );
-        triggerSpecCache.subentryModified( normName, mods, modifiedEntry );
+        next.modify( opContext );
+        triggerSpecCache.subentryModified( opContext, modifiedEntry );
         
         // Fire AFTER Triggers.
         List afterTriggerSpecs = ( List ) triggerMap.get( ActionTime.AFTER );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java?view=diff&rev=530861&r1=530860&r2=530861
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
Fri Apr 20 10:25:42 2007
@@ -201,37 +201,27 @@
     }
 
 
-    public void subentryModified( LdapDN normName, ModificationItemImpl[] mods, Attributes
entry ) throws NamingException
+    public void subentryModified( OperationContext opContext, Attributes entry ) throws NamingException
     {
         if ( !hasPrescriptiveTrigger( entry ) )
         {
             return;
         }
 
+        LdapDN normName = opContext.getDn();
+        ModificationItemImpl[] mods = ((ModifyOperationContext)opContext).getModItems();
+
         boolean isTriggerSpecModified = false;
+        
         for ( int ii = 0; ii < mods.length; ii++ )
         {
             isTriggerSpecModified |= mods[ii].getAttribute().contains( PRESCRIPTIVE_TRIGGER_ATTR
);
         }
+        
         if ( isTriggerSpecModified )
         {
             subentryDeleted( normName, entry );
             subentryAdded( normName, entry );
-        }
-    }
-
-
-    public void subentryModified( OperationContext modifyContext, Attributes entry ) throws
NamingException
-    {
-        if ( !hasPrescriptiveTrigger( entry ) )
-        {
-            return;
-        }
-
-        if ( ((ModifyOperationContext)modifyContext).getMods().get( PRESCRIPTIVE_TRIGGER_ATTR
) != null )
-        {
-            subentryDeleted( modifyContext.getDn(), entry );
-            subentryAdded( modifyContext.getDn(), entry );
         }
     }
 

Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java?view=diff&rev=530861&r1=530860&r2=530861
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
(original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
Fri Apr 20 10:25:42 2007
@@ -29,12 +29,17 @@
 import java.util.Map;
 import java.util.Set;
 
+import javax.naming.Context;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.SearchControls;
+
 import junit.framework.TestCase;
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.DirectoryServiceListener;
-import org.apache.directory.server.core.configuration.PartitionConfiguration;
 import org.apache.directory.server.core.configuration.InterceptorConfiguration;
 import org.apache.directory.server.core.configuration.MutableInterceptorConfiguration;
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
@@ -44,15 +49,8 @@
 import org.apache.directory.server.core.jndi.DeadContext;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.shared.ldap.filter.ExprNode;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
-import javax.naming.NamingException;
-import javax.naming.NamingEnumeration;
-import javax.naming.Context;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.SearchControls;
-
 
 /**
  * Unit test cases for InterceptorChain methods.
@@ -289,82 +287,75 @@
         }
 
 
-        public Attributes getRootDSE( NextInterceptor next, OperationContext getRootDSEContext
) throws NamingException
+        public Attributes getRootDSE( NextInterceptor next, OperationContext opContext )
throws NamingException
         {
             interceptors.add( this );
-            return next.getRootDSE( getRootDSEContext );
+            return next.getRootDSE( opContext );
         }
 
 
-        public LdapDN getMatchedName ( NextInterceptor next, OperationContext getMatchedNameContext
) throws NamingException
+        public LdapDN getMatchedName ( NextInterceptor next, OperationContext opContext )
throws NamingException
         {
             interceptors.add( this );
-            return next.getMatchedName( getMatchedNameContext );
+            return next.getMatchedName( opContext );
         }
 
 
-        public LdapDN getSuffix ( NextInterceptor next, OperationContext getSuffixContext
) throws NamingException
+        public LdapDN getSuffix ( NextInterceptor next, OperationContext opContext ) throws
NamingException
         {
             interceptors.add( this );
-            return next.getSuffix( getSuffixContext );
+            return next.getSuffix( opContext );
         }
 
 
-        public Iterator listSuffixes ( NextInterceptor next, OperationContext emptyContext
) throws NamingException
+        public Iterator listSuffixes ( NextInterceptor next, OperationContext opContext )
throws NamingException
         {
             interceptors.add( this );
-            return next.listSuffixes( emptyContext );
+            return next.listSuffixes( opContext );
         }
 
 
-        public void addContextPartition( NextInterceptor next, OperationContext addContextPartitionContext
)
+        public void addContextPartition( NextInterceptor next, OperationContext opContext
)
             throws NamingException
         {
             interceptors.add( this );
-            next.addContextPartition( addContextPartitionContext );
+            next.addContextPartition( opContext );
         }
 
 
-        public void removeContextPartition( NextInterceptor next, OperationContext removeContextPartition
) throws NamingException
+        public void removeContextPartition( NextInterceptor next, OperationContext opContext
) throws NamingException
         {
             interceptors.add( this );
-            next.removeContextPartition( removeContextPartition );
+            next.removeContextPartition( opContext );
         }
 
 
-        public boolean compare( NextInterceptor next, OperationContext compareContext ) throws
NamingException
+        public boolean compare( NextInterceptor next, OperationContext opContext ) throws
NamingException
         {
             interceptors.add( this );
-            return next.compare( compareContext );
+            return next.compare( opContext );
         }
 
 
-        public void delete( NextInterceptor next, OperationContext deleteContext ) throws
NamingException
+        public void delete( NextInterceptor next, OperationContext opContext ) throws NamingException
         {
             interceptors.add( this );
-            next.delete( deleteContext );
+            next.delete( opContext );
         }
 
 
-        public void add(NextInterceptor next, OperationContext addContext )
+        public void add(NextInterceptor next, OperationContext opContext )
             throws NamingException
         {
             interceptors.add( this );
-            next.add( addContext );
-        }
-
-
-        public void modify( NextInterceptor next, OperationContext modifyContext ) throws
NamingException
-        {
-            interceptors.add( this );
-            next.modify( modifyContext );
+            next.add( opContext );
         }
 
 
-        public void modify( NextInterceptor next, LdapDN name, ModificationItemImpl[] items
) throws NamingException
+        public void modify( NextInterceptor next, OperationContext opContext ) throws NamingException
         {
             interceptors.add( this );
-            next.modify( name, items );
+            next.modify( opContext );
         }
 
 
@@ -383,55 +374,55 @@
         }
 
 
-        public Attributes lookup( NextInterceptor next, OperationContext lookupContext )
throws NamingException
+        public Attributes lookup( NextInterceptor next, OperationContext opContext ) throws
NamingException
         {
             interceptors.add( this );
-            return next.lookup( lookupContext );
+            return next.lookup( opContext );
         }
 
 
-        public boolean hasEntry( NextInterceptor next, OperationContext entryContext ) throws
NamingException
+        public boolean hasEntry( NextInterceptor next, OperationContext opContext ) throws
NamingException
         {
             interceptors.add( this );
-            return next.hasEntry( entryContext );
+            return next.hasEntry( opContext );
         }
 
 
-        public void rename( NextInterceptor next, OperationContext renameContext )
+        public void rename( NextInterceptor next, OperationContext opContext )
             throws NamingException
         {
             interceptors.add( this );
-            next.rename( renameContext );
+            next.rename( opContext );
         }
 
 
-        public void move( NextInterceptor next, OperationContext moveContext ) throws NamingException
+        public void move( NextInterceptor next, OperationContext opContext ) throws NamingException
         {
             interceptors.add( this );
-            next.move( moveContext );
+            next.move( opContext );
         }
 
 
-        public void moveAndRename( NextInterceptor next, OperationContext moveAndRenameContext
)
+        public void moveAndRename( NextInterceptor next, OperationContext opContext )
             throws NamingException
         {
             interceptors.add( this );
-            next.moveAndRename( moveAndRenameContext );
+            next.moveAndRename( opContext );
         }
 
 
-        public void bind( NextInterceptor next, OperationContext bindContext )
+        public void bind( NextInterceptor next, OperationContext opContext )
         throws NamingException
         {
             interceptors.add( this );
-            next.bind( bindContext );
+            next.bind( opContext );
         }
 
 
-        public void unbind( NextInterceptor next, OperationContext unbindContext ) throws
NamingException
+        public void unbind( NextInterceptor next, OperationContext opContext ) throws NamingException
         {
             interceptors.add( this );
-            next.unbind( unbindContext );
+            next.unbind( opContext );
         }
     }
 



Mime
View raw message