directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r638228 [8/20] - in /directory/sandbox/akarasulu/bigbang/apacheds: ./ apacheds-xbean-spring/src/site/ benchmarks/src/site/ bootstrap-extract/src/site/ bootstrap-partition/src/site/ bootstrap-plugin/src/main/java/org/apache/directory/server/...
Date Tue, 18 Mar 2008 06:13:18 GMT
Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java Mon Mar 17 23:12:41 2008
@@ -27,7 +27,7 @@
 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.ServerValue;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.enumeration.SearchResultFilter;
 import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
@@ -60,9 +60,10 @@
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.entry.Modification;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -71,11 +72,7 @@
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.DirContext;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 
 import java.text.ParseException;
 import java.util.ArrayList;
@@ -226,7 +223,7 @@
         enabled = directoryService.isAccessControlEnabled();
 
         // stuff for dealing with subentries (garbage for now)
-        ServerValue<?> subschemaSubentry = 
+        Value<?> subschemaSubentry = 
         	directoryService.getPartitionNexus().getRootDSE( null ).
         		get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
         LdapDN subschemaSubentryDnName = new LdapDN( (String)(subschemaSubentry.get()) );
@@ -258,14 +255,6 @@
     }
 
 
-    private LdapDN parseNormalized( String name ) throws NamingException
-    {
-        LdapDN dn = new LdapDN( name );
-        dn.normalize( atRegistry.getNormalizerMapping() );
-        return dn;
-    }
-
-
     /**
      * Adds perscriptiveACI tuples to a collection of tuples by accessing the
      * tupleCache.  The tuple cache is accessed for each A/C subentry
@@ -298,10 +287,7 @@
         {
             LdapDN parentDn = ( LdapDN ) dn.clone();
             parentDn.remove( dn.size() - 1 );
-            entry = ServerEntryUtils.toServerEntry( 
-                proxy.lookup( new LookupOperationContext( registries, parentDn), PartitionNexusProxy.LOOKUP_BYPASS ),
-                parentDn,
-                registries );
+            entry = proxy.lookup( new LookupOperationContext( registries, parentDn), PartitionNexusProxy.LOOKUP_BYPASS );
         }
 
         ServerAttribute subentries = entry.get( acSubentryType );
@@ -311,7 +297,7 @@
             return;
         }
         
-        for ( ServerValue<?> value:subentries )
+        for ( Value<?> value:subentries )
         {
             String subentryDn = ( String ) value.get();
             tuples.addAll( tupleCache.getACITuples( subentryDn ) );
@@ -336,7 +322,7 @@
             return;
         }
 
-        for ( ServerValue<?> value:entryAci )
+        for ( Value<?> value:entryAci )
         {
             String aciString = ( String ) value.get();
             ACIItem item;
@@ -380,12 +366,14 @@
         // will contain the subentryACI attributes that effect subentries
         LdapDN parentDn = ( LdapDN ) dn.clone();
         parentDn.remove( dn.size() - 1 );
-        ServerEntry administrativeEntry = ServerEntryUtils.toServerEntry( 
+        ServerEntry administrativeEntry =  
             proxy.lookup( 
-        		new LookupOperationContext( registries, parentDn, new String[]
-            { SchemaConstants.SUBENTRY_ACI_AT }) , PartitionNexusProxy.LOOKUP_BYPASS ),
-            parentDn,
-            registries );
+        		new LookupOperationContext( 
+        		    registries, 
+        		    parentDn, 
+        		    new String[]
+        		               { SchemaConstants.SUBENTRY_ACI_AT }) , 
+        		PartitionNexusProxy.LOOKUP_BYPASS );
         
         ServerAttribute subentryAci = administrativeEntry.get( subentryAciType );
 
@@ -394,7 +382,7 @@
             return;
         }
 
-        for ( ServerValue<?> value:subentryAci )
+        for ( Value<?> value:subentryAci )
         {
             String aciString = ( String ) value.get();
             ACIItem item;
@@ -490,10 +478,10 @@
         // now we must check if attribute type and value scope permission is granted
         for ( ServerAttribute attribute:serverEntry )
         {
-            for ( ServerValue<?> value:attribute )
+            for ( Value<?> value:attribute )
             {
                 engine.checkPermission( registries, proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name, attribute
-                    .getUpId(), value.get(), ADD_PERMS, tuples, serverEntry, null );
+                    .getUpId(), value, ADD_PERMS, tuples, serverEntry, null );
             }
         }
 
@@ -520,10 +508,6 @@
         // Access the principal requesting the operation, and bypass checks if it is the admin
         Invocation invocation = InvocationStack.getInstance().peek();
         PartitionNexusProxy proxy = invocation.getProxy();
-        ServerEntry entry = ServerEntryUtils.toServerEntry( 
-            proxy.lookup( new LookupOperationContext( registries, name ) , PartitionNexusProxy.LOOKUP_BYPASS ),
-            name,
-            registries );
 
         LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
         LdapDN principalDn = principal.getJndiName();
@@ -535,6 +519,8 @@
             return;
         }
 
+        ServerEntry entry = proxy.lookup( new LookupOperationContext( registries, name ) , PartitionNexusProxy.LOOKUP_BYPASS );
+
         protectCriticalEntries( name );
 
         // bypass authz code but manage caches if operation is performed by the admin
@@ -569,10 +555,7 @@
         LdapDN name = opContext.getDn();
 
         // Access the principal requesting the operation, and bypass checks if it is the admin
-        ServerEntry entry = ServerEntryUtils.toServerEntry( 
-            proxy.lookup( new LookupOperationContext( registries, name ), PartitionNexusProxy.LOOKUP_BYPASS ),
-            name,
-            registries );
+        ServerEntry entry = proxy.lookup( new LookupOperationContext( registries, name ), PartitionNexusProxy.LOOKUP_BYPASS );
         
         LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
         LdapDN principalDn = principal.getJndiName();
@@ -584,7 +567,7 @@
             return;
         }
 
-        List<ModificationItemImpl> mods = opContext.getModItems();
+        List<Modification> mods = opContext.getModItems();
 
         // bypass authz code but manage caches if operation is performed by the admin
         if ( isPrincipalAnAdministrator( principalDn ) )
@@ -593,8 +576,8 @@
             /**
              * @TODO: A virtual entry can be created here for not hitting the backend again.
              */
-            Attributes modifiedEntry = proxy.lookup( new LookupOperationContext( registries, name ), PartitionNexusProxy.LOOKUP_BYPASS );
-            tupleCache.subentryModified( name, mods, ServerEntryUtils.toServerEntry( modifiedEntry, name, registries ) );
+            ServerEntry modifiedEntry = proxy.lookup( new LookupOperationContext( registries, name ), PartitionNexusProxy.LOOKUP_BYPASS );
+            tupleCache.subentryModified( name, mods, modifiedEntry );
             groupCache.groupModified( name, mods, entry, registries );
             return;
         }
@@ -611,28 +594,28 @@
         Collection<MicroOperation> perms = null;
         ServerEntry entryView = ( ServerEntry ) entry.clone();
         
-        for ( ModificationItemImpl mod : mods )
+        for ( Modification mod : mods )
         {
-            Attribute attr = mod.getAttribute();
+            ServerAttribute attr = (ServerAttribute)mod.getAttribute();
 
-            switch ( mod.getModificationOp() )
+            switch ( mod.getOperation() )
             {
-                case ( DirContext.ADD_ATTRIBUTE ):
+                case ADD_ATTRIBUTE :
                     perms = ADD_PERMS;
                 
                     // If the attribute is being created with an initial value ...
-                    if ( entry.get( attr.getID() ) == null )
+                    if ( entry.get( attr.getId() ) == null )
                     {
                         // ... we also need to check if adding the attribute is permitted
                         engine.checkPermission( registries, proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name,
-                                attr.getID(), null, perms, tuples, entry, null );
+                                attr.getId(), null, perms, tuples, entry, null );
                     }
                     
                     break;
 
-                case ( DirContext.REMOVE_ATTRIBUTE ):
+                case REMOVE_ATTRIBUTE :
                     perms = REMOVE_PERMS;
-                    ServerAttribute entryAttr = entry.get( attr.getID() );
+                    ServerAttribute entryAttr = entry.get( attr.getId() );
 
                     if ( entryAttr != null )
                     {
@@ -641,13 +624,13 @@
                         {
                             // ... we also need to check if removing the attribute at all is permitted
                             engine.checkPermission( registries, proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name,
-                                    attr.getID(), null, perms, tuples, entry, null );
+                                    attr.getId(), null, perms, tuples, entry, null );
                         }
                     }
                     
                     break;
 
-                case ( DirContext.REPLACE_ATTRIBUTE ):
+                case REPLACE_ATTRIBUTE :
                     perms = REPLACE_PERMS;
                     break;
             }
@@ -667,10 +650,10 @@
              */
             entryView = ServerEntryUtils.getTargetEntry( mod, entryView, registries );
             
-            for ( int jj = 0; jj < attr.size(); jj++ )
+            for ( Value<?> value:attr )
             {                
                 engine.checkPermission( registries, proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name,
-                        attr.getID(), attr.get( jj ), perms, tuples, entry, entryView );
+                        attr.getId(), value, perms, tuples, entry, entryView );
             }
         }
 
@@ -680,8 +663,8 @@
         /**
          * @TODO: A virtual entry can be created here for not hitting the backend again.
          */
-        Attributes modifiedEntry = proxy.lookup( new LookupOperationContext( registries, name ), PartitionNexusProxy.LOOKUP_BYPASS );
-        tupleCache.subentryModified( name, mods, ServerEntryUtils.toServerEntry( modifiedEntry, name, registries ) );
+        ServerEntry modifiedEntry = proxy.lookup( new LookupOperationContext( registries, name ), PartitionNexusProxy.LOOKUP_BYPASS );
+        tupleCache.subentryModified( name, mods, modifiedEntry );
         groupCache.groupModified( name, mods, entry, registries );
     }
 
@@ -691,10 +674,8 @@
         Invocation invocation = InvocationStack.getInstance().peek();
         PartitionNexusProxy proxy = invocation.getProxy();
         
-        ServerEntry entry = ServerEntryUtils.toServerEntry( 
-            proxy.lookup( new LookupOperationContext( registries, name ), PartitionNexusProxy.LOOKUP_BYPASS ),
-            name,
-            registries );
+        ServerEntry entry = proxy.lookup( new LookupOperationContext( registries, name ), PartitionNexusProxy.LOOKUP_BYPASS );
+            
         
         LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
         LdapDN principalDn = principal.getJndiName();
@@ -758,7 +739,7 @@
         for ( ServerAttribute attribute:entry )
         {
             
-            for ( ServerValue<?> value:attribute )
+            for ( Value<?> value:attribute )
             {
                 engine.checkPermission( 
                     registries, 
@@ -768,7 +749,7 @@
                     principal.getAuthenticationLevel(), 
                     dn, 
                     attribute.getUpId(), 
-                    value.get(), 
+                    value, 
                     READ_PERMS, 
                     tuples, 
                     entry, 
@@ -778,7 +759,7 @@
     }
 
 
-    public Attributes lookup( NextInterceptor next, LookupOperationContext lookupContext ) throws NamingException
+    public ServerEntry lookup( NextInterceptor next, LookupOperationContext lookupContext ) throws NamingException
     {
         Invocation invocation = InvocationStack.getInstance().peek();
         LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
@@ -795,10 +776,8 @@
         }
 
         PartitionNexusProxy proxy = invocation.getProxy();
-        ServerEntry entry = ServerEntryUtils.toServerEntry( 
-            proxy.lookup( lookupContext, PartitionNexusProxy.LOOKUP_BYPASS ),
-            lookupContext.getDn(),
-            registries );
+        ServerEntry entry = proxy.lookup( lookupContext, PartitionNexusProxy.LOOKUP_BYPASS );
+
         checkLookupAccess( principal, lookupContext.getDn(), entry );
         return next.lookup( lookupContext );
     }
@@ -811,10 +790,7 @@
         Invocation invocation = InvocationStack.getInstance().peek();
         PartitionNexusProxy proxy = invocation.getProxy();
         
-        ServerEntry entry = ServerEntryUtils.toServerEntry( 
-            proxy.lookup( new LookupOperationContext( registries, name ), PartitionNexusProxy.LOOKUP_BYPASS ),
-            name,
-            registries );
+        ServerEntry entry = proxy.lookup( new LookupOperationContext( registries, name ), PartitionNexusProxy.LOOKUP_BYPASS );
         
         LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
         LdapDN principalDn = principal.getJndiName();
@@ -869,10 +845,7 @@
         Invocation invocation = InvocationStack.getInstance().peek();
         PartitionNexusProxy proxy = invocation.getProxy();
         
-        ServerEntry entry = ServerEntryUtils.toServerEntry(
-            proxy.lookup( new LookupOperationContext( registries, oriChildName ), PartitionNexusProxy.LOOKUP_BYPASS ),
-            oriChildName,
-            registries );
+        ServerEntry entry = proxy.lookup( new LookupOperationContext( registries, oriChildName ), PartitionNexusProxy.LOOKUP_BYPASS );
         
             LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
         LdapDN principalDn = principal.getJndiName();
@@ -911,11 +884,9 @@
         // will not be valid at the new location.
         // This will certainly be fixed by the SubentryInterceptor,
         // but after this service.
-        ServerEntry importedEntry = ServerEntryUtils.toServerEntry( 
-            proxy.lookup( new LookupOperationContext( registries, oriChildName ), 
-                PartitionNexusProxy.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS ),
-            oriChildName,
-            registries );
+        ServerEntry importedEntry = proxy.lookup( 
+            new LookupOperationContext( registries, oriChildName ), 
+                PartitionNexusProxy.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS );
             
         
         // As the target entry does not exist yet and so
@@ -954,11 +925,8 @@
         // Access the principal requesting the operation, and bypass checks if it is the admin
         Invocation invocation = InvocationStack.getInstance().peek();
         PartitionNexusProxy proxy = invocation.getProxy();
-        ServerEntry entry = ServerEntryUtils.toServerEntry( 
-            proxy.lookup( new LookupOperationContext( registries, oriChildName ), PartitionNexusProxy.LOOKUP_BYPASS ),
-            oriChildName,
-            registries );
-        
+        ServerEntry entry = proxy.lookup( new LookupOperationContext( registries, oriChildName ), PartitionNexusProxy.LOOKUP_BYPASS );
+       
         LdapDN newName = ( LdapDN ) newParentName.clone();
         newName.add( oriChildName.get( oriChildName.size() - 1 ) );
         LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
@@ -996,11 +964,9 @@
         // will not be valid at the new location.
         // This will certainly be fixed by the SubentryInterceptor,
         // but after this service.
-        ServerEntry importedEntry = ServerEntryUtils.toServerEntry( 
-            proxy.lookup( new LookupOperationContext( registries, oriChildName ), 
-                PartitionNexusProxy.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS ),
-            oriChildName,
-            registries );
+        ServerEntry importedEntry = proxy.lookup( 
+            new LookupOperationContext( registries, oriChildName ), 
+                PartitionNexusProxy.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS );
             
         // As the target entry does not exist yet and so
         // its subentry operational attributes are not there,
@@ -1029,12 +995,12 @@
     }
 
     
-    public NamingEnumeration<SearchResult> list( NextInterceptor next, ListOperationContext opContext ) throws NamingException
+    public NamingEnumeration<ServerSearchResult> list( NextInterceptor next, ListOperationContext opContext ) throws NamingException
     {
         Invocation invocation = InvocationStack.getInstance().peek();
         ServerLdapContext ctx = ( ServerLdapContext ) invocation.getCaller();
         LdapPrincipal user = ctx.getPrincipal();
-        NamingEnumeration<SearchResult> e = next.list( opContext );
+        NamingEnumeration<ServerSearchResult> e = next.list( opContext );
         
         if ( isPrincipalAnAdministrator( user.getJndiName() ) || !enabled )
         {
@@ -1046,13 +1012,13 @@
     }
 
 
-    public NamingEnumeration<SearchResult> search( NextInterceptor next, SearchOperationContext opContext ) throws NamingException
+    public NamingEnumeration<ServerSearchResult> search( NextInterceptor next, SearchOperationContext opContext ) throws NamingException
     {
         Invocation invocation = InvocationStack.getInstance().peek();
         ServerLdapContext ctx = ( ServerLdapContext ) invocation.getCaller();
         LdapPrincipal user = ctx.getPrincipal();
         LdapDN principalDn = user.getJndiName();
-        NamingEnumeration<SearchResult> e = next.search( opContext );
+        NamingEnumeration<ServerSearchResult> e = next.search( opContext );
 
         boolean isSubschemaSubentryLookup = subschemaSubentryDn.equals( opContext.getDn().getNormName() );
         SearchControls searchCtls = opContext.getSearchControls();
@@ -1078,17 +1044,14 @@
     {
     	LdapDN name = opContext.getDn();
     	String oid = opContext.getOid();
-    	Object value = opContext.getValue();
+    	Value<?> value = (Value<?>)opContext.getValue();
     	
         // Access the principal requesting the operation, and bypass checks if it is the admin
         Invocation invocation = InvocationStack.getInstance().peek();
         PartitionNexusProxy proxy = invocation.getProxy();
-        ServerEntry entry = ServerEntryUtils.toServerEntry( 
-            proxy.lookup( 
+        ServerEntry entry = proxy.lookup( 
         		new LookupOperationContext( registries, name ), 
-        		PartitionNexusProxy.LOOKUP_BYPASS ),
-        	name,
-        	registries );
+        		PartitionNexusProxy.LOOKUP_BYPASS );
 
         LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
         LdapDN principalDn = principal.getJndiName();
@@ -1135,10 +1098,7 @@
         // that but if permission is granted then short the process and return the dn
         while ( matched.size() > 0 )
         {
-            entry = ServerEntryUtils.toServerEntry( 
-                proxy.lookup( new LookupOperationContext( registries, matched ), PartitionNexusProxy.GETMATCHEDDN_BYPASS ),
-                matched,
-                registries );
+            entry = proxy.lookup( new LookupOperationContext( registries, matched ), PartitionNexusProxy.GETMATCHEDDN_BYPASS );
             
             Set<LdapDN> userGroups = groupCache.getGroups( principalDn.toString() );
             Collection<ACITuple> tuples = new HashSet<ACITuple>();
@@ -1165,20 +1125,17 @@
     }
 
 
-    private boolean filter( Invocation invocation, LdapDN normName, SearchResult result ) throws NamingException
+    private boolean filter( Invocation invocation, LdapDN normName, ServerSearchResult result ) throws NamingException
     {
-        ServerEntry resultEntry = ServerEntryUtils.toServerEntry( result.getAttributes(), new LdapDN( result.getName() ) , registries );
+        ServerEntry resultEntry = result.getServerEntry();
 
         /*
          * First call hasPermission() for entry level "Browse" and "ReturnDN" perm
          * tests.  If we hasPermission() returns false we immediately short the
          * process and return false.
          */
-        ServerEntry entry = ServerEntryUtils.toServerEntry( 
-            invocation.getProxy().lookup( 
-                new LookupOperationContext( registries, normName ), PartitionNexusProxy.LOOKUP_BYPASS ),
-            normName,
-            registries );
+        ServerEntry entry = invocation.getProxy().lookup( 
+                new LookupOperationContext( registries, normName ), PartitionNexusProxy.LOOKUP_BYPASS );
         
         ServerLdapContext ctx = ( ServerLdapContext ) invocation.getCaller();
         LdapDN userDn = ctx.getPrincipal().getJndiName();
@@ -1212,7 +1169,6 @@
          * not allowed are removed from the attribute.  If the attribute has no more
          * values remaining then the entire attribute is removed.
          */
-        //NamingEnumeration<String> idList = result.getObject().getIDs();
         List<AttributeType> attributeToRemove = new ArrayList<AttributeType>();
         
         for ( AttributeType attributeType:resultEntry.getAttributeTypes() )
@@ -1240,10 +1196,10 @@
                 continue;
             }
 
-            List<ServerValue<?>> valueToRemove = new ArrayList<ServerValue<?>>();
+            List<Value<?>> valueToRemove = new ArrayList<Value<?>>();
             
             // attribute type scope is ok now let's determine value level scope
-            for ( ServerValue<?> value:attr )
+            for ( Value<?> value:attr )
             {
                 if ( !engine.hasPermission( 
                         registries, 
@@ -1253,7 +1209,7 @@
                         ctx.getPrincipal().getAuthenticationLevel(), 
                         normName, 
                         attr.getUpId(), 
-                        value.get(), 
+                        value, 
                         SEARCH_ATTRVAL_PERMS, 
                         tuples,
                         entry, 
@@ -1263,7 +1219,7 @@
                 }
             }
             
-            for ( ServerValue<?> value:valueToRemove )
+            for ( Value<?> value:valueToRemove )
             {
                 attr.remove( value );
             }
@@ -1279,7 +1235,7 @@
             resultEntry.remove( attributeType );
         }
 
-        result.setAttributes( ServerEntryUtils.toAttributesImpl( resultEntry ) );
+        result.setServerEntry( resultEntry );
         return true;
     }
 
@@ -1289,10 +1245,10 @@
      */
     class AuthorizationFilter implements SearchResultFilter
     {
-        public boolean accept( Invocation invocation, SearchResult result, SearchControls controls )
+        public boolean accept( Invocation invocation, ServerSearchResult result, SearchControls controls )
             throws NamingException
         {
-            LdapDN normName = parseNormalized( result.getName() );
+            LdapDN normName = result.getDn().normalize( atRegistry.getNormalizerMapping() );
             return filter( invocation, normName, result );
         }
     }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java Mon Mar 17 23:12:41 2008
@@ -22,6 +22,9 @@
 
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.enumeration.SearchResultFilter;
 import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
@@ -42,23 +45,18 @@
 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.entry.Value;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.message.ServerSearchResult;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.OidNormalizer;
-import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.Name;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.NoPermissionException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
 import java.util.HashSet;
 import java.util.Map;
@@ -149,18 +147,18 @@
     {
         // read in the administrators and cache their normalized names
         Set<String> newAdministrators = new HashSet<String>( 2 );
-        Attributes adminGroup = nexus.lookup( new LookupOperationContext( registries, ADMIN_GROUP_DN ) );
+        ServerEntry adminGroup = nexus.lookup( new LookupOperationContext( registries, ADMIN_GROUP_DN ) );
         
         if ( adminGroup == null )
         {
             return;
         }
         
-        Attribute uniqueMember = AttributeUtils.getAttribute( adminGroup, uniqueMemberAT );
+        ServerAttribute uniqueMember = adminGroup.get( uniqueMemberAT );
         
-        for ( int ii = 0; ii < uniqueMember.size(); ii++ )
+        for ( Value<?> value:uniqueMember )
         {
-            LdapDN memberDn = new LdapDN( ( String ) uniqueMember.get( ii ) );
+            LdapDN memberDn = new LdapDN( ( String ) value.get() );
             memberDn.normalize( normalizerMapping );
             newAdministrators.add( memberDn.getNormName() );
         }
@@ -427,17 +425,17 @@
     }
 
 
-    public Attributes lookup( NextInterceptor nextInterceptor, LookupOperationContext opContext ) throws NamingException
+    public ServerEntry lookup( NextInterceptor nextInterceptor, LookupOperationContext opContext ) throws NamingException
     {
-        Attributes attributes = nextInterceptor.lookup( opContext );
+        ServerEntry serverEntry = nextInterceptor.lookup( opContext );
         
-        if ( !enabled || ( attributes == null ) )
+        if ( !enabled || ( serverEntry == null ) )
         {
-            return attributes;
+            return serverEntry;
         }
 
         protectLookUp( opContext.getDn() );
-        return attributes;
+        return serverEntry;
     }
 
 
@@ -499,9 +497,9 @@
     }
 
 
-    public NamingEnumeration<SearchResult> search( NextInterceptor nextInterceptor, SearchOperationContext opContext ) throws NamingException
+    public NamingEnumeration<ServerSearchResult> search( NextInterceptor nextInterceptor, SearchOperationContext opContext ) throws NamingException
     {
-        NamingEnumeration<SearchResult> e = nextInterceptor.search( opContext );
+        NamingEnumeration<ServerSearchResult> e = nextInterceptor.search( opContext );
 
         if ( !enabled )
         {
@@ -513,7 +511,7 @@
         return new SearchResultFilteringEnumeration( e, opContext.getSearchControls(), invocation, 
             new SearchResultFilter()
         {
-            public boolean accept( Invocation invocation, SearchResult result, SearchControls controls )
+            public boolean accept( Invocation invocation, ServerSearchResult result, SearchControls controls )
                 throws NamingException
             {
                 return DefaultAuthorizationInterceptor.this.isSearchable( invocation, result );
@@ -522,9 +520,9 @@
     }
 
 
-    public NamingEnumeration<SearchResult> list( NextInterceptor nextInterceptor, ListOperationContext opContext ) throws NamingException
+    public NamingEnumeration<ServerSearchResult> list( NextInterceptor nextInterceptor, ListOperationContext opContext ) throws NamingException
     {
-        NamingEnumeration<SearchResult> result = nextInterceptor.list( opContext );
+        NamingEnumeration<ServerSearchResult> result = nextInterceptor.list( opContext );
         
         if ( !enabled )
         {
@@ -535,7 +533,7 @@
         
         return new SearchResultFilteringEnumeration( result, null, invocation, new SearchResultFilter()
         {
-            public boolean accept( Invocation invocation, SearchResult result, SearchControls controls )
+            public boolean accept( Invocation invocation, ServerSearchResult result, SearchControls controls )
                 throws NamingException
             {
                 return DefaultAuthorizationInterceptor.this.isSearchable( invocation, result );
@@ -544,10 +542,10 @@
     }
 
 
-    private boolean isSearchable( Invocation invocation, SearchResult result ) throws NamingException
+    private boolean isSearchable( Invocation invocation, ServerSearchResult result ) throws NamingException
     {
         LdapDN principalDn = ( ( ServerContext ) invocation.getCaller() ).getPrincipal().getJndiName();
-        LdapDN dn = ((ServerSearchResult)result).getDn();
+        LdapDN dn = result.getDn();
         
         if ( !dn.isNormalized() )
         {

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java Mon Mar 17 23:12:41 2008
@@ -30,18 +30,19 @@
 import org.apache.directory.server.core.DirectoryService;
 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.ServerValue;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 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.entry.Modification;
+import org.apache.directory.shared.ldap.entry.ModificationOperation;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.OrNode;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.OidNormalizer;
@@ -50,10 +51,7 @@
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.ModificationItem;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 
 
 /**
@@ -139,15 +137,14 @@
             LdapDN baseDn = new LdapDN( suffix );
             SearchControls ctls = new SearchControls();
             ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-            NamingEnumeration<SearchResult> results = nexus.search(
+            NamingEnumeration<ServerSearchResult> results = nexus.search(
                     new SearchOperationContext( registries, baseDn, AliasDerefMode.DEREF_ALWAYS, filter, ctls ) );
 
             while ( results.hasMore() )
             {
-                SearchResult result = results.next();
-                LdapDN groupDn = parseNormalized( result.getName() );
-                ServerAttribute members = getMemberAttribute( 
-                    ServerEntryUtils.toServerEntry( result.getAttributes(), groupDn, registries ) );
+            	ServerSearchResult result = results.next();
+                LdapDN groupDn = result.getDn().normalize( normalizerMap );
+                ServerAttribute members = getMemberAttribute( result.getServerEntry() );
 
                 if ( members != null )
                 {
@@ -226,7 +223,7 @@
      */
     private void addMembers( Set<String> memberSet, ServerAttribute members ) throws NamingException
     {
-        for ( ServerValue<?> value:members )
+        for ( Value<?> value:members )
         {
 
             // get and normalize the DN of the member
@@ -255,7 +252,7 @@
      */
     private void removeMembers( Set<String> memberSet, ServerAttribute members ) throws NamingException
     {
-        for ( ServerValue<?> value:members )
+        for ( Value<?> value:members )
         {
             // get and normalize the DN of the member
             String memberDn = (String)value.get();
@@ -336,16 +333,16 @@
      * @param members the members being added, removed or replaced
      * @throws NamingException if there are problems accessing attribute values
      */
-    private void modify( Set<String> memberSet, int modOp, ServerAttribute members ) throws NamingException
+    private void modify( Set<String> memberSet, ModificationOperation modOp, ServerAttribute members ) throws NamingException
     {
 
         switch ( modOp )
         {
-            case ( DirContext.ADD_ATTRIBUTE  ):
+            case ADD_ATTRIBUTE :
                 addMembers( memberSet, members );
                 break;
                 
-            case ( DirContext.REPLACE_ATTRIBUTE  ):
+            case REPLACE_ATTRIBUTE :
                 if ( members.size() > 0 )
                 {
                     memberSet.clear();
@@ -354,7 +351,7 @@
             
                 break;
                 
-            case ( DirContext.REMOVE_ATTRIBUTE  ):
+            case REMOVE_ATTRIBUTE :
                 removeMembers( memberSet, members );
                 break;
                 
@@ -373,21 +370,19 @@
      * @param entry the group entry being modified
      * @throws NamingException if there are problems accessing attribute  values
      */
-    public void groupModified( LdapDN name, List<ModificationItemImpl> mods, ServerEntry entry, Registries registries ) throws NamingException
+    public void groupModified( LdapDN name, List<Modification> mods, ServerEntry entry, Registries registries ) throws NamingException
     {
         ServerAttribute members = null;
         String memberAttrId = null;
         ServerAttribute oc = entry.get( SchemaConstants.OBJECT_CLASS_AT );
 
-        if ( oc.contains( SchemaConstants.GROUP_OF_NAMES_OC ) ||
-             oc.contains( SchemaConstants.GROUP_OF_NAMES_OC_OID ))
+        if ( oc.contains( SchemaConstants.GROUP_OF_NAMES_OC ) )
         {
             members = entry.get( memberAT );
             memberAttrId = SchemaConstants.MEMBER_AT;
         }
 
-        if ( oc.contains( SchemaConstants.GROUP_OF_UNIQUE_NAMES_OC ) ||
-             oc.contains( SchemaConstants.GROUP_OF_UNIQUE_NAMES_OC_OID ) )
+        if ( oc.contains( SchemaConstants.GROUP_OF_UNIQUE_NAMES_OC ) )
         {
             members = entry.get( uniqueMemberAT );
             memberAttrId = SchemaConstants.UNIQUE_MEMBER_AT;
@@ -398,9 +393,9 @@
             return;
         }
 
-        for ( ModificationItem modification:mods )
+        for ( Modification modification:mods )
         {
-            if ( memberAttrId.equalsIgnoreCase( modification.getAttribute().getID() ) )
+            if ( memberAttrId.equalsIgnoreCase( modification.getAttribute().getId() ) )
             {
                 Set<String> memberSet = groups.get( name.getNormName() );
                 
@@ -408,10 +403,8 @@
                 {
                     modify( 
                         memberSet, 
-                        modification.getModificationOp(), 
-                        ServerEntryUtils.toServerAttribute( 
-                            modification.getAttribute(),
-                            registries.getAttributeTypeRegistry().lookup( modification.getAttribute().getID() ) ) );
+                        modification.getOperation(), 
+                        (ServerAttribute)modification.getAttribute() );
                 }
                 
                 break;
@@ -434,7 +427,7 @@
      * @param mods the modifications being performed
      * @throws NamingException if there are problems accessing attribute  values
      */
-    public void groupModified( LdapDN name, int modOp, ServerEntry mods ) throws NamingException
+    public void groupModified( LdapDN name, ModificationOperation modOp, ServerEntry mods ) throws NamingException
     {
         ServerAttribute members = getMemberAttribute( mods );
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java Mon Mar 17 23:12:41 2008
@@ -22,8 +22,7 @@
 import org.apache.directory.server.core.DirectoryService;
 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.ServerValue;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.schema.ConcreteNameComponentNormalizer;
@@ -34,11 +33,12 @@
 import org.apache.directory.shared.ldap.aci.ACIItemParser;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.entry.Modification;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.NameComponentNormalizer;
@@ -47,11 +47,9 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.Name;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -133,15 +131,15 @@
                     SchemaConstants.ACCESS_CONTROL_SUBENTRY_OC );
             SearchControls ctls = new SearchControls();
             ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-            NamingEnumeration<SearchResult> results = nexus.search( 
+            NamingEnumeration<ServerSearchResult> results = nexus.search( 
                 new SearchOperationContext( registries, baseDn,
                     AliasDerefMode.NEVER_DEREF_ALIASES, filter, ctls ) );
             
             while ( results.hasMore() )
             {
-                SearchResult result = results.next();
-                LdapDN subentryDn = new LdapDN( result.getName() ).normalize( normalizerMap );
-                ServerEntry serverEntry = ServerEntryUtils.toServerEntry( result.getAttributes(), subentryDn, registries );
+            	ServerSearchResult result = results.next();
+                LdapDN subentryDn = result.getDn().normalize( normalizerMap );
+                ServerEntry serverEntry = result.getServerEntry();
                 ServerAttribute aci = serverEntry.get( prescriptiveAciAT );
                 
                 if ( aci == null )
@@ -196,7 +194,7 @@
 
         List<ACITuple> entryTuples = new ArrayList<ACITuple>();
         
-        for ( ServerValue<?> value:aciAttr )
+        for ( Value<?> value:aciAttr )
         {
             String aci = (String)value.get();
             ACIItem item = null;
@@ -234,19 +232,16 @@
     }
 
 
-    public void subentryModified( LdapDN normName, List<ModificationItemImpl> mods, ServerEntry entry ) throws NamingException
+    public void subentryModified( LdapDN normName, List<Modification> mods, ServerEntry entry ) throws NamingException
     {
         if ( !hasPrescriptiveACI( entry ) )
         {
             return;
         }
 
-        for ( ModificationItemImpl mod : mods )
+        for ( Modification mod : mods )
         {
-            String attrID = mod.getAttribute().getID();
-            
-            if ( attrID.equalsIgnoreCase( SchemaConstants.PRESCRIPTIVE_ACI_AT ) ||
-                    attrID.equalsIgnoreCase( SchemaConstants.PRESCRIPTIVE_ACI_AT_OID ) )
+            if ( ((ServerAttribute)mod.getAttribute()).instanceOf( SchemaConstants.PRESCRIPTIVE_ACI_AT ) )
             {
                 subentryDeleted( normName, entry );
                 subentryAdded( normName, entry );
@@ -282,7 +277,7 @@
     }
 
 
-    public void subentryRenamed( Name oldName, Name newName )
+    public void subentryRenamed( LdapDN oldName, LdapDN newName )
     {
         tuples.put( newName.toString(), tuples.remove( oldName.toString() ) );
     }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java Mon Mar 17 23:12:41 2008
@@ -31,7 +31,6 @@
 import org.apache.directory.server.core.authz.AciAuthorizationInterceptor;
 import org.apache.directory.server.core.authz.DefaultAuthorizationInterceptor;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.entry.ServerEntryUtils;
 import org.apache.directory.server.core.event.Evaluator;
 import org.apache.directory.server.core.event.EventInterceptor;
 import org.apache.directory.server.core.event.ExpressionEvaluator;
@@ -51,6 +50,7 @@
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
@@ -136,7 +136,7 @@
         AuthenticationLevel authenticationLevel, 
         LdapDN entryName, 
         String attrId, 
-        Object attrValue, 
+        Value<?> attrValue, 
         Collection<MicroOperation> microOperations, 
         Collection<ACITuple> aciTuples, 
         ServerEntry entry, 
@@ -194,7 +194,7 @@
         AuthenticationLevel authenticationLevel, 
         LdapDN entryName, 
         String attrId, 
-        Object attrValue, 
+        Value<?> attrValue, 
         Collection<MicroOperation> microOperations, 
         Collection<ACITuple> aciTuples, 
         ServerEntry entry, 
@@ -205,10 +205,7 @@
             throw new NullPointerException( "entryName" );
         }
 
-        ServerEntry userEntry = ServerEntryUtils.toServerEntry( 
-            proxy.lookup( new LookupOperationContext( registries, userName ), USER_LOOKUP_BYPASS ),
-            userName, 
-            registries );
+        ServerEntry userEntry = proxy.lookup( new LookupOperationContext( registries, userName ), USER_LOOKUP_BYPASS );
 
         // Determine the scope of the requested operation.
         OperationScope scope;
@@ -239,14 +236,14 @@
                 proxy, 
                 userGroupNames, 
                 userName, 
-                ServerEntryUtils.toAttributesImpl( userEntry ),
+                userEntry,
                 authenticationLevel, 
                 entryName, 
                 attrId, 
                 attrValue, 
-                ServerEntryUtils.toAttributesImpl( entry ), 
+                entry, 
                 microOperations, 
-                ServerEntryUtils.toAttributesImpl( entryView ) );
+                entryView );
         }
 
         // Deny access if no tuples left.

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java Mon Mar 17 23:12:41 2008
@@ -23,13 +23,14 @@
 import java.util.Collection;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 
@@ -51,13 +52,13 @@
      * @param scope the scope of the operation to be performed
      * @param proxy the proxy interceptor for this filter to access the DIT
      * @param userGroupNames the collection of group ({@link Name})s which the current user belongs to
-     * @param userName the {@link Name} of the current user
-     * @param userEntry the {@link Attributes} of the current user entry in the DIT
+     * @param userName the {@link DN} of the current user
+     * @param userEntry the {@link ServerEntry} of the current user entry in the DIT
      * @param authenticationLevel the level of authentication of the current user
      * @param entryName the {@link Name} of the entry the current user accesses
      * @param attrId the attribute ID the current user accesses
      * @param attrValue the value of the attribute the current user accesses
-     * @param entry the {@link Attributes} of the entry the current user accesses
+     * @param entry the {@link ServerEntry} of the entry the current user accesses
      * @param microOperations the set of {@link MicroOperation}s the current user will perform
      * @param entryView in case of a Modify operation, view of the entry being modified as if the modification permitted and completed
      * @return the collection of filtered tuples
@@ -70,13 +71,13 @@
             PartitionNexusProxy proxy,
             Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
-            Attributes userEntry,
+            ServerEntry userEntry,
             AuthenticationLevel authenticationLevel, 
             LdapDN entryName, 
             String attrId,
-            Object attrValue, 
-            Attributes entry, 
+            Value<?> attrValue, 
+            ServerEntry entry, 
             Collection<MicroOperation> microOperations,
-            Attributes entryView )
+            ServerEntry entryView )
         throws NamingException;
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java Mon Mar 17 23:12:41 2008
@@ -24,13 +24,14 @@
 import java.util.Iterator;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 
@@ -50,14 +51,14 @@
     		PartitionNexusProxy proxy,
             Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
-            Attributes userEntry, 
+            ServerEntry userEntry, 
             AuthenticationLevel authenticationLevel,
             LdapDN entryName, 
             String attrId, 
-            Object attrValue, 
-            Attributes entry, 
+            Value<?> attrValue, 
+            ServerEntry entry, 
             Collection<MicroOperation> microOperations,
-            Attributes entryView )
+            ServerEntry entryView )
         throws NamingException
     {
         if ( tuples.size() <= 1 )

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java Mon Mar 17 23:12:41 2008
@@ -23,6 +23,8 @@
 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.ServerEntry;
+import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.event.EventInterceptor;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.normalization.NormalizationInterceptor;
@@ -36,6 +38,7 @@
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
@@ -43,9 +46,7 @@
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
@@ -80,14 +81,14 @@
             PartitionNexusProxy proxy,
             Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
-            Attributes userEntry, 
+            ServerEntry userEntry, 
             AuthenticationLevel authenticationLevel,
             LdapDN entryName, 
             String attrId, 
-            Object attrValue, 
-            Attributes entry, 
+            Value<?> attrValue, 
+            ServerEntry entry, 
             Collection<MicroOperation> microOperations,
-            Attributes entryView )
+            ServerEntry entryView )
         throws NamingException
     {
         if ( entryName.size() == 0 )
@@ -160,7 +161,7 @@
     private int getImmSubCount( Registries registries, PartitionNexusProxy proxy, LdapDN entryName ) throws NamingException
     {
         int cnt = 0;
-        NamingEnumeration<SearchResult> e = null;
+        NamingEnumeration<ServerSearchResult> e = null;
         
         try
         {

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java Mon Mar 17 23:12:41 2008
@@ -24,9 +24,9 @@
 import java.util.Iterator;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
 
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.aci.ACITuple;
@@ -34,6 +34,7 @@
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
 import org.apache.directory.shared.ldap.aci.ProtectedItem.MaxValueCountItem;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 
@@ -53,14 +54,14 @@
             PartitionNexusProxy proxy,
             Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
-            Attributes userEntry, 
+            ServerEntry userEntry, 
             AuthenticationLevel authenticationLevel,
             LdapDN entryName, 
             String attrId, 
-            Object attrValue, 
-            Attributes entry, 
+            Value<?> attrValue, 
+            ServerEntry entry, 
             Collection<MicroOperation> microOperations,
-            Attributes entryView )
+            ServerEntry entryView )
         throws NamingException
     {
         if ( scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE )
@@ -76,6 +77,7 @@
         for ( Iterator<ACITuple> i = tuples.iterator(); i.hasNext(); )
         {
             ACITuple tuple = i.next();
+            
             if ( !tuple.isGrant() )
             {
                 continue;
@@ -84,9 +86,11 @@
             for ( Iterator<ProtectedItem> j = tuple.getProtectedItems().iterator(); j.hasNext(); )
             {
                 ProtectedItem item = j.next();
+                
                 if ( item instanceof ProtectedItem.MaxValueCount )
                 {
                     ProtectedItem.MaxValueCount mvc = ( ProtectedItem.MaxValueCount ) item;
+                    
                     if ( isRemovable( mvc, attrId, entryView ) )
                     {
                         i.remove();
@@ -100,15 +104,16 @@
     }
 
 
-    private boolean isRemovable( ProtectedItem.MaxValueCount mvc, String attrId, Attributes entryView )
+    private boolean isRemovable( ProtectedItem.MaxValueCount mvc, String attrId, ServerEntry entryView ) throws NamingException
     {
         for ( Iterator<ProtectedItem.MaxValueCountItem> k = mvc.iterator(); k.hasNext(); )
         {
             MaxValueCountItem mvcItem = k.next();
             if ( attrId.equalsIgnoreCase( mvcItem.getAttributeType() ) )
             {
-                Attribute attr = entryView.get( attrId );
+                ServerAttribute attr = entryView.get( attrId );
                 int attrCount = attr == null ? 0 : attr.size();
+                
                 if ( attrCount > mvcItem.getMaxCount() )
                 {
                     return true;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java Mon Mar 17 23:12:41 2008
@@ -24,13 +24,14 @@
 import java.util.Iterator;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 
@@ -51,14 +52,14 @@
             PartitionNexusProxy proxy,
             Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
-            Attributes userEntry, 
+            ServerEntry userEntry, 
             AuthenticationLevel authenticationLevel,
             LdapDN entryName, 
             String attrId, 
-            Object attrValue, 
-            Attributes entry, 
+            Value<?> attrValue, 
+            ServerEntry entry, 
             Collection<MicroOperation> microOperations,
-            Attributes entryView )
+            ServerEntry entryView )
         throws NamingException
     {
         if ( tuples.size() == 0 )

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java Mon Mar 17 23:12:41 2008
@@ -24,14 +24,15 @@
 import java.util.Collection;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 
@@ -59,14 +60,14 @@
             PartitionNexusProxy proxy,
             Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
-            Attributes userEntry, 
+            ServerEntry userEntry, 
             AuthenticationLevel authenticationLevel,
             LdapDN entryName, 
             String attrId, 
-            Object attrValue, 
-            Attributes entry, 
+            Value<?> attrValue, 
+            ServerEntry entry, 
             Collection<MicroOperation> microOperations,
-            Attributes entryView )
+            ServerEntry entryView )
         throws NamingException
     {
         if ( tuples.size() <= 1 )

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java Mon Mar 17 23:12:41 2008
@@ -24,14 +24,15 @@
 import java.util.Collection;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.aci.UserClass;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 
@@ -57,14 +58,14 @@
             PartitionNexusProxy proxy,
             Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
-            Attributes userEntry, 
+            ServerEntry userEntry, 
             AuthenticationLevel authenticationLevel,
             LdapDN entryName, 
             String attrId, 
-            Object attrValue, 
-            Attributes entry, 
+            Value<?> attrValue, 
+            ServerEntry entry, 
             Collection<MicroOperation> microOperations,
-            Attributes entryView )
+            ServerEntry entryView )
         throws NamingException
     {
         if ( tuples.size() <= 1 )

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java Mon Mar 17 23:12:41 2008
@@ -25,8 +25,9 @@
 
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
 
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.event.Evaluator;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.server.core.subtree.RefinementEvaluator;
@@ -40,6 +41,7 @@
 import org.apache.directory.shared.ldap.aci.ProtectedItem.RestrictedByItem;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
@@ -77,14 +79,14 @@
             PartitionNexusProxy proxy,
             Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
-            Attributes userEntry,
+            ServerEntry userEntry,
             AuthenticationLevel authenticationLevel, 
             LdapDN entryName, 
             String attrId,
-            Object attrValue, 
-            Attributes entry, 
+            Value<?> attrValue, 
+            ServerEntry entry, 
             Collection<MicroOperation> microOperations,
-            Attributes entryView )
+            ServerEntry entryView )
         throws NamingException
     {
         if ( tuples.size() == 0 )
@@ -95,6 +97,7 @@
         for ( Iterator<ACITuple> i = tuples.iterator(); i.hasNext(); )
         {
             ACITuple tuple = i.next();
+            
             if ( !isRelated( tuple, scope, userName, entryName, attrId, attrValue, entry ) )
             {
                 i.remove();
@@ -106,9 +109,10 @@
 
 
     private boolean isRelated( ACITuple tuple, OperationScope scope, LdapDN userName, LdapDN entryName, String attrId,
-                               Object attrValue, Attributes entry ) throws NamingException, InternalError
+                               Value<?> attrValue, ServerEntry entry ) throws NamingException, InternalError
     {
         String oid = null;
+        
         if ( attrId != null )
         {
             oid = oidRegistry.getOid( attrId );
@@ -187,7 +191,7 @@
                     String attrOid = oidRegistry.getOid( attr.getID() );
                     AttributeType attrType = attrRegistry.lookup( attrOid );
                     
-                    if ( oid.equals( attrOid ) && AttributeUtils.containsValue( attr, attrValue, attrType ) )
+                    if ( oid.equals( attrOid ) && AttributeUtils.containsValue( attr, attrValue.get(), attrType ) )
                     {
                         return true;
                     }
@@ -225,6 +229,7 @@
             else if ( item instanceof ProtectedItem.RangeOfValues )
             {
                 ProtectedItem.RangeOfValues rov = ( ProtectedItem.RangeOfValues ) item;
+                
                 if ( entryEvaluator.evaluate( rov.getFilter(), entryName.toString(), entry ) )
                 {
                     return true;
@@ -260,12 +265,11 @@
                     String svItem = j.next();
                     if ( oid.equals( oidRegistry.getOid( svItem ) ) )
                     {
-                        AttributeType attrType = attrRegistry.lookup( oid );
-                        Attribute attr = AttributeUtils.getAttribute( entry, attrType );
+                        ServerAttribute attr = entry.get( oid );
                         
                         if ( ( attr != null ) && 
-                             ( ( AttributeUtils.containsValue( attr, userName.toNormName(), attrType ) || 
-                               ( AttributeUtils.containsValue( attr, userName.getUpName(), attrType ) ) ) ) )
+                             ( ( attr.contains( userName.toNormName() ) || 
+                               ( attr.contains( userName.getUpName() ) ) ) ) )
                         {
                             return true;
                         }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java Mon Mar 17 23:12:41 2008
@@ -24,10 +24,8 @@
 import java.util.Iterator;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
 
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.entry.ServerEntryUtils;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.server.core.subtree.SubtreeEvaluator;
 import org.apache.directory.server.schema.registries.Registries;
@@ -35,6 +33,7 @@
 import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.aci.UserClass;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
 
@@ -66,14 +65,14 @@
             PartitionNexusProxy proxy,
             Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
-            Attributes userEntry, 
+            ServerEntry userEntry, 
             AuthenticationLevel authenticationLevel,
             LdapDN entryName, 
             String attrId, 
-            Object attrValue, 
-            Attributes entry, 
+            Value<?> attrValue, 
+            ServerEntry entry, 
             Collection<MicroOperation> microOperations,
-            Attributes entryView )
+            ServerEntry entryView )
         throws NamingException
     {
         if ( tuples.size() == 0 )
@@ -89,7 +88,7 @@
             {
                 if ( !isRelated( userGroupNames, 
                                  userName, 
-                                 ServerEntryUtils.toServerEntry( userEntry, userName, registries ), 
+                                 userEntry, 
                                  entryName, 
                                  tuple.getUserClasses() )
                     || authenticationLevel.compareTo( tuple.getAuthenticationLevel() ) < 0 )
@@ -102,7 +101,7 @@
             {
                 if ( !isRelated( userGroupNames, 
                                  userName, 
-                                 ServerEntryUtils.toServerEntry( userEntry, userName, registries ), 
+                                 userEntry, 
                                  entryName, 
                                  tuple.getUserClasses() )
                     && authenticationLevel.compareTo( tuple.getAuthenticationLevel() ) >= 0 )

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java Mon Mar 17 23:12:41 2008
@@ -24,9 +24,9 @@
 import java.util.Iterator;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
 
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.aci.ACITuple;
@@ -34,6 +34,7 @@
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
 import org.apache.directory.shared.ldap.aci.ProtectedItem.RestrictedByItem;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 
@@ -53,14 +54,14 @@
             PartitionNexusProxy proxy,
             Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
-            Attributes userEntry, 
+            ServerEntry userEntry, 
             AuthenticationLevel authenticationLevel,
             LdapDN entryName, 
             String attrId, 
-            Object attrValue, 
-            Attributes entry, 
+            Value<?> attrValue, 
+            ServerEntry entry, 
             Collection<MicroOperation> microOperations,
-            Attributes entryView )
+            ServerEntry entryView )
         throws NamingException
     {
         if ( scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE )
@@ -76,6 +77,7 @@
         for ( Iterator<ACITuple> ii = tuples.iterator() ; ii.hasNext(); )
         {
             ACITuple tuple = ii.next();
+            
             if ( !tuple.isGrant() )
             {
                 continue;
@@ -91,7 +93,7 @@
     }
 
 
-    public boolean isRemovable( ACITuple tuple, String attrId, Object attrValue, Attributes entry )
+    public boolean isRemovable( ACITuple tuple, String attrId, Value<?> attrValue, ServerEntry entry ) throws NamingException
     {
         for ( ProtectedItem item : tuple.getProtectedItems() )
         {
@@ -106,7 +108,7 @@
                     // TODO Fix DIRSEVER-832 
                     if ( attrId.equalsIgnoreCase( rbItem.getAttributeType() ) )
                     {
-                        Attribute attr = entry.get( rbItem.getValuesIn() );
+                        ServerAttribute attr = entry.get( rbItem.getValuesIn() );
                         
                         // TODO Fix DIRSEVER-832
                         if ( ( attr == null ) || !attr.contains( attrValue ) )

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLog.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLog.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLog.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLog.java Mon Mar 17 23:12:41 2008
@@ -22,7 +22,7 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.authn.LdapPrincipal;
-import org.apache.directory.shared.ldap.ldif.Entry;
+import org.apache.directory.shared.ldap.ldif.LdifEntry;
 
 import javax.naming.NamingException;
 
@@ -73,7 +73,7 @@
      * @return the new revision reached after having applied the forward LDIF
      * @throws NamingException if there are problems logging the change
      */
-    long log( LdapPrincipal principal, Entry forward, Entry reverse ) throws NamingException;
+    long log( LdapPrincipal principal, LdifEntry forward, LdifEntry reverse ) throws NamingException;
 
 
     /**

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogEvent.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogEvent.java?rev=638228&r1=638227&r2=638228&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogEvent.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogEvent.java Mon Mar 17 23:12:41 2008
@@ -23,7 +23,7 @@
 import java.io.Serializable;
 
 import org.apache.directory.server.core.authn.LdapPrincipal;
-import org.apache.directory.shared.ldap.ldif.Entry;
+import org.apache.directory.shared.ldap.ldif.LdifEntry;
 
 
 /**
@@ -37,8 +37,8 @@
     private static final long serialVersionUID = 1L;
     private final String zuluTime;
     private final long revision;
-    private final Entry forwardLdif;
-    private final Entry reverseLdif;
+    private final LdifEntry forwardLdif;
+    private final LdifEntry reverseLdif;
     private final LdapPrincipal committer;
     
     
@@ -49,7 +49,7 @@
      * @param zuluTime the timestamp for when the change occurred in generalizedTime format
      */
     public ChangeLogEvent( long revision, String zuluTime, LdapPrincipal committer,
-                           Entry forwardLdif, Entry reverseLdif )
+                           LdifEntry forwardLdif, LdifEntry reverseLdif )
     {
         this.zuluTime = zuluTime;
         this.revision = revision;
@@ -62,7 +62,7 @@
     /**
      * @return the forwardLdif
      */
-    public Entry getForwardLdif()
+    public LdifEntry getForwardLdif()
     {
         return forwardLdif;
     }
@@ -71,7 +71,7 @@
     /**
      * @return the reverseLdif
      */
-    public Entry getReverseLdif()
+    public LdifEntry getReverseLdif()
     {
         return reverseLdif;
     }



Mime
View raw message