portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r351661 - /portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
Date Fri, 02 Dec 2005 10:14:29 GMT
Author: taylor
Date: Fri Dec  2 02:14:27 2005
New Revision: 351661

URL: http://svn.apache.org/viewcvs?rev=351661&view=rev
Log:
add fragment prefs to the copying of frags

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

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java?rev=351661&r1=351660&r2=351661&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
(original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
Fri Dec  2 02:14:27 2005
@@ -40,7 +40,6 @@
 import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.om.page.PageSecurity;
 import org.apache.jetspeed.om.page.SecurityConstraintsDef;
-import org.apache.jetspeed.om.page.SecurityConstraintsDef;
 import org.apache.jetspeed.om.preference.FragmentPreference;
 import org.apache.jetspeed.page.document.Node;
 import org.apache.jetspeed.portalsite.MenuElement;
@@ -659,7 +658,23 @@
             Map.Entry prop = (Map.Entry)props.next();
             copy.getProperties().put(prop.getKey(), prop.getValue());
         }
-                       
+                  
+        // copy preferences
+        Iterator prefs = source.getPreferences().iterator();
+        while (prefs.hasNext())
+        {
+            FragmentPreference pref = (FragmentPreference)prefs.next();
+            FragmentPreference newPref = this.newFragmentPreference();
+            newPref.setName(pref.getName());
+            newPref.setReadOnly(pref.isReadOnly());
+            newPref.setValueList(new ArrayList());
+            Iterator values = pref.getValueList().iterator();            
+            while (values.hasNext())
+            {
+                String value = (String)values.next();
+                newPref.getValueList().add(value);
+            }
+        }
         return copy;
     }
     



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