You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by at...@apache.org on 2008/09/24 23:22:19 UTC

svn commit: r698741 [1/2] - 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/ jet...

Author: ate
Date: Wed Sep 24 14:22:18 2008
New Revision: 698741

URL: http://svn.apache.org/viewvc?rev=698741&view=rev
Log:
Complete implementation and proper handling of default supported JetspeedPrincipal association types.
This includes isMemberOf, IsChildOf, IsA, IsPartOf, BelongsTo associations and their behaviors.

Also providing default configuration/support for the following associations:
- groupIsAGroup
- groupIsPartOfGroup
- roleIsARole
- roleIsPartOfRole
So, yes: *both* isA and IsPartOf can now be used at the same time for hierarical groups and/or roles!

And finally, the default configuration for the UserSubjectPrincipalsResolver actually evaluates all of the above properly:
- the children groups of isPartOf another group are collected (from side)
- the parent group which is the generalization of isA another group is collected (to side)
- the roles from groupIsMemberOfRole associations are collected
- the children roles of isPartOf another role are collected (from side)
- the parent role which is the generalization of isA another role is collected (to side)
- and all collected groups and roles are evaluated themselves as well (recursively)

One note: currently the j2-admin nor the JetspeedSerializer support defining isA or isPartOf associations for roles and groups.
The above has been verified and tested by manually creating these associations in the database.

Added:
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/BelongsToPrincipalAssociationHandler.java   (with props)
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsAPrincipalAssociationHandler.java   (with props)
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsChildOfPrincipalAssociationHandler.java   (with props)
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsMemberOfPrincipalAssociationHandler.java   (contents, props changed)
      - copied, changed from r698537, portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/SimpleMemberOfPrincipalAssociationHandler.java
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsPartOfPrincipalAssociationHandler.java   (with props)
Removed:
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/SimpleMemberOfPrincipalAssociationHandler.java
Modified:
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/JetspeedPrincipalAssociationTypeImpl.java
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/BaseJetspeedPrincipalAssociationHandler.java
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/UserSubjectPrincipalsResolverImpl.java
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages.properties
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_en.properties
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_ja.properties
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_ko.properties
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_nl.properties
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_ua.properties
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_zh.properties
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_zh_TW.properties
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationType.java
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/SecurityException.java
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-managers.xml

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/JetspeedPrincipalAssociationTypeImpl.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/JetspeedPrincipalAssociationTypeImpl.java?rev=698741&r1=698740&r2=698741&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/JetspeedPrincipalAssociationTypeImpl.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/JetspeedPrincipalAssociationTypeImpl.java Wed Sep 24 14:22:18 2008
@@ -31,6 +31,7 @@
     private boolean dependent;
     private boolean singular;
     private boolean dominant;
+    private boolean mixedTypes;
     
     public JetspeedPrincipalAssociationTypeImpl(String associationName, JetspeedPrincipalType fromType,
                                                 JetspeedPrincipalType toType, boolean required, boolean dependent, boolean singular, boolean dominant)
@@ -42,6 +43,7 @@
         this.dependent = dependent;
         this.singular = singular;
         this.dominant = dominant;
+        this.mixedTypes = !fromType.getName().equals(toType.getName());
     }
 
     public String getAssociationName()
@@ -78,4 +80,9 @@
     {
         return dominant;
     }
+    
+    public boolean isMixedTypes()
+    {
+        return mixedTypes;
+    }
 }

Modified: 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=698741&r1=698740&r2=698741&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/BaseJetspeedPrincipalAssociationHandler.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/BaseJetspeedPrincipalAssociationHandler.java Wed Sep 24 14:22:18 2008
@@ -17,6 +17,8 @@
 
 package org.apache.jetspeed.security.spi.impl;
 
+import java.util.List;
+
 import org.apache.jetspeed.security.JetspeedPrincipal;
 import org.apache.jetspeed.security.JetspeedPrincipalAssociationType;
 import org.apache.jetspeed.security.JetspeedPrincipalManager;
@@ -74,6 +76,31 @@
     {
         if (from.getType().equals(associationType.getFromPrincipalType()) && to.getType().equals(associationType.getToPrincipalType()))
         {
+            if (!isSynchronizing())
+            {
+                if (associationType.isSingular() && !getManagerFrom().getAssociatedFrom(from.getName(), from.getType(), associationType.getAssociationName()).isEmpty())
+                {
+                    if (associationType.isMixedTypes())
+                    {
+                        throw new SecurityException(SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED.createScoped(from.getType().getName(),associationType.getAssociationName(), from.getName(), to.getType().getName()));
+                    }
+                    else
+                    {
+                        throw new SecurityException(SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR.createScoped(from.getType().getName(),associationType.getAssociationName(), from.getName(), from.getType().getName()));
+                    }
+                }
+                if (associationType.isDominant() && !getManagerTo().getAssociatedTo(to.getName(), to.getType(), associationType.getAssociationName()).isEmpty())
+                {
+                    if (associationType.isMixedTypes())
+                    {
+                        throw new SecurityException(SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED.createScoped(to.getType().getName(),associationType.getAssociationName(), to.getName(), from.getType().getName()));
+                    }
+                    else
+                    {
+                        throw new SecurityException(SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT.createScoped(to.getType().getName(),associationType.getAssociationName(), to.getName(), to.getType().getName()));
+                    }
+                }
+            }
             jpasm.addAssociation(from, to, associationType.getAssociationName());
         }
     }
@@ -86,6 +113,32 @@
         }
     }
     
+    public void beforeRemoveFrom(JetspeedPrincipal from) throws SecurityException
+    {
+        // by default nothing to do
+        // use isSynchronizing() to turn off constraint checks        
+    }
+
+    @SuppressWarnings("unchecked")
+    public void beforeRemoveTo(JetspeedPrincipal to) throws SecurityException
+    {
+        if (associationType.isDependent())
+        {
+            List<JetspeedPrincipal> fromList = (List<JetspeedPrincipal>)getManagerTo().getAssociatedTo(to.getName(), to.getType(), associationType.getAssociationName());
+            for (JetspeedPrincipal from : fromList)
+            {
+                getManagerFrom().removePrincipal(from);
+            }
+        }
+        else if (associationType.isRequired() && !isSynchronizing())
+        {
+            if (!getManagerTo().getAssociatedTo(to.getName(), to.getType(), associationType.getAssociationName()).isEmpty())
+            {
+                throw new SecurityException(SecurityException.PRINCIPAL_ASSOCIATION_REQUIRED.createScoped(to.getType().getName(), to.getName(), associationType.getFromPrincipalType().getName(), associationType.getAssociationName()));
+            }
+        }
+    }
+    
     protected boolean isSynchronizing()
     {
         return SynchronizationStateAccess.isSynchronizing();

Added: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/BelongsToPrincipalAssociationHandler.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/BelongsToPrincipalAssociationHandler.java?rev=698741&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/BelongsToPrincipalAssociationHandler.java (added)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/BelongsToPrincipalAssociationHandler.java Wed Sep 24 14:22:18 2008
@@ -0,0 +1,40 @@
+/*
+ * 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.JetspeedPrincipalAssociationType;
+import org.apache.jetspeed.security.impl.JetspeedPrincipalAssociationTypeImpl;
+import org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager;
+import org.apache.jetspeed.security.spi.JetspeedPrincipalManagerSPI;
+
+/**
+ * @version $Id$
+ *
+ */
+public class BelongsToPrincipalAssociationHandler extends BaseJetspeedPrincipalAssociationHandler
+{
+    public BelongsToPrincipalAssociationHandler(JetspeedPrincipalManagerSPI from, JetspeedPrincipalManagerSPI to, JetspeedPrincipalAssociationStorageManager jpasm)
+    {
+        super(new JetspeedPrincipalAssociationTypeImpl(JetspeedPrincipalAssociationType.IS_CHILD_OF, from.getPrincipalType(), to.getPrincipalType(), true, true, true, false), from, to, jpasm);
+    }
+    
+    public BelongsToPrincipalAssociationHandler(String associationName, JetspeedPrincipalManagerSPI from, JetspeedPrincipalManagerSPI to, JetspeedPrincipalAssociationStorageManager jpasm)
+    {
+        super(new JetspeedPrincipalAssociationTypeImpl(associationName, from.getPrincipalType(), to.getPrincipalType(), true, true, true, false), from, to, jpasm);
+    }
+}

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/BelongsToPrincipalAssociationHandler.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/BelongsToPrincipalAssociationHandler.java
------------------------------------------------------------------------------
    svn:keywords = Id

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

Added: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsAPrincipalAssociationHandler.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/IsAPrincipalAssociationHandler.java?rev=698741&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsAPrincipalAssociationHandler.java (added)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsAPrincipalAssociationHandler.java Wed Sep 24 14:22:18 2008
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2006 Hippo
+ *
+ * Licensed 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.JetspeedPrincipalAssociationType;
+import org.apache.jetspeed.security.impl.JetspeedPrincipalAssociationTypeImpl;
+import org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager;
+import org.apache.jetspeed.security.spi.JetspeedPrincipalManagerSPI;
+
+/**
+ * @version $Id$
+ *
+ */
+public class IsAPrincipalAssociationHandler extends BaseJetspeedPrincipalAssociationHandler
+{
+    public IsAPrincipalAssociationHandler(JetspeedPrincipalManagerSPI manager, JetspeedPrincipalAssociationStorageManager jpasm)
+    {
+        super(new JetspeedPrincipalAssociationTypeImpl(JetspeedPrincipalAssociationType.IS_A, manager.getPrincipalType(), manager.getPrincipalType(), false, true, true, false), manager, manager, jpasm);
+    }
+    
+    public IsAPrincipalAssociationHandler(String associationName, JetspeedPrincipalManagerSPI manager, JetspeedPrincipalAssociationStorageManager jpasm)
+    {
+        super(new JetspeedPrincipalAssociationTypeImpl(associationName, manager.getPrincipalType(), manager.getPrincipalType(), false, true, true, false), manager, manager, jpasm);
+    }
+}

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsAPrincipalAssociationHandler.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/IsAPrincipalAssociationHandler.java
------------------------------------------------------------------------------
    svn:keywords = Id

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

Added: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsChildOfPrincipalAssociationHandler.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/IsChildOfPrincipalAssociationHandler.java?rev=698741&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsChildOfPrincipalAssociationHandler.java (added)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsChildOfPrincipalAssociationHandler.java Wed Sep 24 14:22:18 2008
@@ -0,0 +1,40 @@
+/*
+ * 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.JetspeedPrincipalAssociationType;
+import org.apache.jetspeed.security.impl.JetspeedPrincipalAssociationTypeImpl;
+import org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager;
+import org.apache.jetspeed.security.spi.JetspeedPrincipalManagerSPI;
+
+/**
+ * @version $Id$
+ *
+ */
+public class IsChildOfPrincipalAssociationHandler extends BaseJetspeedPrincipalAssociationHandler
+{
+    public IsChildOfPrincipalAssociationHandler(JetspeedPrincipalManagerSPI manager, JetspeedPrincipalAssociationStorageManager jpasm)
+    {
+        super(new JetspeedPrincipalAssociationTypeImpl(JetspeedPrincipalAssociationType.IS_CHILD_OF, manager.getPrincipalType(), manager.getPrincipalType(), true, true, true, false), manager, manager, jpasm);
+    }
+    
+    public IsChildOfPrincipalAssociationHandler(String associationName, JetspeedPrincipalManagerSPI manager, JetspeedPrincipalAssociationStorageManager jpasm)
+    {
+        super(new JetspeedPrincipalAssociationTypeImpl(associationName, manager.getPrincipalType(), manager.getPrincipalType(), true, true, true, false), manager, manager, jpasm);
+    }
+}

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsChildOfPrincipalAssociationHandler.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/IsChildOfPrincipalAssociationHandler.java
------------------------------------------------------------------------------
    svn:keywords = Id

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

Copied: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsMemberOfPrincipalAssociationHandler.java (from r698537, 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/IsMemberOfPrincipalAssociationHandler.java?p2=portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsMemberOfPrincipalAssociationHandler.java&p1=portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/SimpleMemberOfPrincipalAssociationHandler.java&r1=698537&r2=698741&rev=698741&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/SimpleMemberOfPrincipalAssociationHandler.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsMemberOfPrincipalAssociationHandler.java Wed Sep 24 14:22:18 2008
@@ -17,9 +17,7 @@
 
 package org.apache.jetspeed.security.spi.impl;
 
-import org.apache.jetspeed.security.JetspeedPrincipal;
 import org.apache.jetspeed.security.JetspeedPrincipalAssociationType;
-import org.apache.jetspeed.security.SecurityException;
 import org.apache.jetspeed.security.impl.JetspeedPrincipalAssociationTypeImpl;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalManagerSPI;
@@ -28,33 +26,15 @@
  * @version $Id$
  *
  */
-public class SimpleMemberOfPrincipalAssociationHandler extends BaseJetspeedPrincipalAssociationHandler
+public class IsMemberOfPrincipalAssociationHandler extends BaseJetspeedPrincipalAssociationHandler
 {
-    public SimpleMemberOfPrincipalAssociationHandler(JetspeedPrincipalAssociationType associationType, JetspeedPrincipalManagerSPI from, JetspeedPrincipalManagerSPI to, JetspeedPrincipalAssociationStorageManager jpasm)
+    public IsMemberOfPrincipalAssociationHandler(JetspeedPrincipalManagerSPI from,JetspeedPrincipalManagerSPI to, JetspeedPrincipalAssociationStorageManager jpasm)
     {
-        super(associationType, from, to, jpasm);
+        super(new JetspeedPrincipalAssociationTypeImpl(JetspeedPrincipalAssociationType.IS_MEMBER_OF, from.getPrincipalType(), to.getPrincipalType(), false, false, false, false), from, to, jpasm);
     }
     
-    public SimpleMemberOfPrincipalAssociationHandler(String associationName, JetspeedPrincipalManagerSPI from,JetspeedPrincipalManagerSPI to, JetspeedPrincipalAssociationStorageManager jpasm)
+    public IsMemberOfPrincipalAssociationHandler(String associationName, JetspeedPrincipalManagerSPI from,JetspeedPrincipalManagerSPI to, JetspeedPrincipalAssociationStorageManager jpasm)
     {
-        this(new JetspeedPrincipalAssociationTypeImpl(associationName, from.getPrincipalType(), to.getPrincipalType(), false, false, false, false), from, to, jpasm);
-    }
-    
-    /* (non-Javadoc)
-     * @see org.apache.jetspeed.security.JetspeedPrincipalAssociationHandler#beforeRemoveFrom(org.apache.jetspeed.security.JetspeedPrincipal)
-     */
-    public void beforeRemoveFrom(JetspeedPrincipal from) throws SecurityException
-    {
-        // nothing to do
-        // use super.isSynchronizing() to turn off constraint checks        
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.jetspeed.security.JetspeedPrincipalAssociationHandler#beforeRemoveTo(org.apache.jetspeed.security.JetspeedPrincipal)
-     */
-    public void beforeRemoveTo(JetspeedPrincipal to) throws SecurityException
-    {
-        // nothing to do
-        // use super.isSynchronizing() to turn off constraint checks
+        super(new JetspeedPrincipalAssociationTypeImpl(associationName, from.getPrincipalType(), to.getPrincipalType(), false, false, false, false), from, to, jpasm);
     }
 }

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsMemberOfPrincipalAssociationHandler.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/IsMemberOfPrincipalAssociationHandler.java
------------------------------------------------------------------------------
    svn:keywords = Id

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

Added: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsPartOfPrincipalAssociationHandler.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/IsPartOfPrincipalAssociationHandler.java?rev=698741&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsPartOfPrincipalAssociationHandler.java (added)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsPartOfPrincipalAssociationHandler.java Wed Sep 24 14:22:18 2008
@@ -0,0 +1,40 @@
+/*
+ * 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.JetspeedPrincipalAssociationType;
+import org.apache.jetspeed.security.impl.JetspeedPrincipalAssociationTypeImpl;
+import org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager;
+import org.apache.jetspeed.security.spi.JetspeedPrincipalManagerSPI;
+
+/**
+ * @version $Id$
+ *
+ */
+public class IsPartOfPrincipalAssociationHandler extends BaseJetspeedPrincipalAssociationHandler
+{
+    public IsPartOfPrincipalAssociationHandler(JetspeedPrincipalManagerSPI manager, JetspeedPrincipalAssociationStorageManager jpasm)
+    {
+        super(new JetspeedPrincipalAssociationTypeImpl(JetspeedPrincipalAssociationType.IS_PART_OF, manager.getPrincipalType(), manager.getPrincipalType(), false, false, false, false), manager, manager, jpasm);
+    }
+    
+    public IsPartOfPrincipalAssociationHandler(String associationName, JetspeedPrincipalManagerSPI manager, JetspeedPrincipalAssociationStorageManager jpasm)
+    {
+        super(new JetspeedPrincipalAssociationTypeImpl(associationName, manager.getPrincipalType(), manager.getPrincipalType(), false, false, false, false), manager, manager, jpasm);
+    }
+}

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsPartOfPrincipalAssociationHandler.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/IsPartOfPrincipalAssociationHandler.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/IsPartOfPrincipalAssociationHandler.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/UserSubjectPrincipalsResolverImpl.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/UserSubjectPrincipalsResolverImpl.java?rev=698741&r1=698740&r2=698741&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/UserSubjectPrincipalsResolverImpl.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/UserSubjectPrincipalsResolverImpl.java Wed Sep 24 14:22:18 2008
@@ -18,6 +18,8 @@
 package org.apache.jetspeed.security.spi.impl;
 
 import java.security.Principal;
+import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -39,21 +41,38 @@
     private UserSubjectPrincipalsProvider spp;
     private JetspeedPrincipalType principalType;
     private JetspeedPrincipalAssociationType uat; 
-    private JetspeedPrincipalAssociationType iat; 
+    private List<JetspeedPrincipalAssociationType> iatList; 
     private boolean fromUser;
     private boolean initialized;
-    private boolean indirectFrom;
     private JetspeedPrincipalAccessManager accessManager;
+    
+    private static List<Object> wrapInList(JetspeedPrincipalAssociationType type)
+    {
+        if (type != null)
+        {
+            List<Object> list = new ArrayList<Object>(1);
+            list.add(type);
+            return list;
+        }
+        return Collections.emptyList();
+    }
 
     public UserSubjectPrincipalsResolverImpl(UserSubjectPrincipalsProvider spp, JetspeedPrincipalType principalType,
                                          JetspeedPrincipalAssociationType userAssociationType)
     {
-        init(spp, principalType, userAssociationType, null);
+        this(spp, principalType, userAssociationType, (JetspeedPrincipalAssociationType)null);
     }
     
-    protected void init(UserSubjectPrincipalsProvider spp, JetspeedPrincipalType principalType,
+    public UserSubjectPrincipalsResolverImpl(UserSubjectPrincipalsProvider spp, JetspeedPrincipalType principalType,
+            JetspeedPrincipalAssociationType userAssociationType,
+            JetspeedPrincipalAssociationType indirectAssociationType)
+    {
+        this(spp, principalType, userAssociationType, wrapInList(indirectAssociationType));
+    }
+    
+    public UserSubjectPrincipalsResolverImpl(UserSubjectPrincipalsProvider spp, JetspeedPrincipalType principalType,
                                          JetspeedPrincipalAssociationType userAssociationType,
-                                         JetspeedPrincipalAssociationType indirectAssociationType)
+                                         List<Object> indirectAssociationTypes)
     {
         if (!spp.getPrincipalType().getName().equals(JetspeedPrincipalType.USER))
         {
@@ -89,16 +108,21 @@
         }
         this.uat = userAssociationType;
         
-        if (indirectAssociationType != null)
+        if (indirectAssociationTypes != null && !indirectAssociationTypes.isEmpty())
         {
-            if (indirectAssociationType.getFromPrincipalType() != principalType || indirectAssociationType.getToPrincipalType() != principalType)
-            {
-                throw new IllegalArgumentException("Provided indirectAssociationType should match this resolvers principalType");
-            }
-            else
-            {
-                this.iat = indirectAssociationType;
-                indirectFrom = indirectAssociationType.getFromPrincipalType() == principalType;
+            iatList = new ArrayList<JetspeedPrincipalAssociationType>(indirectAssociationTypes.size());
+            
+            for (Object o: indirectAssociationTypes)
+            {
+                JetspeedPrincipalAssociationType iat = (JetspeedPrincipalAssociationType)o;
+                if (iat.getFromPrincipalType() != principalType && iat.getToPrincipalType() != principalType)
+                {
+                    throw new IllegalArgumentException("Provided indirectAssociationType "+iat.getAssociationName()+" should match this resolvers principalType");
+                }
+                else
+                {
+                   iatList.add(iat); 
+                }
             }
         }
         
@@ -164,18 +188,22 @@
             return;
         }
         principals.add(principal);
-        if (iat != null)
+        if (iatList != null)
         {
-            List <JetspeedPrincipal> found = null;
-            if (indirectFrom)
-            {
-                found = accessManager.getAssociatedFrom(principal.getId(), iat.getFromPrincipalType(), iat.getToPrincipalType(), iat.getAssociationName());
-            }
-            else
+            for (JetspeedPrincipalAssociationType iat : iatList)
             {
-                found = accessManager.getAssociatedTo(user.getId(), iat.getFromPrincipalType(), iat.getToPrincipalType(), iat.getAssociationName());
+                List <JetspeedPrincipal> found = null;
+                
+                if ((!iat.isMixedTypes() && !iat.isSingular()) || !iat.getFromPrincipalType().getName().equals(getPrincipalType().getName()))
+                {
+                    found = accessManager.getAssociatedTo(principal.getId(), iat.getFromPrincipalType(), iat.getToPrincipalType(), iat.getAssociationName());
+                }
+                else
+                {
+                    found = accessManager.getAssociatedFrom(principal.getId(), iat.getFromPrincipalType(), iat.getToPrincipalType(), iat.getAssociationName());
+                }
+                processFound(found, user, resolvedIds, principals, resolvers);
             }
-            processFound(found, user, resolvedIds, principals, resolvers);
         }
     }
 }
\ No newline at end of file

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages.properties?rev=698741&r1=698740&r2=698741&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages.properties (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages.properties Wed Sep 24 14:22:18 2008
@@ -19,9 +19,13 @@
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_IS_READ_ONLY = The principal {0} is read-only.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_UPDATE_FAILURE = Failed to update principal {0}.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_NOT_REMOVABLE = The principal {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.DEPENDENT_PRINCIPAL_EXISTS = The principal {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.DEPENDENT_PRINCIPAL_EXISTS = The principal {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_REQUIRED = A {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A {0} {1} association is not allowed.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from principal {1} to another {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to principal {1} from another {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTE_IS_READ_ONLY = The principal attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTE_IS_REQUIRED = The principal attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTES_ARE_READ_ONLY = The principal attributes are read only.
@@ -53,9 +57,13 @@
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_IS_READ_ONLY = The user {0} is read-only.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_UPDATE_FAILURE = Failed to update user {0}.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_NOT_REMOVABLE = The user {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.user.DEPENDENT_PRINCIPAL_EXISTS = The user {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.user.DEPENDENT_PRINCIPAL_EXISTS = The user {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_REQUIRED = A user {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A user {0} {1} association is not allowed.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from user {1} to another user.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to user {1} from another user.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTE_IS_READ_ONLY = The user attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTE_IS_REQUIRED = The user attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTES_ARE_READ_ONLY = The user attributes are read only.
@@ -66,9 +74,13 @@
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_IS_READ_ONLY = The role {0} is read-only.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_UPDATE_FAILURE = Failed to update role {0}.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_NOT_REMOVABLE = The role {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.role.DEPENDENT_PRINCIPAL_EXISTS = The role {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.role.DEPENDENT_PRINCIPAL_EXISTS = The role {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_REQUIRED = A role {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A role {0} {1} association is not allowed.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from role {1} to another role.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to role {1} from another role.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTE_IS_READ_ONLY = The role attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTE_IS_REQUIRED = The role attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTES_ARE_READ_ONLY = The role attributes are read only.
@@ -79,9 +91,13 @@
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_IS_READ_ONLY = The group {0} is read-only.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_UPDATE_FAILURE = Failed to update group {0}.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_NOT_REMOVABLE = The group {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.group.DEPENDENT_PRINCIPAL_EXISTS = The group {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.group.DEPENDENT_PRINCIPAL_EXISTS = The group {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_REQUIRED = A group {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A group {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from principal {1} to another group.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to principal {1} from another group.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTE_IS_READ_ONLY = The group attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTE_IS_REQUIRED = The group attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTES_ARE_READ_ONLY = The group attributes are read only.

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_en.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_en.properties?rev=698741&r1=698740&r2=698741&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_en.properties (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_en.properties Wed Sep 24 14:22:18 2008
@@ -18,9 +18,13 @@
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_IS_READ_ONLY = The principal {0} is read-only.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_UPDATE_FAILURE = Failed to update principal {0}.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_NOT_REMOVABLE = The principal {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.DEPENDENT_PRINCIPAL_EXISTS = The principal {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.DEPENDENT_PRINCIPAL_EXISTS = The principal {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_REQUIRED = A {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A {0} {1} association is not allowed.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from principal {1} to another {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to principal {1} from another {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTE_IS_READ_ONLY = The principal attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTE_IS_REQUIRED = The principal attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTES_ARE_READ_ONLY = The principal attributes are read only.
@@ -52,9 +56,13 @@
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_IS_READ_ONLY = The user {0} is read-only.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_UPDATE_FAILURE = Failed to update user {0}.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_NOT_REMOVABLE = The user {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.user.DEPENDENT_PRINCIPAL_EXISTS = The user {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.user.DEPENDENT_PRINCIPAL_EXISTS = The user {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_REQUIRED = A user {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A user {0} {1} association is not allowed.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from user {1} to another user.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to user {1} from another user.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTE_IS_READ_ONLY = The user attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTE_IS_REQUIRED = The user attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTES_ARE_READ_ONLY = The user attributes are read only.
@@ -65,9 +73,13 @@
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_IS_READ_ONLY = The role {0} is read-only.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_UPDATE_FAILURE = Failed to update role {0}.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_NOT_REMOVABLE = The role {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.role.DEPENDENT_PRINCIPAL_EXISTS = The role {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.role.DEPENDENT_PRINCIPAL_EXISTS = The role {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_REQUIRED = A role {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A role {0} {1} association is not allowed.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from role {1} to another role.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to role {1} from another role.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTE_IS_READ_ONLY = The role attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTE_IS_REQUIRED = The role attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTES_ARE_READ_ONLY = The role attributes are read only.
@@ -78,9 +90,13 @@
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_IS_READ_ONLY = The group {0} is read-only.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_UPDATE_FAILURE = Failed to update group {0}.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_NOT_REMOVABLE = The group {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.group.DEPENDENT_PRINCIPAL_EXISTS = The group {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.group.DEPENDENT_PRINCIPAL_EXISTS = The group {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_REQUIRED = A group {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A group {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from principal {1} to another group.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to principal {1} from another group.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTE_IS_READ_ONLY = The group attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTE_IS_REQUIRED = The group attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTES_ARE_READ_ONLY = The group attributes are read only.

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_ja.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_ja.properties?rev=698741&r1=698740&r2=698741&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_ja.properties (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_ja.properties Wed Sep 24 14:22:18 2008
@@ -18,9 +18,13 @@
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_IS_READ_ONLY = The principal {0} is read-only.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_UPDATE_FAILURE = Failed to update principal {0}.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_NOT_REMOVABLE = The principal {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.DEPENDENT_PRINCIPAL_EXISTS = The principal {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.DEPENDENT_PRINCIPAL_EXISTS = The principal {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_REQUIRED = A {0} {1} association is required.
-org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A {0} {1} association is not allowed.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from principal {1} to another {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to principal {1} from another {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTE_IS_READ_ONLY = The principal attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTE_IS_REQUIRED = The principal attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTES_ARE_READ_ONLY = The principal attributes are read only.
@@ -52,9 +56,13 @@
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_IS_READ_ONLY = The user {0} is read-only.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_UPDATE_FAILURE = Failed to update user {0}.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_NOT_REMOVABLE = The user {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.user.DEPENDENT_PRINCIPAL_EXISTS = The user {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.user.DEPENDENT_PRINCIPAL_EXISTS = The user {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_REQUIRED = A user {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A user {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from user {1} to another user.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to user {1} from another user.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTE_IS_READ_ONLY = The user attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTE_IS_REQUIRED = The user attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTES_ARE_READ_ONLY = The user attributes are read only.
@@ -65,9 +73,13 @@
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_IS_READ_ONLY = The role {0} is read-only.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_UPDATE_FAILURE = Failed to update role {0}.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_NOT_REMOVABLE = The role {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.role.DEPENDENT_PRINCIPAL_EXISTS = The role {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.role.DEPENDENT_PRINCIPAL_EXISTS = The role {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_REQUIRED = A role {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A role {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from role {1} to another role.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to role {1} from another role.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTE_IS_READ_ONLY = The role attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTE_IS_REQUIRED = The role attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTES_ARE_READ_ONLY = The role attributes are read only.
@@ -78,9 +90,13 @@
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_IS_READ_ONLY = The group {0} is read-only.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_UPDATE_FAILURE = Failed to update group {0}.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_NOT_REMOVABLE = The group {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.group.DEPENDENT_PRINCIPAL_EXISTS = The group {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.group.DEPENDENT_PRINCIPAL_EXISTS = The group {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_REQUIRED = A group {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A group {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from principal {1} to another group.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to principal {1} from another group.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTE_IS_READ_ONLY = The group attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTE_IS_REQUIRED = The group attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTES_ARE_READ_ONLY = The group attributes are read only.

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_ko.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_ko.properties?rev=698741&r1=698740&r2=698741&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_ko.properties (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_ko.properties Wed Sep 24 14:22:18 2008
@@ -18,9 +18,13 @@
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_IS_READ_ONLY = The principal {0} is read-only.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_UPDATE_FAILURE = Failed to update principal {0}.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_NOT_REMOVABLE = The principal {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.DEPENDENT_PRINCIPAL_EXISTS = The principal {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.DEPENDENT_PRINCIPAL_EXISTS = The principal {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_REQUIRED = A {0} {1} association is required.
-org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A {0} {1}  association is not supported.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A {0} {1} association is not allowed.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from principal {1} to another {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to principal {1} from another {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTE_IS_READ_ONLY = The principal attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTE_IS_REQUIRED = The principal attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTES_ARE_READ_ONLY = The principal attributes are read only.
@@ -52,9 +56,13 @@
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_IS_READ_ONLY = The user {0} is read-only.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_UPDATE_FAILURE = Failed to update user {0}.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_NOT_REMOVABLE = The user {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.user.DEPENDENT_PRINCIPAL_EXISTS = The user {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.user.DEPENDENT_PRINCIPAL_EXISTS = The user {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_REQUIRED = A user {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A user {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from user {1} to another user.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to user {1} from another user.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTE_IS_READ_ONLY = The user attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTE_IS_REQUIRED = The user attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTES_ARE_READ_ONLY = The user attributes are read only.
@@ -65,9 +73,13 @@
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_IS_READ_ONLY = The role {0} is read-only.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_UPDATE_FAILURE = Failed to update role {0}.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_NOT_REMOVABLE = The role {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.role.DEPENDENT_PRINCIPAL_EXISTS = The role {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.role.DEPENDENT_PRINCIPAL_EXISTS = The role {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_REQUIRED = A role {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A role {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from role {1} to another role.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to role {1} from another role.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTE_IS_READ_ONLY = The role attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTE_IS_REQUIRED = The role attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTES_ARE_READ_ONLY = The role attributes are read only.
@@ -78,9 +90,13 @@
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_IS_READ_ONLY = The group {0} is read-only.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_UPDATE_FAILURE = Failed to update group {0}.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_NOT_REMOVABLE = The group {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.group.DEPENDENT_PRINCIPAL_EXISTS = The group {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.group.DEPENDENT_PRINCIPAL_EXISTS = The group {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_REQUIRED = A group {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A group {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from principal {1} to another group.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to principal {1} from another group.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTE_IS_READ_ONLY = The group attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTE_IS_REQUIRED = The group attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTES_ARE_READ_ONLY = The group attributes are read only.

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_nl.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_nl.properties?rev=698741&r1=698740&r2=698741&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_nl.properties (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_nl.properties Wed Sep 24 14:22:18 2008
@@ -18,9 +18,13 @@
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_IS_READ_ONLY = De principal {0} mag niet gewijzigd worden.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_UPDATE_FAILURE = Opslaan van de principal {0} is mislukt.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_NOT_REMOVABLE = De principal {0} mag niet worden verwijderd.
-org.apache.jetspeed.security.SecurityException.DEPENDENT_PRINCIPAL_EXISTS = De principal {0} heeft een of meer verplichte afhankelijkheden.
+org.apache.jetspeed.security.SecurityException.DEPENDENT_PRINCIPAL_EXISTS = De principal {0} heeft een of meer veplichte {1} {2} koppelingen.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_REQUIRED = Een {0} {1} koppeling is vereist.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_UNSUPPORTED = Een {0} {1} koppeling is niet mogelijk.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR = Slechts een {0} koppeling is toegestaan van principal {1} naar een andere {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT = Slects een {0} koppeling is toegestaan naar principal {1} van een andere {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Slechts een {0} koppeling is toegestaan van principal {1} naar een {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Slechts een {0} koppeling is toegestaan naar principal {1} van een {2}.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTE_IS_READ_ONLY = Het attribuut {0} mag niet gewijzigd worden.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTE_IS_REQUIRED = Het attribuut {0} is verplicht.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTES_ARE_READ_ONLY = De attributen mogen niet gewijzigd worden.
@@ -52,9 +56,13 @@
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_IS_READ_ONLY = De gebruiker {0} mag niet gewijzigd worden.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_UPDATE_FAILURE = Opslaan van de gebruiker {0} is mislukt.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_NOT_REMOVABLE = De gebruiker {0} mag niet worden verwijderd.
-org.apache.jetspeed.security.SecurityException.user.DEPENDENT_PRINCIPAL_EXISTS = De gebruiker {0} heeft een of meer verplichte afhankelijkheden.
+org.apache.jetspeed.security.SecurityException.user.DEPENDENT_PRINCIPAL_EXISTS = De gebruiker {0} heeft een of meer verplichte {1} {2} koppelingen.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_REQUIRED = Een user {0} {1} koppeling is vereist.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_UNSUPPORTED = Een user {0} {1} koppeling is niet mogelijk.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_SINGULAR = Slechts een {0} koppeling is toegestaan van gebruiker {1} naar een andere gebruiker.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_DOMINANT = Slechts een {0} koppeling is toegestaan naar gebruiker {1} van een andere gebruiker.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Slechts een {0} koppeling is toegestaan van gebruiker {1} naar een {2}.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Slechts een {0} koppeling is toegestaan naar gebruiker {1} van een {2}.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTE_IS_READ_ONLY = Het gebruikersattribuut {0} mag niet gewijzigd worden.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTE_IS_REQUIRED = Het gebruikersattribuut {0} is verplicht.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTES_ARE_READ_ONLY = De gebruikersattributen mogen niet gewijzigd worden.
@@ -65,9 +73,13 @@
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_IS_READ_ONLY = De rol {0} mag niet gewijzigd worden.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_UPDATE_FAILURE = Opslaan van de rol {0} is mislukt.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_NOT_REMOVABLE = De rol {0} mag niet worden verwijderd.
-org.apache.jetspeed.security.SecurityException.role.DEPENDENT_PRINCIPAL_EXISTS = De rol {0} heeft een of meer verplichte afhankelijkheden.
+org.apache.jetspeed.security.SecurityException.role.DEPENDENT_PRINCIPAL_EXISTS = De rol {0} heeft een of meer verplichte {1} {2} koppelingen.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_REQUIRED = Een role {0} {1} koppeling is vereist.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_UNSUPPORTED = Een role {0} {1} koppeling is niet mogelijk.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_SINGULAR = Slechts een {0} koppeling is toegestaan van rol {1} naar een andere rol.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_DOMINANT = Slechts een {0} koppeling is toegestaan naar rol {1} van een andere rol.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Slechts een {0} koppeling is toegestaan van rol {1} naar een {2}.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Slechts een {0} koppeling is toegestaan naar rol {1} van een {2}.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTE_IS_READ_ONLY = Het rolattribuut {0} mag niet gewijzgd worden.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTE_IS_REQUIRED = Het rolattribuut {0} is verplicht.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTES_ARE_READ_ONLY = De rolattributen mogen niet gewijzigd worden.
@@ -78,9 +90,13 @@
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_IS_READ_ONLY = De groep {0} mag niet gewijzigd worden.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_UPDATE_FAILURE = Opslaan van de groep {0} is mislukt.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_NOT_REMOVABLE = De groep {0} mag niet worden verwijderd.
-org.apache.jetspeed.security.SecurityException.group.DEPENDENT_PRINCIPAL_EXISTS = De groep {0} heeft een of meer verplichte afhankelijkheden.
+org.apache.jetspeed.security.SecurityException.group.DEPENDENT_PRINCIPAL_EXISTS = De groep {0} heeft een of meer verplichte {1} {2} koppelingen.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_REQUIRED = Een group {0} {1} koppeling is vereist.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_UNSUPPORTED = Een group {0} {1} koppeling is niet mogelijk.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_SINGULAR = Slechts een {0} koppeling is toegestaan van groep {1} naar een andere groep.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_DOMINANT = Slechts een {0} koppeling is toegestaan naar groep {1} van een andere groep.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Slechts een {0} koppeling is toegestaan van groep {1} naar een {2}.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Slechts een {0} koppeling is toegestaan naar groep {1} van een {2}.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTE_IS_READ_ONLY = Het groepsattribuut {0} mag niet gewijzigd worden.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTE_IS_REQUIRED = Het groepsattribuut {0} is verplicht.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTES_ARE_READ_ONLY = De groepsattributen mogen niet gewijzigd worden.

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_ua.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_ua.properties?rev=698741&r1=698740&r2=698741&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_ua.properties (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_ua.properties Wed Sep 24 14:22:18 2008
@@ -18,9 +18,13 @@
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_IS_READ_ONLY = The principal {0} is read-only.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_UPDATE_FAILURE = Failed to update principal {0}.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_NOT_REMOVABLE = The principal {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.DEPENDENT_PRINCIPAL_EXISTS = The principal {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.DEPENDENT_PRINCIPAL_EXISTS = The principal {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_REQUIRED = A {0} {1} association is required.
-org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A {0} {1} association is not allowed.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from principal {1} to another {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to principal {1} from another {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTE_IS_READ_ONLY = The principal attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTE_IS_REQUIRED = The principal attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.ATTRIBUTES_ARE_READ_ONLY = The principal attributes are read only.
@@ -52,9 +56,13 @@
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_IS_READ_ONLY = The user {0} is read-only.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_UPDATE_FAILURE = Failed to update user {0}.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_NOT_REMOVABLE = The user {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.user.DEPENDENT_PRINCIPAL_EXISTS = The user {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.user.DEPENDENT_PRINCIPAL_EXISTS = The user {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_REQUIRED = A user {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A user {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from user {1} to another user.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to user {1} from another user.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTE_IS_READ_ONLY = The user attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTE_IS_REQUIRED = The user attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.user.ATTRIBUTES_ARE_READ_ONLY = The user attributes are read only.
@@ -65,9 +73,13 @@
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_IS_READ_ONLY = The role {0} is read-only.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_UPDATE_FAILURE = Failed to update role {0}.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_NOT_REMOVABLE = The role {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.role.DEPENDENT_PRINCIPAL_EXISTS = The role {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.role.DEPENDENT_PRINCIPAL_EXISTS = The role {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_REQUIRED = A role {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A role {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from role {1} to another role.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to role {1} from another role.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTE_IS_READ_ONLY = The role attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTE_IS_REQUIRED = The role attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.role.ATTRIBUTES_ARE_READ_ONLY = The role attributes are read only.
@@ -78,9 +90,13 @@
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_IS_READ_ONLY = The group {0} is read-only.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_UPDATE_FAILURE = Failed to update group {0}.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_NOT_REMOVABLE = The group {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.group.DEPENDENT_PRINCIPAL_EXISTS = The group {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.group.DEPENDENT_PRINCIPAL_EXISTS = The group {0} has one or more required {1} {2} associations.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_REQUIRED = A group {0} {1} association is required.
 org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A group {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from principal {1} to another group.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to principal {1} from another group.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTE_IS_READ_ONLY = The group attribute {0} is read only.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTE_IS_REQUIRED = The group attribute {0} is required.
 org.apache.jetspeed.security.SecurityException.group.ATTRIBUTES_ARE_READ_ONLY = The group attributes are read only.



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