geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r650302 - /geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/mappingprovider/
Date Mon, 21 Apr 2008 22:33:34 GMT
Author: djencks
Date: Mon Apr 21 15:33:11 2008
New Revision: 650302

URL: http://svn.apache.org/viewvc?rev=650302&view=rev
Log:
use a few more generics

Modified:
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/mappingprovider/ApplicationPrincipalRoleConfigurationManager.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/mappingprovider/PolicyConfigurationGeneric.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/mappingprovider/PrincipalRoleConfiguration.java

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/mappingprovider/ApplicationPrincipalRoleConfigurationManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/mappingprovider/ApplicationPrincipalRoleConfigurationManager.java?rev=650302&r1=650301&r2=650302&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/mappingprovider/ApplicationPrincipalRoleConfigurationManager.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/mappingprovider/ApplicationPrincipalRoleConfigurationManager.java
Mon Apr 21 15:33:11 2008
@@ -18,6 +18,7 @@
 
 import java.util.Map;
 import java.util.Set;
+import java.security.Principal;
 
 import javax.security.jacc.PolicyContextException;
 
@@ -32,9 +33,9 @@
 public class ApplicationPrincipalRoleConfigurationManager implements PrincipalRoleMapper
{
 
     private static PrincipalRoleConfigurationFactory principalRoleConfigurationFactory;
-    private final Map principalRoleMap;
+    private final Map<Principal, Set<String>> principalRoleMap;
 
-    public ApplicationPrincipalRoleConfigurationManager(Map principalRoleMap) throws PolicyContextException,
ClassNotFoundException {
+    public ApplicationPrincipalRoleConfigurationManager(Map<Principal, Set<String>>
principalRoleMap) throws PolicyContextException, ClassNotFoundException {
         this.principalRoleMap = principalRoleMap;
     }
 

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/mappingprovider/PolicyConfigurationGeneric.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/mappingprovider/PolicyConfigurationGeneric.java?rev=650302&r1=650301&r2=650302&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/mappingprovider/PolicyConfigurationGeneric.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/mappingprovider/PolicyConfigurationGeneric.java
Mon Apr 21 15:33:11 2008
@@ -58,7 +58,7 @@
 
     public boolean implies(ProtectionDomain domain, Permission permission) {
 
-        if (excluded != null && excluded.implies(permission)) return false;
+//        if (excluded != null && excluded.implies(permission)) return false;
 
         if (unchecked != null && unchecked.implies(permission)) return true;
 
@@ -66,7 +66,7 @@
         if (principals.length == 0) return false;
 
         for (Principal principal : principals) {
-            Permissions permissions = (Permissions) principalPermissionsMap.get(principal);
+            Permissions permissions = principalPermissionsMap.get(principal);
 
             if (permissions != null && permissions.implies(permission)) return true;
         }
@@ -74,7 +74,7 @@
         return false;
     }
 
-    public void setPrincipalRoleMapping(Map principalRoleMap) throws PolicyContextException
{
+    public void setPrincipalRoleMapping(Map<Principal, Set<String>> principalRoleMap)
throws PolicyContextException {
         principalRoleMapping.clear();
         principalRoleMapping.putAll(principalRoleMap);
     }

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/mappingprovider/PrincipalRoleConfiguration.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/mappingprovider/PrincipalRoleConfiguration.java?rev=650302&r1=650301&r2=650302&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/mappingprovider/PrincipalRoleConfiguration.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/mappingprovider/PrincipalRoleConfiguration.java
Mon Apr 21 15:33:11 2008
@@ -21,6 +21,8 @@
 package org.apache.geronimo.security.jacc.mappingprovider;
 
 import java.util.Map;
+import java.util.Set;
+import java.security.Principal;
 
 import javax.security.jacc.PolicyContextException;
 
@@ -28,5 +30,5 @@
  * @version $Rev$ $Date$
  */
 public interface PrincipalRoleConfiguration {
-    void setPrincipalRoleMapping(Map principalRoleMap) throws PolicyContextException;
+    void setPrincipalRoleMapping(Map<Principal, Set<String>> principalRoleMap)
throws PolicyContextException;
 }



Mime
View raw message