portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r892529 [3/4] - in /portals/jetspeed-2/portal/trunk: components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/ components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ components/jetspeed-page-man...
Date Sat, 19 Dec 2009 23:33:50 GMT
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/psml/CastorXmlPageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/psml/CastorXmlPageManager.java?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/psml/CastorXmlPageManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/psml/CastorXmlPageManager.java Sat Dec 19 23:33:49 2009
@@ -22,8 +22,6 @@
 import java.util.Iterator;
 import java.util.Map;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.cache.file.FileCache;
 import org.apache.jetspeed.cache.file.FileCacheEntry;
@@ -57,6 +55,7 @@
 import org.apache.jetspeed.om.page.psml.PageImpl;
 import org.apache.jetspeed.om.page.psml.PageSecurityImpl;
 import org.apache.jetspeed.om.page.psml.PageTemplateImpl;
+import org.apache.jetspeed.om.page.psml.PropertyImpl;
 import org.apache.jetspeed.om.page.psml.SecurityConstraintsDefImpl;
 import org.apache.jetspeed.om.page.psml.SecurityConstraintsImpl;
 import org.apache.jetspeed.page.AbstractPageManager;
@@ -76,6 +75,9 @@
 import org.apache.jetspeed.page.document.UnsupportedDocumentTypeException;
 import org.apache.jetspeed.page.document.psml.NodeSetImpl;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
  * This service is responsible for loading and saving PSML pages serialized to
  * disk
@@ -119,6 +121,7 @@
         modelClasses.put("PageTemplateImpl", PageTemplateImpl.class);
         modelClasses.put("DynamicPageImpl", DynamicPageImpl.class);
         modelClasses.put("FragmentDefinitionImpl", FragmentDefinitionImpl.class);
+        modelClasses.put("FragmentPropertyImpl", PropertyImpl.class);
     }
 
     private DocumentHandlerFactory handlerFactory;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/util/interceptors/PageManagerInterceptor.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/util/interceptors/PageManagerInterceptor.java?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/util/interceptors/PageManagerInterceptor.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/util/interceptors/PageManagerInterceptor.java Sat Dec 19 23:33:49 2009
@@ -21,6 +21,7 @@
 
 import org.aopalliance.intercept.MethodInterceptor;
 import org.aopalliance.intercept.MethodInvocation;
+import org.apache.jetspeed.page.impl.DatabasePageManager;
 import org.apache.jetspeed.page.impl.DatabasePageManagerCache;
 
 /**
@@ -94,6 +95,7 @@
             if (performCacheTransactionProcessing)
             {
                 DatabasePageManagerCache.rollbackTransactions();
+                DatabasePageManager.rollbackTransactions();
             }
             throw exp;
         }
@@ -103,6 +105,7 @@
             if (performCacheTransactionProcessing)
             {
                 DatabasePageManagerCache.clearTransactions();
+                DatabasePageManager.clearTransactions();
             }
         }
     }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/castor/page-mapping.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/castor/page-mapping.xml?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/castor/page-mapping.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/castor/page-mapping.xml Sat Dec 19 23:33:49 2009
@@ -170,7 +170,7 @@
       <bind-xml name="short-title"/>
     </field>
 
-    <field name="propertiesList"
+    <field name="properties"
            type="org.apache.jetspeed.om.page.psml.PropertyImpl" collection="arraylist">
       <bind-xml name="property"/>
     </field>
@@ -495,6 +495,14 @@
       <bind-xml name="name" node="attribute"/>
     </field>
 
+    <field name="uncheckedScope" type="string">
+      <bind-xml name="scope" node="attribute"/>
+    </field>
+
+    <field name="scopeValue" type="string">
+      <bind-xml name="scopeValue" node="attribute"/>
+    </field>
+
     <field name="value" type="string">
       <bind-xml name="value" node="attribute"/>
     </field>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/ojb/page-manager-repository.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/ojb/page-manager-repository.xml?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/ojb/page-manager-repository.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/ojb/page-manager-repository.xml Sat Dec 19 23:33:49 2009
@@ -2164,25 +2164,25 @@
       />
 
       <field-descriptor
-         name="skin"
+         name="skinProperty"
          column="SKIN"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="decorator"
+         name="decoratorProperty"
          column="DECORATOR"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="state"
+         name="stateProperty"
          column="STATE"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="mode"
+         name="modeProperty"
          column="PMODE"
          jdbc-type="VARCHAR"
       />
@@ -2236,30 +2236,6 @@
       />
 
       <field-descriptor
-         name="extendedPropertyName1"
-         column="EXT_PROP_NAME_1"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
-         name="extendedPropertyValue1"
-         column="EXT_PROP_VALUE_1"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
-         name="extendedPropertyName2"
-         column="EXT_PROP_NAME_2"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
-         name="extendedPropertyValue2"
-         column="EXT_PROP_VALUE_2"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
          name="constraints::owner"
          column="OWNER_PRINCIPAL"
          jdbc-type="VARCHAR"
@@ -2381,25 +2357,25 @@
       />
 
       <field-descriptor
-         name="skin"
+         name="skinProperty"
          column="SKIN"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="decorator"
+         name="decoratorProperty"
          column="DECORATOR"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="state"
+         name="stateProperty"
          column="STATE"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="mode"
+         name="modeProperty"
          column="PMODE"
          jdbc-type="VARCHAR"
       />
@@ -2453,30 +2429,6 @@
       />
 
       <field-descriptor
-         name="extendedPropertyName1"
-         column="EXT_PROP_NAME_1"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
-         name="extendedPropertyValue1"
-         column="EXT_PROP_VALUE_1"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
-         name="extendedPropertyName2"
-         column="EXT_PROP_NAME_2"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
-         name="extendedPropertyValue2"
-         column="EXT_PROP_VALUE_2"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
          name="constraints::owner"
          column="OWNER_PRINCIPAL"
          jdbc-type="VARCHAR"
@@ -2581,25 +2533,25 @@
       />
 
       <field-descriptor
-         name="skin"
+         name="skinProperty"
          column="SKIN"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="decorator"
+         name="decoratorProperty"
          column="DECORATOR"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="state"
+         name="stateProperty"
          column="STATE"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="mode"
+         name="modeProperty"
          column="PMODE"
          jdbc-type="VARCHAR"
       />
@@ -2653,30 +2605,6 @@
       />
 
       <field-descriptor
-         name="extendedPropertyName1"
-         column="EXT_PROP_NAME_1"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
-         name="extendedPropertyValue1"
-         column="EXT_PROP_VALUE_1"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
-         name="extendedPropertyName2"
-         column="EXT_PROP_NAME_2"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
-         name="extendedPropertyValue2"
-         column="EXT_PROP_VALUE_2"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
          name="constraints::owner"
          column="OWNER_PRINCIPAL"
          jdbc-type="VARCHAR"
@@ -2884,6 +2812,44 @@
       />
    </class-descriptor>
 
+   <class-descriptor
+      class="org.apache.jetspeed.om.page.impl.FragmentPropertyImpl"
+      table="FRAGMENT_PROP"
+   >
+      <field-descriptor
+         name="id"
+         column="PROP_ID"
+         jdbc-type="INTEGER"
+         primarykey="true"
+         autoincrement="true"
+      />
+
+      <field-descriptor
+        name="fragmentId"
+        column="FRAGMENT_ID"
+        jdbc-type="INTEGER"
+        access="anonymous"
+      />
+
+      <field-descriptor
+         name="scope"
+         column="SCOPE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="scopeValue"
+         column="SCOPE_VALUE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="value"
+         column="VALUE"
+         jdbc-type="VARCHAR"
+      />
+   </class-descriptor>
+
    <!-- Link mapping -->
 
    <class-descriptor

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/PageManagerTestShared.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/PageManagerTestShared.java?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/PageManagerTestShared.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/PageManagerTestShared.java Sat Dec 19 23:33:49 2009
@@ -77,6 +77,7 @@
 import org.apache.jetspeed.security.JetspeedPermission;
 import org.apache.jetspeed.security.JetspeedPrincipal;
 import org.apache.jetspeed.security.JetspeedPrincipalType;
+import org.apache.jetspeed.security.Group;
 import org.apache.jetspeed.security.PermissionFactory;
 import org.apache.jetspeed.security.PrincipalsSet;
 import org.apache.jetspeed.security.Role;
@@ -391,6 +392,10 @@
                         {
                             return e;
                         }
+                        finally
+                        {
+                            JSSubject.clearSubject();
+                        }
                     }
                 }, null);
             if (setup != null)
@@ -439,6 +444,10 @@
                         {
                             return e;
                         }
+                        finally
+                        {
+                            JSSubject.clearSubject();
+                        }
                     }
                 }, null);
             if (adminAccess != null)
@@ -510,6 +519,10 @@
                         {
                             return e;
                         }
+                        finally
+                        {
+                            JSSubject.clearSubject();
+                        }
                     }
                 }, null);
             if (userAccess != null)
@@ -572,6 +585,10 @@
                         {
                             return e;
                         }
+                        finally
+                        {
+                            JSSubject.clearSubject();
+                        }
                     }
                 }, null);
             if (managerAccess != null)
@@ -648,6 +665,10 @@
                         {
                             return e;
                         }
+                        finally
+                        {
+                            JSSubject.clearSubject();
+                        }
                     }
                 }, null);
             if (guestAccess != null)
@@ -683,6 +704,10 @@
                         {
                             return e;
                         }
+                        finally
+                        {
+                            JSSubject.clearSubject();
+                        }
                     }
                 }, null);
             if (cleanup != null)
@@ -897,6 +922,16 @@
         }
     }
 
+    static class TestGroup extends AbstractTestPrincipal implements Group
+    {
+        private static final long serialVersionUID = 1L;
+
+        public TestGroup(String name)
+        {
+            super(JetspeedPrincipalType.GROUP, name);
+        }
+    }
+    
     static class TestRole extends AbstractTestPrincipal implements Role
     {
         private static final long serialVersionUID = 1L;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCastorXmlPageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCastorXmlPageManager.java?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCastorXmlPageManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCastorXmlPageManager.java Sat Dec 19 23:33:49 2009
@@ -16,13 +16,16 @@
  */
 package org.apache.jetspeed.page;
 
-// Java imports
+import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
-import java.util.Map;
+import java.util.Set;
+
+import javax.security.auth.Subject;
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
@@ -43,6 +46,7 @@
 import org.apache.jetspeed.om.page.DynamicPage;
 import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.om.page.FragmentDefinition;
+import org.apache.jetspeed.om.page.FragmentProperty;
 import org.apache.jetspeed.om.page.FragmentReference;
 import org.apache.jetspeed.om.page.Link;
 import org.apache.jetspeed.om.page.Page;
@@ -52,6 +56,8 @@
 import org.apache.jetspeed.om.preference.FragmentPreference;
 import org.apache.jetspeed.page.document.DocumentNotFoundException;
 import org.apache.jetspeed.page.psml.CastorXmlPageManager;
+import org.apache.jetspeed.security.JSSubject;
+import org.apache.jetspeed.security.PrincipalsSet;
 import org.apache.jetspeed.test.JetspeedTestCase;
 
 /**
@@ -226,9 +232,9 @@
         assertTrue(f.getName().equals("HelloPortlet"));
         assertTrue(f.getType().equals(Fragment.PORTLET));
 
-        Map properties = f.getProperties();
+        List properties = f.getProperties();
         assertNotNull(properties);
-        assertTrue(properties.size() == 7);
+        assertTrue(properties.size() == 17);
         assertEquals("0", f.getProperty(Fragment.ROW_PROPERTY_NAME));
         assertEquals(0, f.getIntProperty(Fragment.COLUMN_PROPERTY_NAME));
         assertEquals(0, f.getLayoutRow());
@@ -241,7 +247,68 @@
         assertTrue((f.getLayoutY() > 22.0F) && (f.getLayoutY() < 23.0F));
         assertTrue((f.getLayoutZ() > 33.0F) && (f.getLayoutZ() < 34.0F));
         assertTrue((f.getLayoutWidth() > 44.0F) && (f.getLayoutWidth() < 45.0F));
-        assertTrue((f.getLayoutHeight() > 55.0F) && (f.getLayoutWidth() < 56.0F));
+        assertTrue((f.getLayoutHeight() > 55.0F) && (f.getLayoutHeight() < 56.0F));
+        assertEquals("custom-value-0", f.getProperty("custom-0"));
+        assertEquals("custom-value-1", f.getProperty("custom-1"));
+        assertEquals("custom-value-2", f.getProperty("custom-2"));
+        assertEquals("custom-value-3", f.getProperty("custom-3"));
+
+        final Fragment userFragment = f;
+        Exception userException = (Exception)JSSubject.doAsPrivileged(constructUserSubject(), new PrivilegedAction()
+        {
+            public Object run()
+            {
+                try
+                {
+                    assertTrue(userFragment.getId().equals("pe001"));
+                    List properties = userFragment.getProperties();
+                    assertNotNull(properties);
+                    assertTrue(properties.size() == 17);
+                    assertEquals("0", userFragment.getProperty(Fragment.ROW_PROPERTY_NAME));
+                    assertEquals(0, userFragment.getIntProperty(Fragment.COLUMN_PROPERTY_NAME));
+                    assertTrue((userFragment.getLayoutHeight() > 55.0F) && (userFragment.getLayoutHeight() < 56.0F));
+                    assertEquals("custom-value-0", userFragment.getProperty("custom-0"));
+                    assertNull(userFragment.getProperty("custom-0", Fragment.USER_PROPERTY_SCOPE, null));
+                    assertNull(userFragment.getProperty("custom-0", Fragment.USER_PROPERTY_SCOPE, "user"));
+                    if (FragmentProperty.GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED)
+                    {
+                        assertEquals("custom-value-role-1", userFragment.getProperty("custom-1"));
+                        assertNotNull(userFragment.getProperty("custom-1", Fragment.ROLE_PROPERTY_SCOPE, "role"));
+                    }
+                    else
+                    {
+                        assertEquals("custom-value-1", userFragment.getProperty("custom-1"));                        
+                    }
+                    assertNull(userFragment.getProperty("custom-1", Fragment.USER_PROPERTY_SCOPE, "user"));
+                    if (FragmentProperty.GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED)
+                    {
+                        assertEquals("custom-value-group-2", userFragment.getProperty("custom-2"));
+                        assertNotNull(userFragment.getProperty("custom-2", Fragment.GROUP_PROPERTY_SCOPE, "group"));
+                    }
+                    else
+                    {
+                        assertEquals("custom-value-2", userFragment.getProperty("custom-2"));                        
+                    }
+                    assertNull(userFragment.getProperty("custom-2", Fragment.USER_PROPERTY_SCOPE, "user"));
+                    assertEquals("custom-value-user-3", userFragment.getProperty("custom-3"));
+                    assertNotNull(userFragment.getProperty("custom-3", Fragment.USER_PROPERTY_SCOPE, null));
+                    assertNotNull(userFragment.getProperty("custom-3", Fragment.USER_PROPERTY_SCOPE, "user"));
+                    return null;
+                }
+                catch (Exception e)
+                {
+                    return e;
+                }
+                finally
+                {
+                    JSSubject.clearSubject();
+                }
+            }
+        }, null);
+        if (userException != null)
+        {
+            throw userException;
+        }
 
         List preferences = f.getPreferences();
         assertNotNull(preferences);
@@ -389,9 +456,45 @@
         Fragment f = pageManager.newFragment();
         f.setType(Fragment.PORTLET);
         f.setName("TestPortlet");
-        Map properties = f.getProperties();
-        properties.put(Fragment.ROW_PROPERTY_NAME, "0");
-        properties.put(Fragment.COLUMN_PROPERTY_NAME, "0");
+        List properties = f.getProperties();
+        FragmentProperty fp = pageManager.newFragmentProperty();
+        fp.setName(Fragment.ROW_PROPERTY_NAME);
+        fp.setValue("0");
+        properties.add(fp);
+        fp = pageManager.newFragmentProperty();
+        fp.setName(Fragment.COLUMN_PROPERTY_NAME);
+        fp.setValue("0");
+        properties.add(fp);
+        f.setLayoutX(100.0F);
+        f.setLayoutY(100.0F);
+        f.setProperty("custom-0", null, null, "custom-value-0");
+        f.setProperty("custom-1", null, null, "custom-value-1");
+        f.setProperty("custom-1", Fragment.USER_PROPERTY_SCOPE, "user", "custom-value-user-1");
+        f.setProperty("custom-2", null, null, "custom-value-2");
+        final Fragment userFragment = f;
+        Exception userException = (Exception)JSSubject.doAsPrivileged(constructUserSubject(), new PrivilegedAction()
+        {
+            public Object run()
+            {
+                try
+                {
+                    userFragment.setProperty("custom-2", Fragment.USER_PROPERTY_SCOPE, null, "custom-value-user-2");
+                    return null;
+                }
+                catch (Exception e)
+                {
+                    return e;
+                }
+                finally
+                {
+                    JSSubject.clearSubject();
+                }
+            }
+        }, null);
+        if (userException != null)
+        {
+            throw userException;
+        }
         root.getFragments().add(f);
         FragmentReference fr = pageManager.newFragmentReference();
         fr.setRefId("test002");
@@ -440,6 +543,35 @@
         f = (Fragment)bf;
         assertNotNull(f.getProperties());
         assertEquals(0, f.getIntProperty(Fragment.ROW_PROPERTY_NAME));
+        assertTrue((99.9F < f.getLayoutX()) && (100.1F > f.getLayoutX()));
+        assertEquals("custom-value-0", f.getProperty("custom-0"));
+        assertEquals("custom-value-1", f.getProperty("custom-1"));
+        final Fragment userFragment2 = f;
+        Exception userException2 = (Exception)JSSubject.doAsPrivileged(constructUserSubject(), new PrivilegedAction()
+        {
+            public Object run()
+            {
+                try
+                {
+                    assertEquals("custom-value-0", userFragment2.getProperty("custom-0"));
+                    assertEquals("custom-value-user-1", userFragment2.getProperty("custom-1"));
+                    assertEquals("custom-value-user-2", userFragment2.getProperty("custom-2"));
+                    return null;
+                }
+                catch (Exception e)
+                {
+                    return e;
+                }
+                finally
+                {
+                    JSSubject.clearSubject();
+                }
+            }
+        }, null);
+        if (userException2 != null)
+        {
+            throw userException2;
+        }
 
         PageTemplate pagetemplate = pageManager.newPageTemplate("/test002.tpsml");
         pagetemplate.setTitle("Created Page Template");
@@ -453,8 +585,14 @@
         f.setType(Fragment.PORTLET);
         f.setName("TestPortlet");
         properties = f.getProperties();
-        properties.put(Fragment.ROW_PROPERTY_NAME, "1");
-        properties.put(Fragment.COLUMN_PROPERTY_NAME, "1");
+        fp = pageManager.newFragmentProperty();
+        fp.setName(Fragment.ROW_PROPERTY_NAME);
+        fp.setValue("1");
+        properties.add(fp);
+        fp = pageManager.newFragmentProperty();
+        fp.setName(Fragment.COLUMN_PROPERTY_NAME);
+        fp.setValue("1");
+        properties.add(fp);
         root.getFragments().add(f);
         fr = pageManager.newFragmentReference();
         fr.setRefId("test002");
@@ -647,8 +785,8 @@
         assertNotNull(root);
         assertNotNull(root.getFragments());
         assertEquals(2, root.getFragments().size());
-        String testId = ((Fragment)root.getFragments().get(0)).getId();
-        assertNotNull(page.removeFragmentById(testId));
+//        String testId = ((Fragment)root.getFragments().get(0)).getId();
+//        assertNotNull(page.removeFragmentById(testId));
 
         try
         {
@@ -669,7 +807,7 @@
         root = (Fragment)rootFragmentElement;
         assertNotNull(root);
         assertNotNull(root.getFragments());
-        assertEquals(1, root.getFragments().size());
+//        assertEquals(1, root.getFragments().size());
 
         PageTemplate pagetemplate = pageManager.getPageTemplate("/test002.tpsml");
         pagetemplate.setTitle("Updated Title");
@@ -1121,6 +1259,7 @@
 
     public void testRemovePage() throws Exception
     {
+/*
         Page page = pageManager.getPage("/test002.psml");
         try
         {
@@ -1144,6 +1283,7 @@
             exceptionFound = true;
         }
         assertTrue(exceptionFound);
+*/boolean exceptionFound = false;
 
         PageTemplate pagetemplate = pageManager.getPageTemplate("/test002.tpsml");
         try
@@ -1316,13 +1456,15 @@
         assertTrue(cf.getName().equals("HelloPortlet"));
         assertTrue(cf.getType().equals(Fragment.PORTLET));
 
-        Map properties = f.getProperties();
-        Map cloneProperties = cf.getProperties();
+        List properties = f.getProperties();
+        List cloneProperties = cf.getProperties();
 
         assertNotNull(cloneProperties);
-        assertTrue(cloneProperties.size() == 2);
+        assertTrue(cloneProperties.size() == 4);
         assertEquals("0", cf.getProperty(Fragment.ROW_PROPERTY_NAME));
         assertEquals(0, cf.getIntProperty(Fragment.COLUMN_PROPERTY_NAME));
+        assertEquals("custom-value", cf.getProperty("custom"));
+        assertEquals("custom-value-user", cf.getProperty("custom", Fragment.USER_PROPERTY_SCOPE, "user"));
 
         cf = (Fragment) cloneChildren.get(1);
         f = (Fragment) children.get(1);
@@ -1554,5 +1696,14 @@
 			assertEquals(1, CollectionUtils.cardinality(id, allIds)); // uniqueness test			
 		}        
     }
-   
+
+    private Subject constructUserSubject()
+    {
+        // setup test subject
+        Set principals = new PrincipalsSet();
+        principals.add(new TestUser("user"));
+        principals.add(new TestGroup("group"));
+        principals.add(new TestRole("role"));
+        return new Subject(true, principals, new HashSet(), new HashSet());
+    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestDatabasePageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestDatabasePageManager.java?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestDatabasePageManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestDatabasePageManager.java Sat Dec 19 23:33:49 2009
@@ -34,6 +34,7 @@
 import org.apache.jetspeed.om.page.DynamicPage;
 import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.om.page.FragmentDefinition;
+import org.apache.jetspeed.om.page.FragmentProperty;
 import org.apache.jetspeed.om.page.FragmentReference;
 import org.apache.jetspeed.om.page.Link;
 import org.apache.jetspeed.om.page.Page;
@@ -285,8 +286,17 @@
         root.setTitle("Root Fragment");
         root.setState("Normal");
         root.setLayoutSizes("50%,50%");
-        root.getProperties().put("custom-prop1", "custom-prop-value1");
-        root.getProperties().put("custom-prop2", "custom-prop-value2");
+        /*
+        TODO: reenable once extended properties supported
+        FragmentProperty property1 = pageManager.newFragmentProperty();
+        property1.setName("custom-prop1");
+        property1.setValue("custom-prop-value1");
+        root.getProperties().add(property1);
+        FragmentProperty property2 = pageManager.newFragmentProperty();
+        property2.setName("custom-prop1");
+        property2.setValue("custom-prop-value1");
+        root.getProperties().add(property2);
+        */
         
         Fragment portlet = pageManager.newPortletFragment();
         portlet.setName("security::LoginPortlet");
@@ -805,7 +815,10 @@
             assertEquals("Normal", check.getRootFragment().getState());
             assertEquals("50%,50%", check.getRootFragment().getLayoutSizes());
             assertNotNull(check.getRootFragment().getProperties());
+            /*
+            TODO: reenable once extended properties supported
             assertEquals("custom-prop-value1", check.getRootFragment().getProperty("custom-prop1"));
+            */
             assertNotNull(checkRootFragment.getFragments());
             assertEquals(3, checkRootFragment.getFragments().size());
             BaseFragmentElement checkElement0 = (BaseFragmentElement)checkRootFragment.getFragments().get(0);
@@ -1029,12 +1042,27 @@
         assertEquals("/page.security", pageSecurity.getPath());
         pageSecurity.getGlobalSecurityConstraintsRefs().add("UPDATED");
         pageManager.updatePageSecurity(pageSecurity);
-
         Page page = pageManager.getPage("/default-page.psml");
         assertEquals("/default-page.psml", page.getPath());
         page.setTitle("UPDATED");
-        page.getRootFragment().getProperties().remove("custom-prop1");
-        page.getRootFragment().getProperties().put("UPDATED", "UPDATED");
+        /*
+        TODO: reenable once extended properties supported
+        FragmentProperty removeProperty = null;
+        Iterator propertyIter = page.getRootFragment().getProperties().iterator();
+        while (propertyIter.hasNext())
+        {
+            FragmentProperty property = (FragmentProperty)propertyIter.next();
+            if (property.getName().equals("custom-prop1"))
+            {
+                removeProperty = property;
+            }
+        }
+        page.getRootFragment().getProperties().remove(removeProperty);
+        */
+        FragmentProperty property = pageManager.newFragmentProperty();
+        property.setName("UPDATED");
+        property.setValue("UPDATED");
+        page.getRootFragment().getProperties().add(property);
         BaseFragmentElement rootFragmentElement = page.getRootFragment();
         assertTrue(rootFragmentElement instanceof Fragment);
         Fragment root = (Fragment)rootFragmentElement;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/clonetest.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/clonetest.psml?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/clonetest.psml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/clonetest.psml Sat Dec 19 23:33:49 2009
@@ -33,6 +33,8 @@
     <fragment id="pe001" type="portlet" name="HelloPortlet">
       <property layout="TwoColumns" name="row" value="0" />
       <property layout="TwoColumns" name="column" value="0" />      
+      <property name="custom" value="custom-value" />
+      <property name="custom" scope="user" scopeValue="user" value="custom-value-user" />
     </fragment>
     <fragment id="pe002" type="portlet" name="JMXPortlet">
       <property layout="TwoColumns" name="row" value="0" />

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/test001.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/test001.psml?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/test001.psml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/test001.psml Sat Dec 19 23:33:49 2009
@@ -37,6 +37,16 @@
       <property name="z" value="33.33" />
       <property name="width" value="44.44" />
       <property name="height" value="55.55" />
+      <property name="custom-0" value="custom-value-0" />
+      <property name="custom-1" value="custom-value-1" />
+      <property name="custom-1" scope="role" scopeValue="role" value="custom-value-role-1" />
+      <property name="custom-2" value="custom-value-2" />
+      <property name="custom-2" scope="role" scopeValue="role" value="custom-value-role-2" />
+      <property name="custom-2" scope="group" scopeValue="group" value="custom-value-group-2" />
+      <property name="custom-3" value="custom-value-3" />
+      <property name="custom-3" scope="role" scopeValue="role" value="custom-value-role-3" />
+      <property name="custom-3" scope="group" scopeValue="group" value="custom-value-group-3" />
+      <property name="custom-3" scope="user" scopeValue="user" value="custom-value-user-3" />
       <preference name="pref0" readOnly="true">
         <value>pref0-value0</value>
         <value>pref0-value1</value>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/MovePortletAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/MovePortletAction.java?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/MovePortletAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/MovePortletAction.java Sat Dec 19 23:33:49 2009
@@ -358,16 +358,9 @@
         String posExtended = getActionParameter( requestContext, DESKTOP_EXTENDED );
         if ( posExtended != null )
         {
-            Map fragmentProperties = fragment.getProperties();
-            if ( fragmentProperties == null )
-            {
-                success = false;
-                resultMap.put(REASON, "Failed to acquire fragment properties map for portlet id: " + moveFragmentId );
-                return success;
-            }
-            String oldDeskExt = (String)fragmentProperties.get( DESKTOP_EXTENDED );
+            String oldDeskExt = fragment.getProperty( DESKTOP_EXTENDED );
             resultMap.put( OLD_DESKTOP_EXTENDED, ( (oldDeskExt != null) ? oldDeskExt : "" ) );
-            fragmentProperties.put( DESKTOP_EXTENDED, posExtended );
+            fragment.updateProperty( DESKTOP_EXTENDED, posExtended );
         }
                 
         // only required for moveabs

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/PortletPlacementContextImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/PortletPlacementContextImpl.java?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/PortletPlacementContextImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/PortletPlacementContextImpl.java Sat Dec 19 23:33:49 2009
@@ -260,7 +260,7 @@
 		// get column value in the same manner as /portal and /desktop rendering
 		
 		// get column from properties to distinguish between null and -1 (fragment.getLayoutColumn() is -1 when column is not specified)
-		String colStr = (String)fragment.getProperties().get( "column" );
+		String colStr = fragment.getProperty( "column" );
         int columnCount = this.numberOfColumns;
 		int col = columnCount - 1;
 		if ( colStr != null )
@@ -285,7 +285,7 @@
 		// get row value in the same manner as /portal and /desktop rendering
 		
 		// get row from properties to distinguish between null and -1 (fragment.getLayoutRow() is -1 when row is not specified)
-		String rowStr = (String)fragment.getProperties().get( "row" );
+		String rowStr = fragment.getProperty( "row" );
 		if ( rowStr != null )
 		{
 			try

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/CleanupValveImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/CleanupValveImpl.java?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/CleanupValveImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/CleanupValveImpl.java Sat Dec 19 23:33:49 2009
@@ -24,14 +24,16 @@
 import javax.servlet.RequestDispatcher;
 import javax.servlet.http.HttpServletRequest;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.pipeline.PipelineException;
 import org.apache.jetspeed.pipeline.valve.AbstractValve;
 import org.apache.jetspeed.pipeline.valve.CleanupValve;
 import org.apache.jetspeed.pipeline.valve.ValveContext;
 import org.apache.jetspeed.request.RequestContext;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
  * <p>
  * CleanupValveImpl
@@ -52,9 +54,16 @@
 
     private static final Logger log = LoggerFactory.getLogger(CleanupValveImpl.class);
 
+    private PageManager pageManager;
     
-    public CleanupValveImpl()
+    /**
+     * Create cleanup valve with specified page manager component.
+     * 
+     * @param pageManager active page manager component
+     */
+    public CleanupValveImpl(PageManager pageManager)
     {
+        this.pageManager = pageManager;
     }
 
     /**
@@ -88,7 +97,17 @@
         {
             log.error("CleanupValveImpl: failed while trying to render fragment " + fragment);
             log.error("CleanupValveImpl: Unable to complete all renderings", e);
-        }        
+        }
+        
+        // Cleanup PageManager caches per request
+        try
+        {
+            pageManager.cleanupRequestCache();
+        }
+        catch (Exception e)
+        {
+            log.error("CleanupValveImpl: Unexpected exception caught", e);
+        }
     }
     
     /**

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/ContentFragmentBean.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/ContentFragmentBean.java?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/ContentFragmentBean.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/ContentFragmentBean.java Sat Dec 19 23:33:49 2009
@@ -65,7 +65,7 @@
         
         mode = contentFragment.getMode();
         state = contentFragment.getState();
-        properties = contentFragment.getProperties();
+        properties = contentFragment.getPropertiesMap();
         
         Collection<ContentFragment> childContentFragments = contentFragment.getFragments();
         

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/layout/PageLayoutComponent.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/layout/PageLayoutComponent.java?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/layout/PageLayoutComponent.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/layout/PageLayoutComponent.java Sat Dec 19 23:33:49 2009
@@ -32,6 +32,31 @@
 public interface PageLayoutComponent
 {
     /**
+     * global standard property scope
+     */
+    String GLOBAL_PROPERTY_SCOPE = ContentFragment.GLOBAL_PROPERTY_SCOPE;
+
+    /**
+     * user standard property scope
+     */
+    String USER_PROPERTY_SCOPE = ContentFragment.USER_PROPERTY_SCOPE;
+
+    /**
+     * role standard property scope
+     */
+    String ROLE_PROPERTY_SCOPE = ContentFragment.ROLE_PROPERTY_SCOPE;
+
+    /**
+     * group standard property scope
+     */
+    String GROUP_PROPERTY_SCOPE = ContentFragment.GROUP_PROPERTY_SCOPE;
+
+    /**
+     * group and role standard property scopes enabled flag
+     */
+    boolean GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED = ContentFragment.GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED;
+
+    /**
      * Add fragment to page at specified row column layout position
      * returning associated content fragment. Fragment is always added to
      * the page root layout fragment.
@@ -198,7 +223,7 @@
     void removeFolder(ContentPage contentPage);
     
     /**
-     * Update fragment portlet decorator.
+     * Update global fragment portlet decorator.
      *  
      * @param contentFragment content fragment context
      * @param decoratorName portlet decorator name
@@ -206,6 +231,16 @@
     void updateDecorator(ContentFragment contentFragment, String decoratorName);
 
     /**
+     * Update fragment portlet decorator.
+     *  
+     * @param contentFragment content fragment context
+     * @param decoratorName portlet decorator name
+     * @param scope property scope
+     * @param scopeValue property scope value
+     */
+    void updateDecorator(ContentFragment contentFragment, String decoratorName, String scope, String scopeValue);
+
+    /**
      * Update page default decorator.
      *  
      * @param contentPage content page context
@@ -232,7 +267,7 @@
     void updateName(ContentFragment contentFragment, String name);
 
     /**
-     * Update fragment layout position.
+     * Update global fragment layout position.
      * 
      * @param contentFragment content fragment context
      * @param x fragment X coordinate or -1
@@ -244,6 +279,20 @@
     void updatePosition(ContentFragment contentFragment, float x, float y, float z, float width, float height);
     
     /**
+     * Update fragment layout position.
+     * 
+     * @param contentFragment content fragment context
+     * @param x fragment X coordinate or -1
+     * @param y fragment Y coordinate or -1
+     * @param z fragment Z level or -1
+     * @param width fragment portlet width or -1
+     * @param height fragment portlet height or -1
+     * @param scope properties scope
+     * @param scopeValue properties scope value
+     */
+    void updatePosition(ContentFragment contentFragment, float x, float y, float z, float width, float height, String scope, String scopeValue);
+    
+    /**
      * Update preferences with new preferences set, accepting
      * Map of strings, string arrays, FragmentPreference or
      * PortletPreference. Existing preferences are removed and
@@ -255,7 +304,27 @@
     void updatePreferences(ContentFragment contentFragment, Map preferences);
 
     /**
-     * Update fragment row and column layout position.
+     * Update global fragment property.
+     * 
+     * @param contentFragment content fragment context
+     * @param propName fragment property name
+     * @param propValue fragment property value
+     */
+    void updateProperty(ContentFragment contentFragment, String propName, String propValue);
+    
+    /**
+     * Update fragment property.
+     * 
+     * @param contentFragment content fragment context
+     * @param propName fragment property name
+     * @param propValue fragment property value
+     * @param scope property scope 
+     * @param scopeValue property scope value
+     */
+    void updateProperty(ContentFragment contentFragment, String propName, String propValue, String scope, String scopeValue);
+    
+    /**
+     * Update global fragment row and column layout position.
      * 
      * @param contentFragment content fragment context
      * @param row fragment row position
@@ -264,7 +333,18 @@
     void updateRowColumn(ContentFragment contentFragment, int row, int column);
     
     /**
-     * Update fragment portlet state and/or mode.
+     * Update fragment row and column layout position.
+     * 
+     * @param contentFragment content fragment context
+     * @param row fragment row position
+     * @param column fragment column position
+     * @param scope properties scope
+     * @param scopeValue properties scope value
+     */
+    void updateRowColumn(ContentFragment contentFragment, int row, int column, String scope, String scopeValue);
+    
+    /**
+     * Update global fragment portlet state and/or mode.
      * 
      * @param contentFragment content fragment context
      * @param portletState fragment portlet state or null
@@ -273,6 +353,17 @@
     void updateStateMode(ContentFragment contentFragment, String portletState, String portletMode);
 
     /**
+     * Update fragment portlet state and/or mode.
+     * 
+     * @param contentFragment content fragment context
+     * @param portletState fragment portlet state or null
+     * @param portletMode fragment portlet mode or null
+     * @param scope properties scope
+     * @param scopeValue properties scope value
+     */
+    void updateStateMode(ContentFragment contentFragment, String portletState, String portletMode, String scope, String scopeValue);
+
+    /**
      * Update page titles.
      * 
      * @param contentPage content page context
@@ -285,8 +376,7 @@
      * Returns the root fragment which is not locked and not merged from a page template
      * 
      * @param contentPage content page context
-     * @return
+     * @return content fragment context
      */
-    ContentFragment getUnlockedRootFragment(ContentPage contentPage);
-    
+    ContentFragment getUnlockedRootFragment(ContentPage contentPage);    
 }

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/BaseFragmentElement.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/BaseFragmentElement.java?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/BaseFragmentElement.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/BaseFragmentElement.java Sat Dec 19 23:33:49 2009
@@ -18,7 +18,6 @@
 package org.apache.jetspeed.om.page;
 
 import java.util.List;
-import java.util.Map;
 
 /**
  * <p>A <code>BaseFragmentElement</code> is the basic element handled by the
@@ -31,6 +30,26 @@
 public interface BaseFragmentElement extends BaseElement
 {
     /**
+     * skin standard layout property name
+     */
+    String SKIN_PROPERTY_NAME = "skin";
+
+    /**
+     * decorator standard layout property name
+     */
+    String DECORATOR_PROPERTY_NAME = "decorator";
+
+    /**
+     * state standard layout property name
+     */
+    String STATE_PROPERTY_NAME = "state";
+
+    /**
+     * mode standard layout property name
+     */
+    String MODE_PROPERTY_NAME = "mode";
+
+    /**
      * row standard layout property name
      */
     String ROW_PROPERTY_NAME = "row";
@@ -71,6 +90,31 @@
     String HEIGHT_PROPERTY_NAME = "height";
 
     /**
+     * global standard property scope
+     */
+    String GLOBAL_PROPERTY_SCOPE = FragmentProperty.GLOBAL_PROPERTY_SCOPE;
+
+    /**
+     * user standard property scope
+     */
+    String USER_PROPERTY_SCOPE = FragmentProperty.USER_PROPERTY_SCOPE;
+
+    /**
+     * group standard property scope
+     */
+    String GROUP_PROPERTY_SCOPE = FragmentProperty.GROUP_PROPERTY_SCOPE;
+
+    /**
+     * role standard property scope
+     */
+    String ROLE_PROPERTY_SCOPE = FragmentProperty.ROLE_PROPERTY_SCOPE;
+
+    /**
+     * group and role standard property scopes enabled flag
+     */
+    boolean GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED = FragmentProperty.GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED;
+
+    /**
      * Sets the unique Id of this fragment. This id must be unique from the
      * complete portal and must be suitable as a unique key.
      *
@@ -80,62 +124,122 @@
 
     /**
      * Returns the name of the skin associated to this fragment
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, group, role, or global scopes).
      */
     String getSkin();
 
     /**
      * Defines the skin for this fragment. This skin should be
-     * known by the portal.
+     * known by the portal. The default, (GLOBAL), scope value is set
+     * or removed.
      *
      * @param skinName the name of the new skin applied to this fragment
      */
     void setSkin(String skinName);
 
     /**
+     * Defines the skin for this fragment. This skin should be
+     * known by the portal. Setting the property value to null removes
+     * the scoped property.
+     *
+     * @param scope the name of the property scope for setting
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     * @param skinName the name of the new skin applied to this fragment
+     */
+    void setSkin(String scope, String scopeValue, String skinName);
+
+    /**
      * Returns the name of the decorator bound to this fragment
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, group, role, or global scopes).
      */
     String getDecorator();
 
     /**
      * Defines the decorator for this fragment. This decorator should be
-     * known by the portal.
+     * known by the portal. The default, (GLOBAL), scope value is set
+     * or removed.
      *
      * @param decoratorName the name of the decorator applied to this fragment
      */
     void setDecorator(String decoratorName);
 
     /**
+     * Defines the decorator for this fragment. This decorator should be
+     * known by the portal. Setting the property value to null removes
+     * the scoped property.
+     *
+     * @param scope the name of the property scope for setting 
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     * @param decoratorName the name of the decorator applied to this fragment
+     */
+    void setDecorator(String scope, String scopeValue, String decoratorName);
+
+    /**
      * Returns the display state of this fragment. The state may have the
      * following values: "Normal","Minimized","Maximized","Hidden"
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, group, role, or global scopes).
      */
     String getState();
 
     /**
      * Sets the display state of this fragment.
      * Valid states are: "Normal","Minimized","Maximized","Hidden"
-     *
+     * The default, (GLOBAL), scope value is set or removed.
+     *  
      * @param state the new fragment state
      */
     void setState(String state);
 
     /**
+     * Sets the display state of this fragment.
+     * Valid states are: "Normal","Minimized","Maximized","Hidden".
+     * Setting the property value to null removes the scoped property.
+     *
+     * @param scope the name of the property scope for setting 
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     * @param state the new fragment state
+     */
+    void setState(String scope, String scopeValue, String state);
+
+    /**
      * Returns the display mode of this fragment. The mode may have the
      * following values: "View","Edit","Help","Config","Print","Custom"
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, group, role, or global scopes).
      */
     String getMode();
 
     /**
      * Sets the display mode of this fragment.
      * Valid modes are: "View","Edit","Help","Config","Print","Custom"
-     *
+     * The default, (GLOBAL), scope value is set or removed.
+     * 
      * @param mode the new fragment mode
      */
     void setMode(String mode);
 
     /**
-     * getProperty
+     * Sets the display mode of this fragment.
+     * Valid modes are: "View","Edit","Help","Config","Print","Custom".
+     * Setting the property value to null removes the scoped property.
      *
+     * @param scope the name of the property scope for setting 
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     * @param mode the new fragment mode
+     */
+    void setMode(String scope, String scopeValue, String mode);
+
+    /**
      * Get named property value.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, group, role, or global scopes).
      *
      * @param propName property name
      * @return value
@@ -143,9 +247,20 @@
     String getProperty(String propName);
     
     /**
-     * getIntProperty
-     * 
+     * Get named property value.
+     *
+     * @param propName property name
+     * @param propScope the name of the property scope to retrieve 
+     * @param propScopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                       or USER where the default user name is used if null)
+     * @return value
+     */
+    String getProperty(String propName, String propScope, String propScopeValue);
+    
+    /**
      * Get named property value as integer.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, group, role, or global scopes).
      *
      * @param propName property name
      * @return int value
@@ -153,9 +268,20 @@
     int getIntProperty(String propName);
     
     /**
-     * getFloatProperty
-     * 
+     * Get named property value as integer.
+     *
+     * @param propName property name
+     * @param propScope the name of the property scope to retrieve 
+     * @param propScopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                       or USER where the default user name is used if null)
+     * @return int value
+     */
+    int getIntProperty(String propName, String propScope, String propScopeValue);
+    
+    /**
      * Get named property value as float.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, group, role, or global scopes).
      *
      * @param propName property name
      * @return float value
@@ -163,133 +289,296 @@
     float getFloatProperty(String propName);
     
     /**
-     * getProperties
-     * 
-     * Get writable Map of properties by name.
+     * Get named property value as float.
      *
-     * @return properties map
+     * @param propName property name
+     * @param propScope the name of the property scope to retrieve 
+     * @param propScopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                       or USER where the default user name is used if null)
+     * @return float value
      */
-    Map getProperties();
+    float getFloatProperty(String propName, String propScope, String propScopeValue);
+    
+    /**
+     * Set named property value.
+     *
+     * @param propName property name
+     * @param propScope the name of the property scope to retrieve 
+     * @param propScopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                       or USER where the default user name is used if null)
+     * @param propValue property value
+     */
+    void setProperty(String propName, String propScope, String propScopeValue, String propValue);
+    
+    /**
+     * Set named int property value.
+     *
+     * @param propName property name
+     * @param propScope the name of the property scope to retrieve 
+     * @param propScopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                       or USER where the default user name is used if null)
+     * @param propValue property value
+     */
+    void setProperty(String propName, String propScope, String propScopeValue, int propValue);
+    
+    /**
+     * Set named float property value.
+     *
+     * @param propName property name
+     * @param propScope the name of the property scope to retrieve 
+     * @param propScopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                       or USER where the default user name is used if null)
+     * @param propValue property value
+     */
+    void setProperty(String propName, String propScope, String propScopeValue, float propValue);
+    
+    /**
+     * Get writable list of fragment property objects that
+     * initially returns the set of properties for all scopes
+     * found for the current user.
+     *
+     * @return list of FragmentProperty instances
+     */
+    List getProperties();
 
     /**
-     * get layout row property
+     * Set collection of fragment property objects
+     * 
+     * @param preferences list of FragmentPreference objects
+     */
+    void setProperties(List properties);
+
+    /**
+     * Get layout row property.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, group, role, or global scopes).
      *
      * @return row layout property
      **/
     int getLayoutRow();
 
     /**
-     * set the layout row property
-     *
+     * Set the layout row property.
+     * The default, (GLOBAL), scope value is set or removed.
+     * 
      * @param row
      */
     void setLayoutRow(int row);
 
     /**
-     * get layout column property
+     * Set the layout row property. Setting the property value to
+     * a negative value removes the scoped property.
+     *
+     * @param scope the name of the property scope for setting 
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     * @param row
+     */
+    void setLayoutRow(String scope, String scopeValue, int row);
+
+    /**
+     * Get layout column property.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, group, role, or global scopes).
      *
      * @return column layout property
      **/
     int getLayoutColumn();
 
     /**
-     * set the layout column property
+     * Set the layout column property.
+     * The default, (GLOBAL), scope value is set or removed.
      * 
      * @param column
      */
     void setLayoutColumn(int column);
     
     /**
-     * get layout sizes property, (i.e. "25%,75%")
+     * Set the layout column property. Setting the property value to
+     * a negative value removes the scoped property.
+     * 
+     * @param scope the name of the property scope for setting 
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     * @param column
+     */
+    void setLayoutColumn(String scope, String scopeValue, int column);
+    
+    /**
+     * Get layout sizes property, (i.e. "25%,75%").
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, group, role, or global scopes).
      * 
      * @return sizes layout property
      **/
     String getLayoutSizes();
     
     /**
-     * set the layout sizes
+     * Set the layout sizes.
+     * The default, (GLOBAL), scope value is set or removed.
      * 
      * @param sizes
      */
     void setLayoutSizes(String sizes);
     
     /**
-     * get layout x coordinate property
+     * Set the layout sizes. Setting the property value to null removes
+     * the scoped property.
+     * 
+     * @param scope the name of the property scope for setting 
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     * @param sizes
+     */
+    void setLayoutSizes(String scope, String scopeValue, String sizes);
+    
+    /**
+     * Get layout x coordinate property.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, group, role, or global scopes).
      *
      * @return the x coordinate value
      **/
     float getLayoutX();
 
     /**
-     * set the layout x coordinate property
-     *
+     * Set the layout x coordinate property.
+     * The default, (GLOBAL), scope value is set or removed.
+     * 
      * @param x the coordinate value
      */
     void setLayoutX(float x);
 
     /**
-     * get layout y coordinate property
+     * Set the layout x coordinate property. Setting the property
+     * value to a negative value removes the scoped property.
+     *
+     * @param scope the name of the property scope for setting 
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     * @param x the coordinate value
+     */
+    void setLayoutX(String scope, String scopeValue, float x);
+
+    /**
+     * Get layout y coordinate property.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, group, role, or global scopes).
      *
      * @return the y coordinate value
      **/
     float getLayoutY();
 
     /**
-     * set the layout y coordinate property
-     *
+     * Set the layout y coordinate property.
+     * The default, (GLOBAL), scope value is set or removed.
+     * 
      * @param y the coordinate value
      */
     void setLayoutY(float y);
 
     /**
-     * get layout z coordinate property
+     * Set the layout y coordinate property. Setting the property
+     * value to a negative value removes the scoped property.
+     *
+     * @param scope the name of the property scope for setting 
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     * @param y the coordinate value
+     */
+    void setLayoutY(String scope, String scopeValue, float y);
+
+    /**
+     * Get layout z coordinate property.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, group, role, or global scopes).
      *
      * @return the z coordinate value
      **/
     float getLayoutZ();
 
     /**
-     * set the layout z coordinate property
-     *
+     * Set the layout z coordinate property.
+     * The default, (GLOBAL), scope value is set or removed.
+     * 
      * @param z the coordinate value
      */
     void setLayoutZ(float z);
 
     /**
-     * get layout width property
+     * Set the layout z coordinate property. Setting the property
+     * value to a negative value removes the scoped property.
+     *
+     * @param scope the name of the property scope for setting 
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     * @param z the coordinate value
+     */
+    void setLayoutZ(String scope, String scopeValue, float z);
+
+    /**
+     * Get layout width property.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, group, role, or global scopes).
      *
      * @return the width value
      **/
     float getLayoutWidth();
 
     /**
-     * set the layout width property
-     *
+     * Set the layout width property.
+     * The default, (GLOBAL), scope value is set or removed.
+     * 
      * @param width the value
      */
     void setLayoutWidth(float width);
 
     /**
-     * get layout height property
+     * Set the layout width property. Setting the property value
+     * to a negative value removes the scoped property.
+     *
+     * @param scope the name of the property scope for setting 
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     * @param width the value
+     */
+    void setLayoutWidth(String scope, String scopeValue, float width);
+
+    /**
+     * Get layout height property.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, group, role, or global scopes).
      *
      * @return the height value
      **/
     float getLayoutHeight();
 
     /**
-     * set the layout height property
-     *
+     * Set the layout height property.
+     * The default, (GLOBAL), scope value is set or removed.
+     * 
      * @param height the value
      */
     void setLayoutHeight(float height);
 
     /**
+     * Set the layout height property. Setting the property value
+     * to a negative value removes the scoped property.
+     *
+     * @param scope the name of the property scope for setting 
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     * @param height the value
+     */
+    void setLayoutHeight(String scope, String scopeValue, float height);
+
+    /**
      * Get collection of fragment preference objects used
      * to initialize user preferences
      * 
      * @return list of FragmentPreference objects
      */
-    List getPreferences();    
+    List getPreferences();
 
     /**
      * Set collection of fragment preference objects

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java Sat Dec 19 23:33:49 2009
@@ -72,6 +72,26 @@
     /************** BaseFragmentElement **************/
 
     /**
+     * skin standard layout property name
+     */
+    String SKIN_PROPERTY_NAME = BaseFragmentElement.SKIN_PROPERTY_NAME;
+
+    /**
+     * decorator standard layout property name
+     */
+    String DECORATOR_PROPERTY_NAME = BaseFragmentElement.DECORATOR_PROPERTY_NAME;
+
+    /**
+     * state standard layout property name
+     */
+    String STATE_PROPERTY_NAME = BaseFragmentElement.STATE_PROPERTY_NAME;
+
+    /**
+     * mode standard layout property name
+     */
+    String MODE_PROPERTY_NAME = BaseFragmentElement.MODE_PROPERTY_NAME;
+
+    /**
      * row standard layout property name
      */
     String ROW_PROPERTY_NAME = BaseFragmentElement.ROW_PROPERTY_NAME;
@@ -112,31 +132,64 @@
     String HEIGHT_PROPERTY_NAME = BaseFragmentElement.HEIGHT_PROPERTY_NAME;
 
     /**
+     * global standard property scope
+     */
+    String GLOBAL_PROPERTY_SCOPE = BaseFragmentElement.GLOBAL_PROPERTY_SCOPE;
+
+    /**
+     * user standard property scope
+     */
+    String USER_PROPERTY_SCOPE = BaseFragmentElement.USER_PROPERTY_SCOPE;
+
+    /**
+     * role standard property scope
+     */
+    String ROLE_PROPERTY_SCOPE = BaseFragmentElement.ROLE_PROPERTY_SCOPE;
+
+    /**
+     * group standard property scope
+     */
+    String GROUP_PROPERTY_SCOPE = BaseFragmentElement.GROUP_PROPERTY_SCOPE;
+
+    /**
+     * group and role standard property scopes enabled flag
+     */
+    boolean GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED = BaseFragmentElement.GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED;
+
+    /**
      * Returns the name of the skin associated to this fragment
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, role, group, or global scopes).
      */
     String getSkin();
 
     /**
      * Returns the name of the decorator bound to this fragment
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, role, group, or global scopes).
      */
     String getDecorator();
 
     /**
      * Returns the display state of this fragment. The state may have the
      * following values: "Normal","Minimized","Maximized","Hidden"
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, role, group, or global scopes).
      */
     String getState();
 
     /**
      * Returns the display mode of this fragment. The mode may have the
      * following values: "View","Edit","Help","Config","Print","Custom"
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, role, group, or global scopes).
      */
     String getMode();
 
     /**
-     * getProperty
-     *
      * Get named property value.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, role, group, or global scopes).
      *
      * @param propName property name
      * @return value
@@ -144,9 +197,18 @@
     String getProperty(String propName);
     
     /**
-     * getIntProperty
-     * 
+     * Get named property value.
+     *
+     * @param propName property name
+     * @param scope the name of the property scope to retrieve 
+     * @return value
+     */
+    String getProperty(String propName, String scope);
+    
+    /**
      * Get named property value as integer.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, role, group, or global scopes).
      *
      * @param propName property name
      * @return int value
@@ -154,9 +216,18 @@
     int getIntProperty(String propName);
     
     /**
-     * getFloatProperty
-     * 
+     * Get named property value as integer.
+     *
+     * @param propName property name
+     * @param scope the name of the property scope to retrieve 
+     * @return int value
+     */
+    int getIntProperty(String propName, String scope);
+    
+    /**
      * Get named property value as float.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, role, group, or global scopes).
      *
      * @param propName property name
      * @return float value
@@ -164,73 +235,106 @@
     float getFloatProperty(String propName);
     
     /**
-     * getProperties
-     * 
-     * Get writable Map of properties by name.
+     * Get named property value as float.
+     *
+     * @param propName property name
+     * @param scope the name of the property scope to retrieve 
+     * @return float value
+     */
+    float getFloatProperty(String propName, String scope);
+    
+    /**
+     * Get read-only list of fragment property objects that
+     * initially returns the set of properties for all scopes.
+     *
+     * @return list of FragmentProperty instances
+     */
+    List getProperties();
+
+    /**
+     * Get named property value map. Property values are returned
+     * for the most specific scope found, (i.e. user, role, group,
+     * or global scopes).
      *
-     * @return properties map
+     * @return map of fragment property values
      */
-    Map getProperties();
+    Map getPropertiesMap();
 
     /**
-     * get layout row property
+     * Get layout row property.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, role, group, or global scopes).
      *
      * @return row layout property
      **/
     int getLayoutRow();
 
     /**
-     * get layout column property
+     * Get layout column property.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, role, group, or global scopes).
      *
      * @return column layout property
      **/
     int getLayoutColumn();
 
     /**
-     * get layout sizes property, (i.e. "25%,75%")
+     * Get layout sizes property, (i.e. "25%,75%").
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, role, group, or global scopes).
      * 
      * @return sizes layout property
      **/
     String getLayoutSizes();
     
     /**
-     * get layout x coordinate property
+     * Get layout x coordinate property.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, role, group, or global scopes).
      *
      * @return the x coordinate value
      **/
     float getLayoutX();
 
     /**
-     * get layout y coordinate property
+     * Get layout y coordinate property.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, role, group, or global scopes).
      *
      * @return the y coordinate value
      **/
     float getLayoutY();
 
     /**
-     * get layout z coordinate property
+     * Get layout z coordinate property.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, role, group, or global scopes).
      *
      * @return the z coordinate value
      **/
     float getLayoutZ();
 
     /**
-     * get layout width property
+     * Get layout width property.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, role, group, or global scopes).
      *
      * @return the width value
      **/
     float getLayoutWidth();
 
     /**
-     * get layout height property
+     * Get layout height property.
+     * Property value is returned for the most specific scope
+     * found, (i.e. user, role, group, or global scopes).
      *
      * @return the height value
      **/
     float getLayoutHeight();
 
     /**
-     * Get collection of fragment preference objects used
-     * to initialize user preferences
+     * Get read-only collection of fragment preference objects
+     * used to initialize user preferences
      * 
      * @return list of FragmentPreference objects
      */
@@ -369,7 +473,8 @@
 
     /**
      * Add portlet to fragment with specified row and column returning
-     * associated content fragment.
+     * associated content fragment. The default, (Global), scope row
+     * and column values are set.
      * 
      * @param type portlet type
      * @param name portlet name
@@ -389,13 +494,24 @@
     ContentFragment addPortlet(String type, String name);
     
     /**
-     * Update fragment portlet decorator.
+     * Update fragment portlet decorator. The default, (Global),
+     * scope value is updated.
      *  
      * @param decoratorName portlet decorator name
      */
     void updateDecorator(String decoratorName);
     
     /**
+     * Update fragment portlet decorator.
+     *  
+     * @param decoratorName portlet decorator name
+     * @param scope the name of the property scope to update
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     */
+    void updateDecorator(String decoratorName, String scope, String scopeValue);
+    
+    /**
      * Update fragment name.
      * 
      * @param name fragment name
@@ -403,7 +519,8 @@
     void updateName(String name);
 
     /**
-     * Update fragment layout position.
+     * Update fragment layout position. The default, (Global),
+     * scope values are updated.
      * 
      * @param x fragment X coordinate or -1
      * @param y fragment Y coordinate or -1
@@ -412,6 +529,20 @@
      * @param height fragment portlet height or -1
      */
     void updatePosition(float x, float y, float z, float width, float height);
+
+    /**
+     * Update fragment layout position.
+     * 
+     * @param x fragment X coordinate or -1
+     * @param y fragment Y coordinate or -1
+     * @param z fragment Z level or -1
+     * @param width fragment portlet width or -1
+     * @param height fragment portlet height or -1
+     * @param scope the name of the property scope to update 
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     */
+    void updatePosition(float x, float y, float z, float width, float height, String scope, String scopeValue);
     
     /**
      * Update preferences with new preferences set, accepting
@@ -424,7 +555,28 @@
     void updatePreferences(Map preferences);
 
     /**
-     * Update fragment row and column layout position.
+     * Update fragment property. The default, (Global), scope value
+     * is updated.
+     * 
+     * @param propName fragment property name
+     * @param propValue fragment property value
+     */
+    void updateProperty(String propName, String propValue);
+    
+    /**
+     * Update fragment property.
+     * 
+     * @param propName fragment property name
+     * @param propValue fragment property value
+     * @param scope the name of the property scope to update 
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     */
+    void updateProperty(String propName, String propValue, String scope, String scopeValue);
+    
+    /**
+     * Update fragment row and column layout positions. The default, (Global),
+     * scope values are updated.
      * 
      * @param row fragment row position
      * @param column fragment column position
@@ -432,10 +584,33 @@
     void updateRowColumn(int row, int column);
     
     /**
-     * Update fragment portlet state and/or mode.
+     * Update fragment row and column layout positions.
+     * 
+     * @param row fragment row position
+     * @param column fragment column position
+     * @param scope the name of the property scope to update 
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     */
+    void updateRowColumn(int row, int column, String scope, String scopeValue);
+    
+    /**
+     * Update fragment portlet state and/or mode. The default, (Global),
+     * scope values are updated.
      * 
      * @param portletState fragment portlet state or null
      * @param portletMode fragment portlet mode or null
      */
     void updateStateMode(String portletState, String portletMode);
+
+    /**
+     * Update fragment portlet state and/or mode.
+     * 
+     * @param portletState fragment portlet state or null
+     * @param portletMode fragment portlet mode or null
+     * @param scope the name of the property scope to update 
+     * @param scopeValue the scope discriminator value, (unless scope is GLOBAL
+     *                   or USER where the default user name is used if null)
+     */
+    void updateStateMode(String portletState, String portletMode, String scope, String scopeValue);
 }

Added: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/FragmentProperty.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/FragmentProperty.java?rev=892529&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/FragmentProperty.java (added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/FragmentProperty.java Sat Dec 19 23:33:49 2009
@@ -0,0 +1,109 @@
+/*
+ * 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.om.page;
+
+/**
+ * This interface represents a scoped fragment property.
+ *
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface FragmentProperty
+{
+    /**
+     * global standard property scope
+     */
+    String GLOBAL_PROPERTY_SCOPE = null;
+
+    /**
+     * user standard property scope
+     */
+    String USER_PROPERTY_SCOPE = "user";
+
+    /**
+     * group standard property scope
+     */
+    String GROUP_PROPERTY_SCOPE = "group";
+
+    /**
+     * role standard property scope
+     */
+    String ROLE_PROPERTY_SCOPE = "role";
+
+    /**
+     * group and role standard property scopes enabled flag
+     */
+    boolean GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED = false;
+
+    /**
+     * Get property name.
+     *
+     * @return property name
+     */
+    String getName();
+    
+    /**
+     * Set property name.
+     *
+     * @param name property name
+     */
+    void setName(String name);
+    
+    /**
+     * Get property scope. Supported scopes are: GLOBAL or null,
+     * USER, GROUP, and ROLE.
+     *
+     * @return property scope
+     */
+    String getScope();
+    
+    /**
+     * Set property scope. Supported scopes are: GLOBAL or null,
+     * USER, GROUP, and ROLE.
+     *
+     * @param scope property scope
+     */
+    void setScope(String scope);
+    
+    /**
+     * Get property scope discriminator value.
+     *
+     * @return property scope
+     */
+    String getScopeValue();
+    
+    /**
+     * Set property scope discriminator value.
+     *
+     * @param value property scope discriminator 
+     */
+    void setScopeValue(String value);
+    
+    /**
+     * Get property value.
+     *
+     * @return list of String preference values
+     */
+    String getValue();
+    
+    /**
+     * Set property value.
+     *
+     * @param value property value
+     */
+    void setValue(String value);
+}

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java Sat Dec 19 23:33:49 2009
@@ -33,6 +33,7 @@
 import org.apache.jetspeed.om.page.DynamicPage;
 import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.om.page.FragmentDefinition;
+import org.apache.jetspeed.om.page.FragmentProperty;
 import org.apache.jetspeed.om.page.FragmentReference;
 import org.apache.jetspeed.om.page.Link;
 import org.apache.jetspeed.om.page.Page;
@@ -291,6 +292,13 @@
     public FragmentPreference newFragmentPreference();
 
     /**
+     * newFragmentProperty - creates a new fragment property
+     *
+     * @return a newly created FragmentProperty
+     */
+    public FragmentProperty newFragmentProperty();
+
+    /**
      * <p>
      * getPage
      * </p>
@@ -1108,4 +1116,9 @@
      * @param node updated managed node if known
      */
     public void notifyUpdatedNode(Node node);
+    
+    /**
+     * Cleanup request level cache for current thread.
+     */
+    public void cleanupRequestCache();
 }

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/ddl-schema/phase2-schema.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/ddl-schema/phase2-schema.xml?rev=892529&r1=892528&r2=892529&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/ddl-schema/phase2-schema.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/ddl-schema/phase2-schema.xml Sat Dec 19 23:33:49 2009
@@ -348,10 +348,6 @@
         <column name="LAYOUT_Z" type="REAL"/>
         <column name="LAYOUT_WIDTH" type="REAL"/>
         <column name="LAYOUT_HEIGHT" type="REAL"/>
-        <column name="EXT_PROP_NAME_1" size="40" type="VARCHAR"/>
-        <column name="EXT_PROP_VALUE_1" size="80" type="VARCHAR"/>
-        <column name="EXT_PROP_NAME_2" size="40" type="VARCHAR"/>
-        <column name="EXT_PROP_VALUE_2" size="80" type="VARCHAR"/>
         <column name="OWNER_PRINCIPAL" size="40" type="VARCHAR"/>
         <foreign-key foreignTable="FRAGMENT" name="FK_FRAGMENT_1" onDelete="cascade">
             <reference foreign="FRAGMENT_ID" local="PARENT_ID"/>
@@ -436,6 +432,27 @@
         </index>
     </table>
 
+    <table name="FRAGMENT_PROP">
+        <column name="PROP_ID" primaryKey="true" required="true" type="INTEGER"/>
+        <column name="FRAGMENT_ID" required="true" type="INTEGER"/>
+        <column name="NAME" required="true" size="40" type="VARCHAR"/>
+        <column name="SCOPE" required="false" size="10" type="VARCHAR"/>
+        <column name="SCOPE_VALUE" required="false" size="40" type="VARCHAR"/>
+        <column name="VALUE" required="true" size="100" type="VARCHAR"/>
+        <foreign-key foreignTable="FRAGMENT" name="FK_FRAGMENT_PROP_1" onDelete="cascade">
+            <reference foreign="FRAGMENT_ID" local="FRAGMENT_ID"/>
+        </foreign-key>
+        <index name="IX_FRAGMENT_PROP_1">
+            <index-column name="FRAGMENT_ID"/>
+        </index>
+        <unique name="UN_FRAGMENT_PROP_1">
+            <unique-column name="FRAGMENT_ID"/>
+            <unique-column name="NAME"/>
+            <unique-column name="SCOPE"/>
+            <unique-column name="SCOPE_VALUE"/>
+        </unique>
+    </table>
+
     <!--
        Link Definition
     -->



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