directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r951097 [2/2] - in /directory/apacheds/trunk: core-annotations/src/main/java/org/apache/directory/server/core/factory/ core-api/src/main/java/org/apache/directory/server/core/ core-api/src/main/java/org/apache/directory/server/core/entry/ c...
Date Thu, 03 Jun 2010 18:23:19 GMT
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java
Thu Jun  3 18:23:18 2010
@@ -20,8 +20,6 @@
 package org.apache.directory.server.core.authn;
 
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.exception.LdapException;
@@ -82,7 +80,7 @@ public abstract class AbstractAuthentica
      * Initializes (<tt>directoryService</tt> and and calls {@link #doInit()}
method.
      * Please put your initialization code into {@link #doInit()}.
      * @param directoryService the directory core for this authenticator
-     * @throws NamingException if there is a problem starting up the authenticator
+     * @throws LdapException if there is a problem starting up the authenticator
      */
     public final void init( DirectoryService directoryService ) throws LdapException
     {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
Thu Jun  3 18:23:18 2010
@@ -28,7 +28,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
 
 import org.apache.directory.server.core.CoreSession;
@@ -91,7 +90,7 @@ public class TupleCache
      * Creates a ACITuple cache.
      *
      * @param directoryService the context factory configuration for the server
-     * @throws NamingException if initialization fails
+     * @throws LdapException if initialization fails
      */
     public TupleCache( CoreSession session ) throws LdapException
     {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
Thu Jun  3 18:23:18 2010
@@ -25,8 +25,6 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.authn.AuthenticationInterceptor;
 import org.apache.directory.server.core.authz.AciAuthorizationInterceptor;
 import org.apache.directory.server.core.authz.DefaultAuthorizationInterceptor;
@@ -88,7 +86,7 @@ public class ACDFEngine
      * @param oidRegistry an OID registry to be used by internal components
      * @param attrTypeRegistry an attribute type registry to be used by internal components

      * 
-     * @throws NamingException if failed to initialize internal components
+     * @throws LdapException if failed to initialize internal components
      */
     public ACDFEngine( OidRegistry oidRegistry, SchemaManager schemaManager ) throws LdapException
     {
@@ -125,7 +123,7 @@ public class ACDFEngine
      * @param microOperations the {@link org.apache.directory.shared.ldap.aci.MicroOperation}s
to perform
      * @param aciTuples {@link org.apache.directory.shared.ldap.aci.ACITuple}s translated
from {@link org.apache.directory.shared.ldap.aci.ACIItem}s in the subtree entries
      * @param entryView in case of a Modify operation, view of the entry being modified as
if the modification permitted and completed
-     * @throws NamingException if failed to evaluate ACI items
+     * @throws LdapException if failed to evaluate ACI items
      */
     public void checkPermission( 
         SchemaManager schemaManager, 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
Thu Jun  3 18:23:18 2010
@@ -22,8 +22,6 @@ package org.apache.directory.server.core
 
 import java.util.Collection;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.interceptor.context.OperationContext;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.MicroOperation;
@@ -63,7 +61,7 @@ public interface ACITupleFilter
      * @param microOperations the set of {@link MicroOperation}s the current user will perform
      * @param entryView in case of a Modify operation, view of the entry being modified as
if the modification permitted and completed
      * @return the collection of filtered tuples
-     * @throws NamingException if failed to filter the specific tuples
+     * @throws LdapException if failed to filter the specific tuples
      */
     Collection<ACITuple> filter( 
             SchemaManager schemaManager, 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java
Thu Jun  3 18:23:18 2010
@@ -51,7 +51,6 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
- * TODO remove the NamingException
  */
 public class MemoryChangeLogStore implements TaggableChangeLogStore
 {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
Thu Jun  3 18:23:18 2010
@@ -23,8 +23,6 @@ package org.apache.directory.server.core
 import java.util.HashSet;
 import java.util.Set;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilter;
@@ -112,7 +110,7 @@ public class CollectiveAttributeIntercep
      * are added to
      * @param entry the entry to have the collective attributes injected
      * @param retAttrs array or attribute type to be specifically included in the result
entry(s)
-     * @throws NamingException if there are problems accessing subentries
+     * @throws LdapException if there are problems accessing subentries
      */
     private void addCollectiveAttributes( OperationContext opContext, Entry entry, String[]
retAttrs ) throws LdapException
     {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
Thu Jun  3 18:23:18 2010
@@ -278,88 +278,6 @@ public class SchemaChecker
 
 
     /**
-     * Makes sure modify operations do not leave the entry without a STRUCTURAL
-     * objectClass.  At least one STRUCTURAL objectClass must be specified for
-     * the entry after modifications take effect.
-     *
-     * @param registry the objectClass registry to lookup ObjectClass specifications
-     * @param name the name of the entry being modified
-     * @param mod the type of modification operation being performed (should be
-     * REMOVE_ATTRIBUTE)
-     * @param attributes the attributes being modified
-     * @param entryObjectClasses the entry being modified
-     * @throws NamingException if modify operations leave the entry inconsistent
-     * without a STRUCTURAL objectClass
-     *
-    public static void preventStructuralClassRemovalOnModifyRemove( ObjectClassRegistry registry,
Name name, int mod,
-        Attributes attributes, Attribute entryObjectClasses ) throws NamingException
-    {
-        if ( mod != DirContext.REMOVE_ATTRIBUTE )
-        {
-            return;
-        }
-
-        Attribute objectClass = attributes.get( SchemaConstants.OBJECT_CLASS_AT );
-        if ( objectClass == null )
-        {
-            return;
-        }
-        
-        // check if there is any attribute value as "".
-        // if there is remove it so that it will be considered as not even provided.
-        for( int ii = 0; ii < objectClass.size(); ii++ )
-        {
-            Object value = objectClass.get( ii );
-            if ( "".equals( value ) )
-            {
-                objectClass.remove( ii );
-            }
-        }
-
-        // whoever issued the modify operation is insane they want to delete
-        // all the objectClass values in which case we must throw an exception
-        if ( objectClass.size() == 0 )
-        {
-            String msg = "Modify operation leaves no structural objectClass for entry " +
name;
-            if ( log.isInfoEnabled() )
-            {
-                log.info( msg + ".  Raising LdapSchemaViolationException." );
-            }
-            throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
-        }
-
-        // remove all the objectClass attribute values from a cloned copy and then
-        // we can analyze what remains in this attribute to make sure a structural
-        // objectClass is present for the entry
-
-        Attribute cloned = ( Attribute ) entryObjectClasses.clone();
-        for ( int ii = 0; ii < objectClass.size(); ii++ )
-        {
-            cloned.remove( objectClass.get( ii ) );
-        }
-
-        // check resultant set of objectClass values for a structural objectClass
-        for ( int ii = 0; ii < cloned.size(); ii++ )
-        {
-            ObjectClass ocType = registry.lookup( ( String ) cloned.get( ii ) );
-            if ( ocType.getType() == ObjectClassTypeEnum.STRUCTURAL )
-            {
-                return;
-            }
-        }
-
-        // no structural object classes exist for the entry after the modifications
-        // to the objectClass attribute so we need to complain about that
-        String msg = "Modify operation leaves no structural objectClass for entry " + name;
-        if ( log.isInfoEnabled() )
-        {
-            log.info( msg + ".  Raising LdapSchemaViolationException." );
-        }
-        throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
-    }
-    */
-
-    /**
      * Makes sure a modify operation does not replace RDN attributes or their value.
      * According to section 4.6 of <a href="http://rfc.net/rfc2251.html#s4.6.">
      * RFC 2251</a> a modify operation cannot be used to remove Rdn attributes as

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/StoredProcEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/StoredProcEngine.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/StoredProcEngine.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/StoredProcEngine.java
Thu Jun  3 18:23:18 2010
@@ -22,6 +22,7 @@ package org.apache.directory.server.core
 
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.exception.LdapException;
 
 
 /**
@@ -55,8 +56,8 @@ public interface StoredProcEngine
      * @param fullSPName A fully qualified name of the stored procedure including its unit
name.
      * @param spArgs A list or arguments to be passed to the stored procedure. It should
be an empty array if there aren't any parameters defined.
      * @return The value obtained from invoked procedure. The client should know what will
return exactly so that it can downcast to the appropriate type.
-     * @throws NamingException If an error occurs during invocation.
+     * @throws LdapException If an error occurs during invocation.
      */
-    public Object invokeProcedure( CoreSession session, String fullSPName, Object[] spArgs
) throws Exception;
+    public Object invokeProcedure( CoreSession session, String fullSPName, Object[] spArgs
) throws LdapException;
 
 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/java/JavaStoredProcEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/java/JavaStoredProcEngine.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/java/JavaStoredProcEngine.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/java/JavaStoredProcEngine.java
Thu Jun  3 18:23:18 2010
@@ -27,13 +27,12 @@ import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.sp.StoredProcEngine;
 import org.apache.directory.server.core.sp.StoredProcUtils;
-import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.util.DirectoryClassUtils;
 
 
@@ -54,7 +53,7 @@ public class JavaStoredProcEngine implem
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.sp.StoredProcEngine#invokeProcedure(OperationContext,
String, Object[])
      */
-    public Object invokeProcedure( CoreSession session, String fullSPName, Object[] spArgs
) throws Exception
+    public Object invokeProcedure( CoreSession session, String fullSPName, Object[] spArgs
) throws LdapException
     {
         EntryAttribute javaByteCode = spUnit.get( "javaByteCode" );
         String spName = StoredProcUtils.extractStoredProcName( fullSPName );
@@ -69,9 +68,7 @@ public class JavaStoredProcEngine implem
         }
         catch ( ClassNotFoundException e )
         {
-            NamingException ne = new NamingException();
-            ne.setRootCause( e );
-            throw ne;
+            throw new LdapException( e );
         }
 
         Class<?>[] types = getTypesFromValues( spArgs );
@@ -83,9 +80,7 @@ public class JavaStoredProcEngine implem
         }
         catch ( NoSuchMethodException e )
         {
-            NamingException ne = new NamingException();
-            ne.setRootCause( e );
-            throw ne;
+            throw new LdapException( e );
         }
         try
         {
@@ -93,21 +88,15 @@ public class JavaStoredProcEngine implem
         }
         catch ( IllegalArgumentException e )
         {
-            NamingException ne = new NamingException();
-            ne.setRootCause( e );
-            throw ne;
+            throw new LdapException( e );
         }
         catch ( IllegalAccessException e )
         {
-            NamingException ne = new NamingException();
-            ne.setRootCause( e );
-            throw ne;
+            throw new LdapException( e );
         }
         catch ( InvocationTargetException e )
         {
-            NamingException ne = new NamingException();
-            ne.setRootCause( e );
-            throw ne;
+            throw new LdapException( e );
         }
     }
 

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=951097&r1=951096&r2=951097&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 Jun  3 18:23:18 2010
@@ -28,7 +28,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
 
 import org.apache.directory.server.constants.ApacheSchemaConstants;
@@ -93,7 +92,7 @@ public class TriggerSpecCache
      * Creates a TriggerSpecification cache.
      *
      * @param directoryService the directory service core
-     * @throws NamingException with problems initializing cache
+     * @throws LdapException with problems initializing cache
      */
     public TriggerSpecCache( DirectoryService directoryService ) throws LdapException
     {

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=951097&r1=951096&r2=951097&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 Jun  3 18:23:18 2010
@@ -222,13 +222,13 @@ public class MaxImmSubFilterTest
 
 
         public EntryFilteringCursor search( SearchOperationContext opContext )
-            throws NamingException
+            throws LdapException
         {
             return new BaseEntryFilteringCursor( new BogusCursor( count ), opContext );
         }
 
 
-        public EntryFilteringCursor search( SearchOperationContext opContext, Collection<String>
bypass ) throws NamingException
+        public EntryFilteringCursor search( SearchOperationContext opContext, Collection<String>
bypass ) throws LdapException
         {
             return new BaseEntryFilteringCursor( new BogusCursor( count ), opContext );
         }
@@ -768,7 +768,7 @@ public class MaxImmSubFilterTest
         }
 
 
-        public Entry newEntry( DN dn ) throws NamingException
+        public Entry newEntry( DN dn ) throws LdapException
         {
             return null;
         }

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?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- 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
Thu Jun  3 18:23:18 2010
@@ -573,7 +573,7 @@ public class InterceptorChainTest
         }
 
 
-        public Entry newEntry( DN dn ) throws NamingException
+        public Entry newEntry( DN dn ) throws LdapException
         {
             return null;
         }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java
Thu Jun  3 18:23:18 2010
@@ -258,7 +258,6 @@ public abstract class AbstractSaslCallba
             {
                 code = ResultCodeEnum.getBestEstimate( e, bindRequest.getType() );
                 result.setResultCode( code );
-                //dn = new DN( ((NamingException)e).getResolvedName() );
             }
 
             String msg = "Bind failed: " + e.getLocalizedMessage();

Modified: directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifFileLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifFileLoader.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifFileLoader.java
(original)
+++ directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifFileLoader.java
Thu Jun  3 18:23:18 2010
@@ -34,6 +34,7 @@ import org.apache.directory.server.i18n.
 import org.apache.directory.shared.ldap.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.Modification;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.apache.directory.shared.ldap.name.DN;
@@ -206,7 +207,7 @@ public class LdifFileLoader
                            count++;
                             log.info( "Created {}.", rdn );
                         } 
-                        catch ( NamingException e1 )
+                        catch ( LdapException e1 )
                         {
                             log.info( "Could not create entry " + entry, e1 );
                         }
@@ -221,7 +222,7 @@ public class LdifFileLoader
                         coreSession.modify( dn, items );
                         log.info( "Modified: " + dn + " with modificationItems: " + items
);
                     }
-                    catch ( NamingException e )
+                    catch ( LdapException e )
                     {
                         log.info( "Could not modify: " + dn + " with modificationItems: "
+ items, e );
                     }



Mime
View raw message