portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r693839 - in /portals/jetspeed-2/portal/branches/security-refactoring: components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/ components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/ jetspeed-...
Date Wed, 10 Sep 2008 13:21:56 GMT
Author: ate
Date: Wed Sep 10 06:21:56 2008
New Revision: 693839

URL: http://svn.apache.org/viewvc?rev=693839&view=rev
Log:
- fix for the JetspeedPrincipalAssociationHandler addAssociation exception throws list which
effected all JetspeedPrincipalManager implementations
- first and basic SimpleMemberOfPrincipalAssociationHandler implementation

Added:
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/BaseJetspeedPrincipalAssociationHandler.java
  (with props)
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/SimpleMemberOfPrincipalAssociationHandler.java
  (with props)
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/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationHandler.java
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAssociationStorageManager.java
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalStorageManager.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=693839&r1=693838&r2=693839&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
Wed Sep 10 06:21:56 2008
@@ -32,6 +32,7 @@
 import org.apache.jetspeed.security.PrincipalAlreadyExistsException;
 import org.apache.jetspeed.security.PrincipalAssociationNotAllowedException;
 import org.apache.jetspeed.security.PrincipalAssociationRequiredException;
+import org.apache.jetspeed.security.PrincipalAssociationUnsupportedException;
 import org.apache.jetspeed.security.PrincipalNotFoundException;
 import org.apache.jetspeed.security.PrincipalNotRemovableException;
 import org.apache.jetspeed.security.PrincipalReadOnlyException;
@@ -223,7 +224,7 @@
     }
 
     public void addPrincipal(JetspeedPrincipal principal, Set<JetspeedPrincipalAssociationReference>
associations)
-        throws PrincipalAssociationNotAllowedException, PrincipalAlreadyExistsException,
PrincipalAssociationRequiredException, PrincipalNotFoundException
+        throws PrincipalAssociationNotAllowedException, PrincipalAlreadyExistsException,
PrincipalAssociationRequiredException, PrincipalNotFoundException, PrincipalAssociationUnsupportedException
     {
         validatePrincipal(principal);
         if (associations != null)
@@ -326,7 +327,7 @@
     //
     // JetspeedPrincipalAssociationHandler interface invocations
     //
-    public void addAssociation(String associationName, JetspeedPrincipal from, JetspeedPrincipal
to) throws PrincipalNotFoundException, PrincipalAssociationNotAllowedException
+    public void addAssociation(String associationName, JetspeedPrincipal from, JetspeedPrincipal
to) throws PrincipalNotFoundException, PrincipalAssociationNotAllowedException, PrincipalAssociationUnsupportedException
     {
         AssociationHandlerKey key = new AssociationHandlerKey(associationName, from.getType().getName(),
to.getType().getName());        
         JetspeedPrincipalAssociationHandler jpah = assHandlers.get(key);

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=693839&r1=693838&r2=693839&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
Wed Sep 10 06:21:56 2008
@@ -29,6 +29,7 @@
 import org.apache.jetspeed.security.PrincipalAlreadyExistsException;
 import org.apache.jetspeed.security.PrincipalAssociationNotAllowedException;
 import org.apache.jetspeed.security.PrincipalAssociationRequiredException;
+import org.apache.jetspeed.security.PrincipalAssociationUnsupportedException;
 import org.apache.jetspeed.security.PrincipalNotFoundException;
 import org.apache.jetspeed.security.PrincipalReadOnlyException;
 import org.apache.jetspeed.security.PrincipalUpdateException;
@@ -128,6 +129,10 @@
         {
             throw new SecurityException(e);
         }
+        catch (PrincipalAssociationUnsupportedException e)
+        {
+            throw new SecurityException(e);
+        }
         catch (PrincipalNotFoundException e)
         {
             // cannot occurr as no associations are provided with addPrincipal
@@ -217,6 +222,10 @@
         {
             throw new SecurityException(e);
         }
+        catch (PrincipalAssociationUnsupportedException e)
+        {
+            throw new SecurityException(e);
+        }
     }
 
     /**

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=693839&r1=693838&r2=693839&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
Wed Sep 10 06:21:56 2008
@@ -30,6 +30,7 @@
 import org.apache.jetspeed.security.PrincipalAlreadyExistsException;
 import org.apache.jetspeed.security.PrincipalAssociationNotAllowedException;
 import org.apache.jetspeed.security.PrincipalAssociationRequiredException;
+import org.apache.jetspeed.security.PrincipalAssociationUnsupportedException;
 import org.apache.jetspeed.security.PrincipalNotFoundException;
 import org.apache.jetspeed.security.PrincipalReadOnlyException;
 import org.apache.jetspeed.security.PrincipalUpdateException;
@@ -134,6 +135,10 @@
         {
             throw new SecurityException(e);
         }
+        catch (PrincipalAssociationUnsupportedException e)
+        {
+            throw new SecurityException(e);
+        }
         catch (PrincipalNotFoundException e)
         {
             // cannot occurr as no associations are provided with addPrincipal
@@ -220,6 +225,10 @@
         {
             throw new SecurityException(e);
         }
+        catch (PrincipalAssociationUnsupportedException e)
+        {
+            throw new SecurityException(e);
+        }
     }
 
     /**
@@ -269,6 +278,10 @@
         {
             throw new SecurityException(e);
         }
+        catch (PrincipalAssociationUnsupportedException e)
+        {
+            throw new SecurityException(e);
+        }
     }
 
     /**

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=693839&r1=693838&r2=693839&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
Wed Sep 10 06:21:56 2008
@@ -38,6 +38,7 @@
 import org.apache.jetspeed.security.PrincipalAlreadyExistsException;
 import org.apache.jetspeed.security.PrincipalAssociationNotAllowedException;
 import org.apache.jetspeed.security.PrincipalAssociationRequiredException;
+import org.apache.jetspeed.security.PrincipalAssociationUnsupportedException;
 import org.apache.jetspeed.security.PrincipalNotFoundException;
 import org.apache.jetspeed.security.PrincipalNotRemovableException;
 import org.apache.jetspeed.security.PrincipalReadOnlyException;
@@ -108,6 +109,10 @@
 		{
 			throw new SecurityException(SecurityException.UNEXPECTED.create("UserManager.addUser",
"add", e.getMessage()));
 		}		
+        catch (PrincipalAssociationUnsupportedException e)
+        {
+            throw new SecurityException(e);
+        }
         catch (PrincipalNotFoundException e)
         {
             // cannot occurr as no associations are provided with addPrincipal

Added: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/BaseJetspeedPrincipalAssociationHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/BaseJetspeedPrincipalAssociationHandler.java?rev=693839&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/BaseJetspeedPrincipalAssociationHandler.java
(added)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/BaseJetspeedPrincipalAssociationHandler.java
Wed Sep 10 06:21:56 2008
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.security.spi.impl;
+
+import org.apache.jetspeed.security.JetspeedPrincipal;
+import org.apache.jetspeed.security.JetspeedPrincipalAssociationHandler;
+import org.apache.jetspeed.security.JetspeedPrincipalAssociationType;
+import org.apache.jetspeed.security.PrincipalAssociationNotAllowedException;
+import org.apache.jetspeed.security.PrincipalAssociationRequiredException;
+import org.apache.jetspeed.security.PrincipalAssociationUnsupportedException;
+import org.apache.jetspeed.security.PrincipalNotFoundException;
+import org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager;
+
+/**
+ * @version $Id$
+ *
+ */
+public abstract class BaseJetspeedPrincipalAssociationHandler implements JetspeedPrincipalAssociationHandler
+{
+    private JetspeedPrincipalAssociationType associationType;
+    private JetspeedPrincipalAssociationStorageManager jpasm;
+
+    
+    
+    public BaseJetspeedPrincipalAssociationHandler(JetspeedPrincipalAssociationType associationType,
+                                                   JetspeedPrincipalAssociationStorageManager
jpasm)
+    {
+        this.associationType = associationType;
+        this.jpasm = jpasm;
+    }
+
+    public void add(JetspeedPrincipal from, JetspeedPrincipal to) throws PrincipalNotFoundException,
+                                                                 PrincipalAssociationNotAllowedException,
PrincipalAssociationUnsupportedException
+    {
+        if (from.getType().equals(associationType.getFromPrincipalType()) && to.getType().equals(associationType.getToPrincipalType()))
+        {
+            jpasm.addAssociation(from, to, associationType.getAssociationName());
+        }
+    }
+
+    public JetspeedPrincipalAssociationType getAssociationType()
+    {
+        return associationType;
+    }
+
+    public void remove(JetspeedPrincipal from, JetspeedPrincipal to) throws PrincipalAssociationRequiredException
+    {
+        if (from.getType().equals(associationType.getFromPrincipalType()) && to.getType().equals(associationType.getToPrincipalType()))
+        {
+            jpasm.removeAssociation(from, to, associationType.getAssociationName());
+        }
+    }
+}

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/BaseJetspeedPrincipalAssociationHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/BaseJetspeedPrincipalAssociationHandler.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/BaseJetspeedPrincipalAssociationHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java?rev=693839&r1=693838&r2=693839&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java
Wed Sep 10 06:21:56 2008
@@ -66,6 +66,18 @@
         super(repositoryPath);
     }
     
+    public boolean principalExists(JetspeedPrincipal principal)
+    {
+        if (principal.getId() == null)
+        {
+            return principalExists(principal.getName(), principal.getType());
+        }
+        Criteria criteria = new Criteria();
+        criteria.addEqualTo("id", principal.getId());
+        Query query = QueryFactory.newQuery(principal.getType().getPrincipalClass(),criteria);
+        return getPersistenceBroker(true).getCount(query) == 1;
+    }
+
     //
     // JetspeedPrincipalAccessManager interface implementation
     //
@@ -236,18 +248,6 @@
         return getPersistenceBroker(true).getCount(query) == 1;
     }
 
-    public boolean principalExists(JetspeedPrincipal principal)
-    {
-        if (principal.getId() == null)
-        {
-            return principalExists(principal.getName(), principal.getType());
-        }
-        Criteria criteria = new Criteria();
-        criteria.addEqualTo("id", principal.getId());
-        Query query = QueryFactory.newQuery(principal.getType().getPrincipalClass(),criteria);
-        return getPersistenceBroker(true).getCount(query) == 1;
-    }
-
     //
     // JetspeedPrincipalStorageManager interface implementation
     //
@@ -393,8 +393,17 @@
 
     public List<PasswordCredential> getHistoricPasswordCredentials(User user)
     {
-        // TODO Auto-generated method stub
-        return null;
+        Criteria criteria = new Criteria();
+        criteria.addEqualTo("principalId", user.getId());
+        criteria.addEqualTo("type", PasswordCredential.TYPE_HISTORICAL);
+        Query query = QueryFactory.newQuery(PasswordCredentialImpl.class,criteria);
+        List<PasswordCredential> list = (List<PasswordCredential>)getPersistenceBroker(true).getCollectionByQuery(ManageableArrayList.class,
query);
+        for (PasswordCredential pwc : list)
+        {
+            // store the user by hand as its configured as auto-retrieve="false"
+            ((PasswordCredentialImpl)pwc).setUser(user);
+        }
+        return list;
     }
 
     //

Added: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/SimpleMemberOfPrincipalAssociationHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/SimpleMemberOfPrincipalAssociationHandler.java?rev=693839&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/SimpleMemberOfPrincipalAssociationHandler.java
(added)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/SimpleMemberOfPrincipalAssociationHandler.java
Wed Sep 10 06:21:56 2008
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.security.spi.impl;
+
+import org.apache.jetspeed.security.DependentPrincipalException;
+import org.apache.jetspeed.security.JetspeedPrincipal;
+import org.apache.jetspeed.security.JetspeedPrincipalAssociationType;
+import org.apache.jetspeed.security.JetspeedPrincipalType;
+import org.apache.jetspeed.security.PrincipalNotRemovableException;
+import org.apache.jetspeed.security.impl.JetspeedPrincipalAssociationTypeImpl;
+import org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager;
+
+/**
+ * @version $Id$
+ *
+ */
+public class SimpleMemberOfPrincipalAssociationHandler extends BaseJetspeedPrincipalAssociationHandler
+{
+    public SimpleMemberOfPrincipalAssociationHandler(JetspeedPrincipalAssociationType associationType,
JetspeedPrincipalAssociationStorageManager jpasm)
+    {
+        super(associationType, jpasm);
+    }
+    
+    public SimpleMemberOfPrincipalAssociationHandler(String associationName, JetspeedPrincipalType
fromType,JetspeedPrincipalType toType, boolean required, JetspeedPrincipalAssociationStorageManager
jpasm)
+    {
+        this(new JetspeedPrincipalAssociationTypeImpl(associationName, fromType, toType,
required), jpasm);
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.security.JetspeedPrincipalAssociationHandler#beforeRemoveFrom(org.apache.jetspeed.security.JetspeedPrincipal)
+     */
+    public void beforeRemoveFrom(JetspeedPrincipal from) throws PrincipalNotRemovableException,
+                                                        DependentPrincipalException
+    {
+        // nothing to do
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.security.JetspeedPrincipalAssociationHandler#beforeRemoveTo(org.apache.jetspeed.security.JetspeedPrincipal)
+     */
+    public void beforeRemoveTo(JetspeedPrincipal to) throws PrincipalNotRemovableException,
DependentPrincipalException
+    {
+        // nothing to do
+    }
+}

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/SimpleMemberOfPrincipalAssociationHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/SimpleMemberOfPrincipalAssociationHandler.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/SimpleMemberOfPrincipalAssociationHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationHandler.java?rev=693839&r1=693838&r2=693839&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationHandler.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationHandler.java
Wed Sep 10 06:21:56 2008
@@ -23,7 +23,7 @@
 {
     JetspeedPrincipalAssociationType getAssociationType();
 
-    void add(JetspeedPrincipal from, JetspeedPrincipal to) throws PrincipalNotFoundException,
PrincipalAssociationNotAllowedException;
+    void add(JetspeedPrincipal from, JetspeedPrincipal to) throws PrincipalNotFoundException,
PrincipalAssociationNotAllowedException, PrincipalAssociationUnsupportedException;
 
     void remove(JetspeedPrincipal from, JetspeedPrincipal to) throws PrincipalAssociationRequiredException;
 

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAssociationStorageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAssociationStorageManager.java?rev=693839&r1=693838&r2=693839&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAssociationStorageManager.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalAssociationStorageManager.java
Wed Sep 10 06:21:56 2008
@@ -31,5 +31,5 @@
         throws PrincipalNotFoundException, PrincipalAssociationUnsupportedException, PrincipalAssociationNotAllowedException;
 
     void removeAssociation(JetspeedPrincipal from, JetspeedPrincipal to, String associationName)
-        throws PrincipalAssociationUnsupportedException, PrincipalAssociationRequiredException;
+        throws PrincipalAssociationRequiredException;
 }

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalStorageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalStorageManager.java?rev=693839&r1=693838&r2=693839&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalStorageManager.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalStorageManager.java
Wed Sep 10 06:21:56 2008
@@ -23,6 +23,7 @@
 import org.apache.jetspeed.security.JetspeedPrincipalAssociationReference;
 import org.apache.jetspeed.security.PrincipalAlreadyExistsException;
 import org.apache.jetspeed.security.PrincipalAssociationNotAllowedException;
+import org.apache.jetspeed.security.PrincipalAssociationUnsupportedException;
 import org.apache.jetspeed.security.PrincipalNotFoundException;
 import org.apache.jetspeed.security.PrincipalNotRemovableException;
 import org.apache.jetspeed.security.PrincipalReadOnlyException;
@@ -37,7 +38,7 @@
     boolean isMapped();
     
     void addPrincipal(JetspeedPrincipal principal, Set<JetspeedPrincipalAssociationReference>
associations)
-        throws PrincipalAssociationNotAllowedException, PrincipalAlreadyExistsException,
PrincipalAssociationRequiredException, PrincipalNotFoundException;
+        throws PrincipalAssociationNotAllowedException, PrincipalAlreadyExistsException,
PrincipalAssociationRequiredException, PrincipalNotFoundException, PrincipalAssociationUnsupportedException;
 
     void updatePrincipal(JetspeedPrincipal principal) throws PrincipalUpdateException, PrincipalNotFoundException,
PrincipalReadOnlyException;
 



---------------------------------------------------------------------
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