directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r613608 [8/15] - in /directory/sandbox/akarasulu/bigbang/apacheds: ./ bootstrap-plugin/ bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/ core-entry/ core-entry/src/main/java/org/apache/directory/server/core/...
Date Sun, 20 Jan 2008 16:59:36 GMT
Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java Sun Jan 20 08:59:10 2008
@@ -61,6 +61,8 @@
 import javax.swing.tree.TreeNode;
 import javax.swing.tree.TreePath;
 
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerEntryUtils;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
 import org.apache.directory.server.core.partition.impl.btree.Index;
@@ -455,7 +457,8 @@
 
                 if ( null == partition.getEntryId( ndn.toString() ) )
                 {
-                    partition.add( new AddOperationContext( ndn, attrs ) );
+                    ServerEntry serverEntry = ServerEntryUtils.toServerEntry( attrs, ndn, null );
+                    partition.add( new AddOperationContext( null, ndn, serverEntry ) );
                     load();
                 }
             }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Sun Jan 20 08:59:10 2008
@@ -21,6 +21,7 @@
 
 
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.entry.ServerEntryUtils;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
@@ -467,7 +468,7 @@
     
     public final void add( AddOperationContext addContext ) throws NamingException
     {
-        store.add( addContext.getDn(), addContext.getEntry() );
+        store.add( addContext.getDn(), ServerEntryUtils.toAttributesImpl( addContext.getEntry() ) );
     }
 
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java Sun Jan 20 08:59:10 2008
@@ -31,6 +31,11 @@
 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.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerEntryUtils;
+import org.apache.directory.server.core.entry.ServerStringValue;
+import org.apache.directory.server.core.entry.ServerValue;
 import org.apache.directory.server.core.enumeration.ReferralHandlingEnumeration;
 import org.apache.directory.server.core.enumeration.SearchResultFilter;
 import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
@@ -61,6 +66,7 @@
 import org.apache.directory.server.core.trigger.TriggerInterceptor;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.codec.util.LdapURL;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
@@ -74,7 +80,6 @@
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -111,7 +116,14 @@
 
     private ReferralLut lut = new ReferralLut();
     private PartitionNexus nexus;
-    private AttributeTypeRegistry attrRegistry;
+    
+    /** The attributeType registry */
+    private AttributeTypeRegistry atRegistry;
+    
+    /** Thre global registries */
+    private Registries registries;
+    
+    /** The OID registry */
     private OidRegistry oidRegistry;
 
     
@@ -161,9 +173,9 @@
     }
 
 
-    static boolean isReferral( Attributes entry ) throws NamingException
+    static boolean isReferral( ServerEntry entry ) throws NamingException
     {
-        Attribute oc = entry.get( SchemaConstants.OBJECT_CLASS_AT );
+        ServerAttribute oc = entry.get( SchemaConstants.OBJECT_CLASS_AT );
         
         if ( oc == null )
         {
@@ -171,108 +183,94 @@
             return false;
         }
         
-        for ( int ii = 0; ii < oc.size(); ii++ )
+        if ( oc.contains( SchemaConstants.REFERRAL_OC ) )
         {
-            if ( SchemaConstants.REFERRAL_OC.equalsIgnoreCase( ( String ) oc.get( ii ) ) )
+            //We have a referral ObjectClass, let's check that the ref is
+            // valid, accordingly to the RFC
+            
+            // Get the 'ref' attributeType
+            ServerAttribute refAttr = entry.get( SchemaConstants.REF_AT );
+            
+            if ( refAttr == null )
             {
-            	//We have a referral ObjectClass, let's check that the ref is
-            	// valid, accordingly to the RFC
-            	
-            	// Get the 'ref' attributeType
-            	Attribute ref = entry.get( SchemaConstants.REF_AT );
-            	
-            	if ( ref == null )
-            	{
-            		// very unlikely, as we have already checked the entry in SchemaInterceptor
-            		String message = "An entry with a 'referral' ObjectClass must contains a 'ref' Attribute";
-            		LOG.error( message );
-            		throw new NamingException( message );
-            	}
-            	
-            	NamingEnumeration<?> refs = ref.getAll();
-            	
-            	while ( refs.hasMoreElements() )
-            	{
-            		Object refObj = refs.nextElement(); 
-            		
-            		// it should be a String
-            		if ( refObj instanceof String )
-            		{
-            			String refVal = (String)refObj;
-            			
-            			try
-            			{
-            				LdapURL ldapUrl = new LdapURL( refVal );
-            				
-            				// We have a LDAP URL, we have to check that :
-            				// - we don't have scope specifier
-            				// - we don't have filters
-            				// - we don't have attribute description list
-            				// - we don't have extensions
-            				// - the DN is not empty
-            				
-            				if ( ldapUrl.getScope() != SearchControls.OBJECT_SCOPE )
-            				{
-            					// This is the default value if we don't have any scope
-            					// Let's assume that it's incorrect if we get something
-            					// else in the LdapURL
-            					String message = "An LDAPURL should not contains a scope";
-            					LOG.error( message );
-            					throw new NamingException( message );
-            				}
-            				
-            				if ( !StringTools.isEmpty( ldapUrl.getFilter() ) )
-            				{
-            					String message = "An LDAPURL should not contains filters";
-            					LOG.error( message );
-            					throw new NamingException( message );
-            				}
-            				
-            				if ( ( ldapUrl.getAttributes() != null ) && ( ldapUrl.getAttributes().size() != 0 ) )
-            				{
-            					String message = "An LDAPURL should not contains any description attribute list";
-            					LOG.error( message );
-            					throw new NamingException( message );
-            				}
-            				
-            				if ( ( ldapUrl.getExtensions() != null ) && ( ldapUrl.getExtensions().size() != 0 ) )
-            				{
-            					String message = "An LDAPURL should not contains any extension";
-            					LOG.error( message );
-            					throw new NamingException( message );
-            				}
-            				
-            				if ( ( ldapUrl.getCriticalExtensions() != null ) && ( ldapUrl.getCriticalExtensions().size() != 0 ) )
-            				{
-            					String message = "An LDAPURL should not contains any critical extension";
-            					LOG.error( message );
-            					throw new NamingException( message );
-            				}
-            				
-            				LdapDN dn = ldapUrl.getDn();
-            				
-            				if ( ( dn == null ) || dn.isEmpty() )
-            				{
-            					String message = "An LDAPURL should contains a non-empty DN";
-            					LOG.error( message );
-            					throw new NamingException( message );
-            				}
-            			}
-            			catch ( LdapURLEncodingException luee )
-            			{
-            				// Either the URL is invalid, or it's not a LDAP URL.
-            				// we will just ignore this LdapURL.
-                        }
-            		}
-            		else
-            		{
-            			String message = "Invalid referral value, it should be a String";
-            			LOG.error( message );
-            			throw new NamingException( message );
-            		}
-            	}
-                return true;
+                // very unlikely, as we have already checked the entry in SchemaInterceptor
+                String message = "An entry with a 'referral' ObjectClass must contains a 'ref' Attribute";
+                LOG.error( message );
+                throw new NamingException( message );
+            }
+            
+            for ( ServerValue<?> value:refAttr )
+            {
+                ServerStringValue ref = (ServerStringValue)value; 
+                
+                String refVal = ref.get();
+                
+                try
+                {
+                    LdapURL ldapUrl = new LdapURL( refVal );
+                    
+                    // We have a LDAP URL, we have to check that :
+                    // - we don't have scope specifier
+                    // - we don't have filters
+                    // - we don't have attribute description list
+                    // - we don't have extensions
+                    // - the DN is not empty
+                    
+                    if ( ldapUrl.getScope() != SearchControls.OBJECT_SCOPE )
+                    {
+                        // This is the default value if we don't have any scope
+                        // Let's assume that it's incorrect if we get something
+                        // else in the LdapURL
+                        String message = "An LDAPURL should not contains a scope";
+                        LOG.error( message );
+                        throw new NamingException( message );
+                    }
+                    
+                    if ( !StringTools.isEmpty( ldapUrl.getFilter() ) )
+                    {
+                        String message = "An LDAPURL should not contains filters";
+                        LOG.error( message );
+                        throw new NamingException( message );
+                    }
+                    
+                    if ( ( ldapUrl.getAttributes() != null ) && ( ldapUrl.getAttributes().size() != 0 ) )
+                    {
+                        String message = "An LDAPURL should not contains any description attribute list";
+                        LOG.error( message );
+                        throw new NamingException( message );
+                    }
+                    
+                    if ( ( ldapUrl.getExtensions() != null ) && ( ldapUrl.getExtensions().size() != 0 ) )
+                    {
+                        String message = "An LDAPURL should not contains any extension";
+                        LOG.error( message );
+                        throw new NamingException( message );
+                    }
+                    
+                    if ( ( ldapUrl.getCriticalExtensions() != null ) && ( ldapUrl.getCriticalExtensions().size() != 0 ) )
+                    {
+                        String message = "An LDAPURL should not contains any critical extension";
+                        LOG.error( message );
+                        throw new NamingException( message );
+                    }
+                    
+                    LdapDN dn = ldapUrl.getDn();
+                    
+                    if ( ( dn == null ) || dn.isEmpty() )
+                    {
+                        String message = "An LDAPURL should contains a non-empty DN";
+                        LOG.error( message );
+                        throw new NamingException( message );
+                    }
+                }
+                catch ( LdapURLEncodingException luee )
+                {
+                    // Either the URL is invalid, or it's not a LDAP URL.
+                    // we will just ignore this LdapURL.
+                }
             }
+            
+            return true;
         }
         
         return false;
@@ -282,8 +280,9 @@
     public void init( DirectoryService directoryService ) throws NamingException
     {
         nexus = directoryService.getPartitionNexus();
-        attrRegistry = directoryService.getRegistries().getAttributeTypeRegistry();
-        oidRegistry = directoryService.getRegistries().getOidRegistry();
+        registries = directoryService.getRegistries();
+        atRegistry = registries.getAttributeTypeRegistry();
+        oidRegistry = registries.getOidRegistry();
 
         Iterator<String> suffixes = nexus.listSuffixes( null );
         
@@ -291,19 +290,19 @@
         {
             LdapDN suffix = new LdapDN( suffixes.next() );
             addReferrals( nexus.search( new SearchOperationContext(
-                    suffix, AliasDerefMode.DEREF_ALWAYS, getReferralFilter(), getControls() ) ), suffix );
+                    registries, suffix, AliasDerefMode.DEREF_ALWAYS, getReferralFilter(), getControls() ) ), suffix );
         }
     }
 
 
-    public void doReferralException( LdapDN farthest, LdapDN targetUpdn, Attribute refs ) throws NamingException
+    public void doReferralException( LdapDN farthest, LdapDN targetUpdn, ServerAttribute refs ) throws NamingException
     {
         // handle referral here
         List<String> list = new ArrayList<String>( refs.size() );
         
-        for ( int ii = 0; ii < refs.size(); ii++ )
+        for ( ServerValue<?> value:refs )
         {
-            String val = ( String ) refs.get( ii );
+            String val = (String)value.get();
 
             // need to add non-ldap URLs as-is
             if ( !val.startsWith( "ldap" ) )
@@ -324,7 +323,7 @@
             }
 
             LdapDN urlDn = new LdapDN( ldapUrl.getDn().toNormName() );
-            urlDn.normalize( attrRegistry.getNormalizerMapping() );
+            urlDn.normalize( atRegistry.getNormalizerMapping() );
             
             if ( urlDn.equals( farthest ) )
             {
@@ -383,7 +382,7 @@
         ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
         String refval = ( String ) caller.getEnvironment().get( Context.REFERRAL );
         LdapDN name = opContext.getDn();
-        Attributes entry = opContext.getEntry();
+        ServerEntry entry = opContext.getEntry();
 
         // handle a normal add without following referrals
         if ( ( refval == null ) || refval.equals( IGNORE ) )
@@ -410,9 +409,14 @@
                 return;
             }
 
-            Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
-            AttributeType refsType = attrRegistry.lookup( oidRegistry.getOid( SchemaConstants.REF_AT ) );
-            Attribute refs = AttributeUtils.getAttribute( referral, refsType );
+            ServerEntry referral = ServerEntryUtils.toServerEntry( 
+                invocation.getProxy().lookup( 
+                    new LookupOperationContext( registries, farthest ), 
+                    PartitionNexusProxy.LOOKUP_BYPASS ),
+                farthest, registries );
+            
+            AttributeType refsType = atRegistry.lookup( oidRegistry.getOid( SchemaConstants.REF_AT ) );
+            ServerAttribute refs = referral.get( refsType );
             doReferralException( farthest, new LdapDN( name.getUpName() ), refs );
         }
         else if ( refval.equals( FOLLOW ) )
@@ -450,8 +454,12 @@
                 return next.compare( opContext );
             }
 
-            Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
-            Attribute refs = referral.get( SchemaConstants.REF_AT );
+            ServerEntry referral = ServerEntryUtils.toServerEntry( 
+                invocation.getProxy().lookup( 
+                    new LookupOperationContext( registries, farthest ), 
+                    PartitionNexusProxy.LOOKUP_BYPASS ),
+                farthest, registries );
+            ServerAttribute refs = referral.get( SchemaConstants.REF_AT );
             doReferralException( farthest, new LdapDN( name.getUpName() ), refs );
 
             // we really can't get here since doReferralException will throw an exception
@@ -505,9 +513,14 @@
                 return;
             }
 
-            Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
-            Attribute refs = referral.get( SchemaConstants.REF_AT );
+            ServerEntry referral = ServerEntryUtils.toServerEntry( 
+                invocation.getProxy().lookup( 
+                    new LookupOperationContext( registries, farthest ), 
+                    PartitionNexusProxy.LOOKUP_BYPASS ),
+                farthest, registries );
+            ServerAttribute refs = referral.get( SchemaConstants.REF_AT );
             doReferralException( farthest, new LdapDN( name.getUpName() ), refs );
+            
         }
         else if ( refval.equals( FOLLOW ) )
         {
@@ -577,9 +590,12 @@
             }
             else if ( farthestSrc != null )
             {
-                Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthestSrc ),
-                    PartitionNexusProxy.LOOKUP_BYPASS );
-                Attribute refs = referral.get( SchemaConstants.REF_AT );
+                ServerEntry referral = ServerEntryUtils.toServerEntry( 
+                    invocation.getProxy().lookup( 
+                        new LookupOperationContext( registries, farthestSrc ), 
+                        PartitionNexusProxy.LOOKUP_BYPASS ),
+                    farthestSrc, registries );
+                ServerAttribute refs = referral.get( SchemaConstants.REF_AT );
                 doReferralException( farthestSrc, new LdapDN( oldName.getUpName() ), refs );
             }
             else if ( farthestDst != null )
@@ -649,10 +665,14 @@
             }
             else if ( farthestSrc != null )
             {
-                Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthestSrc ),
-                    PartitionNexusProxy.LOOKUP_BYPASS );
-                Attribute refs = referral.get( SchemaConstants.REF_AT );
+                ServerEntry referral = ServerEntryUtils.toServerEntry( 
+                    invocation.getProxy().lookup( 
+                        new LookupOperationContext( registries, farthestSrc ), 
+                        PartitionNexusProxy.LOOKUP_BYPASS ),
+                    farthestSrc, registries );
+                ServerAttribute refs = referral.get( SchemaConstants.REF_AT );
                 doReferralException( farthestSrc, new LdapDN( oldName.getUpName() ), refs );
+                
             }
             else if ( farthestDst != null )
             {
@@ -726,10 +746,14 @@
             
             if ( farthestSrc != null )
             {
-                Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthestSrc ),
-                    PartitionNexusProxy.LOOKUP_BYPASS );
-                Attribute refs = referral.get( SchemaConstants.REF_AT );
+                ServerEntry referral = ServerEntryUtils.toServerEntry( 
+                    invocation.getProxy().lookup( 
+                        new LookupOperationContext( registries, farthestSrc ), 
+                        PartitionNexusProxy.LOOKUP_BYPASS ),
+                    farthestSrc, registries );
+                ServerAttribute refs = referral.get( SchemaConstants.REF_AT );
                 doReferralException( farthestSrc, new LdapDN( oldName.getUpName() ), refs );
+                
             }
             else if ( farthestDst != null )
             {
@@ -855,8 +879,12 @@
                 return;
             }
 
-            Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
-            Attribute refs = referral.get( SchemaConstants.REF_AT );
+            ServerEntry referral = ServerEntryUtils.toServerEntry( 
+                invocation.getProxy().lookup( 
+                    new LookupOperationContext( registries, farthest ), 
+                    PartitionNexusProxy.LOOKUP_BYPASS ),
+                    farthest, registries );
+            ServerAttribute refs = referral.get( SchemaConstants.REF_AT );
             doReferralException( farthest, new LdapDN( name.getUpName() ), refs );
         }
         else if ( refval.equals( FOLLOW ) )
@@ -894,7 +922,7 @@
         Partition partition = opContext.getPartition();
         LdapDN suffix = partition.getSuffixDn();
         Invocation invocation = InvocationStack.getInstance().peek();
-        NamingEnumeration<SearchResult> list = invocation.getProxy().search( new SearchOperationContext( suffix,
+        NamingEnumeration<SearchResult> list = invocation.getProxy().search( new SearchOperationContext( registries, suffix,
                 AliasDerefMode.DEREF_ALWAYS, getReferralFilter(), getControls() ), SEARCH_BYPASS );
         addReferrals( list, suffix );
     }
@@ -905,7 +933,7 @@
         // remove referrals immediately before removing the partition
         Invocation invocation = InvocationStack.getInstance().peek();
         NamingEnumeration<SearchResult> list = invocation.getProxy().search( 
-            new SearchOperationContext( opContext.getDn(), AliasDerefMode.DEREF_ALWAYS,
+            new SearchOperationContext( registries, opContext.getDn(), AliasDerefMode.DEREF_ALWAYS,
                     getReferralFilter(), getControls() ), SEARCH_BYPASS );
         
         deleteReferrals( list, opContext.getDn() );
@@ -920,7 +948,7 @@
             SearchResult r = referrals.next();
             LdapDN referral;
             LdapDN result = new LdapDN( r.getName() );
-            result.normalize( attrRegistry.getNormalizerMapping() );
+            result.normalize( atRegistry.getNormalizerMapping() );
             
             if ( r.isRelative() )
             {
@@ -941,7 +969,7 @@
             SearchResult r = referrals.next();
             LdapDN referral;
             LdapDN result = new LdapDN( r.getName() );
-            result.normalize( attrRegistry.getNormalizerMapping() );
+            result.normalize( atRegistry.getNormalizerMapping() );
 
             if ( r.isRelative() )
             {
@@ -981,7 +1009,7 @@
         {
             if ( lut.isReferral( base ) )
             {
-                Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( base ), PartitionNexusProxy.LOOKUP_BYPASS );
+                Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( registries, base ), PartitionNexusProxy.LOOKUP_BYPASS );
                 Attribute refs = referral.get( SchemaConstants.REF_AT );
                 doReferralExceptionOnSearchBase( base, refs, controls.getSearchScope() );
             }
@@ -993,7 +1021,7 @@
                 return next.search( opContext );
             }
 
-            Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
+            Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( registries, farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
             Attribute refs = referral.get( SchemaConstants.REF_AT );
             doReferralExceptionOnSearchBase( farthest, new LdapDN( base.getUpName() ), refs, controls.getSearchScope() );
             throw new IllegalStateException( "Should never get here: shutting up compiler" );
@@ -1003,7 +1031,7 @@
         {
             if ( lut.isReferral( base ) )
             {
-                Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( base ), PartitionNexusProxy.LOOKUP_BYPASS );
+                Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( registries, base ), PartitionNexusProxy.LOOKUP_BYPASS );
                 Attribute refs = referral.get( SchemaConstants.REF_AT );
                 doReferralExceptionOnSearchBase( base, refs, controls.getSearchScope() );
             }
@@ -1014,10 +1042,10 @@
             {
                 SearchResultFilteringEnumeration srfe = 
                     ( SearchResultFilteringEnumeration ) next.search( opContext );
-                return new ReferralHandlingEnumeration( srfe, lut, attrRegistry, nexus, controls.getSearchScope(), true );
+                return new ReferralHandlingEnumeration( srfe, lut, opContext.getRegistries(), nexus, controls.getSearchScope(), true );
             }
 
-            Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
+            Attributes referral = invocation.getProxy().lookup( new LookupOperationContext( registries, farthest ), PartitionNexusProxy.LOOKUP_BYPASS );
             Attribute refs = referral.get( SchemaConstants.REF_AT );
             doReferralExceptionOnSearchBase( farthest, new LdapDN( base.getUpName() ), refs, controls.getSearchScope() );
             throw new IllegalStateException( "Should never get here: shutting up compiler" );
@@ -1139,7 +1167,7 @@
             }
 
             LdapDN urlDn = new LdapDN( ldapUrl.getDn().toNormName() );
-            urlDn.normalize( attrRegistry.getNormalizerMapping() );
+            urlDn.normalize( atRegistry.getNormalizerMapping() );
             int diff = targetUpdn.size() - farthest.size();
             LdapDN extra = new LdapDN();
             
@@ -1203,7 +1231,7 @@
         }
 
         LdapDN dn = new LdapDN( name );
-        dn.normalize( attrRegistry.getNormalizerMapping() );
+        dn.normalize( atRegistry.getNormalizerMapping() );
 
         return lut.isReferral( dn );
     }
@@ -1217,6 +1245,6 @@
      */
     public boolean isReferral( LdapDN name ) throws NamingException
     {
-  		return lut.isReferral( name.isNormalized() ? name :  LdapDN.normalize( name, attrRegistry.getNormalizerMapping() ) );
+  		return lut.isReferral( name.isNormalized() ? name :  LdapDN.normalize( name, atRegistry.getNormalizerMapping() ) );
     }
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java Sun Jan 20 08:59:10 2008
@@ -21,6 +21,8 @@
 
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
@@ -29,11 +31,8 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
-import org.apache.directory.shared.ldap.util.AttributeUtils;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
 import javax.naming.directory.SearchResult;
 import java.util.HashSet;
 import java.util.List;
@@ -63,7 +62,7 @@
     }
     
     
-    protected void checkOidIsUnique( Attributes entry ) throws NamingException
+    protected void checkOidIsUnique( ServerEntry entry ) throws NamingException
     {
         String oid = getOid( entry );
 
@@ -97,19 +96,19 @@
     }
     
     
-    protected abstract void modify( LdapDN name, Attributes entry, Attributes targetEntry, boolean cascade ) 
+    protected abstract void modify( LdapDN name, ServerEntry entry, ServerEntry targetEntry, boolean cascade ) 
         throws NamingException;
     
     
-    public final void modify( LdapDN name, int modOp, Attributes mods, Attributes entry, Attributes targetEntry, 
+    public final void modify( LdapDN name, int modOp, ServerEntry mods, ServerEntry entry, ServerEntry targetEntry, 
         boolean cascade ) throws NamingException
     {
         modify( name, entry, targetEntry, cascade );
     }
 
 
-    public final void modify( LdapDN name, List<ModificationItemImpl> mods, Attributes entry,
-        Attributes targetEntry, boolean cascade ) throws NamingException
+    public final void modify( LdapDN name, List<ModificationItemImpl> mods, ServerEntry entry,
+        ServerEntry targetEntry, boolean cascade ) throws NamingException
     {
         modify( name, entry, targetEntry, cascade );
     }
@@ -130,14 +129,16 @@
     }
     
     
-    protected String getOid( Attributes entry ) throws NamingException
+    protected String getOid( ServerEntry entry ) throws NamingException
     {
-        Attribute oid = AttributeUtils.getAttribute( entry, m_oidAT );
+        ServerAttribute oid = entry.get( m_oidAT );
+        
         if ( oid == null )
         {
             return null;
         }
-        return ( String ) oid.get();
+        
+        return oid.getString();
     }
     
     

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/AttributeClassLoader.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/AttributeClassLoader.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/AttributeClassLoader.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/AttributeClassLoader.java Sun Jan 20 08:59:10 2008
@@ -23,7 +23,11 @@
 
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
+import javax.naming.directory.InvalidAttributeValueException;
+
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerBinaryValue;
+import org.apache.directory.server.core.entry.ServerValue;
 
 
 /**
@@ -34,7 +38,7 @@
  */
 public class AttributeClassLoader extends ClassLoader
 {
-    public Attribute attribute;
+    public ServerAttribute attribute;
     
 
     public AttributeClassLoader()
@@ -43,26 +47,32 @@
     }
     
     
-    public void setAttribute( Attribute attribute )
+    public void setAttribute( ServerAttribute attribute ) throws NamingException
     {
+        if ( attribute.getType().getSyntax().isHumanReadable() )
+        {
+            throw new InvalidAttributeValueException( "The attribute must be binary" );
+        }
+        
         this.attribute = attribute;
     }
 
     
-    @SuppressWarnings("unchecked")
-    public Class findClass( String name ) throws ClassNotFoundException
+    public Class<?> findClass( String name ) throws ClassNotFoundException
     {
         byte[] classBytes = null;
         
-        try
+        ServerValue<?> value = attribute.get();
+        
+        if ( value instanceof ServerBinaryValue )
         {
-            classBytes = ( byte[] ) attribute.get();
+            classBytes = ((ServerBinaryValue)value).get();
+
+            return defineClass( name, classBytes, 0, classBytes.length );
         }
-        catch ( NamingException e )
+        else
         {
-            throw new ClassNotFoundException( "Failed to access attribute bytes.", e );
+            throw new ClassNotFoundException( "Failed to access attribute bytes." );
         }
-        
-        return defineClass( name, classBytes, 0, classBytes.length );
     }
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java Sun Jan 20 08:59:10 2008
@@ -24,9 +24,10 @@
 import java.util.List;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerValue;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
@@ -132,7 +133,7 @@
     }
 
     
-    public SyntaxCheckerDescription[] parseSyntaxCheckers( Attribute attr ) throws NamingException
+    public SyntaxCheckerDescription[] parseSyntaxCheckers( ServerAttribute attr ) throws NamingException
     {
         if ( attr == null || attr.size() == 0 )
         {
@@ -141,17 +142,19 @@
         
         SyntaxCheckerDescription[] syntaxCheckerDescriptions = new SyntaxCheckerDescription[attr.size()];
         
-        for ( int ii = 0; ii < attr.size(); ii++ )
+        int pos = 0;
+        
+        for ( ServerValue<?> value:attr )
         {
             try
             {
-                syntaxCheckerDescriptions[ii] = 
-                    syntaxCheckerParser.parseSyntaxCheckerDescription( ( String ) attr.get( ii ) );
+                syntaxCheckerDescriptions[pos++] = 
+                    syntaxCheckerParser.parseSyntaxCheckerDescription( (String)value.get() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( 
-                    "The following does not conform to the syntaxCheckerDescription syntax: " + attr.get( ii ), 
+                    "The following does not conform to the syntaxCheckerDescription syntax: " + value, 
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
                 iave.setRootCause( e );
                 throw iave;
@@ -162,7 +165,7 @@
     }
     
     
-    public NormalizerDescription[] parseNormalizers( Attribute attr ) throws NamingException
+    public NormalizerDescription[] parseNormalizers( ServerAttribute attr ) throws NamingException
     {
         if ( attr == null || attr.size() == 0 )
         {
@@ -171,16 +174,18 @@
         
         NormalizerDescription[] normalizerDescriptions = new NormalizerDescription[attr.size()];
         
-        for ( int ii = 0; ii < attr.size(); ii++ )
+        int pos = 0;
+        
+        for ( ServerValue<?> value:attr )
         {
             try
             {
-                normalizerDescriptions[ii] = normalizerParser.parseNormalizerDescription( ( String ) attr.get( ii ) );
+                normalizerDescriptions[pos++] = normalizerParser.parseNormalizerDescription( (String)value.get() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( 
-                    "The following does not conform to the normalizerDescription syntax: " + attr.get( ii ), 
+                    "The following does not conform to the normalizerDescription syntax: " + value.get(), 
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
                 iave.setRootCause( e );
                 throw iave;
@@ -191,7 +196,7 @@
     }
     
 
-    public ComparatorDescription[] parseComparators( Attribute attr ) throws NamingException
+    public ComparatorDescription[] parseComparators( ServerAttribute attr ) throws NamingException
     {
         if ( attr == null || attr.size() == 0 )
         {
@@ -200,16 +205,18 @@
         
         ComparatorDescription[] comparatorDescriptions = new ComparatorDescription[attr.size()];
         
-        for ( int ii = 0; ii < attr.size(); ii++ )
+        int pos = 0;
+        
+        for ( ServerValue<?> value:attr )
         {
             try
             {
-                comparatorDescriptions[ii] = comparatorParser.parseComparatorDescription( ( String ) attr.get( ii ) );
+                comparatorDescriptions[pos++] = comparatorParser.parseComparatorDescription( ( String ) value.get() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( 
-                    "The following does not conform to the comparatorDescription syntax: " + attr.get( ii ), 
+                    "The following does not conform to the comparatorDescription syntax: " + value.get(), 
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
                 iave.setRootCause( e );
                 throw iave;
@@ -228,7 +235,7 @@
      * @return the set of attributeType objects for the descriptions 
      * @throws NamingException if there are problems parsing the descriptions
      */
-    public AttributeType[] parseAttributeTypes( Attribute attr ) throws NamingException
+    public AttributeType[] parseAttributeTypes( ServerAttribute attr ) throws NamingException
     {
         if ( attr == null || attr.size() == 0 )
         {
@@ -237,18 +244,20 @@
         
         AttributeType[] attributeTypes = new AttributeType[attr.size()];
         
-        for ( int ii = 0; ii < attr.size(); ii++ )
+        int pos = 0;
+        
+        for ( ServerValue<?> value:attr )
         {
             AttributeTypeDescription desc = null;
             
             try
             {
-                desc = attributeTypeParser.parseAttributeTypeDescription( ( String ) attr.get( ii ) );
+                desc = attributeTypeParser.parseAttributeTypeDescription( ( String ) value.get() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( 
-                    "The following does not conform to the attributeTypeDescription syntax: " + attr.get( ii ), 
+                    "The following does not conform to the attributeTypeDescription syntax: " + value.get(), 
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
                 iave.setRootCause( e );
                 throw iave;
@@ -346,7 +355,7 @@
             
             setSchemaObjectProperties( desc, at );
 
-            attributeTypes[ii] = at;
+            attributeTypes[pos++] = at;
         }
         
         return attributeTypes;
@@ -361,7 +370,7 @@
      * @return the set of objectClass objects for the descriptions 
      * @throws NamingException if there are problems parsing the descriptions
      */
-    public ObjectClass[] parseObjectClasses( Attribute attr ) throws NamingException
+    public ObjectClass[] parseObjectClasses( ServerAttribute attr ) throws NamingException
     {
         if ( attr == null || attr.size() == 0 )
         {
@@ -370,18 +379,20 @@
         
         ObjectClass[] objectClasses = new ObjectClass[attr.size()];
         
-        for ( int ii = 0; ii < attr.size(); ii++ )
+        int pos = 0;
+        
+        for ( ServerValue<?> value:attr )
         {
             ObjectClassDescription desc = null;
             
             try
             {
-                desc = objectClassParser.parseObjectClassDescription( ( String ) attr.get( ii ) );
+                desc = objectClassParser.parseObjectClassDescription( ( String ) value.get() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( 
-                    "The following does not conform to the objectClassDescription syntax: " + attr.get( ii ), 
+                    "The following does not conform to the objectClassDescription syntax: " + value.get(), 
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
                 iave.setRootCause( e );
                 throw iave;
@@ -445,7 +456,7 @@
             oc.setType( desc.getKind() );
             setSchemaObjectProperties( desc, oc );
             
-            objectClasses[ii] = oc;
+            objectClasses[pos++] = oc;
         }
         
         return objectClasses;
@@ -460,7 +471,7 @@
      * @return the set of matchingRuleUse objects for the descriptions 
      * @throws NamingException if there are problems parsing the descriptions
      */
-    public MatchingRuleUse[] parseMatchingRuleUses( Attribute attr ) throws NamingException
+    public MatchingRuleUse[] parseMatchingRuleUses( ServerAttribute attr ) throws NamingException
     {
         if ( attr == null || attr.size() == 0 )
         {
@@ -469,18 +480,20 @@
         
         MatchingRuleUse[] matchingRuleUses = new MatchingRuleUse[attr.size()];
         
-        for ( int ii = 0; ii < attr.size(); ii++ )
+        int pos = 0;
+        
+        for ( ServerValue<?> value:attr )
         {
             MatchingRuleUseDescription desc = null;
             
             try
             {
-                desc = matchingRuleUseParser.parseMatchingRuleUseDescription( ( String ) attr.get( ii ) );
+                desc = matchingRuleUseParser.parseMatchingRuleUseDescription( ( String ) value.get() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( 
-                    "The following does not conform to the matchingRuleUseDescription syntax: " + attr.get( ii ), 
+                    "The following does not conform to the matchingRuleUseDescription syntax: " + value.get(), 
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
                 iave.setRootCause( e );
                 throw iave;
@@ -490,7 +503,7 @@
             mru.setApplicableAttributesOids( desc.getApplicableAttributes().toArray( EMPTY ) );
             setSchemaObjectProperties( desc, mru );
             
-            matchingRuleUses[ii] = mru;
+            matchingRuleUses[pos++] = mru;
         }
 
         return matchingRuleUses;
@@ -505,7 +518,7 @@
      * @return the set of Syntax objects for the descriptions 
      * @throws NamingException if there are problems parsing the descriptions
      */
-    public Syntax[] parseSyntaxes( Attribute attr ) throws NamingException
+    public Syntax[] parseSyntaxes( ServerAttribute attr ) throws NamingException
     {
         if ( attr == null || attr.size() == 0 )
         {
@@ -513,19 +526,21 @@
         }
         
         Syntax[] syntaxes = new Syntax[attr.size()];
+
+        int pos = 0;
         
-        for ( int ii = 0; ii < attr.size(); ii++ )
+        for ( ServerValue<?> value:attr )
         {
             LdapSyntaxDescription desc = null;
             
             try
             {
-                desc = syntaxParser.parseLdapSyntaxDescription( ( String ) attr.get( ii ) );
+                desc = syntaxParser.parseLdapSyntaxDescription( ( String ) value.get() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( 
-                    "The following does not conform to the ldapSyntaxDescription syntax: " + attr.get( ii ), 
+                    "The following does not conform to the ldapSyntaxDescription syntax: " + value.get(), 
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
                 iave.setRootCause( e );
                 throw iave;
@@ -542,7 +557,7 @@
             SyntaxImpl syntax = new SyntaxImpl( desc.getNumericOid(), globalRegistries.getSyntaxCheckerRegistry() );
             setSchemaObjectProperties( desc, syntax );
             syntax.setHumanReadable( isHumanReadable( desc ) );
-            syntaxes[ii] = syntax;
+            syntaxes[pos++] = syntax;
         }
         
         return syntaxes;
@@ -557,7 +572,7 @@
      * @return the set of matchingRule objects for the descriptions 
      * @throws NamingException if there are problems parsing the descriptions
      */
-    public MatchingRule[] parseMatchingRules( Attribute attr ) throws NamingException
+    public MatchingRule[] parseMatchingRules( ServerAttribute attr ) throws NamingException
     {
         if ( attr == null || attr.size() == 0 )
         {
@@ -566,18 +581,20 @@
         
         MatchingRule[] matchingRules = new MatchingRule[attr.size()];
 
-        for ( int ii = 0; ii < attr.size(); ii++ )
+        int pos = 0;
+        
+        for ( ServerValue<?> value:attr )
         {
             MatchingRuleDescription desc = null;
 
             try
             {
-                desc = matchingRuleParser.parseMatchingRuleDescription( ( String ) attr.get( ii ) );
+                desc = matchingRuleParser.parseMatchingRuleDescription( ( String ) value.get() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( 
-                    "The following does not conform to the matchingRuleDescription syntax: " + attr.get( ii ), 
+                    "The following does not conform to the matchingRuleDescription syntax: " + value.get(), 
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
                 iave.setRootCause( e );
                 throw iave;
@@ -593,7 +610,7 @@
             MatchingRuleImpl mr = new MatchingRuleImpl( desc.getNumericOid(), desc.getSyntax(), globalRegistries );
             setSchemaObjectProperties( desc, mr );
             
-            matchingRules[ii] = mr;
+            matchingRules[pos++] = mr;
         }
         
         return matchingRules;
@@ -608,7 +625,7 @@
      * @return the set of DITStructureRule objects for the descriptions 
      * @throws NamingException if there are problems parsing the descriptions
      */
-    public DITStructureRule[] parseDitStructureRules( Attribute attr ) throws NamingException
+    public DITStructureRule[] parseDitStructureRules( ServerAttribute attr ) throws NamingException
     {
         if ( attr == null || attr.size() == 0 )
         {
@@ -617,18 +634,20 @@
         
         DITStructureRule[] ditStructureRules = new DITStructureRule[attr.size()];
         
-        for ( int ii = 0; ii < attr.size(); ii++ )
+        int pos = 0;
+        
+        for ( ServerValue<?> value:attr )
         {
             DITStructureRuleDescription desc = null;
      
             try
             {
-                desc = ditStructureRuleParser.parseDITStructureRuleDescription( ( String ) attr.get( ii  ) );
+                desc = ditStructureRuleParser.parseDITStructureRuleDescription( ( String ) value.get() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( 
-                    "The following does not conform to the ditStructureRuleDescription syntax: " + attr.get( ii ), 
+                    "The following does not conform to the ditStructureRuleDescription syntax: " + value.get(), 
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
                 iave.setRootCause( e );
                 throw iave;
@@ -640,7 +659,7 @@
             
             setSchemaObjectProperties( desc, dsr );
 
-            ditStructureRules[ii] = dsr;
+            ditStructureRules[pos++] = dsr;
         }
         
         return ditStructureRules;
@@ -655,7 +674,7 @@
      * @return the set of DITContentRule objects for the descriptions 
      * @throws NamingException if there are problems parsing the descriptions
      */
-    public DITContentRule[] parseDitContentRules( Attribute attr ) throws NamingException
+    public DITContentRule[] parseDitContentRules( ServerAttribute attr ) throws NamingException
     {
         if ( attr == null || attr.size() == 0 )
         {
@@ -663,19 +682,21 @@
         }
         
         DITContentRule[] ditContentRules = new DITContentRule[attr.size()];
+
+        int pos = 0;
         
-        for ( int ii = 0; ii < attr.size(); ii++ )
+        for ( ServerValue<?> value:attr )
         {
             DITContentRuleDescription desc = null;
      
             try
             {
-                desc = ditContentRuleParser.parseDITContentRuleDescription( ( String ) attr.get( ii  ) );
+                desc = ditContentRuleParser.parseDITContentRuleDescription( ( String ) value.get() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( 
-                    "The following does not conform to the ditContentRuleDescription syntax: " + attr.get( ii ), 
+                    "The following does not conform to the ditContentRuleDescription syntax: " + value.get(), 
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
                 iave.setRootCause( e );
                 throw iave;
@@ -689,7 +710,7 @@
             
             setSchemaObjectProperties( desc, dcr );
 
-            ditContentRules[ii] = dcr;
+            ditContentRules[pos++] = dcr;
         }
         
         return ditContentRules;
@@ -704,7 +725,7 @@
      * @return the set of NameFormRule objects for the descriptions 
      * @throws NamingException if there are problems parsing the descriptions
      */
-    public NameForm[] parseNameForms( Attribute attr ) throws NamingException
+    public NameForm[] parseNameForms( ServerAttribute attr ) throws NamingException
     {
         if ( attr == null || attr.size() == 0 )
         {
@@ -712,19 +733,21 @@
         }
         
         NameForm[] nameForms = new NameForm[attr.size()];
+
+        int pos = 0;
         
-        for ( int ii = 0; ii < attr.size(); ii++ )
+        for ( ServerValue<?> value:attr )
         {
             NameFormDescription desc = null;
             
             try
             {
-                desc = nameFormParser.parseNameFormDescription( ( String  ) attr.get( ii ) );
+                desc = nameFormParser.parseNameFormDescription( ( String  ) value.get() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( 
-                    "The following does not conform to the nameFormDescription syntax: " + attr.get( ii ), 
+                    "The following does not conform to the nameFormDescription syntax: " + value.get(), 
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
                 iave.setRootCause( e );
                 throw iave;
@@ -737,7 +760,7 @@
             
             setSchemaObjectProperties( desc, nf );
             
-            nameForms[ii] = nf;
+            nameForms[pos++] = nf;
         }
         
         return nameForms;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java Sun Jan 20 08:59:10 2008
@@ -23,17 +23,16 @@
 import java.util.Set;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
@@ -64,7 +63,7 @@
     }
 
 
-    protected void modify( LdapDN name, Attributes entry, Attributes targetEntry, boolean cascade ) 
+    protected void modify( LdapDN name, ServerEntry entry, ServerEntry targetEntry, boolean cascade ) 
         throws NamingException
     {
         String oid = getOid( entry );
@@ -93,7 +92,7 @@
     }
 
 
-    public void add( LdapDN name, Attributes entry ) throws NamingException
+    public void add( LdapDN name, ServerEntry entry ) throws NamingException
     {
         LdapDN parentDn = ( LdapDN ) name.clone();
         parentDn.remove( parentDn.size() - 1 );
@@ -106,7 +105,7 @@
     }
 
 
-    public void delete( LdapDN name, Attributes entry, boolean cascade ) throws NamingException
+    public void delete( LdapDN name, ServerEntry entry, boolean cascade ) throws NamingException
     {
         String schemaName = getSchemaName( name );
         AttributeType at = factory.getAttributeType( entry, targetRegistries, schemaName );
@@ -135,7 +134,7 @@
     }
 
 
-    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         Schema schema = getSchema( name );
         AttributeType oldAt = factory.getAttributeType( entry, targetRegistries, schema.getSchemaName() );
@@ -149,10 +148,10 @@
                 ResultCodeEnum.UNWILLING_TO_PERFORM );
         }
 
-        Attributes targetEntry = ( Attributes ) entry.clone();
+        ServerEntry targetEntry = ( ServerEntry ) entry.clone();
         String newOid = ( String ) newRdn.getValue();
         checkOidIsUnique( newOid );
-        targetEntry.put( new AttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
+        targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
         AttributeType at = factory.getAttributeType( targetEntry, targetRegistries, schema.getSchemaName() );
 
         if ( ! schema.isDisabled() )
@@ -170,7 +169,7 @@
 
 
     public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRn, boolean deleteOldRn,
-        Attributes entry, boolean cascade ) throws NamingException
+        ServerEntry entry, boolean cascade ) throws NamingException
     {
         checkNewParent( newParentName );
         Schema oldSchema = getSchema( oriChildName );
@@ -186,9 +185,9 @@
         }
 
         Schema newSchema = getSchema( newParentName );
-        Attributes targetEntry = ( Attributes ) entry.clone();
+        ServerEntry targetEntry = ( ServerEntry ) entry.clone();
         String newOid = ( String ) newRn.getValue();
-        targetEntry.put( new AttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
+        targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
         checkOidIsUnique( newOid );
         AttributeType at = factory.getAttributeType( targetEntry, targetRegistries, newSchema.getSchemaName() );
 
@@ -209,7 +208,7 @@
     }
 
 
-    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry, boolean cascade ) 
+    public void replace( LdapDN oriChildName, LdapDN newParentName, ServerEntry entry, boolean cascade ) 
         throws NamingException
     {
         checkNewParent( newParentName );

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java Sun Jan 20 08:59:10 2008
@@ -25,10 +25,10 @@
 import java.util.List;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.ComparatorRegistry;
 import org.apache.directory.server.schema.registries.MatchingRuleRegistry;
@@ -42,7 +42,6 @@
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.syntax.ComparatorDescription;
-import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.shared.ldap.util.Base64;
 
 
@@ -76,7 +75,7 @@
     }
 
     
-    protected void modify( LdapDN name, Attributes entry, Attributes targetEntry, boolean cascade ) throws NamingException
+    protected void modify( LdapDN name, ServerEntry entry, ServerEntry targetEntry, boolean cascade ) throws NamingException
     {
         String oid = getOid( entry );
         Comparator comparator = factory.getComparator( targetEntry, targetRegistries );
@@ -91,25 +90,27 @@
     }
 
     
-    private ComparatorDescription getComparatorDescription( String schemaName, Attributes entry ) throws NamingException
+    private ComparatorDescription getComparatorDescription( String schemaName, ServerEntry entry ) throws NamingException
     {
         ComparatorDescription description = new ComparatorDescription();
         description.setNumericOid( getOid( entry ) );
         List<String> values = new ArrayList<String>();
         values.add( schemaName );
         description.addExtension( MetaSchemaConstants.X_SCHEMA, values );
-        description.setFqcn( ( String ) AttributeUtils.getAttribute( entry, fqcnAT ).get() );
+        description.setFqcn( entry.get( fqcnAT ).getString() );
+        
+        ServerAttribute desc = entry.get( descAT );
         
-        Attribute desc = AttributeUtils.getAttribute( entry, descAT );
         if ( desc != null && desc.size() > 0 )
         {
-            description.setDescription( ( String ) desc.get() );
+            description.setDescription( desc.getString() );
         }
         
-        Attribute bytecode = AttributeUtils.getAttribute( entry, byteCodeAT );
+        ServerAttribute bytecode = entry.get( byteCodeAT );
+
         if ( bytecode != null && bytecode.size() > 0 )
         {
-            byte[] bytes = ( byte[] ) bytecode.get();
+            byte[] bytes = bytecode.getBytes();
             description.setBytecode( new String( Base64.encode( bytes ) ) );
         }
 
@@ -117,7 +118,7 @@
     }
     
 
-    public void add( LdapDN name, Attributes entry ) throws NamingException
+    public void add( LdapDN name, ServerEntry entry ) throws NamingException
     {
         LdapDN parentDn = ( LdapDN ) name.clone();
         parentDn.remove( parentDn.size() - 1 );
@@ -154,7 +155,7 @@
     }
 
 
-    public void delete( LdapDN name, Attributes entry, boolean cascade ) throws NamingException
+    public void delete( LdapDN name, ServerEntry entry, boolean cascade ) throws NamingException
     {
         String oid = getOid( entry );
         delete( oid, cascade );
@@ -178,7 +179,7 @@
     }
 
     
-    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         String oldOid = getOid( entry );
 
@@ -206,7 +207,7 @@
 
 
     public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRdn, boolean deleteOldRn,
-        Attributes entry, boolean cascade ) throws NamingException
+        ServerEntry entry, boolean cascade ) throws NamingException
     {
         checkNewParent( newParentName );
         String oldOid = getOid( entry );
@@ -241,7 +242,7 @@
     }
 
 
-    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry, boolean cascade ) 
+    public void replace( LdapDN oriChildName, LdapDN newParentName, ServerEntry entry, boolean cascade ) 
         throws NamingException
     {
         checkNewParent( newParentName );
@@ -283,7 +284,7 @@
     }
 
 
-    private void checkOidIsUniqueForComparator( Attributes entry ) throws NamingException
+    private void checkOidIsUniqueForComparator( ServerEntry entry ) throws NamingException
     {
         String oid = getOid( entry );
         

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaDitContentRuleHandler.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaDitContentRuleHandler.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaDitContentRuleHandler.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaDitContentRuleHandler.java Sun Jan 20 08:59:10 2008
@@ -20,13 +20,13 @@
 package org.apache.directory.server.core.schema;
 
 
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.DITContentRule;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 
 
 /**
@@ -49,7 +49,7 @@
      * @see org.apache.directory.server.core.schema.AbstractSchemaChangeHandler#modify(org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes, javax.naming.directory.Attributes)
      */
     @Override
-    protected void modify( LdapDN name, Attributes entry, Attributes targetEntry, boolean cascade ) 
+    protected void modify( LdapDN name, ServerEntry entry, ServerEntry targetEntry, boolean cascade ) 
         throws NamingException
     {
         // TODO Auto-generated method stub
@@ -60,7 +60,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#add(org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes)
      */
-    public void add( LdapDN name, Attributes entry ) throws NamingException
+    public void add( LdapDN name, ServerEntry entry ) throws NamingException
     {
         // TODO Auto-generated method stub
 
@@ -70,7 +70,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#delete(org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes)
      */
-    public void delete( LdapDN name, Attributes entry, boolean cascade ) throws NamingException
+    public void delete( LdapDN name, ServerEntry entry, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
 
@@ -81,7 +81,7 @@
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#move(org.apache.directory.shared.ldap.name.LdapDN, org.apache.directory.shared.ldap.name.LdapDN, java.lang.String, boolean, javax.naming.directory.Attributes)
      */
     public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRn, boolean deleteOldRn,
-        Attributes entry, boolean cascade ) throws NamingException
+        ServerEntry entry, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
 
@@ -91,7 +91,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#move(org.apache.directory.shared.ldap.name.LdapDN, org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes)
      */
-    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry, 
+    public void replace( LdapDN oriChildName, LdapDN newParentName, ServerEntry entry, 
         boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
@@ -102,7 +102,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#rename(org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes, java.lang.String)
      */
-    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaDitStructureRuleHandler.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaDitStructureRuleHandler.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaDitStructureRuleHandler.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaDitStructureRuleHandler.java Sun Jan 20 08:59:10 2008
@@ -20,13 +20,13 @@
 package org.apache.directory.server.core.schema;
 
 
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.DITStructureRule;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 
 
 /**
@@ -51,7 +51,7 @@
      * javax.naming.directory.Attributes)
      */
     @Override
-    protected void modify( LdapDN name, Attributes entry, Attributes targetEntry, 
+    protected void modify( LdapDN name, ServerEntry entry, ServerEntry targetEntry, 
         boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
@@ -63,7 +63,7 @@
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#add(
      * org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes)
      */
-    public void add( LdapDN name, Attributes entry ) throws NamingException
+    public void add( LdapDN name, ServerEntry entry ) throws NamingException
     {
         // TODO Auto-generated method stub
 
@@ -74,7 +74,7 @@
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#delete(
      * org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes)
      */
-    public void delete( LdapDN name, Attributes entry, boolean cascade ) throws NamingException
+    public void delete( LdapDN name, ServerEntry entry, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
 
@@ -88,7 +88,7 @@
      * java.lang.String, boolean, javax.naming.directory.Attributes)
      */
     public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRn, boolean deleteOldRn,
-        Attributes entry, boolean cascade ) throws NamingException
+        ServerEntry entry, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
 
@@ -101,7 +101,7 @@
      * org.apache.directory.shared.ldap.name.LdapDN, 
      * javax.naming.directory.Attributes)
      */
-    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry, 
+    public void replace( LdapDN oriChildName, LdapDN newParentName, ServerEntry entry, 
         boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
@@ -113,7 +113,7 @@
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#rename(
      * org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes, java.lang.String)
      */
-    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java Sun Jan 20 08:59:10 2008
@@ -23,17 +23,16 @@
 import java.util.Set;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.MatchingRuleRegistry;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
@@ -63,7 +62,7 @@
     }
 
 
-    protected void modify( LdapDN name, Attributes entry, Attributes targetEntry, 
+    protected void modify( LdapDN name, ServerEntry entry, ServerEntry targetEntry, 
         boolean cascade ) throws NamingException
     {
         String oid = getOid( entry );
@@ -78,7 +77,7 @@
     }
 
 
-    public void add( LdapDN name, Attributes entry ) throws NamingException
+    public void add( LdapDN name, ServerEntry entry ) throws NamingException
     {
         LdapDN parentDn = ( LdapDN ) name.clone();
         parentDn.remove( parentDn.size() - 1 );
@@ -91,7 +90,7 @@
     }
 
 
-    public void delete( LdapDN name, Attributes entry, boolean cascade ) throws NamingException
+    public void delete( LdapDN name, ServerEntry entry, boolean cascade ) throws NamingException
     {
         String schemaName = getSchemaName( name );
         MatchingRule mr = factory.getMatchingRule( entry, targetRegistries, schemaName );
@@ -120,7 +119,7 @@
     }
 
     
-    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         Schema schema = getSchema( name );
         MatchingRule oldMr = factory.getMatchingRule( entry, targetRegistries, schema.getSchemaName() );
@@ -134,11 +133,11 @@
                 ResultCodeEnum.UNWILLING_TO_PERFORM );
         }
 
-        Attributes targetEntry = ( Attributes ) entry.clone();
+        ServerEntry targetEntry = ( ServerEntry ) entry.clone();
         String newOid = ( String ) newRdn.getValue();
         checkOidIsUnique( newOid );
         
-        targetEntry.put( new AttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
+        targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
         MatchingRule mr = factory.getMatchingRule( targetEntry, targetRegistries, schema.getSchemaName() );
 
         if ( ! schema.isDisabled() )
@@ -156,7 +155,7 @@
 
 
     public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRdn, boolean deleteOldRn, 
-        Attributes entry, boolean cascade ) throws NamingException
+        ServerEntry entry, boolean cascade ) throws NamingException
     {
         checkNewParent( newParentName );
         Schema oldSchema = getSchema( oriChildName );
@@ -172,11 +171,11 @@
         }
 
         Schema newSchema = getSchema( newParentName );
-        Attributes targetEntry = ( Attributes ) entry.clone();
+        ServerEntry targetEntry = ( ServerEntry ) entry.clone();
         String newOid = ( String ) newRdn.getValue();
         checkOidIsUnique( newOid );
         
-        targetEntry.put( new AttributeImpl( MetaSchemaConstants.M_OID_AT, newOid ) );
+        targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
         MatchingRule mr = factory.getMatchingRule( targetEntry, targetRegistries, newSchema.getSchemaName() );
 
         if ( ! oldSchema.isDisabled() )
@@ -196,7 +195,7 @@
     }
 
 
-    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry, boolean cascade ) 
+    public void replace( LdapDN oriChildName, LdapDN newParentName, ServerEntry entry, boolean cascade ) 
         throws NamingException
     {
         checkNewParent( newParentName );

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleUseHandler.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleUseHandler.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleUseHandler.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleUseHandler.java Sun Jan 20 08:59:10 2008
@@ -20,13 +20,13 @@
 package org.apache.directory.server.core.schema;
 
 
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.MatchingRuleUse;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 
 
 /**
@@ -46,40 +46,40 @@
 
 
     @Override
-    protected void modify( LdapDN name, Attributes entry, Attributes targetEntry, 
+    protected void modify( LdapDN name, ServerEntry entry, ServerEntry targetEntry, 
         boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
     }
 
 
-    public void add( LdapDN name, Attributes entry ) throws NamingException
+    public void add( LdapDN name, ServerEntry entry ) throws NamingException
     {
         // TODO Auto-generated method stub
     }
 
 
-    public void delete( LdapDN name, Attributes entry, boolean cascade ) throws NamingException
+    public void delete( LdapDN name, ServerEntry entry, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
     }
 
 
     public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRn, boolean deleteOldRn,
-        Attributes entry, boolean cascade ) throws NamingException
+        ServerEntry entry, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
     }
 
 
     public void replace( LdapDN oriChildName, LdapDN newParentName,
-                         Attributes entry, boolean cascade ) throws NamingException
+        ServerEntry entry, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
     }
 
 
-    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
     }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaNameFormHandler.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaNameFormHandler.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaNameFormHandler.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/schema/MetaNameFormHandler.java Sun Jan 20 08:59:10 2008
@@ -21,8 +21,8 @@
 
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
@@ -51,7 +51,7 @@
      * javax.naming.directory.Attributes)
      */
     @Override
-    protected void modify( LdapDN name, Attributes entry, Attributes targetEntry, 
+    protected void modify( LdapDN name, ServerEntry entry, ServerEntry targetEntry, 
         boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
@@ -63,7 +63,7 @@
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#add(
      * org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes)
      */
-    public void add( LdapDN name, Attributes entry ) throws NamingException
+    public void add( LdapDN name, ServerEntry entry ) throws NamingException
     {
         // TODO Auto-generated method stub
 
@@ -74,7 +74,7 @@
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#delete(
      * org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes)
      */
-    public void delete( LdapDN name, Attributes entry, boolean cascade ) throws NamingException
+    public void delete( LdapDN name, ServerEntry entry, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
 
@@ -87,7 +87,7 @@
      * Rdn, boolean, javax.naming.directory.Attributes)
      */
     public void move( LdapDN oriChildName, LdapDN newParentName, Rdn newRn,
-        boolean deleteOldRn, Attributes entry, boolean cascade ) throws NamingException
+        boolean deleteOldRn, ServerEntry entry, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
 
@@ -99,7 +99,7 @@
      * org.apache.directory.shared.ldap.name.LdapDN, 
      * org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes)
      */
-    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry, 
+    public void replace( LdapDN oriChildName, LdapDN newParentName, ServerEntry entry, 
         boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
@@ -111,7 +111,7 @@
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#rename(
      * org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes, Rdn, boolean)
      */
-    public void rename( LdapDN name, Attributes entry, Rdn newRdn, boolean cascade ) throws NamingException
+    public void rename( LdapDN name, ServerEntry entry, Rdn newRdn, boolean cascade ) throws NamingException
     {
         // TODO Auto-generated method stub
 



Mime
View raw message