directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r566866 - in /directory/apacheds/trunk/core/src: main/java/org/apache/directory/server/core/authz/ main/java/org/apache/directory/server/core/authz/support/ test/java/org/apache/directory/server/core/authz/support/
Date Thu, 16 Aug 2007 21:35:53 GMT
Author: elecharny
Date: Thu Aug 16 14:35:52 2007
New Revision: 566866

URL: http://svn.apache.org/viewvc?view=rev&rev=566866
Log:
Using generic
removing useless checks

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilterTest.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java?view=diff&rev=566866&r1=566865&r2=566866
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java Thu Aug 16 14:35:52 2007
@@ -429,7 +429,7 @@
         }
 
         // Assemble all the information required to make an access control decision
-        Set 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
@@ -493,7 +493,7 @@
             return;
         }
 
-        Set 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 );
@@ -542,7 +542,7 @@
             return;
         }
 
-        Set 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 );
@@ -630,7 +630,7 @@
             }
         }
 
-        Set 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 );
@@ -669,7 +669,7 @@
 
         PartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();
         LdapDN userName = principal.getJndiName();
-        Set 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 );
@@ -749,7 +749,7 @@
             return;
         }
 
-        Set 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 );
@@ -796,7 +796,7 @@
             return;
         }
 
-        Set 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 );
@@ -872,7 +872,7 @@
             return;
         }
 
-        Set 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 );
@@ -982,7 +982,7 @@
             return next.compare( opContext );
         }
 
-        Set 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 );
@@ -1020,7 +1020,7 @@
         while ( matched.size() > 0 )
         {
             entry = proxy.lookup( new LookupOperationContext( matched ), PartitionNexusProxy.GETMATCHEDDN_BYPASS );
-            Set 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 );
@@ -1055,7 +1055,7 @@
         Attributes entry = invocation.getProxy().lookup( new LookupOperationContext( normName ), PartitionNexusProxy.LOOKUP_BYPASS );
         ServerLdapContext ctx = ( ServerLdapContext ) invocation.getCaller();
         LdapDN userDn = ctx.getPrincipal().getJndiName();
-        Set 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/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java?view=diff&rev=566866&r1=566865&r2=566866
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java Thu Aug 16 14:35:52 2007
@@ -95,7 +95,7 @@
      */
     private boolean enabled = true;
     
-    private Set administrators = new HashSet(2);
+    private Set<String> administrators = new HashSet<String>(2);
     
     /** The normalizer mapping containing a relation between an OID and a normalizer */
     private Map<String, OidNormalizer> normalizerMapping;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java?view=diff&rev=566866&r1=566865&r2=566866
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java Thu Aug 16 14:35:52 2007
@@ -470,7 +470,7 @@
             return true;
         }
         
-        Set members = groups.get( administratorsGroupDn.getNormName() );
+        Set<String> members = groups.get( administratorsGroupDn.getNormName() );
         
         if ( members == null )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java?view=diff&rev=566866&r1=566865&r2=566866
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java Thu Aug 16 14:35:52 2007
@@ -37,11 +37,11 @@
 import org.apache.directory.server.core.subtree.RefinementEvaluator;
 import org.apache.directory.server.core.subtree.RefinementLeafEvaluator;
 import org.apache.directory.server.core.subtree.SubtreeEvaluator;
-import org.apache.directory.server.core.trigger.TriggerService;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
@@ -118,9 +118,9 @@
      * @param aciTuples {@link org.apache.directory.shared.ldap.aci.ACITuple}s translated from {@link org.apache.directory.shared.ldap.aci.ACIItem}s in the subtree entries
      * @throws NamingException if failed to evaluate ACI items
      */
-    public void checkPermission( PartitionNexusProxy proxy, Collection userGroupNames, LdapDN username,
+    public void checkPermission( PartitionNexusProxy proxy, Collection<LdapDN> userGroupNames, LdapDN username,
                                  AuthenticationLevel authenticationLevel, LdapDN entryName, String attrId, Object attrValue,
-                                 Collection microOperations, Collection<ACITuple> aciTuples, Attributes entry ) throws NamingException
+                                 Collection<MicroOperation> microOperations, Collection<ACITuple> aciTuples, Attributes entry ) throws NamingException
     {
         if ( !hasPermission( proxy, userGroupNames, username, authenticationLevel, entryName, attrId, attrValue,
             microOperations, aciTuples, entry ) )
@@ -129,7 +129,7 @@
         }
     }
 
-    public static final Collection USER_LOOKUP_BYPASS;
+    public static final Collection<String> USER_LOOKUP_BYPASS;
     static
     {
         Collection<String> c = new HashSet<String>();
@@ -162,9 +162,9 @@
      * @param microOperations the {@link org.apache.directory.shared.ldap.aci.MicroOperation}s to perform
      * @param aciTuples {@link org.apache.directory.shared.ldap.aci.ACITuple}s translated from {@link org.apache.directory.shared.ldap.aci.ACIItem}s in the subtree entries
      */
-    public boolean hasPermission( PartitionNexusProxy proxy, Collection userGroupNames, LdapDN userName,
+    public boolean hasPermission( PartitionNexusProxy proxy, Collection<LdapDN> userGroupNames, LdapDN userName,
                                   AuthenticationLevel authenticationLevel, LdapDN entryName, String attrId, Object attrValue,
-                                  Collection microOperations, Collection<ACITuple> aciTuples, Attributes entry ) throws NamingException
+                                  Collection<MicroOperation> microOperations, Collection<ACITuple> aciTuples, Attributes entry ) throws NamingException
     {
         if ( entryName == null )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java?view=diff&rev=566866&r1=566865&r2=566866
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java Thu Aug 16 14:35:52 2007
@@ -27,6 +27,7 @@
 import javax.naming.directory.Attributes;
 
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
 import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -62,9 +63,18 @@
      * @return the collection of filtered tuples
      * @throws NamingException if failed to filter the specifiec tuples
      */
-    Collection filter( Collection tuples, OperationScope scope, PartitionNexusProxy proxy,
-                       Collection userGroupNames, LdapDN userName, Attributes userEntry,
-                       AuthenticationLevel authenticationLevel, LdapDN entryName, String attrId,
-                       Object attrValue, Attributes entry, Collection microOperations )
+    Collection<ACITuple> filter( 
+            Collection<ACITuple> tuples, 
+            OperationScope scope, 
+            PartitionNexusProxy proxy,
+            Collection<LdapDN> userGroupNames, 
+            LdapDN userName, 
+            Attributes userEntry,
+            AuthenticationLevel authenticationLevel, 
+            LdapDN entryName, 
+            String attrId,
+            Object attrValue, 
+            Attributes entry, 
+            Collection<MicroOperation> microOperations )
         throws NamingException;
 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java?view=diff&rev=566866&r1=566865&r2=566866
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java Thu Aug 16 14:35:52 2007
@@ -29,6 +29,7 @@
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 
@@ -41,9 +42,19 @@
  */
 public class HighestPrecedenceFilter implements ACITupleFilter
 {
-    public Collection filter( Collection tuples, OperationScope scope, PartitionNexusProxy proxy,
-                              Collection userGroupNames, LdapDN userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
-                              LdapDN entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+    public Collection<ACITuple> filter( 
+    		Collection<ACITuple> tuples, 
+    		OperationScope scope, 
+    		PartitionNexusProxy proxy,
+            Collection<LdapDN> userGroupNames, 
+            LdapDN userName, 
+            Attributes userEntry, 
+            AuthenticationLevel authenticationLevel,
+            LdapDN entryName, 
+            String attrId, 
+            Object attrValue, 
+            Attributes entry, 
+            Collection<MicroOperation> microOperations )
         throws NamingException
     {
         if ( tuples.size() <= 1 )
@@ -54,9 +65,8 @@
         int maxPrecedence = -1;
 
         // Find the maximum precedence for all tuples.
-        for ( Iterator i = tuples.iterator(); i.hasNext(); )
+        for ( ACITuple tuple:tuples )
         {
-            ACITuple tuple = ( ACITuple ) i.next();
             if ( tuple.getPrecedence() > maxPrecedence )
             {
                 maxPrecedence = tuple.getPrecedence();
@@ -67,6 +77,7 @@
         for ( Iterator i = tuples.iterator(); i.hasNext(); )
         {
             ACITuple tuple = ( ACITuple ) i.next();
+            
             if ( tuple.getPrecedence() != maxPrecedence )
             {
                 i.remove();

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java?view=diff&rev=566866&r1=566865&r2=566866
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java Thu Aug 16 14:35:52 2007
@@ -37,6 +37,7 @@
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.filter.ExprNode;
@@ -65,9 +66,19 @@
     }
 
 
-    public Collection filter( Collection tuples, OperationScope scope, PartitionNexusProxy proxy,
-                              Collection userGroupNames, LdapDN userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
-                              LdapDN entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+    public Collection<ACITuple> filter( 
+            Collection<ACITuple> tuples, 
+            OperationScope scope, 
+            PartitionNexusProxy proxy,
+            Collection<LdapDN> userGroupNames, 
+            LdapDN userName, 
+            Attributes userEntry, 
+            AuthenticationLevel authenticationLevel,
+            LdapDN entryName, 
+            String attrId, 
+            Object attrValue, 
+            Attributes entry, 
+            Collection<MicroOperation> microOperations )
         throws NamingException
     {
         if ( entryName.size() == 0 )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java?view=diff&rev=566866&r1=566865&r2=566866
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java Thu Aug 16 14:35:52 2007
@@ -30,6 +30,7 @@
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
 import org.apache.directory.shared.ldap.aci.ProtectedItem.MaxValueCountItem;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -44,9 +45,19 @@
  */
 public class MaxValueCountFilter implements ACITupleFilter
 {
-    public Collection filter( Collection tuples, OperationScope scope, PartitionNexusProxy proxy,
-                              Collection userGroupNames, LdapDN userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
-                              LdapDN entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+    public Collection<ACITuple> filter( 
+            Collection<ACITuple> tuples, 
+            OperationScope scope, 
+            PartitionNexusProxy proxy,
+            Collection<LdapDN> userGroupNames, 
+            LdapDN userName, 
+            Attributes userEntry, 
+            AuthenticationLevel authenticationLevel,
+            LdapDN entryName, 
+            String attrId, 
+            Object attrValue, 
+            Attributes entry, 
+            Collection<MicroOperation> microOperations )
         throws NamingException
     {
         if ( scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java?view=diff&rev=566866&r1=566865&r2=566866
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java Thu Aug 16 14:35:52 2007
@@ -43,9 +43,19 @@
  */
 public class MicroOperationFilter implements ACITupleFilter
 {
-    public Collection filter( Collection tuples, OperationScope scope, PartitionNexusProxy proxy,
-                              Collection userGroupNames, LdapDN userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
-                              LdapDN entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+    public Collection<ACITuple> filter( 
+                Collection<ACITuple> tuples, 
+                OperationScope scope, 
+                PartitionNexusProxy proxy,
+                Collection<LdapDN> userGroupNames, 
+                LdapDN userName, 
+                Attributes userEntry, 
+                AuthenticationLevel authenticationLevel,
+                LdapDN entryName, 
+                String attrId, 
+                Object attrValue, 
+                Attributes entry, 
+                Collection<MicroOperation> microOperations )
         throws NamingException
     {
         if ( tuples.size() == 0 )
@@ -64,9 +74,9 @@
              */
 
             boolean retain = true;
-            for ( Iterator j = microOperations.iterator(); j.hasNext(); )
+            
+            for ( MicroOperation microOp:microOperations )
             {
-                MicroOperation microOp = ( MicroOperation ) j.next();
                 if ( !tuple.getMicroOperations().contains( microOp ) )
                 {
                     retain = false;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java?view=diff&rev=566866&r1=566865&r2=566866
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java Thu Aug 16 14:35:52 2007
@@ -22,7 +22,6 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Iterator;
 
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
@@ -30,6 +29,7 @@
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
@@ -51,9 +51,19 @@
  */
 public class MostSpecificProtectedItemFilter implements ACITupleFilter
 {
-    public Collection filter( Collection tuples, OperationScope scope, PartitionNexusProxy proxy,
-                              Collection userGroupNames, LdapDN userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
-                              LdapDN entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+    public Collection<ACITuple> filter( 
+            Collection<ACITuple> tuples, 
+            OperationScope scope, 
+            PartitionNexusProxy proxy,
+            Collection<LdapDN> userGroupNames, 
+            LdapDN userName, 
+            Attributes userEntry, 
+            AuthenticationLevel authenticationLevel,
+            LdapDN entryName, 
+            String attrId, 
+            Object attrValue, 
+            Attributes entry, 
+            Collection<MicroOperation> microOperations )
         throws NamingException
     {
         if ( tuples.size() <= 1 )
@@ -61,16 +71,14 @@
             return tuples;
         }
 
-        Collection filteredTuples = new ArrayList();
+        Collection<ACITuple> filteredTuples = new ArrayList<ACITuple>();
 
         // If the protected item is an attribute and there are tuples that
         // specify the attribute type explicitly, discard all other tuples.
-        for ( Iterator i = tuples.iterator(); i.hasNext(); )
+        for ( ACITuple tuple:tuples )
         {
-            ACITuple tuple = ( ACITuple ) i.next();
-            for ( Iterator j = tuple.getProtectedItems().iterator(); j.hasNext(); )
+            for ( ProtectedItem item:tuple.getProtectedItems() )
             {
-                ProtectedItem item = ( ProtectedItem ) j.next();
                 if ( item instanceof ProtectedItem.AttributeType || item instanceof ProtectedItem.AllAttributeValues
                     || item instanceof ProtectedItem.SelfValue || item instanceof ProtectedItem.AttributeValue )
                 {
@@ -89,12 +97,10 @@
         // that specify the attribute value explicitly, discard all other tuples.
         // A protected item which is a rangeOfValues is to be treated as
         // specifying an attribute value explicitly. 
-        for ( Iterator i = tuples.iterator(); i.hasNext(); )
+        for ( ACITuple tuple:tuples )
         {
-            ACITuple tuple = ( ACITuple ) i.next();
-            for ( Iterator j = tuple.getProtectedItems().iterator(); j.hasNext(); )
+            for ( ProtectedItem item:tuple.getProtectedItems() )
             {
-                ProtectedItem item = ( ProtectedItem ) j.next();
                 if ( item instanceof ProtectedItem.RangeOfValues )
                 {
                     filteredTuples.add( tuple );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java?view=diff&rev=566866&r1=566865&r2=566866
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java Thu Aug 16 14:35:52 2007
@@ -22,7 +22,6 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Iterator;
 
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
@@ -30,6 +29,7 @@
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.aci.UserClass;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
@@ -49,9 +49,19 @@
  */
 public class MostSpecificUserClassFilter implements ACITupleFilter
 {
-    public Collection filter( Collection tuples, OperationScope scope, PartitionNexusProxy proxy,
-                              Collection userGroupNames, LdapDN userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
-                              LdapDN entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+    public Collection<ACITuple> filter( 
+            Collection<ACITuple> tuples, 
+            OperationScope scope, 
+            PartitionNexusProxy proxy,
+            Collection<LdapDN> userGroupNames, 
+            LdapDN userName, 
+            Attributes userEntry, 
+            AuthenticationLevel authenticationLevel,
+            LdapDN entryName, 
+            String attrId, 
+            Object attrValue, 
+            Attributes entry, 
+            Collection<MicroOperation> microOperations )
         throws NamingException
     {
         if ( tuples.size() <= 1 )
@@ -59,16 +69,14 @@
             return tuples;
         }
 
-        Collection filteredTuples = new ArrayList();
+        Collection<ACITuple> filteredTuples = new ArrayList<ACITuple>();
 
         // If there are any tuples matching the requestor with UserClasses
         // element name or thisEntry, discard all other tuples.
-        for ( Iterator i = tuples.iterator(); i.hasNext(); )
+        for ( ACITuple tuple:tuples )
         {
-            ACITuple tuple = ( ACITuple ) i.next();
-            for ( Iterator j = tuple.getUserClasses().iterator(); j.hasNext(); )
+            for ( UserClass userClass:tuple.getUserClasses() )
             {
-                UserClass userClass = ( UserClass ) j.next();
                 if ( userClass instanceof UserClass.Name || userClass instanceof UserClass.ThisEntry )
                 {
                     filteredTuples.add( tuple );
@@ -84,12 +92,10 @@
 
         // Otherwise if there are any tuples matching UserGroup,
         // discard all other tuples.
-        for ( Iterator i = tuples.iterator(); i.hasNext(); )
+        for ( ACITuple tuple:tuples )
         {
-            ACITuple tuple = ( ACITuple ) i.next();
-            for ( Iterator j = tuple.getUserClasses().iterator(); j.hasNext(); )
+            for ( UserClass userClass:tuple.getUserClasses() )
             {
-                UserClass userClass = ( UserClass ) j.next();
                 if ( userClass instanceof UserClass.UserGroup )
                 {
                     filteredTuples.add( tuple );
@@ -105,12 +111,10 @@
 
         // Otherwise if there are any tuples matching subtree,
         // discard all other tuples.
-        for ( Iterator i = tuples.iterator(); i.hasNext(); )
+        for ( ACITuple tuple:tuples )
         {
-            ACITuple tuple = ( ACITuple ) i.next();
-            for ( Iterator j = tuple.getUserClasses().iterator(); j.hasNext(); )
+            for ( UserClass userClass:tuple.getUserClasses() )
             {
-                UserClass userClass = ( UserClass ) j.next();
                 if ( userClass instanceof UserClass.Subtree )
                 {
                     filteredTuples.add( tuple );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java?view=diff&rev=566866&r1=566865&r2=566866
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java Thu Aug 16 14:35:52 2007
@@ -34,6 +34,7 @@
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
 import org.apache.directory.shared.ldap.aci.ProtectedItem.MaxValueCountItem;
 import org.apache.directory.shared.ldap.aci.ProtectedItem.RestrictedByItem;
@@ -68,10 +69,19 @@
     }
 
 
-    public Collection filter( Collection tuples, OperationScope scope, PartitionNexusProxy proxy,
-                              Collection userGroupNames, LdapDN userName, Attributes userEntry,
-                              AuthenticationLevel authenticationLevel, LdapDN entryName, String attrId,
-                              Object attrValue, Attributes entry, Collection microOperations )
+    public Collection<ACITuple> filter( 
+            Collection<ACITuple> tuples, 
+            OperationScope scope, 
+            PartitionNexusProxy proxy,
+            Collection<LdapDN> userGroupNames, 
+            LdapDN userName, 
+            Attributes userEntry,
+            AuthenticationLevel authenticationLevel, 
+            LdapDN entryName, 
+            String attrId,
+            Object attrValue, 
+            Attributes entry, 
+            Collection<MicroOperation> microOperations )
         throws NamingException
     {
         if ( tuples.size() == 0 )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java?view=diff&rev=566866&r1=566865&r2=566866
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java Thu Aug 16 14:35:52 2007
@@ -30,6 +30,7 @@
 import org.apache.directory.server.core.subtree.SubtreeEvaluator;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.aci.UserClass;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
@@ -55,9 +56,19 @@
     }
 
 
-    public Collection filter( Collection tuples, OperationScope scope, PartitionNexusProxy proxy,
-        Collection userGroupNames, LdapDN userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
-        LdapDN entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+    public Collection<ACITuple> filter( 
+            Collection<ACITuple> tuples, 
+            OperationScope scope, 
+            PartitionNexusProxy proxy,
+            Collection<LdapDN> userGroupNames, 
+            LdapDN userName, 
+            Attributes userEntry, 
+            AuthenticationLevel authenticationLevel,
+            LdapDN entryName, 
+            String attrId, 
+            Object attrValue, 
+            Attributes entry, 
+            Collection<MicroOperation> microOperations )
         throws NamingException
     {
         if ( tuples.size() == 0 )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java?view=diff&rev=566866&r1=566865&r2=566866
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java Thu Aug 16 14:35:52 2007
@@ -30,6 +30,7 @@
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
 import org.apache.directory.shared.ldap.aci.ProtectedItem.RestrictedByItem;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -44,9 +45,19 @@
  */
 public class RestrictedByFilter implements ACITupleFilter
 {
-    public Collection filter( Collection tuples, OperationScope scope, PartitionNexusProxy proxy,
-                              Collection userGroupNames, LdapDN userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
-                              LdapDN entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations )
+    public Collection<ACITuple> filter( 
+            Collection<ACITuple> tuples, 
+            OperationScope scope, 
+            PartitionNexusProxy proxy,
+            Collection<LdapDN> userGroupNames, 
+            LdapDN userName, 
+            Attributes userEntry, 
+            AuthenticationLevel authenticationLevel,
+            LdapDN entryName, 
+            String attrId, 
+            Object attrValue, 
+            Attributes entry, 
+            Collection<MicroOperation> microOperations )
         throws NamingException
     {
         if ( scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE )
@@ -62,6 +73,7 @@
         for ( Iterator i = tuples.iterator(); i.hasNext(); )
         {
             ACITuple tuple = ( ACITuple ) i.next();
+            
             if ( !tuple.isGrant() )
             {
                 continue;
@@ -79,10 +91,8 @@
 
     public boolean isRemovable( ACITuple tuple, String attrId, Object attrValue, Attributes entry )
     {
-        for ( Iterator i = tuple.getProtectedItems().iterator(); i.hasNext(); )
+        for ( ProtectedItem item:tuple.getProtectedItems() )
         {
-            ProtectedItem item = ( ProtectedItem ) i.next();
-            
             if ( item instanceof ProtectedItem.RestrictedBy )
             {
                 ProtectedItem.RestrictedBy rb = ( ProtectedItem.RestrictedBy ) item;
@@ -91,11 +101,13 @@
                 {
                     RestrictedByItem rbItem = ( RestrictedByItem ) k.next();
                 
+                    // TODO Fix DIRSEVER-832 
                     if ( attrId.equalsIgnoreCase( rbItem.getAttributeType() ) )
                     {
                         Attribute attr = entry.get( rbItem.getValuesIn() );
                         
-                        if ( attr == null || !attr.contains( attrValue ) )
+                        // TODO Fix DIRSEVER-832
+                        if ( ( attr == null ) || !attr.contains( attrValue ) )
                         {
                             return true;
                         }

Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilterTest.java?view=diff&rev=566866&r1=566865&r2=566866
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilterTest.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilterTest.java Thu Aug 16 14:35:52 2007
@@ -24,7 +24,6 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.Set;
 
 import junit.framework.Assert;
@@ -33,6 +32,9 @@
 import org.apache.directory.server.core.authz.support.HighestPrecedenceFilter;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+import org.apache.directory.shared.ldap.aci.MicroOperation;
+import org.apache.directory.shared.ldap.aci.ProtectedItem;
+import org.apache.directory.shared.ldap.aci.UserClass;
 
 
 /**
@@ -44,14 +46,16 @@
  */
 public class HighestPrecedenceFilterTest extends TestCase
 {
-    private static final Collection EMPTY_COLLECTION = Collections.unmodifiableCollection( new ArrayList() );
-    private static final Set EMPTY_SET = Collections.unmodifiableSet( new HashSet() );
+    private static final Collection<ProtectedItem> PI_EMPTY_COLLECTION = Collections.unmodifiableCollection( new ArrayList<ProtectedItem>() );
+    private static final Collection<UserClass> UC_EMPTY_COLLECTION = Collections.unmodifiableCollection( new ArrayList<UserClass>() );
+    private static final Collection<ACITuple> AT_EMPTY_COLLECTION = Collections.unmodifiableCollection( new ArrayList<ACITuple>() );
+    private static final Set<MicroOperation> MO_EMPTY_SET = Collections.unmodifiableSet( new HashSet<MicroOperation>() );
 
 
     public void testZeroTuple() throws Exception
     {
         HighestPrecedenceFilter filter = new HighestPrecedenceFilter();
-        Assert.assertEquals( 0, filter.filter( EMPTY_COLLECTION, null, null, null, null, null, null, null, null, null,
+        Assert.assertEquals( 0, filter.filter( AT_EMPTY_COLLECTION, null, null, null, null, null, null, null, null, null,
             null, null ).size() );
     }
 
@@ -59,9 +63,11 @@
     public void testOneTuple() throws Exception
     {
         HighestPrecedenceFilter filter = new HighestPrecedenceFilter();
-        Collection tuples = new ArrayList();
-        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true, 10 ) );
+        Collection<ACITuple> tuples = new ArrayList<ACITuple>();
+        
+        tuples.add( new ACITuple( UC_EMPTY_COLLECTION, AuthenticationLevel.NONE, PI_EMPTY_COLLECTION, MO_EMPTY_SET, true, 10 ) );
         tuples = Collections.unmodifiableCollection( tuples );
+        
         Assert.assertEquals( tuples, filter.filter( tuples, null, null, null, null, null, null, null, null, null, null,
             null ) );
     }
@@ -71,21 +77,21 @@
     {
         final int MAX_PRECEDENCE = 10;
         HighestPrecedenceFilter filter = new HighestPrecedenceFilter();
-        Collection tuples = new ArrayList();
-        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true,
+        Collection<ACITuple> tuples = new ArrayList<ACITuple>();
+        
+        tuples.add( new ACITuple( UC_EMPTY_COLLECTION, AuthenticationLevel.NONE, PI_EMPTY_COLLECTION, MO_EMPTY_SET, true,
             MAX_PRECEDENCE ) );
-        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true,
+        tuples.add( new ACITuple( UC_EMPTY_COLLECTION, AuthenticationLevel.NONE, PI_EMPTY_COLLECTION, MO_EMPTY_SET, true,
             MAX_PRECEDENCE / 2 ) );
-        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true,
+        tuples.add( new ACITuple( UC_EMPTY_COLLECTION, AuthenticationLevel.NONE, PI_EMPTY_COLLECTION, MO_EMPTY_SET, true,
             MAX_PRECEDENCE ) );
-        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true,
+        tuples.add( new ACITuple( UC_EMPTY_COLLECTION, AuthenticationLevel.NONE, PI_EMPTY_COLLECTION, MO_EMPTY_SET, true,
             MAX_PRECEDENCE / 3 ) );
 
         tuples = filter.filter( tuples, null, null, null, null, null, null, null, null, null, null, null );
 
-        for ( Iterator i = tuples.iterator(); i.hasNext(); )
+        for ( ACITuple tuple:tuples )
         {
-            ACITuple tuple = ( ACITuple ) i.next();
             Assert.assertEquals( MAX_PRECEDENCE, tuple.getPrecedence() );
         }
     }

Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java?view=diff&rev=566866&r1=566865&r2=566866
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java Thu Aug 16 14:35:52 2007
@@ -36,7 +36,9 @@
 import org.apache.directory.server.core.authz.support.RestrictedByFilter;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+import org.apache.directory.shared.ldap.aci.MicroOperation;
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
+import org.apache.directory.shared.ldap.aci.UserClass;
 import org.apache.directory.shared.ldap.aci.ProtectedItem.RestrictedByItem;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
@@ -50,10 +52,12 @@
  */
 public class RestrictedByFilterTest extends TestCase
 {
-    private static final Collection EMPTY_COLLECTION = Collections.unmodifiableCollection( new ArrayList() );
-    private static final Set EMPTY_SET = Collections.unmodifiableSet( new HashSet() );
+    private static final Collection<UserClass> UC_EMPTY_COLLECTION = Collections.unmodifiableCollection( new ArrayList<UserClass>() );
+    private static final Collection<ACITuple> AT_EMPTY_COLLECTION = Collections.unmodifiableCollection( new ArrayList<ACITuple>() );
+    private static final Collection<ProtectedItem> PI_EMPTY_COLLECTION = Collections.unmodifiableCollection( new ArrayList<ProtectedItem>() );
+    private static final Set<MicroOperation> MO_EMPTY_SET = Collections.unmodifiableSet( new HashSet<MicroOperation>() );
 
-    private static final Collection<ProtectedItem.RestrictedBy> PROTECTED_ITEMS = new ArrayList<ProtectedItem.RestrictedBy>();
+    private static final Collection<ProtectedItem> PROTECTED_ITEMS = new ArrayList<ProtectedItem>();
     private static final Attributes ENTRY = new AttributesImpl();
 
     static
@@ -74,7 +78,7 @@
     {
         RestrictedByFilter filter = new RestrictedByFilter();
         Collection<ACITuple> tuples = new ArrayList<ACITuple>();
-        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true, 0 ) );
+        tuples.add( new ACITuple( UC_EMPTY_COLLECTION, AuthenticationLevel.NONE, PI_EMPTY_COLLECTION, MO_EMPTY_SET, true, 0 ) );
 
         tuples = Collections.unmodifiableCollection( tuples );
 
@@ -90,7 +94,7 @@
     {
         RestrictedByFilter filter = new RestrictedByFilter();
 
-        Assert.assertEquals( 0, filter.filter( EMPTY_COLLECTION, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null,
+        Assert.assertEquals( 0, filter.filter( AT_EMPTY_COLLECTION, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null,
             null, null, null, null, null, null, null, null ).size() );
     }
 
@@ -99,7 +103,7 @@
     {
         RestrictedByFilter filter = new RestrictedByFilter();
         Collection<ACITuple> tuples = new ArrayList<ACITuple>();
-        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, PROTECTED_ITEMS, EMPTY_SET, false, 0 ) );
+        tuples.add( new ACITuple( UC_EMPTY_COLLECTION, AuthenticationLevel.NONE, PROTECTED_ITEMS, MO_EMPTY_SET, false, 0 ) );
 
         tuples = Collections.unmodifiableCollection( tuples );
 
@@ -112,7 +116,7 @@
     {
         RestrictedByFilter filter = new RestrictedByFilter();
         Collection<ACITuple> tuples = new ArrayList<ACITuple>();
-        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, PROTECTED_ITEMS, EMPTY_SET, true, 0 ) );
+        tuples.add( new ACITuple( UC_EMPTY_COLLECTION, AuthenticationLevel.NONE, PROTECTED_ITEMS, MO_EMPTY_SET, true, 0 ) );
 
         Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, null, null,
             null, null, "choice", "1", ENTRY, null ).size() );



Mime
View raw message