directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r946782 - in /directory/apacheds/trunk: avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/ core-api/src/main/java/org/apache/directory/server/core/entry/ core-api/src/main/java/org/apache/directory/server/core/inter...
Date Thu, 20 May 2010 20:48:35 GMT
Author: felixk
Date: Thu May 20 20:48:34 2010
New Revision: 946782

URL: http://svn.apache.org/viewvc?rev=946782&view=rev
Log:
>From PMD report
Various 'Avoid unused *' removed

Modified:
    directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
    directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayMarshaller.java
    directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMapImpl.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java
    directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryManager.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java

Modified: directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java (original)
+++ directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java Thu May 20 20:48:34 2010
@@ -91,8 +91,6 @@ public class AvlPartition extends Abstra
         suffixDn.normalize( schemaManager.getNormalizerMapping() );
         store.setSuffixDn( suffixDn );
 
-        Set<Index<?, Entry, Long>> userIndices = new HashSet<Index<?, Entry, Long>>();
-
         for ( AvlIndex<?, Entry> index : indexedAttributes )
         {
             String oid = schemaManager.getAttributeTypeRegistry().getOidByName( index.getAttributeId() );

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java Thu May 20 20:48:34 2010
@@ -31,7 +31,6 @@ import javax.naming.directory.Attributes
 import javax.naming.directory.BasicAttribute;
 import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
-import javax.naming.directory.InvalidAttributeIdentifierException;
 import javax.naming.directory.ModificationItem;
 import javax.naming.directory.SearchResult;
 

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java Thu May 20 20:48:34 2010
@@ -26,7 +26,6 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.Set;
 
-import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
 
 import org.apache.commons.lang.ArrayUtils;

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java Thu May 20 20:48:34 2010
@@ -306,8 +306,6 @@ public class DescriptionParsers
                 throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_416 ) );
             }
 
-            List<Throwable> errors = new ArrayList<Throwable>();
-
             attributeType.setRegistries( schemaManager.getRegistries() );
 
             /*
@@ -412,7 +410,6 @@ public class DescriptionParsers
                 }
             }
 
-            List<Throwable> errors = new ArrayList<Throwable>();
             objectClass.setRegistries( schemaManager.getRegistries() );
 
             objectClasses[pos++] = objectClass;

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java Thu May 20 20:48:34 2010
@@ -31,7 +31,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
 import org.apache.directory.server.core.interceptor.context.ListOperationContext;
-import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.MetaSchemaConstants;
@@ -42,13 +41,9 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.apache.directory.shared.ldap.schema.parsers.LdapComparatorDescription;
-import org.apache.directory.shared.ldap.schema.parsers.NormalizerDescription;
-import org.apache.directory.shared.ldap.schema.parsers.SyntaxCheckerDescription;
 import org.apache.directory.shared.ldap.schema.registries.AbstractSchemaLoader;
 import org.apache.directory.shared.ldap.schema.registries.Registries;
 import org.apache.directory.shared.ldap.schema.registries.Schema;
-import org.apache.directory.shared.ldap.util.Base64;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -70,12 +65,7 @@ public class PartitionSchemaLoader exten
     /** The attributeType registry */
     private SchemaManager schemaManager;
 
-    private final AttributeType mOidAT;
-    private final AttributeType mNameAT;
     private final AttributeType cnAT;
-    private final AttributeType byteCodeAT;
-    private final AttributeType descAT;
-    private final AttributeType fqcnAT;
 
     private static Map<String, DN> staticAttributeTypeDNs = new HashMap<String, DN>();
     private static Map<String, DN> staticMatchingRulesDNs = new HashMap<String, DN>();
@@ -92,12 +82,7 @@ public class PartitionSchemaLoader exten
         this.schemaManager = schemaManager;
 
         dao = new SchemaPartitionDaoImpl( this.partition, schemaManager );
-        mOidAT = schemaManager.lookupAttributeTypeRegistry( MetaSchemaConstants.M_OID_AT );
-        mNameAT = schemaManager.lookupAttributeTypeRegistry( MetaSchemaConstants.M_NAME_AT );
         cnAT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.CN_AT );
-        byteCodeAT = schemaManager.lookupAttributeTypeRegistry( MetaSchemaConstants.M_BYTECODE_AT );
-        descAT = schemaManager.lookupAttributeTypeRegistry( MetaSchemaConstants.M_DESCRIPTION_AT );
-        fqcnAT = schemaManager.lookupAttributeTypeRegistry( MetaSchemaConstants.M_FQCN_AT );
 
         initStaticDNs( "system" );
         initStaticDNs( "core" );
@@ -602,107 +587,6 @@ public class PartitionSchemaLoader exten
     }
 
 
-    private String getOid( Entry entry ) throws Exception
-    {
-        EntryAttribute oid = entry.get( mOidAT );
-
-        if ( oid == null )
-        {
-            return null;
-        }
-
-        return oid.getString();
-    }
-
-
-    private NormalizerDescription getNormalizerDescription( String schemaName, Entry entry ) throws Exception
-    {
-        NormalizerDescription description = new NormalizerDescription( getOid( entry ) );
-        List<String> values = new ArrayList<String>();
-        values.add( schemaName );
-        description.addExtension( MetaSchemaConstants.X_SCHEMA, values );
-        description.setFqcn( entry.get( fqcnAT ).getString() );
-
-        EntryAttribute desc = entry.get( descAT );
-        if ( desc != null && desc.size() > 0 )
-        {
-            description.setDescription( desc.getString() );
-        }
-
-        EntryAttribute bytecode = entry.get( byteCodeAT );
-
-        if ( bytecode != null && bytecode.size() > 0 )
-        {
-            byte[] bytes = bytecode.getBytes();
-            description.setBytecode( new String( Base64.encode( bytes ) ) );
-        }
-
-        return description;
-    }
-
-
-    private ClonedServerEntry lookupPartition( DN dn ) throws Exception
-    {
-        return partition.lookup( new LookupOperationContext( null, dn ) );
-    }
-
-
-    private LdapComparatorDescription getLdapComparatorDescription( String schemaName, Entry entry )
-        throws Exception
-    {
-        LdapComparatorDescription description = new LdapComparatorDescription( getOid( entry ) );
-        List<String> values = new ArrayList<String>();
-        values.add( schemaName );
-        description.addExtension( MetaSchemaConstants.X_SCHEMA, values );
-        description.setFqcn( entry.get( fqcnAT ).getString() );
-
-        EntryAttribute desc = entry.get( descAT );
-
-        if ( desc != null && desc.size() > 0 )
-        {
-            description.setDescription( desc.getString() );
-        }
-
-        EntryAttribute bytecode = entry.get( byteCodeAT );
-
-        if ( bytecode != null && bytecode.size() > 0 )
-        {
-            byte[] bytes = bytecode.getBytes();
-            description.setBytecode( new String( Base64.encode( bytes ) ) );
-        }
-
-        return description;
-    }
-
-
-    private SyntaxCheckerDescription getSyntaxCheckerDescription( String schemaName, Entry entry )
-        throws Exception
-    {
-        SyntaxCheckerDescription description = new SyntaxCheckerDescription( getOid( entry ) );
-        List<String> values = new ArrayList<String>();
-        values.add( schemaName );
-        description.addExtension( MetaSchemaConstants.X_SCHEMA, values );
-        description.setFqcn( entry.get( fqcnAT ).getString() );
-
-        EntryAttribute desc = entry.get( descAT );
-
-        if ( desc != null && desc.size() > 0 )
-        {
-            description.setDescription( desc.getString() );
-        }
-
-        EntryAttribute bytecode = entry.get( byteCodeAT );
-
-        if ( bytecode != null && bytecode.size() > 0 )
-        {
-            byte[] bytes = bytecode.getBytes();
-            description.setBytecode( new String( Base64.encode( bytes ) ) );
-        }
-
-        return description;
-    }
-
-
     /**
      * @return the dao
      */

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java Thu May 20 20:48:34 2010
@@ -23,8 +23,6 @@ package org.apache.directory.server.core
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
@@ -228,7 +226,6 @@ public final class SchemaPartition exten
         {
             wrapped.initialize();
 
-            PartitionSchemaLoader partitionLoader = new PartitionSchemaLoader( wrapped, schemaManager );
             synchronizer = new RegistrySynchronizerAdaptor( schemaManager );
 
             if ( wrapped instanceof NullPartition )

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java Thu May 20 20:48:34 2010
@@ -4,8 +4,6 @@ package org.apache.directory.server.core
 import java.util.Map;
 import java.util.Set;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.name.DN;

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java Thu May 20 20:48:34 2010
@@ -20,26 +20,22 @@
 package org.apache.directory.server.core.schema.registries.synchronizers;
 
 
-import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import javax.naming.NamingException;
+
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.OperationManager;
 import org.apache.directory.server.core.entry.ServerEntryUtils;
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
-import org.apache.directory.server.core.partition.ByPassConstants;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.MetaSchemaConstants;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.entry.DefaultModification;
-import org.apache.directory.shared.ldap.entry.DefaultEntryAttribute;
+import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
-import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
@@ -49,15 +45,9 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.name.RDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.apache.directory.shared.ldap.schema.SchemaObject;
-import org.apache.directory.shared.ldap.schema.SchemaObjectType;
-import org.apache.directory.shared.ldap.schema.SchemaObjectWrapper;
 import org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory;
-import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
-import org.apache.directory.shared.ldap.schema.registries.DefaultSchemaObjectRegistry;
 import org.apache.directory.shared.ldap.schema.registries.Registries;
 import org.apache.directory.shared.ldap.schema.registries.Schema;
-import org.apache.directory.shared.ldap.util.DateUtils;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -95,12 +85,6 @@ public class SchemaSynchronizer implemen
     /** The m-dependencies AttributeType */
     private final AttributeType dependenciesAT;
     
-    /** The modifiersName AttributeType */
-    private final AttributeType modifiersNameAT;
-    
-    /** The modifyTimestamp AttributeType */
-    private final AttributeType modifyTimestampAT;
-    
     /** A static DN referencing ou=schema */
     private final DN ouSchemaDN;
 
@@ -120,8 +104,6 @@ public class SchemaSynchronizer implemen
         cnAT = registries.getAttributeTypeRegistry().lookup( SchemaConstants.CN_AT );
         dependenciesAT = registries.getAttributeTypeRegistry()
             .lookup( MetaSchemaConstants.M_DEPENDENCIES_AT );
-        modifiersNameAT = registries.getAttributeTypeRegistry().lookup( SchemaConstants.MODIFIERS_NAME_AT );
-        modifyTimestampAT = registries.getAttributeTypeRegistry().lookup( SchemaConstants.MODIFY_TIMESTAMP_AT );
         
         ouSchemaDN = new DN( SchemaConstants.OU_SCHEMA );
         ouSchemaDN.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
@@ -501,69 +483,6 @@ public class SchemaSynchronizer implemen
     }
 
     
-    /**
-     * Build the DN to access a schemaObject path for a specific schema 
-     */
-    private DN buildDn( SchemaObjectType schemaObjectType, String schemaName ) throws LdapInvalidDnException
-    {
-        
-        DN path = new DN( 
-            SchemaConstants.OU_SCHEMA,
-            "cn=" + schemaName,
-            schemaObjectType.getRdn()
-            );
-        
-        return path;
-    }
-    
-    
-    /**
-     * Disable a schema and update all of its schemaObject 
-     */
-    private void disable( SchemaObject schemaObject, CoreSession session, Registries registries )
-        throws Exception
-    {
-        Schema schema = registries.getLoadedSchema( schemaObject.getSchemaName() );
-        List<Modification> modifications = new ArrayList<Modification>();
-        
-        // The m-disabled AT
-        EntryAttribute disabledAttr = new DefaultEntryAttribute( disabledAT, "FALSE" );
-        Modification disabledMod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, disabledAttr );
-        
-        modifications.add( disabledMod );
-        
-        // The modifiersName AT
-        EntryAttribute modifiersNameAttr = 
-            new DefaultEntryAttribute( modifiersNameAT, session.getEffectivePrincipal().getName() );
-        Modification modifiersNameMod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, modifiersNameAttr );
-        
-        modifications.add( modifiersNameMod );
-        
-        // The modifyTimestamp AT
-        EntryAttribute modifyTimestampAttr = 
-            new DefaultEntryAttribute( modifyTimestampAT, DateUtils.getGeneralizedTime() );
-        Modification modifyTimestampMod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, modifyTimestampAttr );
-        
-        modifications.add( modifyTimestampMod );
-        
-        // Call the modify operation
-        DN dn = buildDn( schemaObject.getObjectType(), schemaObject.getName() );
-        
-        ModifyOperationContext modifyContext = new ModifyOperationContext( session, dn, modifications );
-        modifyContext.setByPassed( ByPassConstants.BYPASS_ALL_COLLECTION );
-
-        OperationManager operationManager = 
-            session.getDirectoryService().getOperationManager();
-        
-        operationManager.modify( modifyContext );
-        
-        // Now iterate on all the schemaObject under this schema
-        for ( SchemaObjectWrapper schemaObjectWrapper : schema.getContent() )
-        {
-            
-        }
-    }
-
     private boolean disableSchema( CoreSession session, String schemaName ) throws Exception
     {
         Schema schema = registries.getLoadedSchema( schemaName );
@@ -619,29 +538,6 @@ public class SchemaSynchronizer implemen
     }
     
     
-    private void disableAT( CoreSession session, String schemaName )
-    {
-        AttributeTypeRegistry atRegistry = registries.getAttributeTypeRegistry();
-        
-        for ( AttributeType attributeType : atRegistry )
-        {
-            if ( schemaName.equalsIgnoreCase( attributeType.getSchemaName() ) )
-            {
-                if ( attributeType.isDisabled() )
-                {
-                    continue;
-                }
-                
-                EntryAttribute disable = new DefaultEntryAttribute( disabledAT, "TRUE"  );
-                Modification modification = 
-                    new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, disable );
-                
-                //session.modify( dn, mods, ignoreReferral, log )
-            }
-        }
-    }
-
-
     /**
      * Enabling a schema consist on switching all of its schema element to enable.
      * We have to do it on a temporary registries.
@@ -709,26 +605,4 @@ public class SchemaSynchronizer implemen
             }
         }
     }
-
-    
-    /**
-     * Used to iterate through SchemaObjects in a DefaultSchemaObjectRegistry and rename
-     * their schema property to a new schema name.
-     * 
-     * @param registry the registry whose objects are changed
-     * @param originalSchemaName the original schema name
-     * @param newSchemaName the new schema name
-     */
-    private void renameSchema( DefaultSchemaObjectRegistry<? extends SchemaObject> registry, String originalSchemaName, String newSchemaName ) 
-    {
-        Iterator<? extends SchemaObject> list = registry.iterator();
-        while ( list.hasNext() )
-        {
-            SchemaObject obj = list.next();
-            if ( obj.getSchemaName().equalsIgnoreCase( originalSchemaName ) )
-            {
-                obj.setSchemaName( newSchemaName );
-            }
-        }
-    }
 }

Modified: directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayMarshaller.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayMarshaller.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayMarshaller.java (original)
+++ directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayMarshaller.java Thu May 20 20:48:34 2010
@@ -29,8 +29,6 @@ import java.util.Comparator;
 
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.util.StringTools;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -42,9 +40,6 @@ import org.slf4j.LoggerFactory;
 @SuppressWarnings("unchecked")
 public class ArrayMarshaller<E> implements Marshaller<ArrayTree<E>>
 {
-    /** static logger */
-    private static final Logger LOG = LoggerFactory.getLogger( ArrayMarshaller.class );
-
     /** used for serialized form of an empty AvlTree */
     private static final byte[] EMPTY_TREE = new byte[1];
 

Modified: directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMapImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMapImpl.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMapImpl.java (original)
+++ directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMapImpl.java Thu May 20 20:48:34 2010
@@ -128,7 +128,7 @@ public class AvlTreeMapImpl<K,V> impleme
             {
                 if( allowDuplicates )
                 {
-                    return insertDupKey( key, value, temp ); // key already exists add another value
+                    return insertDupKey( value, temp ); // key already exists add another value
                 }
                 else
                 {
@@ -168,7 +168,7 @@ public class AvlTreeMapImpl<K,V> impleme
     }
     
     
-    private V insertDupKey( K key, V value, LinkedAvlMapNode<K,V> existingNode )
+    private V insertDupKey( V value, LinkedAvlMapNode<K,V> existingNode )
     {
         AvlTree<V> dupsTree = null;
         

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java Thu May 20 20:48:34 2010
@@ -64,7 +64,6 @@ public class CoreContextFactory implemen
         }
         
         byte[] credential = getCredential( env );
-        String authentication = getAuthentication( env );
         String providerUrl = getProviderUrl( env );
 
         DirectoryService service = ( DirectoryService ) env.get( DirectoryService.JNDI_KEY );

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java Thu May 20 20:48:34 2010
@@ -36,10 +36,8 @@ import org.apache.directory.server.core.
 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.RenameOperationContext;
 import org.apache.directory.server.i18n.I18n;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -91,7 +89,7 @@ public class EventListenerAdapter implem
     }
     
     
-    private void deliverNamingExceptionEvent( Exception e, OperationContext opContext )
+    private void deliverNamingExceptionEvent( Exception e )
     {
         LOG.error( I18n.err( I18n.ERR_118 ), e );
         NamingExceptionEvent evt = null;
@@ -130,7 +128,7 @@ public class EventListenerAdapter implem
         }
         catch ( Exception e )
         {
-            deliverNamingExceptionEvent( e, opContext );
+            deliverNamingExceptionEvent( e );
         }
     }
 
@@ -153,7 +151,7 @@ public class EventListenerAdapter implem
         }
         catch ( Exception e )
         {
-            deliverNamingExceptionEvent( e, opContext );
+            deliverNamingExceptionEvent( e );
         }
     }
 
@@ -179,7 +177,7 @@ public class EventListenerAdapter implem
         }
         catch ( Exception e )
         {
-            deliverNamingExceptionEvent( e, opContext );
+            deliverNamingExceptionEvent( e );
         }
     }
 
@@ -204,7 +202,7 @@ public class EventListenerAdapter implem
         }
         catch ( Exception e )
         {
-            deliverNamingExceptionEvent( e, opContext );
+            deliverNamingExceptionEvent( e );
         }
     }
 
@@ -229,7 +227,7 @@ public class EventListenerAdapter implem
         }
         catch ( Exception e )
         {
-            deliverNamingExceptionEvent( e, opContext );
+            deliverNamingExceptionEvent( e );
         }
     }
 
@@ -254,7 +252,7 @@ public class EventListenerAdapter implem
         }
         catch ( Exception e )
         {
-            deliverNamingExceptionEvent( e, opContext );
+            deliverNamingExceptionEvent( e );
         }
     }
 }

Modified: directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockInterceptor.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockInterceptor.java (original)
+++ directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockInterceptor.java Thu May 20 20:48:34 2010
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core;
 
 
-import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.Interceptor;

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=946782&r1=946781&r2=946782&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 May 20 20:48:34 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.name.DN;
 

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=946782&r1=946781&r2=946782&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 May 20 20:48:34 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;

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=946782&r1=946781&r2=946782&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 May 20 20:48:34 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;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java Thu May 20 20:48:34 2010
@@ -122,7 +122,7 @@ public class MaxImmSubFilter implements 
                 {
                     if ( immSubCount < 0 )
                     {
-                        immSubCount = getImmSubCount( schemaManager, opContext, entryName );
+                        immSubCount = getImmSubCount( opContext, entryName );
                     }
 
                     ProtectedItem.MaxImmSub mis = ( ProtectedItem.MaxImmSub ) item;
@@ -154,7 +154,7 @@ public class MaxImmSubFilter implements 
     }
 
 
-    private int getImmSubCount( SchemaManager schemaManager, OperationContext opContext, DN entryName ) throws Exception
+    private int getImmSubCount( OperationContext opContext, DN entryName ) throws Exception
     {
         int cnt = 0;
         EntryFilteringCursor results = null;

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=946782&r1=946781&r2=946782&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 May 20 20:48:34 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;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java Thu May 20 20:48:34 2010
@@ -52,12 +52,10 @@ import org.apache.directory.shared.ldap.
  */
 public class CollectiveAttributesSchemaChecker
 {
-    private PartitionNexus nexus = null;
     private SchemaManager schemaManager = null;
     
     public CollectiveAttributesSchemaChecker( PartitionNexus nexus, SchemaManager schemaManager )
     {
-        this.nexus = nexus;
         this.schemaManager = schemaManager;
     }
     

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java Thu May 20 20:48:34 2010
@@ -226,7 +226,7 @@ public class ExceptionInterceptor extend
         
         // check if entry to delete exists
         String msg = "Attempt to delete non-existant entry: ";
-        assertHasEntry( nextInterceptor, opContext, msg, name );
+        assertHasEntry( opContext, msg, name );
 
         // check if entry to delete has children (only leaves can be deleted)
         boolean hasChildren = false;
@@ -271,7 +271,7 @@ public class ExceptionInterceptor extend
         
         // check if entry to search exists
         String msg = "Attempt to search under non-existant entry: ";
-        assertHasEntry( nextInterceptor, opContext, msg, opContext.getDn() );
+        assertHasEntry( opContext, msg, opContext.getDn() );
 
         return nextInterceptor.list( opContext );
     }
@@ -319,7 +319,7 @@ public class ExceptionInterceptor extend
             return;
         }
         
-        assertHasEntry( nextInterceptor, opContext, msg, opContext.getDn() );
+        assertHasEntry( opContext, msg, opContext.getDn() );
 
         Entry entry = opContext.lookup( opContext.getDn(), ByPassConstants.LOOKUP_BYPASS );
         List<Modification> items = opContext.getModItems();
@@ -427,11 +427,11 @@ public class ExceptionInterceptor extend
         
         // check if child to move exists
         String msg = "Attempt to move to non-existant parent: ";
-        assertHasEntry( nextInterceptor, opContext, msg, oriChildName );
+        assertHasEntry( opContext, msg, oriChildName );
 
         // check if parent to move to exists
         msg = "Attempt to move to non-existant parent: ";
-        assertHasEntry( nextInterceptor, opContext, msg, newParentName );
+        assertHasEntry( opContext, msg, newParentName );
 
         // check to see if target entry exists
         String rdn = oriChildName.get( oriChildName.size() - 1 );
@@ -481,11 +481,11 @@ public class ExceptionInterceptor extend
         
         // check if child to move exists
         String msg = "Attempt to move to non-existant parent: ";
-        assertHasEntry( nextInterceptor, opContext, msg, oriChildName );
+        assertHasEntry( opContext, msg, oriChildName );
 
         // check if parent to move to exists
         msg = "Attempt to move to non-existant parent: ";
-        assertHasEntry( nextInterceptor, opContext, msg, parent );
+        assertHasEntry( opContext, msg, parent );
 
         // check to see if target entry exists
         DN target = ( DN ) parent.clone();
@@ -532,7 +532,7 @@ public class ExceptionInterceptor extend
                 if ( !base.isEmpty() && !( subschemSubentryDn.getNormName() ).equalsIgnoreCase( base.getNormName() ) )
                 {
                     // We just check that the entry exists only if we didn't found any entry
-                    assertHasEntry( nextInterceptor, opContext, "Attempt to search under non-existant entry:" , base );
+                    assertHasEntry( opContext, "Attempt to search under non-existant entry:" , base );
                 }
             }
 
@@ -541,7 +541,7 @@ public class ExceptionInterceptor extend
         catch ( Exception ne )
         {
             String msg = I18n.err( I18n.ERR_259 );
-            assertHasEntry( nextInterceptor, opContext, msg, base );
+            assertHasEntry( opContext, msg, base );
             throw ne;
         }
     }
@@ -556,7 +556,7 @@ public class ExceptionInterceptor extend
      * @throws Exception if the entry does not exist
      * @param nextInterceptor the next interceptor in the chain
      */
-    private void assertHasEntry( NextInterceptor nextInterceptor, OperationContext opContext, 
+    private void assertHasEntry( OperationContext opContext, 
         String msg, DN dn ) throws Exception
     {
         if ( subschemSubentryDn.equals( dn ) )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java Thu May 20 20:48:34 2010
@@ -118,7 +118,6 @@ public class OperationalAttributeInterce
     /** The schemaManager */
     private SchemaManager schemaManager;
     
-    private static AttributeType CREATE_TIMESTAMP_ATTRIBUTE_TYPE;
     private static AttributeType MODIFIERS_NAME_ATTRIBUTE_TYPE;
     private static AttributeType MODIFY_TIMESTAMP_ATTRIBUTE_TYPE;
 
@@ -142,7 +141,6 @@ public class OperationalAttributeInterce
         subschemaSubentryDn = new DN( subschemaSubentry.getString() );
         subschemaSubentryDn.normalize( schemaManager.getNormalizerMapping() );
         
-        CREATE_TIMESTAMP_ATTRIBUTE_TYPE = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.CREATE_TIMESTAMP_AT );
         MODIFIERS_NAME_ATTRIBUTE_TYPE = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.MODIFIERS_NAME_AT );
         MODIFY_TIMESTAMP_ATTRIBUTE_TYPE = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.MODIFY_TIMESTAMP_AT );
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java Thu May 20 20:48:34 2010
@@ -55,13 +55,12 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.cursor.EmptyCursor;
 import org.apache.directory.shared.ldap.cursor.SingletonCursor;
 import org.apache.directory.shared.ldap.entry.BinaryValue;
-import org.apache.directory.shared.ldap.entry.DefaultModification;
 import org.apache.directory.shared.ldap.entry.DefaultEntryAttribute;
-import org.apache.directory.shared.ldap.entry.StringValue;
+import org.apache.directory.shared.ldap.entry.DefaultModification;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
-import org.apache.directory.shared.ldap.entry.ModificationOperation;
+import org.apache.directory.shared.ldap.entry.StringValue;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.exception.LdapAttributeInUseException;
 import org.apache.directory.shared.ldap.exception.LdapException;
@@ -93,7 +92,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.SyntaxChecker;
 import org.apache.directory.shared.ldap.schema.UsageEnum;
-import org.apache.directory.shared.ldap.schema.registries.OidRegistry;
 import org.apache.directory.shared.ldap.schema.registries.Schema;
 import org.apache.directory.shared.ldap.schema.registries.SchemaLoader;
 import org.apache.directory.shared.ldap.schema.syntaxCheckers.OctetStringSyntaxChecker;
@@ -116,12 +114,6 @@ public class SchemaInterceptor extends B
     /** The LoggerFactory used by this Interceptor */
     private static Logger LOG = LoggerFactory.getLogger( SchemaInterceptor.class );
 
-    private static final String[] SCHEMA_SUBENTRY_RETURN_ATTRIBUTES = new String[]
-        { 
-            SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, 
-            SchemaConstants.ALL_USER_ATTRIBUTES 
-        };
-
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
 
@@ -817,133 +809,6 @@ public class SchemaInterceptor extends B
     }
 
 
-    /**
-     * Checks to see if an attribute is required by as determined from an entry's
-     * set of objectClass attribute values.
-     *
-     * @param attrId the attribute to test if required by a set of objectClass values
-     * @param objectClass the objectClass values
-     * @return true if the objectClass values require the attribute, false otherwise
-     * @throws Exception if the attribute is not recognized
-     */
-    private boolean isRequired( String attrId, EntryAttribute objectClasses ) throws Exception
-    {
-        OidRegistry oidRegistry = schemaManager.getGlobalOidRegistry();
-
-        if ( !oidRegistry.contains( attrId ) )
-        {
-            return false;
-        }
-
-        String attrOid = schemaManager.getAttributeTypeRegistry().getOidByName( attrId );
-
-        for ( Value<?> objectClass : objectClasses )
-        {
-            ObjectClass ocSpec = schemaManager.getObjectClassRegistry().lookup( objectClass.getString() );
-
-            for ( AttributeType must : ocSpec.getMustAttributeTypes() )
-            {
-                if ( must.getOid().equals( attrOid ) )
-                {
-                    return true;
-                }
-            }
-        }
-
-        return false;
-    }
-
-
-    /**
-     * Checks to see if removing a set of attributes from an entry completely removes
-     * that attribute's values.  If change has zero size then all attributes are
-     * presumed to be removed.
-     *
-     * @param change
-     * @param entry
-     * @return
-     * @throws Exception
-     */
-    private boolean isCompleteRemoval( EntryAttribute change, Entry entry ) throws Exception
-    {
-        // if change size is 0 then all values are deleted then we're in trouble
-        if ( change.size() == 0 )
-        {
-            return true;
-        }
-
-        // can't do math to figure our if all values are removed since some
-        // values in the modify request may not be in the entry.  we need to
-        // remove the values from a cloned version of the attribute and see
-        // if nothing is left.
-        EntryAttribute changedEntryAttr = entry.get( change.getUpId() ).clone();
-
-        for ( Value<?> value : change )
-        {
-            changedEntryAttr.remove( value );
-        }
-
-        return changedEntryAttr.size() == 0;
-    }
-
-
-    /**
-     * 
-     * @param modOp
-     * @param changes
-     * @param existing
-     * @return
-     * @throws Exception
-     */
-    private EntryAttribute getResultantObjectClasses( ModificationOperation modOp, EntryAttribute changes,
-        EntryAttribute existing ) throws Exception
-    {
-        if ( ( changes == null ) && ( existing == null ) )
-        {
-            return new DefaultEntryAttribute( SchemaConstants.OBJECT_CLASS_AT, OBJECT_CLASS );
-        }
-
-        if ( changes == null )
-        {
-            return existing;
-        }
-
-        if ( ( existing == null ) && ( modOp == ModificationOperation.ADD_ATTRIBUTE ) )
-        {
-            return changes;
-        }
-        else if ( existing == null )
-        {
-            return new DefaultEntryAttribute( SchemaConstants.OBJECT_CLASS_AT, OBJECT_CLASS );
-        }
-
-        switch ( modOp )
-        {
-            case ADD_ATTRIBUTE:
-                for ( Value<?> value : changes )
-                {
-                    existing.add( value );
-                }
-
-                return existing;
-
-            case REPLACE_ATTRIBUTE:
-                return changes.clone();
-
-            case REMOVE_ATTRIBUTE:
-                for ( Value<?> value : changes )
-                {
-                    existing.remove( value );
-                }
-
-                return existing;
-
-            default:
-                throw new InternalError( "" );
-        }
-    }
-
-
     private boolean getObjectClasses( EntryAttribute objectClasses, List<ObjectClass> result ) throws Exception
     {
         Set<String> ocSeen = new HashSet<String>();

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryManager.java?rev=946782&r1=946781&r2=946782&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryManager.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryManager.java Thu May 20 20:48:34 2010
@@ -170,7 +170,7 @@ public class SchemaSubentryManager
                     break;
                     
                 case REMOVE_ATTRIBUTE :
-                    modifyRemoveOperation( opContext, opAttrOid, serverAttribute, doCascadeModify );
+                    modifyRemoveOperation( opContext, opAttrOid, serverAttribute );
                     break; 
                     
                 case REPLACE_ATTRIBUTE :
@@ -207,7 +207,7 @@ public class SchemaSubentryManager
                 for ( AttributeType attributeType:attributeTypes )
                 {
                     modifyRemoveOperation( opContext, attributeType.getOid(), 
-                        mods.get( attributeType ), doCascadeModify );
+                        mods.get( attributeType ) );
                 }
             
                 break;
@@ -227,13 +227,12 @@ public class SchemaSubentryManager
      * 
      * @param opAttrOid the numeric id of the operational attribute modified
      * @param mods the attribute with the modifications
-     * @param doCascadeModify determines if a cascading operation should be performed
      * to effect all dependents on the changed entity
      * @throws Exception if there are problems updating the registries and the
      * schema partition
      */
     private void modifyRemoveOperation( ModifyOperationContext opContext, String opAttrOid, 
-        EntryAttribute mods, boolean doCascadeModify ) throws Exception
+        EntryAttribute mods ) throws Exception
     {
         int index = opAttr2handlerIndex.get( opAttrOid );
         

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=946782&r1=946781&r2=946782&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 May 20 20:48:34 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;



Mime
View raw message