portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r892697 - /portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/AbstractPageManager.java
Date Mon, 21 Dec 2009 05:53:32 GMT
Author: rwatler
Date: Mon Dec 21 05:53:32 2009
New Revision: 892697

URL: http://svn.apache.org/viewvc?rev=892697&view=rev
Log:
Correct scoped properties copy operation when Group/Role scopes disabled

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/AbstractPageManager.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/AbstractPageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/AbstractPageManager.java?rev=892697&r1=892696&r2=892697&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/AbstractPageManager.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/AbstractPageManager.java
Mon Dec 21 05:53:32 2009
@@ -1291,14 +1291,22 @@
         while (props.hasNext())
         {
             FragmentProperty prop = (FragmentProperty)props.next();
-            if (copy.getProperty(prop.getName(), prop.getScope(), prop.getScopeValue()) ==
null)
+            String propName = prop.getName();
+            String propScope = prop.getScope();
+            String propScopeValue = prop.getScopeValue();
+            if (FragmentProperty.GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED || 
+                (propScope == null) ||
+                (!propScope.equals(FragmentProperty.GROUP_PROPERTY_SCOPE) && !propScope.equals(FragmentProperty.ROLE_PROPERTY_SCOPE)))
             {
-                FragmentProperty newProp = newFragmentProperty();
-                newProp.setName(prop.getName());
-                newProp.setScope(prop.getScope());
-                newProp.setScopeValue(prop.getScopeValue());
-                newProp.setValue(prop.getValue());
-                copy.getProperties().add(newProp);
+                if (copy.getProperty(propName, propScope, propScopeValue) == null)
+                {
+                    FragmentProperty newProp = newFragmentProperty();
+                    newProp.setName(propName);
+                    newProp.setScope(propScope);
+                    newProp.setScopeValue(propScopeValue);
+                    newProp.setValue(prop.getValue());
+                    copy.getProperties().add(newProp);
+                }
             }
         }
                   



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


Mime
View raw message