directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r612891 - in /directory: apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/ apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ apacheds/branches/bigbang/core/src/ma...
Date Thu, 17 Jan 2008 17:51:06 GMT
Author: elecharny
Date: Thu Jan 17 09:50:58 2008
New Revision: 612891

URL: http://svn.apache.org/viewvc?rev=612891&view=rev
Log:
o Removed some more refs to [Basic]Attribute[s][Impl]
o Using LdapDN instead of Name in some places

Modified:
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilterTest.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java
    directory/shared/branches/bigbang/ldap/src/main/antlr/ACIItem.g
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/aci/UserClass.java

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
Thu Jan 17 09:50:58 2008
@@ -69,7 +69,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.Name;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
@@ -475,7 +474,7 @@
         }
 
         // Assemble all the information required to make an access control decision
-        Set<Name> userGroups = groupCache.getGroups( principalDn.toNormName() );
+        Set<LdapDN> userGroups = groupCache.getGroups( principalDn.toNormName() );
         Collection<ACITuple> tuples = new HashSet<ACITuple>();
 
         // Build the total collection of tuples to be considered for add rights
@@ -547,7 +546,7 @@
             return;
         }
 
-        Set<Name> userGroups = groupCache.getGroups( principalDn.toString() );
+        Set<LdapDN> userGroups = groupCache.getGroups( principalDn.toString() );
         Collection<ACITuple> tuples = new HashSet<ACITuple>();
         addPerscriptiveAciTuples( proxy, tuples, name, entry );
         addEntryAciTuples( tuples, entry );
@@ -600,7 +599,7 @@
             return;
         }
 
-        Set<Name> userGroups = groupCache.getGroups( principalDn.toString() );
+        Set<LdapDN> userGroups = groupCache.getGroups( principalDn.toString() );
         Collection<ACITuple> tuples = new HashSet<ACITuple>();
         addPerscriptiveAciTuples( proxy, tuples, name, entry );
         addEntryAciTuples( tuples, entry );
@@ -706,7 +705,7 @@
             return name.size() == 0 || next.hasEntry( entryContext );
         }
 
-        Set<Name> userGroups = groupCache.getGroups( principalDn.toNormName() );
+        Set<LdapDN> userGroups = groupCache.getGroups( principalDn.toNormName() );
         Collection<ACITuple> tuples = new HashSet<ACITuple>();
         addPerscriptiveAciTuples( proxy, tuples, name, entry );
         addEntryAciTuples( tuples, entry );
@@ -745,7 +744,7 @@
 
         PartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();
         LdapDN userName = principal.getJndiName();
-        Set<Name> userGroups = groupCache.getGroups( userName.toNormName() );
+        Set<LdapDN> userGroups = groupCache.getGroups( userName.toNormName() );
         Collection<ACITuple> tuples = new HashSet<ACITuple>();
         addPerscriptiveAciTuples( proxy, tuples, dn, entry );
         addEntryAciTuples( tuples, entry );
@@ -845,7 +844,7 @@
             return;
         }
 
-        Set<Name> userGroups = groupCache.getGroups( principalDn.toString() );
+        Set<LdapDN> userGroups = groupCache.getGroups( principalDn.toString() );
         Collection<ACITuple> tuples = new HashSet<ACITuple>();
         addPerscriptiveAciTuples( proxy, tuples, name, entry );
         addEntryAciTuples( tuples, entry );
@@ -898,7 +897,7 @@
             return;
         }
 
-        Set<Name> userGroups = groupCache.getGroups( principalDn.toString() );
+        Set<LdapDN> userGroups = groupCache.getGroups( principalDn.toString() );
         Collection<ACITuple> tuples = new HashSet<ACITuple>();
         addPerscriptiveAciTuples( proxy, tuples, oriChildName, entry );
         addEntryAciTuples( tuples, entry );
@@ -983,7 +982,7 @@
             return;
         }
 
-        Set<Name> userGroups = groupCache.getGroups( principalDn.toString() );
+        Set<LdapDN> userGroups = groupCache.getGroups( principalDn.toString() );
         Collection<ACITuple> tuples = new HashSet<ACITuple>();
         addPerscriptiveAciTuples( proxy, tuples, oriChildName, entry );
         addEntryAciTuples( tuples, entry );
@@ -1099,7 +1098,7 @@
             return next.compare( opContext );
         }
 
-        Set<Name> userGroups = groupCache.getGroups( principalDn.toNormName() );
+        Set<LdapDN> userGroups = groupCache.getGroups( principalDn.toNormName() );
         Collection<ACITuple> tuples = new HashSet<ACITuple>();
         addPerscriptiveAciTuples( proxy, tuples, name, entry );
         addEntryAciTuples( tuples, entry );
@@ -1141,7 +1140,7 @@
                 matched,
                 registries );
             
-            Set<Name> userGroups = groupCache.getGroups( principalDn.toString() );
+            Set<LdapDN> userGroups = groupCache.getGroups( principalDn.toString() );
             Collection<ACITuple> tuples = new HashSet<ACITuple>();
             addPerscriptiveAciTuples( proxy, tuples, matched, entry );
             addEntryAciTuples( tuples, entry );
@@ -1183,7 +1182,7 @@
         
         ServerLdapContext ctx = ( ServerLdapContext ) invocation.getCaller();
         LdapDN userDn = ctx.getPrincipal().getJndiName();
-        Set<Name> userGroups = groupCache.getGroups( userDn.toNormName() );
+        Set<LdapDN> userGroups = groupCache.getGroups( userDn.toNormName() );
         Collection<ACITuple> tuples = new HashSet<ACITuple>();
         addPerscriptiveAciTuples( invocation.getProxy(), tuples, normName, entry );
         addEntryAciTuples( tuples, entry );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
Thu Jan 17 09:50:58 2008
@@ -48,10 +48,8 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.Name;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-//import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.ModificationItem;
 import javax.naming.directory.SearchControls;
@@ -92,7 +90,7 @@
     /** the normalized dn of the administrators group */
     private LdapDN administratorsGroupDn;
     
-    private static final Set<Name> EMPTY_GROUPS = new HashSet<Name>();
+    private static final Set<LdapDN> EMPTY_GROUPS = new HashSet<LdapDN>();
     
     /**
      * Creates a static group cache.
@@ -493,7 +491,7 @@
      * @return a Set of Name objects representing the groups
      * @throws NamingException if there are problems accessing attribute  values
      */
-    public Set<Name> getGroups( String member ) throws NamingException
+    public Set<LdapDN> getGroups( String member ) throws NamingException
     {
     	LdapDN normMember;
     	
@@ -507,7 +505,7 @@
             return EMPTY_GROUPS;
         }
 
-        Set<Name> memberGroups = null;
+        Set<LdapDN> memberGroups = null;
 
         for ( String group:groups.keySet() )
         {
@@ -522,7 +520,7 @@
             {
                 if ( memberGroups == null )
                 {
-                    memberGroups = new HashSet<Name>();
+                    memberGroups = new HashSet<LdapDN>();
                 }
 
                 memberGroups.add( parseNormalized( group ) );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
Thu Jan 17 09:50:58 2008
@@ -44,15 +44,12 @@
 import org.apache.directory.shared.ldap.name.NameComponentNormalizer;
 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.directory.Attribute;
-import javax.naming.directory.Attributes;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import java.text.ParseException;
@@ -143,8 +140,9 @@
             while ( results.hasMore() )
             {
                 SearchResult result = results.next();
-                String subentryDn = result.getName();
-                Attribute aci = AttributeUtils.getAttribute( result.getAttributes(), prescriptiveAciAT
);
+                LdapDN subentryDn = new LdapDN( result.getName() ).normalize( normalizerMap
);
+                ServerEntry serverEntry = ServerEntryUtils.toServerEntry( result.getAttributes(),
subentryDn, registries );
+                ServerAttribute aci = serverEntry.get( prescriptiveAciAT );
                 
                 if ( aci == null )
                 {
@@ -153,8 +151,7 @@
                     continue;
                 }
 
-                LdapDN normName = parseNormalized( subentryDn );
-                subentryAdded( normName, ServerEntryUtils.toServerEntry( result.getAttributes(),
normName, registries ) );
+                subentryAdded( subentryDn, serverEntry );
             }
             
             results.close();
@@ -258,14 +255,14 @@
     }
 
 
-    public void subentryModified( LdapDN normName, Attributes mods, ServerEntry entry ) throws
NamingException
+    public void subentryModified( LdapDN normName, ServerEntry mods, ServerEntry entry )
throws NamingException
     {
         if ( !hasPrescriptiveACI( entry ) )
         {
             return;
         }
 
-        if ( AttributeUtils.getAttribute( mods, prescriptiveAciAT ) != null )
+        if ( mods.get( prescriptiveAciAT ) != null )
         {
             subentryDeleted( normName, entry );
             subentryAdded( normName, entry );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
Thu Jan 17 09:50:58 2008
@@ -25,7 +25,6 @@
 import java.util.Collections;
 import java.util.HashSet;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 
 import org.apache.directory.server.core.authn.AuthenticationInterceptor;
@@ -132,7 +131,7 @@
     public void checkPermission( 
         Registries registries, 
         PartitionNexusProxy proxy, 
-        Collection<Name> userGroupNames, 
+        Collection<LdapDN> userGroupNames, 
         LdapDN username,
         AuthenticationLevel authenticationLevel, 
         LdapDN entryName, 
@@ -190,7 +189,7 @@
     public boolean hasPermission( 
         Registries registries, 
         PartitionNexusProxy proxy, 
-        Collection<Name> userGroupNames, 
+        Collection<LdapDN> userGroupNames, 
         LdapDN userName,
         AuthenticationLevel authenticationLevel, 
         LdapDN entryName, 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
Thu Jan 17 09:50:58 2008
@@ -22,7 +22,6 @@
 
 import java.util.Collection;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
@@ -69,7 +68,7 @@
             Collection<ACITuple> tuples, 
             OperationScope scope, 
             PartitionNexusProxy proxy,
-            Collection<Name> userGroupNames, 
+            Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
             Attributes userEntry,
             AuthenticationLevel authenticationLevel, 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
Thu Jan 17 09:50:58 2008
@@ -23,7 +23,6 @@
 import java.util.Collection;
 import java.util.Iterator;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
@@ -49,7 +48,7 @@
     		Collection<ACITuple> tuples, 
     		OperationScope scope, 
     		PartitionNexusProxy proxy,
-            Collection<Name> userGroupNames, 
+            Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
             Attributes userEntry, 
             AuthenticationLevel authenticationLevel,

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
Thu Jan 17 09:50:58 2008
@@ -41,7 +41,6 @@
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
-import javax.naming.Name;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
@@ -79,7 +78,7 @@
             Collection<ACITuple> tuples, 
             OperationScope scope, 
             PartitionNexusProxy proxy,
-            Collection<Name> userGroupNames, 
+            Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
             Attributes userEntry, 
             AuthenticationLevel authenticationLevel,

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java
Thu Jan 17 09:50:58 2008
@@ -23,7 +23,6 @@
 import java.util.Collection;
 import java.util.Iterator;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
@@ -52,7 +51,7 @@
             Collection<ACITuple> tuples, 
             OperationScope scope, 
             PartitionNexusProxy proxy,
-            Collection<Name> userGroupNames, 
+            Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
             Attributes userEntry, 
             AuthenticationLevel authenticationLevel,

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java
Thu Jan 17 09:50:58 2008
@@ -23,7 +23,6 @@
 import java.util.Collection;  
 import java.util.Iterator;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
@@ -50,7 +49,7 @@
             Collection<ACITuple> tuples, 
             OperationScope scope, 
             PartitionNexusProxy proxy,
-            Collection<Name> userGroupNames, 
+            Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
             Attributes userEntry, 
             AuthenticationLevel authenticationLevel,

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java
Thu Jan 17 09:50:58 2008
@@ -23,7 +23,6 @@
 import java.util.ArrayList;
 import java.util.Collection;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
@@ -58,7 +57,7 @@
             Collection<ACITuple> tuples, 
             OperationScope scope, 
             PartitionNexusProxy proxy,
-            Collection<Name> userGroupNames, 
+            Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
             Attributes userEntry, 
             AuthenticationLevel authenticationLevel,

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java
Thu Jan 17 09:50:58 2008
@@ -23,7 +23,6 @@
 import java.util.ArrayList;
 import java.util.Collection;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
@@ -56,7 +55,7 @@
             Collection<ACITuple> tuples, 
             OperationScope scope, 
             PartitionNexusProxy proxy,
-            Collection<Name> userGroupNames, 
+            Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
             Attributes userEntry, 
             AuthenticationLevel authenticationLevel,

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
Thu Jan 17 09:50:58 2008
@@ -23,7 +23,6 @@
 import java.util.Collection;
 import java.util.Iterator;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
@@ -76,7 +75,7 @@
             Collection<ACITuple> tuples, 
             OperationScope scope, 
             PartitionNexusProxy proxy,
-            Collection<Name> userGroupNames, 
+            Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
             Attributes userEntry,
             AuthenticationLevel authenticationLevel, 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java
Thu Jan 17 09:50:58 2008
@@ -23,7 +23,6 @@
 import java.util.Collection;
 import java.util.Iterator;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
@@ -65,7 +64,7 @@
             Collection<ACITuple> tuples, 
             OperationScope scope, 
             PartitionNexusProxy proxy,
-            Collection<Name> userGroupNames, 
+            Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
             Attributes userEntry, 
             AuthenticationLevel authenticationLevel,
@@ -117,7 +116,7 @@
     }
 
 
-    private boolean isRelated( Collection<Name> userGroupNames, LdapDN userName, ServerEntry
userEntry, 
+    private boolean isRelated( Collection<LdapDN> userGroupNames, LdapDN userName,
ServerEntry userEntry, 
         LdapDN entryName, Collection<UserClass> userClasses ) throws NamingException
     {
         for ( UserClass userClass : userClasses )
@@ -145,7 +144,7 @@
             {
                 UserClass.UserGroup userGroupUserClass = ( UserClass.UserGroup ) userClass;
                 
-                for ( Name userGroupName : userGroupNames )
+                for ( LdapDN userGroupName : userGroupNames )
                 {
                     if ( userGroupName != null && userGroupUserClass.getNames().contains(
userGroupName ) )
                     {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
Thu Jan 17 09:50:58 2008
@@ -23,7 +23,6 @@
 import java.util.Collection;
 import java.util.Iterator;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
@@ -52,7 +51,7 @@
             Collection<ACITuple> tuples, 
             OperationScope scope, 
             PartitionNexusProxy proxy,
-            Collection<Name> userGroupNames, 
+            Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
             Attributes userEntry, 
             AuthenticationLevel authenticationLevel,

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
Thu Jan 17 09:50:58 2008
@@ -1419,7 +1419,6 @@
 
     private static void throwInterceptorException( Interceptor interceptor, Throwable e )
throws InterceptorException
     {
-        e.printStackTrace();
         throw new InterceptorException( interceptor, "Unexpected exception.", e );
     }
 }

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilterTest.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilterTest.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilterTest.java
Thu Jan 17 09:50:58 2008
@@ -27,8 +27,6 @@
 import java.util.List;
 import java.util.Set;
 
-import javax.naming.Name;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
 
@@ -39,6 +37,7 @@
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
 import org.apache.directory.shared.ldap.aci.UserClass;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
 
 
@@ -50,7 +49,7 @@
  */
 public class MostSpecificUserClassFilterTest extends TestCase
 {
-    private static final Set<Name> EMPTY_NAME_SET = Collections.unmodifiableSet( new
HashSet<Name>() );
+    private static final Set<LdapDN> EMPTY_NAME_SET = Collections.unmodifiableSet(
new HashSet<LdapDN>() );
     private static final Set<MicroOperation> EMPTY_MICRO_OPERATION_SET = Collections.unmodifiableSet(
new HashSet<MicroOperation>() );
     private static final Collection<UserClass> EMPTY_USER_CLASS_COLLECTION = Collections.unmodifiableCollection(
new ArrayList<UserClass>() );
     private static final Collection<SubtreeSpecification> EMPTY_SUBTREE_SPECIFICATION_COLLECTION
= Collections.unmodifiableCollection( new ArrayList<SubtreeSpecification>() );

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java
Thu Jan 17 09:50:58 2008
@@ -26,7 +26,6 @@
 import java.util.HashSet;
 import java.util.Set;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 
 import junit.framework.Assert;
@@ -58,8 +57,8 @@
 
     private static final LdapDN GROUP_NAME;
     private static final LdapDN USER_NAME;
-    private static final Set<Name> USER_NAMES = new HashSet<Name>();
-    private static final Set<Name> GROUP_NAMES = new HashSet<Name>();
+    private static final Set<LdapDN> USER_NAMES = new HashSet<LdapDN>();
+    private static final Set<LdapDN> GROUP_NAMES = new HashSet<LdapDN>();
 
     private static final SubtreeEvaluator SUBTREE_EVALUATOR;
 
@@ -129,7 +128,7 @@
         Assert.assertEquals( 1, filter.filter( null, tuples, OperationScope.ENTRY, null,
GROUP_NAMES, USER_NAME, null,
             AuthenticationLevel.NONE, null, null, null, null, null, null ).size() );
 
-        Set<Name> wrongGroupNames = new HashSet<Name>();
+        Set<LdapDN> wrongGroupNames = new HashSet<LdapDN>();
         wrongGroupNames.add( new LdapDN( "ou=unrelatedgroup" ) );
 
         Assert.assertEquals( 0, filter.filter( null, tuples, OperationScope.ENTRY, null,
wrongGroupNames, USER_NAME, null,
@@ -192,7 +191,7 @@
         }
         else
         {
-            Set<Name> names = new HashSet<Name>();
+            Set<LdapDN> names = new HashSet<LdapDN>();
             
             try
             {

Modified: directory/shared/branches/bigbang/ldap/src/main/antlr/ACIItem.g
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/antlr/ACIItem.g?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/antlr/ACIItem.g (original)
+++ directory/shared/branches/bigbang/ldap/src/main/antlr/ACIItem.g Thu Jan 17 09:50:58 2008
@@ -32,7 +32,6 @@
 import java.util.Enumeration;
 
 import javax.naming.directory.Attribute;
-import javax.naming.Name;
 
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.AndNode;
@@ -883,7 +882,7 @@
 name
 {
     log.debug( "entered name()" );
-    Set<Name> names = new HashSet<Name>();
+    Set<LdapDN> names = new HashSet<LdapDN>();
     LdapDN distinguishedName = null;
 }
     :
@@ -906,7 +905,7 @@
 userGroup
 {
     log.debug( "entered userGroup()" );
-    Set<Name> userGroup = new HashSet<Name>();
+    Set<LdapDN> userGroup = new HashSet<LdapDN>();
     LdapDN distinguishedName = null;
 }
     :

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/aci/UserClass.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/aci/UserClass.java?rev=612891&r1=612890&r2=612891&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/aci/UserClass.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/aci/UserClass.java
Thu Jan 17 09:50:58 2008
@@ -27,6 +27,7 @@
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
 
 
@@ -127,7 +128,7 @@
      */
     private static abstract class NamedUserClass extends UserClass
     {
-        protected final Set<javax.naming.Name> names;
+        protected final Set<LdapDN> names;
 
 
         /**
@@ -135,16 +136,16 @@
          * 
          * @param names a set of names
          */
-        protected NamedUserClass( Set<javax.naming.Name> names )
+        protected NamedUserClass( Set<LdapDN> names )
         {
-            this.names = Collections.unmodifiableSet( new HashSet<javax.naming.Name>(
names ) );
+            this.names = Collections.unmodifiableSet( new HashSet<LdapDN>( names )
);
         }
 
 
         /**
          * Returns the set of all names.
          */
-        public Set<javax.naming.Name> getNames()
+        public Set<LdapDN> getNames()
         {
             return names;
         }
@@ -217,7 +218,7 @@
          * @param usernames
          *            the set of user DNs.
          */
-        public Name( Set<javax.naming.Name> usernames )
+        public Name( Set<LdapDN> usernames )
         {
             super( usernames );
         }
@@ -253,7 +254,7 @@
          * @param groupNames
          *            the set of group DNs.
          */
-        public UserGroup( Set<javax.naming.Name> groupNames )
+        public UserGroup( Set<LdapDN> groupNames )
         {
             super( groupNames );
         }



Mime
View raw message