directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r658868 - in /directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core: referral/ schema/ trigger/
Date Wed, 21 May 2008 21:01:08 GMT
Author: elecharny
Date: Wed May 21 14:01:07 2008
New Revision: 658868

URL: http://svn.apache.org/viewvc?rev=658868&view=rev
Log:
fixing issues with Cursor verses NamingEnumeration usage in Interceptors

Modified:
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaOperationControl.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/StoredProcedureParameterInjector.java

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java?rev=658868&r1=658867&r2=658868&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
Wed May 21 14:01:07 2008
@@ -31,6 +31,7 @@
 import org.apache.directory.server.core.authn.AuthenticationInterceptor;
 import org.apache.directory.server.core.authz.AciAuthorizationInterceptor;
 import org.apache.directory.server.core.authz.DefaultAuthorizationInterceptor;
+import org.apache.directory.server.core.cursor.Cursor;
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.entry.ServerSearchResult;
@@ -250,7 +251,7 @@
     }
 
 
-    public void init( DirectoryService directoryService ) throws NamingException
+    public void init( DirectoryService directoryService ) throws Exception
     {
         nexus = directoryService.getPartitionNexus();
         registries = directoryService.getRegistries();
@@ -349,7 +350,7 @@
     }
 
 
-    public void add( NextInterceptor next, AddOperationContext opContext ) throws NamingException
+    public void add( NextInterceptor next, AddOperationContext opContext ) throws Exception
     {
         Invocation invocation = InvocationStack.getInstance().peek();
         ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
@@ -401,7 +402,7 @@
     }
 
 
-    public boolean compare( NextInterceptor next, CompareOperationContext opContext ) throws
NamingException
+    public boolean compare( NextInterceptor next, CompareOperationContext opContext ) throws
Exception
     {
         LdapDN name = opContext.getDn();
 
@@ -445,7 +446,7 @@
     }
 
 
-    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws NamingException
+    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws Exception
     {
         LdapDN name = opContext.getDn();
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -515,7 +516,7 @@
      * -----------------------------------------------------------------------
      */
 
-    public void move( NextInterceptor next, MoveOperationContext opContext ) throws NamingException
+    public void move( NextInterceptor next, MoveOperationContext opContext ) throws Exception
     {
         LdapDN oldName = opContext.getDn();
 
@@ -589,7 +590,7 @@
     }
 
 
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext
) throws NamingException
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext
) throws Exception
     {
         LdapDN oldName = opContext.getDn();
 
@@ -662,7 +663,7 @@
     }
 
 
-    public void rename( NextInterceptor next, RenameOperationContext opContext ) throws NamingException
+    public void rename( NextInterceptor next, RenameOperationContext opContext ) throws Exception
     {
         LdapDN oldName = opContext.getDn();
 
@@ -811,7 +812,7 @@
     }
 
 
-    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws NamingException
+    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws Exception
     {
         Invocation invocation = InvocationStack.getInstance().peek();
         ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
@@ -872,7 +873,7 @@
 
 
     public void addContextPartition( NextInterceptor next, AddContextPartitionOperationContext
opContext )
-        throws NamingException
+        throws Exception
     {
         next.addContextPartition( opContext );
 
@@ -880,7 +881,7 @@
         Partition partition = opContext.getPartition();
         LdapDN suffix = partition.getSuffixDn();
         Invocation invocation = InvocationStack.getInstance().peek();
-        NamingEnumeration<ServerSearchResult> list = invocation.getProxy().search(
+        Cursor<ServerEntry> list = invocation.getProxy().search(
             new SearchOperationContext( registries, suffix, AliasDerefMode.DEREF_ALWAYS,
getReferralFilter(),
                 getControls() ), SEARCH_BYPASS );
         addReferrals( list, suffix );
@@ -888,11 +889,11 @@
 
 
     public void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext
opContext )
-        throws NamingException
+        throws Exception
     {
         // remove referrals immediately before removing the partition
         Invocation invocation = InvocationStack.getInstance().peek();
-        NamingEnumeration<ServerSearchResult> list = invocation.getProxy().search(
+        Cursor<ServerEntry> list = invocation.getProxy().search(
             new SearchOperationContext( registries, opContext.getDn(), AliasDerefMode.DEREF_ALWAYS,
                 getReferralFilter(), getControls() ), SEARCH_BYPASS );
 
@@ -901,20 +902,20 @@
     }
 
 
-    private void addReferrals( NamingEnumeration<ServerSearchResult> referrals, LdapDN
base ) throws NamingException
+    private void addReferrals( Cursor<ServerEntry> referrals, LdapDN base ) throws
Exception
     {
-        while ( referrals.hasMore() )
+        while ( referrals.next() )
         {
-            ServerSearchResult r = referrals.next();
+            ServerEntry r = referrals.get();
             LdapDN referral;
             LdapDN result = new LdapDN( r.getDn() );
             result.normalize( atRegistry.getNormalizerMapping() );
 
-            if ( r.isRelative() )
+            /*if ( r.isRelative() )
             {
                 referral = ( LdapDN ) base.clone();
                 referral.addAll( result );
-            }
+            }*/
 
             // Now, add the referral to the cache
             lut.referralAdded( result );
@@ -922,20 +923,20 @@
     }
 
 
-    private void deleteReferrals( NamingEnumeration<ServerSearchResult> referrals,
LdapDN base ) throws NamingException
+    private void deleteReferrals( Cursor<ServerEntry> referrals, LdapDN base ) throws
Exception
     {
-        while ( referrals.hasMore() )
+        while ( referrals.next() )
         {
-            ServerSearchResult r = referrals.next();
+            ServerEntry r = referrals.get();
             LdapDN referral;
             LdapDN result = new LdapDN( r.getDn() );
             result.normalize( atRegistry.getNormalizerMapping() );
 
-            if ( r.isRelative() )
+            /*if ( r.isRelative() )
             {
                 referral = ( LdapDN ) base.clone();
                 referral.addAll( result );
-            }
+            }*/
 
             // Now, remove the referral from the cache
             lut.referralDeleted( result );
@@ -943,8 +944,8 @@
     }
 
 
-    public NamingEnumeration<ServerSearchResult> search( NextInterceptor next, SearchOperationContext
opContext )
-        throws NamingException
+    public Cursor<ServerEntry> search( NextInterceptor next, SearchOperationContext
opContext )
+        throws Exception
     {
         Invocation invocation = InvocationStack.getInstance().peek();
         ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
@@ -1003,8 +1004,10 @@
             if ( farthest == null )
             {
                 SearchResultFilteringEnumeration srfe = ( SearchResultFilteringEnumeration
) next.search( opContext );
-                return new ReferralHandlingEnumeration( srfe, lut, opContext.getRegistries(),
nexus, controls
-                    .getSearchScope(), true );
+                // TODO FixMe
+                //return new ReferralHandlingEnumeration( srfe, lut, opContext.getRegistries(),
nexus, controls
+                //    .getSearchScope(), true );
+                return null;
             }
 
             ServerEntry referral = invocation.getProxy().lookup( new LookupOperationContext(
registries, farthest ),

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaOperationControl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaOperationControl.java?rev=658868&r1=658867&r2=658868&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaOperationControl.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaOperationControl.java
Wed May 21 14:01:07 2008
@@ -933,7 +933,7 @@
      * 
      * @throws NamingException if the update fails
      */
-    private void updateSchemaModificationAttributes() throws NamingException
+    private void updateSchemaModificationAttributes() throws Exception
     {
         Invocation invocation = InvocationStack.getInstance().peek();
         ServerLdapContext ctx = ( ServerLdapContext ) invocation.getCaller();

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java?rev=658868&r1=658867&r2=658868&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
Wed May 21 14:01:07 2008
@@ -155,7 +155,7 @@
     }
 
 
-    public void deleteSchemaObject( Registries registries, SchemaObject obj ) throws NamingException
+    public void deleteSchemaObject( Registries registries, SchemaObject obj ) throws Exception
     {
         PartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();
         LdapDN dn = getDn( obj );
@@ -163,7 +163,7 @@
     }
 
     
-    public void delete( Registries registries, NormalizerDescription normalizerDescription
) throws NamingException
+    public void delete( Registries registries, NormalizerDescription normalizerDescription
) throws Exception
     {
         String schemaName = getSchema( normalizerDescription );
         PartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();
@@ -173,7 +173,7 @@
     }
 
 
-    public void delete( Registries registries, SyntaxCheckerDescription syntaxCheckerDescription
) throws NamingException
+    public void delete( Registries registries, SyntaxCheckerDescription syntaxCheckerDescription
) throws Exception
     {
         String schemaName = getSchema( syntaxCheckerDescription );
         PartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();
@@ -183,7 +183,7 @@
     }
 
 
-    public void delete( Registries registries, ComparatorDescription comparatorDescription
) throws NamingException
+    public void delete( Registries registries, ComparatorDescription comparatorDescription
) throws Exception
     {
         String schemaName = getSchema( comparatorDescription );
         PartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();
@@ -193,7 +193,7 @@
     }
 
 
-    public void add( Registries registries, ComparatorDescription comparatorDescription )
throws NamingException
+    public void add( Registries registries, ComparatorDescription comparatorDescription )
throws Exception
     {
         String schemaName = getSchema( comparatorDescription );   
         PartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();
@@ -229,7 +229,7 @@
     }
 
 
-    public void add( Registries registries, NormalizerDescription normalizerDescription )
throws NamingException
+    public void add( Registries registries, NormalizerDescription normalizerDescription )
throws Exception
     {
         String schemaName = getSchema( normalizerDescription );
         PartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();
@@ -265,7 +265,7 @@
     }
 
 
-    public void add( Registries registries, SyntaxCheckerDescription syntaxCheckerDescription
) throws NamingException
+    public void add( Registries registries, SyntaxCheckerDescription syntaxCheckerDescription
) throws Exception
     {
         String schemaName = getSchema( syntaxCheckerDescription );
         PartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java?rev=658868&r1=658867&r2=658868&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java
Wed May 21 14:01:07 2008
@@ -73,7 +73,7 @@
         this.invocation = invocation;
     }
     
-    public final List<Object> getArgumentsToInject( Registries registries, List<StoredProcedureParameter>
parameterList ) throws NamingException
+    public final List<Object> getArgumentsToInject( Registries registries, List<StoredProcedureParameter>
parameterList ) throws Exception
     {
         List<Object> arguments = new ArrayList<Object>();
         

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java?rev=658868&r1=658867&r2=658868&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
Wed May 21 14:01:07 2008
@@ -39,7 +39,7 @@
     private LdapDN deletedEntryName;
     private ServerEntry deletedEntry;
     
-    public DeleteStoredProcedureParameterInjector( Registries registries, Invocation invocation,
LdapDN deletedEntryName ) throws NamingException
+    public DeleteStoredProcedureParameterInjector( Registries registries, Invocation invocation,
LdapDN deletedEntryName ) throws Exception
     {
         super( invocation );
         this.deletedEntryName = deletedEntryName;
@@ -66,7 +66,7 @@
         }
     };
     
-    private ServerEntry getDeletedEntry( Registries registries ) throws NamingException
+    private ServerEntry getDeletedEntry( Registries registries ) throws Exception
     {
         PartitionNexusProxy proxy = getInvocation().getProxy();
         /**

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java?rev=658868&r1=658867&r2=658868&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
Wed May 21 14:01:07 2008
@@ -43,7 +43,7 @@
     private ServerEntry oldEntry;
     
     
-    public ModifyStoredProcedureParameterInjector( Invocation invocation, ModifyOperationContext
opContext ) throws NamingException
+    public ModifyStoredProcedureParameterInjector( Invocation invocation, ModifyOperationContext
opContext ) throws Exception
     {
         super( invocation );
         modifiedEntryName = opContext.getDn();
@@ -90,13 +90,13 @@
     
     MicroInjector $newEntryInjector = new MicroInjector()
     {
-        public Object inject( Registries registries, StoredProcedureParameter param ) throws
NamingException
+        public Object inject( Registries registries, StoredProcedureParameter param ) throws
Exception
         {
             return getEntry( registries );
         }
     };
     
-    private ServerEntry getEntry( Registries registries ) throws NamingException
+    private ServerEntry getEntry( Registries registries ) throws Exception
     {
         PartitionNexusProxy proxy = getInvocation().getProxy();
         /**

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/StoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/StoredProcedureParameterInjector.java?rev=658868&r1=658867&r2=658868&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/StoredProcedureParameterInjector.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/StoredProcedureParameterInjector.java
Wed May 21 14:01:07 2008
@@ -22,17 +22,15 @@
 
 import java.util.List;
 
-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( Registries registries, List<StoredProcedureParameter>
parameterList ) throws NamingException;
+    List<Object> getArgumentsToInject( Registries registries, List<StoredProcedureParameter>
parameterList ) throws Exception;
     
     public interface MicroInjector
     {
-        Object inject( Registries registries, StoredProcedureParameter param ) throws NamingException;
+        Object inject( Registries registries, StoredProcedureParameter param ) throws Exception;
     }
 }



Mime
View raw message