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 dd...@apache.org on 2008/09/22 15:38:00 UTC

svn commit: r697820 - in /portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security: impl/ spi/ spi/impl/

Author: ddam
Date: Mon Sep 22 06:38:00 2008
New Revision: 697820

URL: http://svn.apache.org/viewvc?rev=697820&view=rev
Log:
turn off read-only / required checks when updating DB during synchronization

Added:
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/SynchronizationState.java   (with props)
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/SynchronizationStateAccess.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/PersistentJetspeedPrincipal.java
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/SecurityAttributesImpl.java
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalSynchronizer.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/DefaultJetspeedPrincipalSynchronizer.java
    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/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=697820&r1=697819&r2=697820&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 Mon Sep 22 06:38:00 2008
@@ -42,6 +42,7 @@
 import org.apache.jetspeed.security.spi.JetspeedPrincipalAccessManager;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalManagerSPI;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalStorageManager;
+import org.apache.jetspeed.security.spi.SynchronizationStateAccess;
 
 /**
  * @version $Id$
@@ -253,29 +254,32 @@
         throws PrincipalAssociationNotAllowedException, PrincipalAlreadyExistsException, PrincipalAssociationRequiredException, PrincipalNotFoundException, PrincipalAssociationUnsupportedException
     {
         validatePrincipal(principal);
-        if (associations != null)
-        {
-            AssociationHandlerKey key = null;
+        // don't check required associations during synchronization
+        if (!isSynchronizing()){
             Map<AssociationHandlerKey, JetspeedPrincipalAssociationType> reqAss = new HashMap<AssociationHandlerKey, JetspeedPrincipalAssociationType>(reqAssociations);
-            for (JetspeedPrincipalAssociationReference ref : associations)
+            if (associations != null)
             {
-                if (ref.ref.isTransient())
-                {
-                    throw new IllegalArgumentException("Associated principal of type "+ref.ref.getType().getName() +" is transient");
-                }
-                if (ref.type == JetspeedPrincipalAssociationReference.Type.FROM)
-                {
-                    key = new AssociationHandlerKey(ref.associationName, ref.ref.getType().getName(), principalType.getName());
-                }
-                else
-                {
-                    key = new AssociationHandlerKey(ref.associationName, ref.ref.getType().getName(), principalType.getName());
-                }
-                if (!assHandlers.containsKey(key))
+                AssociationHandlerKey key = null;
+                for (JetspeedPrincipalAssociationReference ref : associations)
                 {
-                    throw new PrincipalAssociationNotAllowedException();
+                    if (ref.ref.isTransient())
+                    {
+                        throw new IllegalArgumentException("Associated principal of type "+ref.ref.getType().getName() +" is transient");
+                    }
+                    if (ref.type == JetspeedPrincipalAssociationReference.Type.FROM)
+                    {
+                        key = new AssociationHandlerKey(ref.associationName, ref.ref.getType().getName(), principalType.getName());
+                    }
+                    else
+                    {
+                        key = new AssociationHandlerKey(ref.associationName, ref.ref.getType().getName(), principalType.getName());
+                    }
+                    if (!assHandlers.containsKey(key))
+                    {
+                        throw new PrincipalAssociationNotAllowedException();
+                    }
+                    reqAss.remove(key);
                 }
-                reqAss.remove(key);
             }
             if (!reqAss.isEmpty())
             {
@@ -322,7 +326,7 @@
                                                             PrincipalNotFoundException, PrincipalReadOnlyException
     {
         validatePrincipal(principal);
-        if (principal.isReadOnly())
+        if (principal.isReadOnly() && !isSynchronizing())
         {
             throw new PrincipalReadOnlyException();
         }
@@ -385,7 +389,7 @@
         
         if (jpah != null)
         {
-            if (jpah.getAssociationType().isRequired())
+            if (jpah.getAssociationType().isRequired() && !isSynchronizing())
             {
                 throw new PrincipalAssociationRequiredException();
             }
@@ -408,4 +412,9 @@
             jpah.remove(from, to);
         }
     }
+    
+    protected boolean isSynchronizing(){
+        return SynchronizationStateAccess.getInstance().isSynchronizing();
+    }
+
 }

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/PersistentJetspeedPrincipal.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/PersistentJetspeedPrincipal.java?rev=697820&r1=697819&r2=697820&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/PersistentJetspeedPrincipal.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/PersistentJetspeedPrincipal.java Mon Sep 22 06:38:00 2008
@@ -25,6 +25,7 @@
 
 import org.apache.jetspeed.security.PrincipalReadOnlyException;
 import org.apache.jetspeed.security.SecurityAttributes;
+import org.apache.jetspeed.security.spi.SynchronizationStateAccess;
 import org.apache.ojb.broker.PersistenceBroker;
 import org.apache.ojb.broker.PersistenceBrokerAware;
 import org.apache.ojb.broker.PersistenceBrokerException;
@@ -84,7 +85,7 @@
 
     public void setEnabled(boolean enabled) throws PrincipalReadOnlyException
     {
-        if (isReadOnly())
+        if (isReadOnly() && !isSynchronizing())
         {
             throw new PrincipalReadOnlyException();
         }
@@ -187,4 +188,9 @@
     {
         this.modifiedDate = new Timestamp(System.currentTimeMillis());
     }
+    
+    protected boolean isSynchronizing(){
+        return SynchronizationStateAccess.getInstance().isSynchronizing();
+    }
+
 }

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/SecurityAttributesImpl.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/SecurityAttributesImpl.java?rev=697820&r1=697819&r2=697820&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/SecurityAttributesImpl.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/SecurityAttributesImpl.java Mon Sep 22 06:38:00 2008
@@ -34,6 +34,7 @@
 import org.apache.jetspeed.security.SecurityAttributeType;
 import org.apache.jetspeed.security.SecurityAttributeTypes;
 import org.apache.jetspeed.security.SecurityAttributes;
+import org.apache.jetspeed.security.spi.SynchronizationStateAccess;
 
 /**
  * @version $Id$
@@ -188,7 +189,7 @@
             return null;
         }
         
-        if (isReadOnly())
+        if (isReadOnly() && !isSynchronizing())
         {
             throw new AttributesReadOnlyException();
         }
@@ -197,7 +198,7 @@
                 
         if (sat == null)
         {
-            if (!isExtendable())
+            if (!isExtendable() && !isSynchronizing())
             {
                 throw new AttributesNotExtendableException();
             }
@@ -220,18 +221,18 @@
 
     public void removeAttribute(String name) throws AttributesReadOnlyException, AttributeReadOnlyException, AttributeRequiredException
     {
-        if (isReadOnly())
+        if (isReadOnly() && !isSynchronizing())
         {
             throw new AttributesReadOnlyException();
         }
         SecurityAttributeImpl sa = saMap.get(name);
         if (sa != null)
         {
-            if (sa.isReadOnly())
+            if (sa.isReadOnly() && !isSynchronizing())
             {
                 throw new AttributeReadOnlyException();
             }
-            if (sa.isRequired())
+            if (sa.isRequired() && !isSynchronizing())
             {
                 throw new AttributeRequiredException();
             }
@@ -239,4 +240,8 @@
             avColl.remove(sa.getSecurityAttributeValue());
         }
     }
+    
+    protected boolean isSynchronizing(){
+        return SynchronizationStateAccess.getInstance().isSynchronizing();
+    }
 }

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalSynchronizer.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/JetspeedPrincipalSynchronizer.java?rev=697820&r1=697819&r2=697820&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalSynchronizer.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/JetspeedPrincipalSynchronizer.java Mon Sep 22 06:38:00 2008
@@ -23,6 +23,8 @@
 public interface JetspeedPrincipalSynchronizer
 {
 
+    SynchronizationState getSynchronizationState();
+    
     void synchronizeUserPrincipal(String name);
     
     void synchronizePrincipalsByType(String principalTypeName);

Added: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/SynchronizationState.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/SynchronizationState.java?rev=697820&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/SynchronizationState.java (added)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/SynchronizationState.java Mon Sep 22 06:38:00 2008
@@ -0,0 +1,29 @@
+/* 
+ * 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;
+
+
+/**
+ * @author <a href="mailto:ddam@apache.org">Dennis Dam</a>
+ * @version $Id$
+ */
+public interface SynchronizationState
+{
+
+    boolean isSynchronizing();
+    
+}

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

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

Added: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/SynchronizationStateAccess.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/SynchronizationStateAccess.java?rev=697820&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/SynchronizationStateAccess.java (added)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/SynchronizationStateAccess.java Mon Sep 22 06:38:00 2008
@@ -0,0 +1,38 @@
+/* 
+ * 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;
+
+
+
+/**
+ * @author <a href="mailto:ddam@apache.org">Dennis Dam</a>
+ * @version $Id$
+ */
+public class SynchronizationStateAccess
+{
+    private static JetspeedPrincipalSynchronizer synchronizer;
+    
+    protected SynchronizationStateAccess(JetspeedPrincipalSynchronizer synchronizer){
+        this.synchronizer = synchronizer;
+    }
+    
+    public static SynchronizationState getInstance()
+    {        
+        return synchronizer.getSynchronizationState();
+    }
+    
+}

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

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

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=697820&r1=697819&r2=697820&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 Mon Sep 22 06:38:00 2008
@@ -27,6 +27,7 @@
 import org.apache.jetspeed.security.PrincipalNotFoundException;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalManagerSPI;
+import org.apache.jetspeed.security.spi.SynchronizationStateAccess;
 
 /**
  * @version $Id$
@@ -89,4 +90,9 @@
             jpasm.removeAssociation(from, to, associationType.getAssociationName());
         }
     }
+    
+    protected boolean isSynchronizing(){
+        return SynchronizationStateAccess.getInstance().isSynchronizing();
+    }
+
 }

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/DefaultJetspeedPrincipalSynchronizer.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/DefaultJetspeedPrincipalSynchronizer.java?rev=697820&r1=697819&r2=697820&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/DefaultJetspeedPrincipalSynchronizer.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/DefaultJetspeedPrincipalSynchronizer.java Mon Sep 22 06:38:00 2008
@@ -50,6 +50,7 @@
 import org.apache.jetspeed.security.mapping.model.Attribute;
 import org.apache.jetspeed.security.mapping.model.Entity;
 import org.apache.jetspeed.security.spi.JetspeedPrincipalSynchronizer;
+import org.apache.jetspeed.security.spi.SynchronizationState;
 
 /**
  * @author <a href="mailto:ddam@apache.org">Dennis Dam</a>
@@ -61,6 +62,18 @@
 
     private static final Log logger = LogFactory.getLog(DefaultJetspeedPrincipalSynchronizer.class);
 
+    private static ThreadLocal synchronizing = new ThreadLocal();  
+    
+    private static final SynchronizationState syncStateSingleton = new SynchronizationState(){
+
+        public boolean isSynchronizing()
+        {
+            Boolean syncing = (Boolean)synchronizing.get();
+            return syncing != null && syncing;
+        }
+        
+    };
+    
     JetspeedPrincipalManagerProvider principalManagerProvider;
 
     SecurityEntityManager securityEntityManager;
@@ -84,6 +97,7 @@
     {
         this.principalManagerProvider = principalManagerProvider;
         this.securityEntityManager = securityEntityManager;
+        
     }
 
     public void synchronizeUserPrincipal(String name)
@@ -93,10 +107,10 @@
         // TODO: allow processing of required relations towards users.
         Collection<String> skipEntities = Arrays.asList(new String[]
         { JetspeedPrincipalType.USER_TYPE_NAME});
-        recursiveSynchronizePrincipal(securityEntityManager.getEntity(JetspeedPrincipalType.USER_TYPE_NAME, name), new SynchronizationState(skipEntities));
+        recursiveSynchronizePrincipal(securityEntityManager.getEntity(JetspeedPrincipalType.USER_TYPE_NAME, name), new InternalSynchronizationState(skipEntities));
     }
 
-    public JetspeedPrincipal recursiveSynchronizePrincipal(Entity entity, SynchronizationState syncState)
+    public JetspeedPrincipal recursiveSynchronizePrincipal(Entity entity, InternalSynchronizationState syncState)
     {
         JetspeedPrincipal updatedPrincipal = null;
         if (entity != null && !syncState.isProcessed(entity))
@@ -135,7 +149,7 @@
         return updatedPrincipal;
     }
 
-    protected Collection<String> synchronizeAddedAssociations(SecurityEntityRelationType relationTypeForThisEntity, Entity entity, JetspeedPrincipal principal, boolean entityIsFromEntity, SynchronizationState syncState){
+    protected Collection<String> synchronizeAddedAssociations(SecurityEntityRelationType relationTypeForThisEntity, Entity entity, JetspeedPrincipal principal, boolean entityIsFromEntity, InternalSynchronizationState syncState){
         Collection<String> externalRelatedEntityIds=null;
         Collection<Entity> relatedEntities = entityIsFromEntity ? 
                 securityEntityManager.getRelatedEntitiesFrom(entity, relationTypeForThisEntity) :
@@ -386,6 +400,15 @@
 
     }
 
+    public SynchronizationState getSynchronizationState()
+    {
+        return syncStateSingleton;
+    }
+
+    private void setSynchronizing(boolean sync){
+        this.synchronizing.set(new Boolean(sync));
+    }
+    
     public void setPrincipalManagerProvider(JetspeedPrincipalManagerProvider principalManagerProvider)
     {
         this.principalManagerProvider = principalManagerProvider;
@@ -403,7 +426,7 @@
         }
     }
 
-    private class SynchronizationState
+    private class InternalSynchronizationState
     {
 
         // entity type to processed entity IDs map
@@ -423,18 +446,18 @@
         // is "user", the relation is flagged as processed.
         Collection<String> skipEntities;
 
-        SynchronizationState(Collection<String> skipEntities)
+        InternalSynchronizationState(Collection<String> skipEntities)
         {
             this.skipEntities = skipEntities;
         }
 
-        public boolean isProcessed(Entity entity)
+        private boolean isProcessed(Entity entity)
         {
             Set<String> processedEntitiesByType = processedEntities.get(entity.getType());
             return processedEntitiesByType != null && processedEntitiesByType.contains(entity.getId());
         }
 
-        public void setProcessed(Entity entity)
+        private void setProcessed(Entity entity)
         {
             Set<String> processedEntitiesByType = processedEntities.get(entity.getType());
             if (processedEntitiesByType == null)
@@ -444,7 +467,7 @@
             processedEntitiesByType.add(entity.getId());
         }
 
-        public boolean isRelationProcessed(SecurityEntityRelationType relationType, Entity startEntity, Entity endEntity, boolean startEntityIsFrom){
+        private boolean isRelationProcessed(SecurityEntityRelationType relationType, Entity startEntity, Entity endEntity, boolean startEntityIsFrom){
             if (startEntityIsFrom){
                 return isRelationProcessed(relationType, startEntity, endEntity);
             } else {
@@ -452,7 +475,7 @@
             }
         }
         
-        public boolean isRelationProcessed(SecurityEntityRelationType relationType, Entity fromEntity, Entity toEntity)
+        private boolean isRelationProcessed(SecurityEntityRelationType relationType, Entity fromEntity, Entity toEntity)
         {
             Map<String, Collection<String>> e2eMap = processedEntityRelationsFromTo.get(relationType);
             if (e2eMap != null)
@@ -463,7 +486,7 @@
             return false;
         }
 
-        public void setRelationProcessed(SecurityEntityRelationType relationType, Entity startEntity, Entity endEntity, boolean startEntityIsFrom){
+        private void setRelationProcessed(SecurityEntityRelationType relationType, Entity startEntity, Entity endEntity, boolean startEntityIsFrom){
             if (startEntityIsFrom){
                 setRelationProcessed(relationType, startEntity, endEntity);
             } else {
@@ -471,7 +494,7 @@
             }
         }
         
-        public void setRelationProcessed(SecurityEntityRelationType relationType, Entity fromEntity, Entity toEntity)
+        private void setRelationProcessed(SecurityEntityRelationType relationType, Entity fromEntity, Entity toEntity)
         {
             Map<String, Collection<String>> e2eMap = processedEntityRelationsFromTo.get(relationType);
             if (e2eMap == null)
@@ -489,5 +512,5 @@
         }
 
     }
-
+    
 }

Modified: 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=697820&r1=697819&r2=697820&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/SimpleMemberOfPrincipalAssociationHandler.java Mon Sep 22 06:38:00 2008
@@ -48,6 +48,7 @@
                                                         DependentPrincipalException
     {
         // nothing to do
+        // use super.isSynchronizing() to turn off constraint checks        
     }
 
     /* (non-Javadoc)
@@ -56,5 +57,6 @@
     public void beforeRemoveTo(JetspeedPrincipal to) throws PrincipalNotRemovableException, DependentPrincipalException
     {
         // nothing to do
+        // use super.isSynchronizing() to turn off constraint checks
     }
 }



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