You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2007/08/23 21:26:01 UTC

svn commit: r569124 [3/3] - in /directory/apacheds/trunk: core/src/main/java/org/apache/directory/server/core/authn/ core/src/main/java/org/apache/directory/server/core/authz/ core/src/main/java/org/apache/directory/server/core/collective/ core/src/mai...

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java?rev=569124&r1=569123&r2=569124&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java Thu Aug 23 12:25:57 2007
@@ -47,11 +47,14 @@
 import org.apache.directory.server.core.interceptor.NextInterceptor;
 import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
+import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
+import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 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.OperationContext;
+import org.apache.directory.server.core.interceptor.context.RemoveContextPartitionOperationContext;
 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;
@@ -267,13 +270,13 @@
     }
 
 
-    public void add(NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void add(NextInterceptor next, AddOperationContext opContext ) throws NamingException
     {
         Invocation invocation = InvocationStack.getInstance().peek();
         ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
         String refval = ( String ) caller.getEnvironment().get( Context.REFERRAL );
         LdapDN name = opContext.getDn();
-        Attributes entry = ((AddOperationContext)opContext).getEntry();
+        Attributes entry = opContext.getEntry();
 
         // handle a normal add without following referrals
         if ( ( refval == null ) || refval.equals( IGNORE ) )
@@ -319,7 +322,7 @@
     }
 
 
-    public boolean compare( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public boolean compare( NextInterceptor next, CompareOperationContext opContext ) throws NamingException
     {
     	LdapDN name = opContext.getDn();
     	
@@ -360,7 +363,7 @@
     }
 
 
-    public void delete( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws NamingException
     {
     	LdapDN name = opContext.getDn();
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -427,14 +430,14 @@
      * -----------------------------------------------------------------------
      */
 
-    public void move( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void move( NextInterceptor next, MoveOperationContext opContext ) throws NamingException
     {
         LdapDN oldName = opContext.getDn();
         
         Invocation invocation = InvocationStack.getInstance().peek();
         ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
         String refval = ( String ) caller.getEnvironment().get( Context.REFERRAL );
-        LdapDN newName = ( LdapDN ) ((MoveOperationContext)opContext).getParent().clone();
+        LdapDN newName = ( LdapDN ) opContext.getParent().clone();
         newName.add( oldName.get( oldName.size() - 1 ) );
 
         // handle a normal modify without following referrals
@@ -499,7 +502,7 @@
     }
 
 
-    public void moveAndRename( NextInterceptor next, OperationContext opContext )
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext )
         throws NamingException
     {
         LdapDN oldName = opContext.getDn();
@@ -507,8 +510,8 @@
         Invocation invocation = InvocationStack.getInstance().peek();
         ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
         String refval = ( String ) caller.getEnvironment().get( Context.REFERRAL );
-        LdapDN newName = ( LdapDN ) ((MoveAndRenameOperationContext)opContext).getParent().clone();
-        newName.add( ((MoveAndRenameOperationContext)opContext).getNewRdn() );
+        LdapDN newName = ( LdapDN ) opContext.getParent().clone();
+        newName.add( opContext.getNewRdn() );
 
         // handle a normal modify without following referrals
         if ( refval == null || refval.equals( IGNORE ) )
@@ -568,7 +571,7 @@
     }
 
 
-    public void rename( NextInterceptor next, OperationContext opContext )
+    public void rename( NextInterceptor next, RenameOperationContext opContext )
         throws NamingException
     {
         LdapDN oldName = opContext.getDn();
@@ -579,7 +582,7 @@
         LdapDN newName = ( LdapDN ) oldName.clone();
         newName.remove( oldName.size() - 1 );
 
-        LdapDN newRdnName = new LdapDN( ((RenameOperationContext)opContext).getNewRdn() );
+        LdapDN newRdnName = new LdapDN( opContext.getNewRdn() );
         newRdnName.normalize( attrRegistry.getNormalizerMapping() );
         newName.add( newRdnName.toNormName() );
 
@@ -711,13 +714,13 @@
     }
 
 
-    public void modify( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws NamingException
     {
         Invocation invocation = InvocationStack.getInstance().peek();
         ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
         String refval = ( String ) caller.getEnvironment().get( Context.REFERRAL );
         LdapDN name = opContext.getDn();
-        ModificationItemImpl[] mods = ((ModifyOperationContext)opContext).getModItems();
+        ModificationItemImpl[] mods = opContext.getModItems();
 
         // handle a normal modify without following referrals
         if ( refval == null || refval.equals( IGNORE ) )
@@ -768,12 +771,12 @@
     }
 
 
-    public void addContextPartition( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void addContextPartition( NextInterceptor next, AddContextPartitionOperationContext opContext ) throws NamingException
     {
         next.addContextPartition( opContext );
 
         // add referrals immediately after adding the new partition
-        Partition partition = ( ( AddContextPartitionOperationContext ) opContext ).getPartition();
+        Partition partition = opContext.getPartition();
         LdapDN suffix = partition.getSuffix();
         Invocation invocation = InvocationStack.getInstance().peek();
         NamingEnumeration list = invocation.getProxy().search( 
@@ -783,7 +786,7 @@
     }
 
 
-    public void removeContextPartition( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext opContext ) throws NamingException
     {
         // remove referrals immediately before removing the partition
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -851,7 +854,7 @@
     }
 
 
-    public NamingEnumeration<SearchResult> search( NextInterceptor next, OperationContext opContext )
+    public NamingEnumeration<SearchResult> search( NextInterceptor next, SearchOperationContext opContext )
         throws NamingException
     {
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -865,7 +868,7 @@
         }
         
         LdapDN base = opContext.getDn();
-        SearchControls controls = ((SearchOperationContext)opContext).getSearchControls();
+        SearchControls controls = opContext.getSearchControls();
         
 
         /**

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?rev=569124&r1=569123&r2=569124&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java Thu Aug 23 12:25:57 2007
@@ -48,6 +48,8 @@
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
 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.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;
@@ -377,7 +379,7 @@
     /**
      * 
      */
-    public NamingEnumeration list( NextInterceptor nextInterceptor, OperationContext opContext ) throws NamingException
+    public NamingEnumeration list( NextInterceptor nextInterceptor, ListOperationContext opContext ) throws NamingException
     {
         NamingEnumeration e = nextInterceptor.list( opContext );
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -475,11 +477,11 @@
     /**
      * 
      */
-    public NamingEnumeration<SearchResult> search( NextInterceptor nextInterceptor, OperationContext opContext ) throws NamingException
+    public NamingEnumeration<SearchResult> search( NextInterceptor nextInterceptor, SearchOperationContext opContext ) throws NamingException
     {
         LdapDN base = opContext.getDn();
-        SearchControls searchCtls = ((SearchOperationContext)opContext).getSearchControls();
-        ExprNode filter = ((SearchOperationContext)opContext).getFilter();
+        SearchControls searchCtls = opContext.getSearchControls();
+        ExprNode filter = opContext.getFilter();
         
         // We have to eliminate bad attributes from the request, accordingly
         // to RFC 2251, chap. 4.5.1. Basically, all unknown attributes are removed
@@ -864,7 +866,7 @@
     /**
      * Search for an entry, using its DN. Binary attributes and ObjectClass attribute are removed.
      */
-    public Attributes lookup( NextInterceptor nextInterceptor, OperationContext opContext ) throws NamingException
+    public Attributes lookup( NextInterceptor nextInterceptor, LookupOperationContext opContext ) throws NamingException
     {
         Attributes result = nextInterceptor.lookup( opContext );
         
@@ -1175,7 +1177,7 @@
         }
     }
 
-    public void moveAndRename( NextInterceptor next, OperationContext opContext )
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext )
         throws NamingException
     {
         LdapDN oriChildName = opContext.getDn();
@@ -1185,16 +1187,16 @@
         if ( oriChildName.startsWith( schemaBaseDN ) )
         {
             schemaManager.move( oriChildName, 
-                ((MoveAndRenameOperationContext)opContext).getParent(), 
-                ((MoveAndRenameOperationContext)opContext).getNewRdn(), 
-                ((MoveAndRenameOperationContext)opContext).getDelOldDn(), entry );
+                opContext.getParent(), 
+                opContext.getNewRdn(), 
+                opContext.getDelOldDn(), entry );
         }
         
         next.moveAndRename( opContext );
     }
 
 
-    public void move( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void move( NextInterceptor next, MoveOperationContext opContext ) throws NamingException
     {
         LdapDN oriChildName = opContext.getDn();
         
@@ -1202,18 +1204,18 @@
 
         if ( oriChildName.startsWith( schemaBaseDN ) )
         {
-            schemaManager.replace( oriChildName, ((MoveOperationContext)opContext).getParent(), entry );
+            schemaManager.replace( oriChildName, opContext.getParent(), entry );
         }
         
         next.move( opContext );
     }
     
 
-    public void rename( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void rename( NextInterceptor next, RenameOperationContext opContext ) throws NamingException
     {
         LdapDN name = opContext.getDn();
-        String newRdn = ((RenameOperationContext)opContext).getNewRdn();
-        boolean deleteOldRn = ((RenameOperationContext)opContext).getDelOldDn();
+        String newRdn = opContext.getNewRdn();
+        boolean deleteOldRn = opContext.getDelOldDn();
         
         Attributes entry = nexus.lookup( new LookupOperationContext( name ) );
 
@@ -1228,11 +1230,11 @@
 
     private final static String[] schemaSubentryReturnAttributes = new String[] { "+", "*" };
     
-    public void modify( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws NamingException
     {
         Attributes entry = null; 
         LdapDN name = opContext.getDn();
-        ModificationItemImpl[] mods = ((ModifyOperationContext)opContext).getModItems();
+        ModificationItemImpl[] mods = opContext.getModItems();
 
         // handle operations against the schema subentry in the schema service
         // and never try to look it up in the nexus below
@@ -1733,10 +1735,10 @@
     /**
      * Check that all the attributes exist in the schema for this entry.
      */
-    public void add( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void add( NextInterceptor next, AddOperationContext opContext ) throws NamingException
     {
     	LdapDN name = opContext.getDn();
-        Attributes attrs = ((AddOperationContext)opContext).getEntry();
+        Attributes attrs = opContext.getEntry();
         
     	check( name, attrs );
 
@@ -1792,7 +1794,7 @@
     }
     
     
-    public void delete( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws NamingException
     {
     	LdapDN name = opContext.getDn();
         Attributes entry = nexus.lookup( new LookupOperationContext( name ) );

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?rev=569124&r1=569123&r2=569124&view=diff
==============================================================================
--- 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 Thu Aug 23 12:25:57 2007
@@ -43,6 +43,8 @@
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
 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.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;
@@ -226,7 +228,7 @@
     // Methods/Code dealing with Subentry Visibility
     // -----------------------------------------------------------------------
 
-    public NamingEnumeration list( NextInterceptor nextInterceptor, OperationContext opContext ) throws NamingException
+    public NamingEnumeration list( NextInterceptor nextInterceptor, ListOperationContext opContext ) throws NamingException
     {
         NamingEnumeration e = nextInterceptor.list( opContext );
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -241,11 +243,11 @@
     }
 
 
-    public NamingEnumeration<SearchResult> search( NextInterceptor nextInterceptor, OperationContext opContext ) throws NamingException
+    public NamingEnumeration<SearchResult> search( NextInterceptor nextInterceptor, SearchOperationContext opContext ) throws NamingException
     {
         NamingEnumeration e = nextInterceptor.search( opContext );
         Invocation invocation = InvocationStack.getInstance().peek();
-        SearchControls searchCtls = ((SearchOperationContext)opContext).getSearchControls();
+        SearchControls searchCtls = opContext.getSearchControls();
 
         // object scope searches by default return subentries
         if ( searchCtls.getSearchScope() == SearchControls.OBJECT_SCOPE )
@@ -375,10 +377,10 @@
     }
 
 
-    public void add( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void add( NextInterceptor next, AddOperationContext opContext ) throws NamingException
     {
     	LdapDN name = opContext.getDn();
-    	Attributes entry = ((AddOperationContext)opContext).getEntry();
+    	Attributes entry = opContext.getEntry();
     	
         Attribute objectClasses = entry.get( SchemaConstants.OBJECT_CLASS_AT );
 
@@ -549,7 +551,7 @@
     // Methods dealing subentry deletion
     // -----------------------------------------------------------------------
 
-    public void delete( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws NamingException
     {
     	LdapDN name = opContext.getDn();
         Attributes entry = nexus.lookup( new LookupOperationContext( name ) );
@@ -707,10 +709,10 @@
     }
 
 
-    public void rename( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void rename( NextInterceptor next, RenameOperationContext opContext ) throws NamingException
     {
         LdapDN name = opContext.getDn();
-        String newRdn = ((RenameOperationContext)opContext).getNewRdn();
+        String newRdn = opContext.getNewRdn();
         
         Attributes entry = nexus.lookup( new LookupOperationContext( name ) );
         Attribute objectClasses = AttributeUtils.getAttribute( entry, objectClassType );
@@ -784,11 +786,11 @@
     }
 
 
-    public void moveAndRename( NextInterceptor next, OperationContext opContext )
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext )
         throws NamingException
     {
         LdapDN oriChildName = opContext.getDn();
-        LdapDN parent = ((MoveAndRenameOperationContext)opContext).getParent();
+        LdapDN parent = opContext.getParent();
         String newRn = ((RenameOperationContext)opContext).getNewRdn();
         
         
@@ -865,10 +867,10 @@
     }
 
 
-    public void move( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void move( NextInterceptor next, MoveOperationContext opContext ) throws NamingException
     {
         LdapDN oriChildName = opContext.getDn();
-        LdapDN newParentName = ((MoveOperationContext)opContext).getParent();
+        LdapDN newParentName = opContext.getParent();
         
         Attributes entry = nexus.lookup( new LookupOperationContext( oriChildName ) );
         Attribute objectClasses = entry.get( SchemaConstants.OBJECT_CLASS_AT );
@@ -1014,10 +1016,10 @@
         return getSubentryTypes( attrs );
     }
 
-    public void modify( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws NamingException
     {
         LdapDN name = opContext.getDn();
-        ModificationItemImpl[] mods = ((ModifyOperationContext)opContext).getModItems();
+        ModificationItemImpl[] mods = opContext.getModItems();
         
         Attributes entry = nexus.lookup( new LookupOperationContext( name ) );
         Attributes oldEntry = (Attributes) entry.clone();

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?rev=569124&r1=569123&r2=569124&view=diff
==============================================================================
--- 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 Thu Aug 23 12:25:57 2007
@@ -41,11 +41,11 @@
     private Attributes oldEntry;
     
     
-    public ModifyStoredProcedureParameterInjector( Invocation invocation, OperationContext opContext ) throws NamingException
+    public ModifyStoredProcedureParameterInjector( Invocation invocation, ModifyOperationContext opContext ) throws NamingException
     {
         super( invocation );
         modifiedEntryName = opContext.getDn();
-        modifications = ((ModifyOperationContext)opContext).getModItems();
+        modifications = opContext.getModItems();
         this.oldEntry = getEntry();
         Map<Class, MicroInjector> 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?rev=569124&r1=569123&r2=569124&view=diff
==============================================================================
--- 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 Thu Aug 23 12:25:57 2007
@@ -40,7 +40,9 @@
 import org.apache.directory.server.core.interceptor.InterceptorChain;
 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.DeleteOperationContext;
 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.OperationContext;
@@ -247,10 +249,10 @@
         this.enabled = true; // TODO: Get this from the configuration if needed.
     }
 
-    public void add( NextInterceptor next, OperationContext addContext ) throws NamingException
+    public void add( NextInterceptor next, AddOperationContext addContext ) throws NamingException
     {
     	LdapDN name = addContext.getDn();
-    	Attributes entry = ((AddOperationContext)addContext).getEntry();
+    	Attributes entry = addContext.getEntry();
     	
         // Bypass trigger handling if the service is disabled.
         if ( !enabled )
@@ -283,7 +285,7 @@
         executeTriggers( afterTriggerSpecs, injector, callerRootCtx );
     }
 
-    public void delete( NextInterceptor next, OperationContext deleteContext ) throws NamingException
+    public void delete( NextInterceptor next, DeleteOperationContext deleteContext ) throws NamingException
     {
     	LdapDN name = deleteContext.getDn();
     	
@@ -316,7 +318,7 @@
         executeTriggers( afterTriggerSpecs, injector, callerRootCtx );
     }
     
-    public void modify( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws NamingException
     {
         // Bypass trigger handling if the service is disabled.
         if ( !enabled )
@@ -350,11 +352,11 @@
     }
     
 
-    public void rename( NextInterceptor next, OperationContext renameContext ) throws NamingException
+    public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws NamingException
     {
         LdapDN name = renameContext.getDn();
-        String newRdn = ((RenameOperationContext)renameContext).getNewRdn();
-        boolean deleteOldRn = ((RenameOperationContext)renameContext).getDelOldDn();
+        String newRdn = renameContext.getNewRdn();
+        boolean deleteOldRn = renameContext.getDelOldDn();
         
         // Bypass trigger handling if the service is disabled.
         if ( !enabled )
@@ -396,12 +398,12 @@
         executeTriggers( afterTriggerSpecs, injector, callerRootCtx );
     }
     
-    public void moveAndRename( NextInterceptor next, OperationContext moveAndRenameContext ) throws NamingException
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext ) throws NamingException
     {
         LdapDN oriChildName = moveAndRenameContext.getDn();
-        LdapDN parent = ((MoveAndRenameOperationContext)moveAndRenameContext).getParent();
-        String newRn = ((MoveAndRenameOperationContext)moveAndRenameContext).getNewRdn();
-        boolean deleteOldRn = ((MoveAndRenameOperationContext)moveAndRenameContext).getDelOldDn();
+        LdapDN parent = moveAndRenameContext.getParent();
+        String newRn = moveAndRenameContext.getNewRdn();
+        boolean deleteOldRn = moveAndRenameContext.getDelOldDn();
 
         // Bypass trigger handling if the service is disabled.
         if ( !enabled )
@@ -472,7 +474,7 @@
     }
     
     
-    public void move( NextInterceptor next, OperationContext moveContext ) throws NamingException
+    public void move( NextInterceptor next, MoveOperationContext moveContext ) throws NamingException
     {
         // Bypass trigger handling if the service is disabled.
         if ( !enabled )
@@ -482,7 +484,7 @@
         }
         
         LdapDN oriChildName = moveContext.getDn();
-        LdapDN newParentName = ((MoveOperationContext)moveContext).getParent();
+        LdapDN newParentName = moveContext.getParent();
         
         // Gather supplementary data.        
         Invocation invocation = InvocationStack.getInstance().peek();

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?rev=569124&r1=569123&r2=569124&view=diff
==============================================================================
--- 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 Thu Aug 23 12:25:57 2007
@@ -204,7 +204,7 @@
     }
 
 
-    public void subentryModified( OperationContext opContext, Attributes entry ) throws NamingException
+    public void subentryModified( ModifyOperationContext opContext, Attributes entry ) throws NamingException
     {
         if ( !hasPrescriptiveTrigger( entry ) )
         {
@@ -212,7 +212,7 @@
         }
 
         LdapDN normName = opContext.getDn();
-        ModificationItemImpl[] mods = ((ModifyOperationContext)opContext).getModItems();
+        ModificationItemImpl[] mods = opContext.getModItems();
 
         boolean isTriggerSpecModified = false;
         

Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java?rev=569124&r1=569123&r2=569124&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java Thu Aug 23 12:25:57 2007
@@ -41,6 +41,7 @@
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.DirectoryServiceListener;
 import org.apache.directory.server.core.interceptor.context.OperationContext;
+import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.jndi.DeadContext;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.shared.ldap.aci.ACITuple;
@@ -158,14 +159,14 @@
         }
 
 
-        public NamingEnumeration<SearchResult> search( OperationContext opContext )
+        public NamingEnumeration<SearchResult> search( SearchOperationContext opContext )
             throws NamingException
         {
             return new BogusEnumeration( count );
         }
 
 
-        public NamingEnumeration<SearchResult> search( OperationContext opContext, Collection bypass ) throws NamingException
+        public NamingEnumeration<SearchResult> search( SearchOperationContext opContext, Collection bypass ) throws NamingException
         {
             return new BogusEnumeration( count );
         }

Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java?rev=569124&r1=569123&r2=569124&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java Thu Aug 23 12:25:57 2007
@@ -29,7 +29,26 @@
 
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.configuration.InterceptorConfiguration;
+import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
+import org.apache.directory.server.core.interceptor.context.AddOperationContext;
+import org.apache.directory.server.core.interceptor.context.BindOperationContext;
+import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
+import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
+import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
+import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
+import org.apache.directory.server.core.interceptor.context.GetRootDSEOperationContext;
+import org.apache.directory.server.core.interceptor.context.GetSuffixOperationContext;
+import org.apache.directory.server.core.interceptor.context.ListOperationContext;
+import org.apache.directory.server.core.interceptor.context.ListSuffixOperationContext;
+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.OperationContext;
+import org.apache.directory.server.core.interceptor.context.RemoveContextPartitionOperationContext;
+import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
+import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
+import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 
@@ -68,35 +87,35 @@
     }
 
 
-    public Attributes getRootDSE( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public Attributes getRootDSE( NextInterceptor next, GetRootDSEOperationContext opContext ) throws NamingException
     {
         test.interceptors.add( this );
         return next.getRootDSE( opContext );
     }
 
 
-    public LdapDN getMatchedName ( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public LdapDN getMatchedName ( NextInterceptor next, GetMatchedNameOperationContext opContext ) throws NamingException
     {
         test.interceptors.add( this );
         return next.getMatchedName( opContext );
     }
 
 
-    public LdapDN getSuffix ( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public LdapDN getSuffix ( NextInterceptor next, GetSuffixOperationContext opContext ) throws NamingException
     {
         test.interceptors.add( this );
         return next.getSuffix( opContext );
     }
 
 
-    public Iterator listSuffixes ( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public Iterator listSuffixes ( NextInterceptor next, ListSuffixOperationContext opContext ) throws NamingException
     {
         test.interceptors.add( this );
         return next.listSuffixes( opContext );
     }
 
 
-    public void addContextPartition( NextInterceptor next, OperationContext opContext )
+    public void addContextPartition( NextInterceptor next, AddContextPartitionOperationContext opContext )
         throws NamingException
     {
         test.interceptors.add( this );
@@ -104,28 +123,28 @@
     }
 
 
-    public void removeContextPartition( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext opContext ) throws NamingException
     {
         test.interceptors.add( this );
         next.removeContextPartition( opContext );
     }
 
 
-    public boolean compare( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public boolean compare( NextInterceptor next, CompareOperationContext opContext ) throws NamingException
     {
         test.interceptors.add( this );
         return next.compare( opContext );
     }
 
 
-    public void delete( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws NamingException
     {
         test.interceptors.add( this );
         next.delete( opContext );
     }
 
 
-    public void add(NextInterceptor next, OperationContext opContext )
+    public void add( NextInterceptor next, AddOperationContext opContext )
         throws NamingException
     {
         test.interceptors.add( this );
@@ -133,42 +152,42 @@
     }
 
 
-    public void modify( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws NamingException
     {
         test.interceptors.add( this );
         next.modify( opContext );
     }
 
 
-    public NamingEnumeration list( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public NamingEnumeration list( NextInterceptor next, ListOperationContext opContext ) throws NamingException
     {
         test.interceptors.add( this );
         return next.list( opContext );
     }
 
 
-    public NamingEnumeration<SearchResult> search( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public NamingEnumeration<SearchResult> search( NextInterceptor next, SearchOperationContext opContext ) throws NamingException
     {
         test.interceptors.add( this );
         return next.search( opContext );
     }
 
 
-    public Attributes lookup( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public Attributes lookup( NextInterceptor next, LookupOperationContext opContext ) throws NamingException
     {
         test.interceptors.add( this );
         return next.lookup( opContext );
     }
 
 
-    public boolean hasEntry( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public boolean hasEntry( NextInterceptor next, EntryOperationContext opContext ) throws NamingException
     {
         test.interceptors.add( this );
         return next.hasEntry( opContext );
     }
 
 
-    public void rename( NextInterceptor next, OperationContext opContext )
+    public void rename( NextInterceptor next, RenameOperationContext opContext )
         throws NamingException
     {
         test.interceptors.add( this );
@@ -176,14 +195,14 @@
     }
 
 
-    public void move( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void move( NextInterceptor next, MoveOperationContext opContext ) throws NamingException
     {
         test.interceptors.add( this );
         next.move( opContext );
     }
 
 
-    public void moveAndRename( NextInterceptor next, OperationContext opContext )
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext )
         throws NamingException
     {
         test.interceptors.add( this );
@@ -191,7 +210,7 @@
     }
 
 
-    public void bind( NextInterceptor next, OperationContext opContext )
+    public void bind( NextInterceptor next, BindOperationContext opContext )
     throws NamingException
     {
         test.interceptors.add( this );
@@ -199,7 +218,7 @@
     }
 
 
-    public void unbind( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void unbind( NextInterceptor next, UnbindOperationContext opContext ) throws NamingException
     {
         test.interceptors.add( this );
         next.unbind( opContext );

Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java?rev=569124&r1=569123&r2=569124&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java (original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java Thu Aug 23 12:25:57 2007
@@ -162,9 +162,9 @@
      * sets {@link Constants#ENTRY_DELETED} to "FALSE" to resurrect the
      * entry the modified attributes belong to.
      */
-    public Operation newModify( OperationContext opContext )
+    public Operation newModify( ModifyOperationContext opContext )
     {
-        ModificationItemImpl[] items = ((ModifyOperationContext)opContext).getModItems();
+        ModificationItemImpl[] items = opContext.getModItems();
         LdapDN normalizedName = opContext.getDn();
 
         CSN csn = newCSN();

Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java?rev=569124&r1=569123&r2=569124&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java (original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java Thu Aug 23 12:25:57 2007
@@ -24,7 +24,6 @@
 import java.net.InetSocketAddress;
 import java.text.ParseException;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
 import javax.naming.NameNotFoundException;
@@ -58,8 +57,11 @@
 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.DeleteOperationContext;
+import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
 import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
+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.OperationContext;
@@ -382,22 +384,22 @@
     }
 
 
-    public void add( NextInterceptor nextInterceptor, OperationContext addContext ) throws NamingException
+    public void add( NextInterceptor nextInterceptor, AddOperationContext addContext ) throws NamingException
     {
-        Operation op = operationFactory.newAdd( addContext.getDn(), ((AddOperationContext)addContext).getEntry() );
+        Operation op = operationFactory.newAdd( addContext.getDn(), addContext.getEntry() );
         op.execute( nexus, store, attrRegistry );
     }
 
 
     @Override
-    public void delete( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws NamingException
     {
         Operation op = operationFactory.newDelete( opContext.getDn() );
         op.execute( nexus, store, attrRegistry );
     }
 
 
-    public void modify( NextInterceptor next, OperationContext modifyContext ) throws NamingException
+    public void modify( NextInterceptor next, ModifyOperationContext modifyContext ) throws NamingException
     {
         Operation op = operationFactory.newModify( modifyContext );
         op.execute( nexus, store, attrRegistry );
@@ -405,7 +407,7 @@
     
     
     @Override
-    public void move( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void move( NextInterceptor next, MoveOperationContext opContext ) throws NamingException
     {
         MoveOperationContext moveOpContext = (MoveOperationContext) opContext;
         Operation op = operationFactory.newMove( moveOpContext.getDn(), moveOpContext.getParent() );
@@ -414,7 +416,7 @@
     
     
     @Override
-    public void moveAndRename( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext ) throws NamingException
     {
         MoveAndRenameOperationContext moveAndRenameOpContext = (MoveAndRenameOperationContext) opContext;
         Operation op = operationFactory.newMove( moveAndRenameOpContext.getDn(), moveAndRenameOpContext.getParent(), moveAndRenameOpContext.getNewRdn(), moveAndRenameOpContext.getDelOldDn() );
@@ -423,15 +425,14 @@
     
     
     @Override
-    public void rename( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public void rename( NextInterceptor next, RenameOperationContext renameOpContext ) throws NamingException
     {
-        RenameOperationContext renameOpContext = (RenameOperationContext) opContext;
         Operation op = operationFactory.newModifyRn( renameOpContext.getDn(), renameOpContext.getNewRdn(), renameOpContext.getDelOldDn() );
         op.execute( nexus, store, attrRegistry );
     }
 
 
-    public boolean hasEntry( NextInterceptor nextInterceptor, OperationContext entryContext ) throws NamingException
+    public boolean hasEntry( NextInterceptor nextInterceptor, EntryOperationContext entryContext ) throws NamingException
     {
         // Ask others first.
         boolean hasEntry = nextInterceptor.hasEntry( entryContext );
@@ -456,15 +457,13 @@
     }
 
 
-    public Attributes lookup( NextInterceptor nextInterceptor, OperationContext lookupContext ) throws NamingException
+    public Attributes lookup( NextInterceptor nextInterceptor, LookupOperationContext lookupContext ) throws NamingException
     {
-        LookupOperationContext ctx = ((LookupOperationContext)lookupContext);
-        
-        if ( ctx.getAttrsId() != null )
+        if ( lookupContext.getAttrsId() != null )
         {
             boolean found = false;
             
-            String[] attrIds = ctx.getAttrsIdArray();
+            String[] attrIds = lookupContext.getAttrsIdArray();
             
             // Look for 'entryDeleted' attribute is in attrIds.
             for ( String attrId:attrIds )
@@ -482,18 +481,18 @@
                 String[] newAttrIds = new String[attrIds.length + 1];
                 System.arraycopy( attrIds, 0, newAttrIds, 0, attrIds.length );
                 newAttrIds[attrIds.length] = Constants.ENTRY_DELETED;
-                ctx.setAttrsId( newAttrIds );
+                lookupContext.setAttrsId( newAttrIds );
             }
         }
         
         Attributes result = nextInterceptor.lookup( lookupContext );
-        ensureNotDeleted( ctx.getDn(), result );
+        ensureNotDeleted( lookupContext.getDn(), result );
         return result;
     }
 
 
     @Override
-    public NamingEnumeration list( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public NamingEnumeration list( NextInterceptor next, ListOperationContext opContext ) throws NamingException
     {
         DirContext ctx = ( DirContext ) InvocationStack.getInstance().peek().getCaller();
         NamingEnumeration e = next.search(
@@ -508,10 +507,9 @@
 
 
     @Override
-    public NamingEnumeration<SearchResult> search( NextInterceptor next, OperationContext opContext ) throws NamingException
+    public NamingEnumeration<SearchResult> search( NextInterceptor next, SearchOperationContext opContext ) throws NamingException
     {
-        SearchOperationContext searchOpContext = (SearchOperationContext) opContext;
-        SearchControls searchControls = searchOpContext.getSearchControls();
+        SearchControls searchControls = opContext.getSearchControls();
         
         if ( searchControls.getReturningAttributes() != null )
         {
@@ -523,7 +521,7 @@
         }
         
         NamingEnumeration e = next.search( 
-            new SearchOperationContext( searchOpContext.getDn(), searchOpContext.getEnv(), searchOpContext.getFilter(), searchControls ) );
+            new SearchOperationContext( opContext.getDn(), opContext.getEnv(), opContext.getFilter(), searchControls ) );
         return new SearchResultFilteringEnumeration( e, searchControls, InvocationStack.getInstance().peek(),
             Constants.DELETED_ENTRIES_FILTER, "Search Replication filter" );
     }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java?rev=569124&r1=569123&r2=569124&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java Thu Aug 23 12:25:57 2007
@@ -34,6 +34,7 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.interceptor.context.EmptyOperationContext;
+import org.apache.directory.server.core.interceptor.context.ListSuffixOperationContext;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.PartitionNexus;
@@ -93,7 +94,7 @@
             requestor.write( new LaunchDiagnosticUiResponse( req.getMessageId() ) );
 
             PartitionNexus nexus = service.getConfiguration().getPartitionNexus();
-            Iterator list = nexus.listSuffixes( new EmptyOperationContext() );
+            Iterator list = nexus.listSuffixes( new ListSuffixOperationContext() );
             int launchedWindowCount = 0;
             
             while ( list.hasNext() )