portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r694561 - in /portals/jetspeed-2/portal/branches/security-refactoring: components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/ jetspeed-api/src/main/java/org/apache/jetspeed/security/ jetspeed-api/src/main/java/org/apa...
Date Fri, 12 Sep 2008 00:22:29 GMT
Author: ate
Date: Thu Sep 11 17:22:28 2008
New Revision: 694561

URL: http://svn.apache.org/viewvc?rev=694561&view=rev
Log:
- dropping PrincipalPermission handling methods from the JetspeedPrincipalManager
- removing dependency (extension) of the JetspeedPrincipalManager on the JetspeedPrincipalStorageManager
(spi only) 

Removed:
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalPermissionStorageManager.java
Modified:
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipalManager.java
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/GroupManagerImpl.java
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/RoleManagerImpl.java
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/UserManagerImpl.java
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAccessManager.java

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipalManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipalManager.java?rev=694561&r1=694560&r2=694561&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipalManager.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipalManager.java
Thu Sep 11 17:22:28 2008
@@ -23,7 +23,6 @@
 import java.util.Set;
 
 import org.apache.jetspeed.security.DependentPrincipalException;
-import org.apache.jetspeed.security.JetspeedPermission;
 import org.apache.jetspeed.security.JetspeedPrincipal;
 import org.apache.jetspeed.security.JetspeedPrincipalAssociationHandler;
 import org.apache.jetspeed.security.JetspeedPrincipalAssociationReference;
@@ -39,7 +38,6 @@
 import org.apache.jetspeed.security.PrincipalUpdateException;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalAccessManager;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalManagerSPI;
-import org.apache.jetspeed.security.spi.JetspeedPrincipalPermissionStorageManager;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalStorageManager;
 
 /**
@@ -84,16 +82,13 @@
     private Map<AssociationHandlerKey, JetspeedPrincipalAssociationType> reqAssociations
= new HashMap<AssociationHandlerKey, JetspeedPrincipalAssociationType>();
     private JetspeedPrincipalAccessManager jpam;
     private JetspeedPrincipalStorageManager jpsm;
-    private JetspeedPrincipalPermissionStorageManager jppsm;
 
     public BaseJetspeedPrincipalManager(JetspeedPrincipalType principalType, JetspeedPrincipalAccessManager
jpam,
-                                        JetspeedPrincipalStorageManager jpsm,
-                                        JetspeedPrincipalPermissionStorageManager jppsm)
+                                        JetspeedPrincipalStorageManager jpsm)
     {
         this.principalType = principalType;
         this.jpam = jpam;
         this.jpsm = jpsm;
-        this.jppsm = jppsm;
     }
     
     protected final void validatePrincipal(JetspeedPrincipal principal)
@@ -218,11 +213,6 @@
     //
     // JetspeedPrincipalStorageManager interface implementation
     //
-    public final boolean isMapped()
-    {
-        return jpsm.isMapped();
-    }
-
     public void addPrincipal(JetspeedPrincipal principal, Set<JetspeedPrincipalAssociationReference>
associations)
         throws PrincipalAssociationNotAllowedException, PrincipalAlreadyExistsException,
PrincipalAssociationRequiredException, PrincipalNotFoundException, PrincipalAssociationUnsupportedException
     {
@@ -304,27 +294,6 @@
     }
 
     //
-    // JetspeedPrincipalPermissionStorageManager interface implementation
-    //
-    public void grantPermission(JetspeedPrincipal principal, JetspeedPermission permission)
-    {
-        validatePrincipal(principal);
-        jppsm.grantPermission(principal, permission);
-    }
-
-    public void revokeAll(JetspeedPrincipal principal)
-    {
-        jppsm.revokeAll(principal);
-        validatePrincipal(principal);
-    }
-
-    public void revokePermission(JetspeedPrincipal principal, JetspeedPermission permission)
-    {
-        validatePrincipal(principal);
-        jppsm.revokePermission(principal, permission);
-    }
-
-    //
     // JetspeedPrincipalAssociationHandler interface invocations
     //
     public void addAssociation(String associationName, JetspeedPrincipal from, JetspeedPrincipal
to) throws PrincipalNotFoundException, PrincipalAssociationNotAllowedException, PrincipalAssociationUnsupportedException

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/GroupManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/GroupManagerImpl.java?rev=694561&r1=694560&r2=694561&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/GroupManagerImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/GroupManagerImpl.java
Thu Sep 11 17:22:28 2008
@@ -25,7 +25,6 @@
 import org.apache.jetspeed.security.GroupManager;
 import org.apache.jetspeed.security.JetspeedPrincipal;
 import org.apache.jetspeed.security.JetspeedPrincipalAssociationType;
-import org.apache.jetspeed.security.JetspeedPrincipalManager;
 import org.apache.jetspeed.security.JetspeedPrincipalType;
 import org.apache.jetspeed.security.PrincipalAlreadyExistsException;
 import org.apache.jetspeed.security.PrincipalAssociationNotAllowedException;
@@ -35,12 +34,10 @@
 import org.apache.jetspeed.security.PrincipalNotRemovableException;
 import org.apache.jetspeed.security.PrincipalReadOnlyException;
 import org.apache.jetspeed.security.PrincipalUpdateException;
-import org.apache.jetspeed.security.RoleManager;
 import org.apache.jetspeed.security.SecurityException;
 import org.apache.jetspeed.security.User;
 import org.apache.jetspeed.security.UserManager;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalAccessManager;
-import org.apache.jetspeed.security.spi.JetspeedPrincipalPermissionStorageManager;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalStorageManager;
 
 /**
@@ -71,10 +68,9 @@
     private UserManager userManager;
     
     public GroupManagerImpl(JetspeedPrincipalType principalType,JetspeedPrincipalType userType,JetspeedPrincipalType
roleType, 
-                           JetspeedPrincipalAccessManager jpam, JetspeedPrincipalStorageManager
jpsm,
-                           JetspeedPrincipalPermissionStorageManager jppsm)
+                           JetspeedPrincipalAccessManager jpam, JetspeedPrincipalStorageManager
jpsm)
     {
-        super(principalType, jpam, jpsm, jppsm);
+        super(principalType, jpam, jpsm);
         this.userType = userType;
         this.roleType = roleType;
     }

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/RoleManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/RoleManagerImpl.java?rev=694561&r1=694560&r2=694561&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/RoleManagerImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/RoleManagerImpl.java
Thu Sep 11 17:22:28 2008
@@ -26,7 +26,6 @@
 import org.apache.jetspeed.security.GroupManager;
 import org.apache.jetspeed.security.JetspeedPrincipal;
 import org.apache.jetspeed.security.JetspeedPrincipalAssociationType;
-import org.apache.jetspeed.security.JetspeedPrincipalManager;
 import org.apache.jetspeed.security.JetspeedPrincipalType;
 import org.apache.jetspeed.security.PrincipalAlreadyExistsException;
 import org.apache.jetspeed.security.PrincipalAssociationNotAllowedException;
@@ -42,7 +41,6 @@
 import org.apache.jetspeed.security.User;
 import org.apache.jetspeed.security.UserManager;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalAccessManager;
-import org.apache.jetspeed.security.spi.JetspeedPrincipalPermissionStorageManager;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalStorageManager;
 
 /**
@@ -75,10 +73,9 @@
     private GroupManager groupManager;
     
     public RoleManagerImpl(JetspeedPrincipalType principalType,JetspeedPrincipalType userType,JetspeedPrincipalType
groupType,
-                           JetspeedPrincipalAccessManager jpam, JetspeedPrincipalStorageManager
jpsm,
-                           JetspeedPrincipalPermissionStorageManager jppsm)
+                           JetspeedPrincipalAccessManager jpam, JetspeedPrincipalStorageManager
jpsm)
     {
-        super(principalType, jpam, jpsm, jppsm);
+        super(principalType, jpam, jpsm);
         this.userType = userType;
         this.groupType = groupType;
     }

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/UserManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/UserManagerImpl.java?rev=694561&r1=694560&r2=694561&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/UserManagerImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/UserManagerImpl.java
Thu Sep 11 17:22:28 2008
@@ -48,7 +48,6 @@
 import org.apache.jetspeed.security.User;
 import org.apache.jetspeed.security.UserManager;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalAccessManager;
-import org.apache.jetspeed.security.spi.JetspeedPrincipalPermissionStorageManager;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalStorageManager;
 import org.apache.jetspeed.security.spi.UserPasswordCredentialManager;
 
@@ -74,10 +73,9 @@
 	private GroupManager groupManager;
 
 	public UserManagerImpl(JetspeedPrincipalType principalType, JetspeedPrincipalType roleType,
JetspeedPrincipalType groupType,
-			JetspeedPrincipalAccessManager jpam, JetspeedPrincipalStorageManager jpsm, JetspeedPrincipalPermissionStorageManager
jppsm,
-			UserPasswordCredentialManager credentialManager) 
+			JetspeedPrincipalAccessManager jpam, JetspeedPrincipalStorageManager jpsm, UserPasswordCredentialManager
credentialManager) 
 	{
-		super(principalType, jpam, jpsm, jppsm);
+		super(principalType, jpam, jpsm);
 		this.credentialManager = credentialManager;
 		this.roleType = roleType;
 		this.groupType = groupType;

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java?rev=694561&r1=694560&r2=694561&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java
Thu Sep 11 17:22:28 2008
@@ -17,14 +17,14 @@
 package org.apache.jetspeed.security;
 
 import java.util.List;
+import java.util.Set;
 
-import org.apache.jetspeed.security.spi.JetspeedPrincipalPermissionStorageManager;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalStorageManager;
 
 /**
  * @version $Id$
  */
-public interface JetspeedPrincipalManager extends JetspeedPrincipalStorageManager, JetspeedPrincipalPermissionStorageManager
+public interface JetspeedPrincipalManager
 {
     JetspeedPrincipalType getPrincipalType();
 
@@ -108,4 +108,12 @@
      * @return The list of the names of the principals in the <em>from</em> side
of the provided association for the provided principal name and its type
      */
     List<String> getAssociatedNamesTo(String principalToName, JetspeedPrincipalType
to, String associationName);
+
+    void addPrincipal(JetspeedPrincipal principal, Set<JetspeedPrincipalAssociationReference>
associations)
+        throws PrincipalAssociationNotAllowedException, PrincipalAlreadyExistsException,
PrincipalAssociationRequiredException, PrincipalNotFoundException, PrincipalAssociationUnsupportedException;
+
+    void updatePrincipal(JetspeedPrincipal principal) throws PrincipalUpdateException, PrincipalNotFoundException,
PrincipalReadOnlyException;
+
+    void removePrincipal(JetspeedPrincipal principal)
+        throws PrincipalNotFoundException, PrincipalNotRemovableException, DependentPrincipalException;
 }

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAccessManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAccessManager.java?rev=694561&r1=694560&r2=694561&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAccessManager.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAccessManager.java
Thu Sep 11 17:22:28 2008
@@ -18,7 +18,6 @@
 
 import java.util.List;
 
-import org.apache.jetspeed.security.JetspeedPermission;
 import org.apache.jetspeed.security.JetspeedPrincipal;
 import org.apache.jetspeed.security.JetspeedPrincipalType;
 
@@ -54,8 +53,4 @@
     List<String> getAssociatedNamesTo(String principalToName, JetspeedPrincipalType
from, JetspeedPrincipalType to, String associationName);
 
     List<String> getAssociatedNamesTo(Long principalToId, JetspeedPrincipalType from,
JetspeedPrincipalType to, String associationName);
-
-    List<String> getPrincipals(JetspeedPermission permission);
-
-    List<String> getPrincipals(JetspeedPermission permission, JetspeedPrincipalType
type);
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message