portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r881862 [10/16] - in /portals/jetspeed-2/portal/trunk: ./ applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/ applications/jetspeed/src/main/webapp/WEB-INF/templates/ applications/jetspeed/src/main/webapp/decorations/layout/greenearth/...
Date Wed, 18 Nov 2009 18:24:53 GMT
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=881862&r1=881861&r2=881862&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 Wed Nov 18 18:24:48 2009
@@ -18,17 +18,12 @@
   limitations under the License.
 -->
 <mapping>
-  <class name="org.apache.jetspeed.om.page.psml.PageImpl">
-    <map-to xml="page"/>
+  <class name="org.apache.jetspeed.om.page.psml.AbstractBaseFragmentsElement">
 
     <field name="id" type="string">
       <bind-xml name="id" node="attribute"/>
     </field>
 
-    <field name="hidden" type="boolean">
-      <bind-xml name="hidden" node="attribute"/>
-    </field>
-
     <field name="securityConstraints"
            type="org.apache.jetspeed.om.page.psml.SecurityConstraintsImpl">
       <bind-xml name="security-constraints"/>
@@ -46,14 +41,9 @@
       <bind-xml name="short-title"/>
     </field>
     
-    <field name="defaults"
-           type="org.apache.jetspeed.om.page.psml.DefaultsImpl">
-      <bind-xml name="defaults"/>
-    </field>
-
-    <field name="rootFragment"
-           type="org.apache.jetspeed.om.page.psml.FragmentImpl">
-      <bind-xml name="fragment"/>
+    <field name="rootFragmentElementImpl"
+           type="org.apache.jetspeed.om.page.psml.FragmentElementImpl">
+      <bind-xml name="fragment-element"/>
     </field>
 
     <field name="metadataFields"
@@ -61,6 +51,20 @@
            collection="collection">
       <bind-xml name="metadata"/>
     </field>
+  </class>
+
+  <class name="org.apache.jetspeed.om.page.psml.FragmentDefinitionImpl"
+         extends="org.apache.jetspeed.om.page.psml.AbstractBaseFragmentsElement">
+    <map-to xml="fragment-definition"/>
+  </class>
+
+  <class name="org.apache.jetspeed.om.page.psml.AbstractBasePageElement"
+         extends="org.apache.jetspeed.om.page.psml.AbstractBaseFragmentsElement">
+
+    <field name="defaults"
+           type="org.apache.jetspeed.om.page.psml.DefaultsImpl">
+      <bind-xml name="defaults"/>
+    </field>
 
     <field name="menuDefinitions"
            type="org.apache.jetspeed.om.folder.psml.MenuDefinitionImpl" 
@@ -68,7 +72,34 @@
       <bind-xml name="menu"/>
     </field>
   </class>
-  
+
+  <class name="org.apache.jetspeed.om.page.psml.AbstractBaseConcretePageElement"
+         extends="org.apache.jetspeed.om.page.psml.AbstractBasePageElement">
+
+    <field name="hidden" type="boolean">
+      <bind-xml name="hidden" node="attribute"/>
+    </field>
+  </class>
+
+  <class name="org.apache.jetspeed.om.page.psml.PageImpl"
+         extends="org.apache.jetspeed.om.page.psml.AbstractBaseConcretePageElement">
+    <map-to xml="page"/>
+  </class>
+
+  <class name="org.apache.jetspeed.om.page.psml.PageTemplateImpl"
+         extends="org.apache.jetspeed.om.page.psml.AbstractBasePageElement">
+    <map-to xml="page-template"/>
+  </class>
+
+  <class name="org.apache.jetspeed.om.page.psml.DynamicPageImpl"
+         extends="org.apache.jetspeed.om.page.psml.AbstractBaseConcretePageElement">
+    <map-to xml="dynamic-page"/>
+
+    <field name="pageType" type="string">
+      <bind-xml name="type" node="attribute"/>
+    </field>
+  </class>
+
   <class name="org.apache.jetspeed.om.page.PageLocalizedFieldImpl">
     <map-to xml="metadata"/>
 
@@ -85,19 +116,29 @@
     </field>
   </class>
 
-  <class name="org.apache.jetspeed.om.page.psml.FragmentImpl">
-    <map-to xml="fragment"/>
+  <class name="org.apache.jetspeed.om.page.psml.FragmentElementImpl">
+    <map-to xml="fragment-element"/>
 
-    <field name="id" type="string">
-      <bind-xml name="id" node="attribute"/>
+    <field name="fragment"
+           type="org.apache.jetspeed.om.page.psml.FragmentImpl">
+      <bind-xml name="fragment"/>
     </field>
 
-    <field name="type" type="string">
-      <bind-xml name="type" node="attribute"/>
+    <field name="fragmentReference"
+           type="org.apache.jetspeed.om.page.psml.FragmentReferenceImpl">
+      <bind-xml name="fragment-reference"/>
     </field>
 
-    <field name="name" type="string">
-      <bind-xml name="name" node="attribute"/>
+    <field name="pageFragment"
+           type="org.apache.jetspeed.om.page.psml.PageFragmentImpl">
+      <bind-xml name="page-fragment"/>
+    </field>
+  </class>
+
+  <class name="org.apache.jetspeed.om.page.psml.AbstractBaseFragmentElement">
+
+    <field name="id" type="string">
+      <bind-xml name="id" node="attribute"/>
     </field>
 
     <field name="skin" type="string">
@@ -129,12 +170,6 @@
       <bind-xml name="short-title"/>
     </field>
 
-    <field name="fragments"
-           type="org.apache.jetspeed.om.page.psml.FragmentImpl" 
-           collection="collection">
-      <bind-xml name="fragment"/>
-    </field>
-
     <field name="propertiesList"
            type="org.apache.jetspeed.om.page.psml.PropertyImpl" collection="arraylist">
       <bind-xml name="property"/>
@@ -145,6 +180,39 @@
       <bind-xml name="preference"/>
     </field>
   </class>
+
+  <class name="org.apache.jetspeed.om.page.psml.FragmentImpl"
+         extends="org.apache.jetspeed.om.page.psml.AbstractBaseFragmentElement">
+    <map-to xml="fragment"/>
+
+    <field name="type" type="string">
+      <bind-xml name="type" node="attribute"/>
+    </field>
+
+    <field name="name" type="string">
+      <bind-xml name="name" node="attribute"/>
+    </field>
+
+    <field name="fragmentElementImpls"
+           type="org.apache.jetspeed.om.page.psml.FragmentElementImpl" 
+           collection="collection">
+      <bind-xml name="fragment-element"/>
+    </field>
+  </class>
+    
+  <class name="org.apache.jetspeed.om.page.psml.FragmentReferenceImpl"
+         extends="org.apache.jetspeed.om.page.psml.AbstractBaseFragmentElement">
+    <map-to xml="fragment-reference"/>
+
+    <field name="refId" type="string">
+      <bind-xml name="refid" node="attribute"/>
+    </field>
+  </class>
+    
+  <class name="org.apache.jetspeed.om.page.psml.PageFragmentImpl"
+         extends="org.apache.jetspeed.om.page.psml.AbstractBaseFragmentElement">
+    <map-to xml="page-fragment"/>
+  </class>
     
   <class name="org.apache.jetspeed.om.page.psml.LinkImpl">
     <map-to xml="link"/>

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=881862&r1=881861&r2=881862&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 Wed Nov 18 18:24:48 2009
@@ -772,11 +772,20 @@
 
    <!-- Page mapping -->
 
+   <class-descriptor class="org.apache.jetspeed.om.page.impl.BaseFragmentsElementImpl">
+      <object-cache class="org.apache.jetspeed.page.impl.DatabasePageManagerCache"/>
+
+      <extent-class class-ref="org.apache.jetspeed.om.page.impl.FragmentDefinitionImpl"/>
+      <extent-class class-ref="org.apache.jetspeed.om.page.impl.PageImpl"/>
+      <extent-class class-ref="org.apache.jetspeed.om.page.impl.PageTemplateImpl"/>
+      <extent-class class-ref="org.apache.jetspeed.om.page.impl.DynamicPageImpl"/>
+   </class-descriptor>
+
    <class-descriptor
-      class="org.apache.jetspeed.om.page.impl.PageImpl"
+      class="org.apache.jetspeed.om.page.impl.FragmentDefinitionImpl"
       table="PAGE"
    >
-      <object-cache class="org.apache.jetspeed.page.impl.DatabasePageManagerCache"/>
+      <!-- org.apache.jetspeed.om.page.impl.BaseFragmentsElementImpl mapping -->
 
       <field-descriptor
          name="id"
@@ -787,6 +796,12 @@
       />
 
       <field-descriptor
+         name="ojbConcreteClass"
+         column="CLASS_NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
         name="parentId"
         column="PARENT_ID"
         jdbc-type="INTEGER"
@@ -805,7 +820,7 @@
 
       <collection-descriptor
           name="fragment"
-          element-class-ref="org.apache.jetspeed.om.page.impl.FragmentImpl"
+          element-class-ref="org.apache.jetspeed.om.page.impl.BaseFragmentElementImpl"
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
@@ -856,31 +871,6 @@
       />
 
       <field-descriptor
-         name="hidden"
-         column="IS_HIDDEN"
-         jdbc-type="INTEGER"
-         conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
-      />
-
-      <field-descriptor
-         name="skin"
-         column="SKIN"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
-         name="defaultLayoutDecorator"
-         column="DEFAULT_LAYOUT_DECORATOR"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
-         name="defaultPortletDecorator"
-         column="DEFAULT_PORTLET_DECORATOR"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
          name="subsite"
          column="SUBSITE"
          jdbc-type="VARCHAR"
@@ -958,199 +948,300 @@
          <inverse-foreignkey field-ref="pageId"/>
       </collection-descriptor>
 
-      <collection-descriptor
-          name="menus"
-          element-class-ref="org.apache.jetspeed.om.page.impl.PageMenuDefinitionImpl"
-          auto-retrieve="true"
-          auto-delete="object"
-          auto-update="object"
-          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
-      >
-         <orderby name="name" sort="ASC"/>
-         <inverse-foreignkey field-ref="pageId"/>
-      </collection-descriptor>
+      <!-- org.apache.jetspeed.om.page.impl.FragmentDefinitionImpl mapping -->
 
    </class-descriptor>
 
    <class-descriptor
-      class="org.apache.jetspeed.om.page.impl.PageMetadataLocalizedFieldImpl"
-      table="PAGE_METADATA"
+      class="org.apache.jetspeed.om.page.impl.PageImpl"
+      table="PAGE"
    >
+      <!-- org.apache.jetspeed.om.page.impl.BaseFragmentsElementImpl mapping -->
+
       <field-descriptor
          name="id"
-         column="METADATA_ID"
-         jdbc-type="BIGINT"
+         column="PAGE_ID"
+         jdbc-type="INTEGER"
          primarykey="true"
          autoincrement="true"
-         conversion="org.apache.jetspeed.util.ojb.ObjectIDtoLongFieldConversion"
       />
 
       <field-descriptor
-        name="pageId"
-        column="PAGE_ID"
+         name="ojbConcreteClass"
+         column="CLASS_NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+        name="parentId"
+        column="PARENT_ID"
         jdbc-type="INTEGER"
         access="anonymous"
       />
 
+      <reference-descriptor
+          name="parent"
+          class-ref="org.apache.jetspeed.om.folder.impl.FolderImpl"
+          auto-retrieve="true"
+          auto-delete="link"
+          auto-update="link"
+          >
+         <foreignkey field-ref="parentId"/>
+      </reference-descriptor>
+
+      <collection-descriptor
+          name="fragment"
+          element-class-ref="org.apache.jetspeed.om.page.impl.BaseFragmentElementImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <inverse-foreignkey field-ref="pageId"/>
+      </collection-descriptor>
+
+      <collection-descriptor
+          name="metadataFields"
+          element-class-ref="org.apache.jetspeed.om.page.impl.PageMetadataLocalizedFieldImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
+      >
+         <inverse-foreignkey field-ref="pageId"/>
+      </collection-descriptor>
+
       <field-descriptor
-         name="name"
-         column="NAME"
+         name="path"
+         column="PATH"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="locale"
-         column="LOCALE"
+         name="name"
+         column="NAME"
          jdbc-type="VARCHAR"
-         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
       />
 
       <field-descriptor
-         name="value"
-         column="VALUE"
+         name="version"
+         column="VERSION"
          jdbc-type="VARCHAR"
       />
-   </class-descriptor>
 
-   <class-descriptor
-      class="org.apache.jetspeed.om.page.impl.PageSecurityConstraintImpl"
-      table="PAGE_CONSTRAINT"
-   >
       <field-descriptor
-         name="id"
-         column="CONSTRAINT_ID"
-         jdbc-type="INTEGER"
-         primarykey="true"
-         autoincrement="true"
+         name="title"
+         column="TITLE"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-        name="pageId"
-        column="PAGE_ID"
-        jdbc-type="INTEGER"
-        access="anonymous"
+         name="shortTitle"
+         column="SHORT_TITLE"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="applyOrder"
-         column="APPLY_ORDER"
-         jdbc-type="INTEGER"
+         name="subsite"
+         column="SUBSITE"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="usersList"
-         column="USER_PRINCIPALS_ACL"
+         name="user"
+         column="USER_PRINCIPAL"
          jdbc-type="VARCHAR"
-         conversion="org.apache.jetspeed.util.ojb.ACLFieldConversion"
       />
 
       <field-descriptor
-         name="rolesList"
-         column="ROLE_PRINCIPALS_ACL"
+         name="role"
+         column="ROLE_PRINCIPAL"
          jdbc-type="VARCHAR"
-         conversion="org.apache.jetspeed.util.ojb.ACLFieldConversion"
       />
 
       <field-descriptor
-         name="groupsList"
-         column="GROUP_PRINCIPALS_ACL"
+         name="group"
+         column="GROUP_PRINCIPAL"
          jdbc-type="VARCHAR"
-         conversion="org.apache.jetspeed.util.ojb.ACLFieldConversion"
       />
 
       <field-descriptor
-         name="permissionsList"
-         column="PERMISSIONS_ACL"
+         name="mediatype"
+         column="MEDIATYPE"
          jdbc-type="VARCHAR"
-         conversion="org.apache.jetspeed.util.ojb.ACLFieldConversion"
       />
-   </class-descriptor>
 
-   <class-descriptor
-      class="org.apache.jetspeed.om.page.impl.PageSecurityConstraintsRef"
-      table="PAGE_CONSTRAINTS_REF"
-   >
       <field-descriptor
-         name="id"
-         column="CONSTRAINTS_REF_ID"
-         jdbc-type="INTEGER"
-         primarykey="true"
-         autoincrement="true"
+         name="locale"
+         column="LOCALE"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-        name="pageId"
-        column="PAGE_ID"
-        jdbc-type="INTEGER"
-        access="anonymous"
+         name="extendedAttributeName"
+         column="EXT_ATTR_NAME"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="applyOrder"
-         column="APPLY_ORDER"
-         jdbc-type="INTEGER"
+         name="extendedAttributeValue"
+         column="EXT_ATTR_VALUE"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="name"
-         column="NAME"
+         name="constraints::owner"
+         column="OWNER_PRINCIPAL"
          jdbc-type="VARCHAR"
       />
-   </class-descriptor>
 
-   <class-descriptor class="org.apache.jetspeed.om.page.impl.PageMenuDefinitionElement">
-      <extent-class class-ref="org.apache.jetspeed.om.page.impl.PageMenuDefinitionImpl"/>
-      <extent-class class-ref="org.apache.jetspeed.om.page.impl.PageMenuExcludeDefinitionImpl"/>
-      <extent-class class-ref="org.apache.jetspeed.om.page.impl.PageMenuIncludeDefinitionImpl"/>
-      <extent-class class-ref="org.apache.jetspeed.om.page.impl.PageMenuOptionsDefinitionImpl"/>
-      <extent-class class-ref="org.apache.jetspeed.om.page.impl.PageMenuSeparatorDefinitionImpl"/>
-   </class-descriptor>
+      <collection-descriptor
+          name="constraints::constraints"
+          element-class-ref="org.apache.jetspeed.om.page.impl.PageSecurityConstraintImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <orderby name="applyOrder" sort="ASC"/>
+         <inverse-foreignkey field-ref="pageId"/>
+      </collection-descriptor>
 
-   <class-descriptor
-      class="org.apache.jetspeed.om.page.impl.PageMenuDefinitionImpl"
-      table="PAGE_MENU"
-   >
-      <field-descriptor
-         name="id"
-         column="MENU_ID"
-         jdbc-type="INTEGER"
-         primarykey="true"
-         autoincrement="true"
-      />
+      <collection-descriptor
+          name="constraints::constraintsRefs"
+          element-class-ref="org.apache.jetspeed.om.page.impl.PageSecurityConstraintsRef"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <orderby name="applyOrder" sort="ASC"/>
+         <inverse-foreignkey field-ref="pageId"/>
+      </collection-descriptor>
 
-      <field-descriptor
-         name="ojbConcreteClass"
-         column="CLASS_NAME"
-         jdbc-type="VARCHAR"
-      />
+      <!-- org.apache.jetspeed.om.page.impl.BasePageElementImpl mapping -->
 
       <field-descriptor
-         name="parentId"
-         column="PARENT_ID"
-         jdbc-type="INTEGER"
-         access="anonymous"
+         name="skin"
+         column="SKIN"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="pageId"
-         column="PAGE_ID"
-         jdbc-type="INTEGER"
-         access="anonymous"
+         name="defaultLayoutDecorator"
+         column="DEFAULT_LAYOUT_DECORATOR"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="elementOrder"
-         column="ELEMENT_ORDER"
-         jdbc-type="INTEGER"
+         name="defaultPortletDecorator"
+         column="DEFAULT_PORTLET_DECORATOR"
+         jdbc-type="VARCHAR"
       />
 
-      <field-descriptor
-         name="name"
+      <collection-descriptor
+          name="menus"
+          element-class-ref="org.apache.jetspeed.om.page.impl.PageMenuDefinitionImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <orderby name="name" sort="ASC"/>
+         <inverse-foreignkey field-ref="pageId"/>
+      </collection-descriptor>
+
+      <!-- org.apache.jetspeed.om.page.impl.BaseConcretePageElementImpl mapping -->
+
+      <field-descriptor
+         name="hidden"
+         column="IS_HIDDEN"
+         jdbc-type="INTEGER"
+         conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
+      />
+
+      <!-- org.apache.jetspeed.om.page.impl.PageImpl mapping -->
+
+   </class-descriptor>
+
+   <class-descriptor
+      class="org.apache.jetspeed.om.page.impl.PageTemplateImpl"
+      table="PAGE"
+   >
+      <!-- org.apache.jetspeed.om.page.impl.BaseFragmentsElementImpl mapping -->
+
+      <field-descriptor
+         name="id"
+         column="PAGE_ID"
+         jdbc-type="INTEGER"
+         primarykey="true"
+         autoincrement="true"
+      />
+
+      <field-descriptor
+         name="ojbConcreteClass"
+         column="CLASS_NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+        name="parentId"
+        column="PARENT_ID"
+        jdbc-type="INTEGER"
+        access="anonymous"
+      />
+
+      <reference-descriptor
+          name="parent"
+          class-ref="org.apache.jetspeed.om.folder.impl.FolderImpl"
+          auto-retrieve="true"
+          auto-delete="link"
+          auto-update="link"
+          >
+         <foreignkey field-ref="parentId"/>
+      </reference-descriptor>
+
+      <collection-descriptor
+          name="fragment"
+          element-class-ref="org.apache.jetspeed.om.page.impl.BaseFragmentElementImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <inverse-foreignkey field-ref="pageId"/>
+      </collection-descriptor>
+
+      <collection-descriptor
+          name="metadataFields"
+          element-class-ref="org.apache.jetspeed.om.page.impl.PageMetadataLocalizedFieldImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
+      >
+         <inverse-foreignkey field-ref="pageId"/>
+      </collection-descriptor>
+
+      <field-descriptor
+         name="path"
+         column="PATH"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="name"
          column="NAME"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
+         name="version"
+         column="VERSION"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
          name="title"
          column="TITLE"
          jdbc-type="VARCHAR"
@@ -1163,80 +1254,128 @@
       />
 
       <field-descriptor
-         name="options"
-         column="OPTIONS"
+         name="subsite"
+         column="SUBSITE"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="depth"
-         column="DEPTH"
-         jdbc-type="INTEGER"
+         name="user"
+         column="USER_PRINCIPAL"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="paths"
-         column="IS_PATHS"
-         jdbc-type="INTEGER"
-         conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
+         name="role"
+         column="ROLE_PRINCIPAL"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="regexp"
-         column="IS_REGEXP"
-         jdbc-type="INTEGER"
-         conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
+         name="group"
+         column="GROUP_PRINCIPAL"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="profile"
-         column="PROFILE"
+         name="mediatype"
+         column="MEDIATYPE"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="order"
-         column="OPTIONS_ORDER"
+         name="locale"
+         column="LOCALE"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="skin"
-         column="SKIN"
+         name="extendedAttributeName"
+         column="EXT_ATTR_NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="extendedAttributeValue"
+         column="EXT_ATTR_VALUE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="constraints::owner"
+         column="OWNER_PRINCIPAL"
          jdbc-type="VARCHAR"
       />
 
       <collection-descriptor
-          name="metadataFields"
-          element-class-ref="org.apache.jetspeed.om.page.impl.PageMenuMetadataLocalizedFieldImpl"
+          name="constraints::constraints"
+          element-class-ref="org.apache.jetspeed.om.page.impl.PageSecurityConstraintImpl"
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
-          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
-         <inverse-foreignkey field-ref="menuId"/>
+         <orderby name="applyOrder" sort="ASC"/>
+         <inverse-foreignkey field-ref="pageId"/>
       </collection-descriptor>
- 
+
       <collection-descriptor
-          name="elements"
-          element-class-ref="org.apache.jetspeed.om.page.impl.PageMenuDefinitionElement"
+          name="constraints::constraintsRefs"
+          element-class-ref="org.apache.jetspeed.om.page.impl.PageSecurityConstraintsRef"
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
           collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
-         <orderby name="elementOrder" sort="ASC"/>
-         <inverse-foreignkey field-ref="parentId"/>
+         <orderby name="applyOrder" sort="ASC"/>
+         <inverse-foreignkey field-ref="pageId"/>
       </collection-descriptor>
+
+      <!-- org.apache.jetspeed.om.page.impl.BasePageElementImpl mapping -->
+
+      <field-descriptor
+         name="skin"
+         column="SKIN"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="defaultLayoutDecorator"
+         column="DEFAULT_LAYOUT_DECORATOR"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="defaultPortletDecorator"
+         column="DEFAULT_PORTLET_DECORATOR"
+         jdbc-type="VARCHAR"
+      />
+
+      <collection-descriptor
+          name="menus"
+          element-class-ref="org.apache.jetspeed.om.page.impl.PageMenuDefinitionImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <orderby name="name" sort="ASC"/>
+         <inverse-foreignkey field-ref="pageId"/>
+      </collection-descriptor>
+
+      <!-- org.apache.jetspeed.om.page.impl.PageTemplateImpl mapping -->
+
    </class-descriptor>
 
    <class-descriptor
-      class="org.apache.jetspeed.om.page.impl.PageMenuExcludeDefinitionImpl"
-      table="PAGE_MENU"
+      class="org.apache.jetspeed.om.page.impl.DynamicPageImpl"
+      table="PAGE"
    >
+      <!-- org.apache.jetspeed.om.page.impl.BaseFragmentsElementImpl mapping -->
+
       <field-descriptor
          name="id"
-         column="MENU_ID"
+         column="PAGE_ID"
          jdbc-type="INTEGER"
          primarykey="true"
          autoincrement="true"
@@ -1249,16 +1388,48 @@
       />
 
       <field-descriptor
-         name="parentId"
-         column="PARENT_ID"
-         jdbc-type="INTEGER"
-         access="anonymous"
+        name="parentId"
+        column="PARENT_ID"
+        jdbc-type="INTEGER"
+        access="anonymous"
       />
 
+      <reference-descriptor
+          name="parent"
+          class-ref="org.apache.jetspeed.om.folder.impl.FolderImpl"
+          auto-retrieve="true"
+          auto-delete="link"
+          auto-update="link"
+          >
+         <foreignkey field-ref="parentId"/>
+      </reference-descriptor>
+
+      <collection-descriptor
+          name="fragment"
+          element-class-ref="org.apache.jetspeed.om.page.impl.BaseFragmentElementImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <inverse-foreignkey field-ref="pageId"/>
+      </collection-descriptor>
+
+      <collection-descriptor
+          name="metadataFields"
+          element-class-ref="org.apache.jetspeed.om.page.impl.PageMetadataLocalizedFieldImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
+      >
+         <inverse-foreignkey field-ref="pageId"/>
+      </collection-descriptor>
+
       <field-descriptor
-         name="elementOrder"
-         column="ELEMENT_ORDER"
-         jdbc-type="INTEGER"
+         name="path"
+         column="PATH"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
@@ -1266,15 +1437,906 @@
          column="NAME"
          jdbc-type="VARCHAR"
       />
+
+      <field-descriptor
+         name="version"
+         column="VERSION"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="title"
+         column="TITLE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="shortTitle"
+         column="SHORT_TITLE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="subsite"
+         column="SUBSITE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="user"
+         column="USER_PRINCIPAL"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="role"
+         column="ROLE_PRINCIPAL"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="group"
+         column="GROUP_PRINCIPAL"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="mediatype"
+         column="MEDIATYPE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="locale"
+         column="LOCALE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="extendedAttributeName"
+         column="EXT_ATTR_NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="extendedAttributeValue"
+         column="EXT_ATTR_VALUE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="constraints::owner"
+         column="OWNER_PRINCIPAL"
+         jdbc-type="VARCHAR"
+      />
+
+      <collection-descriptor
+          name="constraints::constraints"
+          element-class-ref="org.apache.jetspeed.om.page.impl.PageSecurityConstraintImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <orderby name="applyOrder" sort="ASC"/>
+         <inverse-foreignkey field-ref="pageId"/>
+      </collection-descriptor>
+
+      <collection-descriptor
+          name="constraints::constraintsRefs"
+          element-class-ref="org.apache.jetspeed.om.page.impl.PageSecurityConstraintsRef"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <orderby name="applyOrder" sort="ASC"/>
+         <inverse-foreignkey field-ref="pageId"/>
+      </collection-descriptor>
+
+      <!-- org.apache.jetspeed.om.page.impl.BasePageElementImpl mapping -->
+
+      <field-descriptor
+         name="skin"
+         column="SKIN"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="defaultLayoutDecorator"
+         column="DEFAULT_LAYOUT_DECORATOR"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="defaultPortletDecorator"
+         column="DEFAULT_PORTLET_DECORATOR"
+         jdbc-type="VARCHAR"
+      />
+
+      <collection-descriptor
+          name="menus"
+          element-class-ref="org.apache.jetspeed.om.page.impl.PageMenuDefinitionImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <orderby name="name" sort="ASC"/>
+         <inverse-foreignkey field-ref="pageId"/>
+      </collection-descriptor>
+
+      <!-- org.apache.jetspeed.om.page.impl.BaseConcretePageElementImpl mapping -->
+
+      <field-descriptor
+         name="hidden"
+         column="IS_HIDDEN"
+         jdbc-type="INTEGER"
+         conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
+      />
+
+      <!-- org.apache.jetspeed.om.page.impl.DynamicPageImpl mapping -->
+
+      <field-descriptor
+         name="pageType"
+         column="PAGE_TYPE"
+         jdbc-type="VARCHAR"
+      />
+
+   </class-descriptor>
+
+   <class-descriptor
+      class="org.apache.jetspeed.om.page.impl.PageMetadataLocalizedFieldImpl"
+      table="PAGE_METADATA"
+   >
+      <field-descriptor
+         name="id"
+         column="METADATA_ID"
+         jdbc-type="BIGINT"
+         primarykey="true"
+         autoincrement="true"
+         conversion="org.apache.jetspeed.util.ojb.ObjectIDtoLongFieldConversion"
+      />
+
+      <field-descriptor
+        name="pageId"
+        column="PAGE_ID"
+        jdbc-type="INTEGER"
+        access="anonymous"
+      />
+
+      <field-descriptor
+         name="name"
+         column="NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="locale"
+         column="LOCALE"
+         jdbc-type="VARCHAR"
+         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
+      />
+
+      <field-descriptor
+         name="value"
+         column="VALUE"
+         jdbc-type="VARCHAR"
+      />
+   </class-descriptor>
+
+   <class-descriptor
+      class="org.apache.jetspeed.om.page.impl.PageSecurityConstraintImpl"
+      table="PAGE_CONSTRAINT"
+   >
+      <field-descriptor
+         name="id"
+         column="CONSTRAINT_ID"
+         jdbc-type="INTEGER"
+         primarykey="true"
+         autoincrement="true"
+      />
+
+      <field-descriptor
+        name="pageId"
+        column="PAGE_ID"
+        jdbc-type="INTEGER"
+        access="anonymous"
+      />
+
+      <field-descriptor
+         name="applyOrder"
+         column="APPLY_ORDER"
+         jdbc-type="INTEGER"
+      />
+
+      <field-descriptor
+         name="usersList"
+         column="USER_PRINCIPALS_ACL"
+         jdbc-type="VARCHAR"
+         conversion="org.apache.jetspeed.util.ojb.ACLFieldConversion"
+      />
+
+      <field-descriptor
+         name="rolesList"
+         column="ROLE_PRINCIPALS_ACL"
+         jdbc-type="VARCHAR"
+         conversion="org.apache.jetspeed.util.ojb.ACLFieldConversion"
+      />
+
+      <field-descriptor
+         name="groupsList"
+         column="GROUP_PRINCIPALS_ACL"
+         jdbc-type="VARCHAR"
+         conversion="org.apache.jetspeed.util.ojb.ACLFieldConversion"
+      />
+
+      <field-descriptor
+         name="permissionsList"
+         column="PERMISSIONS_ACL"
+         jdbc-type="VARCHAR"
+         conversion="org.apache.jetspeed.util.ojb.ACLFieldConversion"
+      />
+   </class-descriptor>
+
+   <class-descriptor
+      class="org.apache.jetspeed.om.page.impl.PageSecurityConstraintsRef"
+      table="PAGE_CONSTRAINTS_REF"
+   >
+      <field-descriptor
+         name="id"
+         column="CONSTRAINTS_REF_ID"
+         jdbc-type="INTEGER"
+         primarykey="true"
+         autoincrement="true"
+      />
+
+      <field-descriptor
+        name="pageId"
+        column="PAGE_ID"
+        jdbc-type="INTEGER"
+        access="anonymous"
+      />
+
+      <field-descriptor
+         name="applyOrder"
+         column="APPLY_ORDER"
+         jdbc-type="INTEGER"
+      />
+
+      <field-descriptor
+         name="name"
+         column="NAME"
+         jdbc-type="VARCHAR"
+      />
+   </class-descriptor>
+
+   <class-descriptor class="org.apache.jetspeed.om.page.impl.PageMenuDefinitionElement">
+      <extent-class class-ref="org.apache.jetspeed.om.page.impl.PageMenuDefinitionImpl"/>
+      <extent-class class-ref="org.apache.jetspeed.om.page.impl.PageMenuExcludeDefinitionImpl"/>
+      <extent-class class-ref="org.apache.jetspeed.om.page.impl.PageMenuIncludeDefinitionImpl"/>
+      <extent-class class-ref="org.apache.jetspeed.om.page.impl.PageMenuOptionsDefinitionImpl"/>
+      <extent-class class-ref="org.apache.jetspeed.om.page.impl.PageMenuSeparatorDefinitionImpl"/>
+   </class-descriptor>
+
+   <class-descriptor
+      class="org.apache.jetspeed.om.page.impl.PageMenuDefinitionImpl"
+      table="PAGE_MENU"
+   >
+      <field-descriptor
+         name="id"
+         column="MENU_ID"
+         jdbc-type="INTEGER"
+         primarykey="true"
+         autoincrement="true"
+      />
+
+      <field-descriptor
+         name="ojbConcreteClass"
+         column="CLASS_NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="parentId"
+         column="PARENT_ID"
+         jdbc-type="INTEGER"
+         access="anonymous"
+      />
+
+      <field-descriptor
+         name="pageId"
+         column="PAGE_ID"
+         jdbc-type="INTEGER"
+         access="anonymous"
+      />
+
+      <field-descriptor
+         name="elementOrder"
+         column="ELEMENT_ORDER"
+         jdbc-type="INTEGER"
+      />
+
+      <field-descriptor
+         name="name"
+         column="NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="title"
+         column="TITLE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="shortTitle"
+         column="SHORT_TITLE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="options"
+         column="OPTIONS"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="depth"
+         column="DEPTH"
+         jdbc-type="INTEGER"
+      />
+
+      <field-descriptor
+         name="paths"
+         column="IS_PATHS"
+         jdbc-type="INTEGER"
+         conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
+      />
+
+      <field-descriptor
+         name="regexp"
+         column="IS_REGEXP"
+         jdbc-type="INTEGER"
+         conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
+      />
+
+      <field-descriptor
+         name="profile"
+         column="PROFILE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="order"
+         column="OPTIONS_ORDER"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="skin"
+         column="SKIN"
+         jdbc-type="VARCHAR"
+      />
+
+      <collection-descriptor
+          name="metadataFields"
+          element-class-ref="org.apache.jetspeed.om.page.impl.PageMenuMetadataLocalizedFieldImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
+      >
+         <inverse-foreignkey field-ref="menuId"/>
+      </collection-descriptor>
+ 
+      <collection-descriptor
+          name="elements"
+          element-class-ref="org.apache.jetspeed.om.page.impl.PageMenuDefinitionElement"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <orderby name="elementOrder" sort="ASC"/>
+         <inverse-foreignkey field-ref="parentId"/>
+      </collection-descriptor>
+   </class-descriptor>
+
+   <class-descriptor
+      class="org.apache.jetspeed.om.page.impl.PageMenuExcludeDefinitionImpl"
+      table="PAGE_MENU"
+   >
+      <field-descriptor
+         name="id"
+         column="MENU_ID"
+         jdbc-type="INTEGER"
+         primarykey="true"
+         autoincrement="true"
+      />
+
+      <field-descriptor
+         name="ojbConcreteClass"
+         column="CLASS_NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="parentId"
+         column="PARENT_ID"
+         jdbc-type="INTEGER"
+         access="anonymous"
+      />
+
+      <field-descriptor
+         name="elementOrder"
+         column="ELEMENT_ORDER"
+         jdbc-type="INTEGER"
+      />
+
+      <field-descriptor
+         name="name"
+         column="NAME"
+         jdbc-type="VARCHAR"
+      />
+   </class-descriptor>
+
+   <class-descriptor
+      class="org.apache.jetspeed.om.page.impl.PageMenuIncludeDefinitionImpl"
+      table="PAGE_MENU"
+   >
+      <field-descriptor
+         name="id"
+         column="MENU_ID"
+         jdbc-type="INTEGER"
+         primarykey="true"
+         autoincrement="true"
+      />
+
+      <field-descriptor
+         name="ojbConcreteClass"
+         column="CLASS_NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="parentId"
+         column="PARENT_ID"
+         jdbc-type="INTEGER"
+         access="anonymous"
+      />
+
+      <field-descriptor
+         name="elementOrder"
+         column="ELEMENT_ORDER"
+         jdbc-type="INTEGER"
+      />
+
+      <field-descriptor
+         name="name"
+         column="NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="nest"
+         column="IS_NEST"
+         jdbc-type="INTEGER"
+         conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
+      />
+   </class-descriptor>
+
+   <class-descriptor
+      class="org.apache.jetspeed.om.page.impl.PageMenuOptionsDefinitionImpl"
+      table="PAGE_MENU"
+   >
+      <field-descriptor
+         name="id"
+         column="MENU_ID"
+         jdbc-type="INTEGER"
+         primarykey="true"
+         autoincrement="true"
+      />
+
+      <field-descriptor
+         name="ojbConcreteClass"
+         column="CLASS_NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="parentId"
+         column="PARENT_ID"
+         jdbc-type="INTEGER"
+         access="anonymous"
+      />
+
+      <field-descriptor
+         name="elementOrder"
+         column="ELEMENT_ORDER"
+         jdbc-type="INTEGER"
+      />
+
+      <field-descriptor
+         name="options"
+         column="OPTIONS"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="depth"
+         column="DEPTH"
+         jdbc-type="INTEGER"
+      />
+
+      <field-descriptor
+         name="paths"
+         column="IS_PATHS"
+         jdbc-type="INTEGER"
+         conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
+      />
+
+      <field-descriptor
+         name="regexp"
+         column="IS_REGEXP"
+         jdbc-type="INTEGER"
+         conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
+      />
+
+      <field-descriptor
+         name="profile"
+         column="PROFILE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="order"
+         column="OPTIONS_ORDER"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="skin"
+         column="SKIN"
+         jdbc-type="VARCHAR"
+      />
+   </class-descriptor>
+
+   <class-descriptor
+      class="org.apache.jetspeed.om.page.impl.PageMenuSeparatorDefinitionImpl"
+      table="PAGE_MENU"
+   >
+      <field-descriptor
+         name="id"
+         column="MENU_ID"
+         jdbc-type="INTEGER"
+         primarykey="true"
+         autoincrement="true"
+      />
+
+      <field-descriptor
+         name="ojbConcreteClass"
+         column="CLASS_NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="parentId"
+         column="PARENT_ID"
+         jdbc-type="INTEGER"
+         access="anonymous"
+      />
+
+      <field-descriptor
+         name="elementOrder"
+         column="ELEMENT_ORDER"
+         jdbc-type="INTEGER"
+      />
+
+      <field-descriptor
+         name="title"
+         column="TITLE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="text"
+         column="TEXT"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="skin"
+         column="SKIN"
+         jdbc-type="VARCHAR"
+      />
+
+      <collection-descriptor
+          name="metadataFields"
+          element-class-ref="org.apache.jetspeed.om.page.impl.PageMenuMetadataLocalizedFieldImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
+      >
+         <inverse-foreignkey field-ref="menuId"/>
+      </collection-descriptor>
+   </class-descriptor>
+
+   <class-descriptor
+      class="org.apache.jetspeed.om.page.impl.PageMenuMetadataLocalizedFieldImpl"
+      table="PAGE_MENU_METADATA"
+   >
+      <field-descriptor
+         name="id"
+         column="METADATA_ID"
+         jdbc-type="BIGINT"
+         primarykey="true"
+         autoincrement="true"
+         conversion="org.apache.jetspeed.util.ojb.ObjectIDtoLongFieldConversion"
+      />
+
+      <field-descriptor
+        name="menuId"
+        column="MENU_ID"
+        jdbc-type="INTEGER"
+        access="anonymous"
+      />
+
+      <field-descriptor
+         name="name"
+         column="NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="locale"
+         column="LOCALE"
+         jdbc-type="VARCHAR"
+         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
+      />
+
+      <field-descriptor
+         name="value"
+         column="VALUE"
+         jdbc-type="VARCHAR"
+      />
+   </class-descriptor>
+
+   <!-- Fragment mapping -->
+
+   <class-descriptor class="org.apache.jetspeed.om.page.impl.BaseFragmentElementImpl">
+      <extent-class class-ref="org.apache.jetspeed.om.page.impl.FragmentImpl"/>
+      <extent-class class-ref="org.apache.jetspeed.om.page.impl.FragmentReferenceImpl"/>
+      <extent-class class-ref="org.apache.jetspeed.om.page.impl.PageFragmentImpl"/>
+   </class-descriptor>
+
+   <class-descriptor
+      class="org.apache.jetspeed.om.page.impl.FragmentImpl"
+      table="FRAGMENT"
+   >
+      <!-- org.apache.jetspeed.om.page.impl.BaseFragmentElementImpl mapping -->
+
+      <field-descriptor
+         name="id"
+         column="FRAGMENT_ID"
+         jdbc-type="INTEGER"
+         primarykey="true"
+         autoincrement="true"
+      />
+
+      <field-descriptor
+         name="ojbConcreteClass"
+         column="CLASS_NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+        name="parentId"
+        column="PARENT_ID"
+        jdbc-type="INTEGER"
+        access="anonymous"
+      />
+
+      <field-descriptor
+        name="pageId"
+        column="PAGE_ID"
+        jdbc-type="INTEGER"
+        access="anonymous"
+      />
+
+      <field-descriptor
+         name="fragmentId"
+         column="FRAGMENT_STRING_ID"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="title"
+         column="TITLE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="shortTitle"
+         column="SHORT_TITLE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="skin"
+         column="SKIN"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="decorator"
+         column="DECORATOR"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="state"
+         column="STATE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="mode"
+         column="PMODE"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="layoutRowProperty"
+         column="LAYOUT_ROW"
+         jdbc-type="INTEGER"
+      />
+
+      <field-descriptor
+         name="layoutColumnProperty"
+         column="LAYOUT_COLUMN"
+         jdbc-type="INTEGER"
+      />
+
+      <field-descriptor
+         name="layoutSizesProperty"
+         column="LAYOUT_SIZES"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="layoutXProperty"
+         column="LAYOUT_X"
+         jdbc-type="REAL"
+      />
+
+      <field-descriptor
+         name="layoutYProperty"
+         column="LAYOUT_Y"
+         jdbc-type="REAL"
+      />
+
+      <field-descriptor
+         name="layoutZProperty"
+         column="LAYOUT_Z"
+         jdbc-type="REAL"
+      />
+
+      <field-descriptor
+         name="layoutWidthProperty"
+         column="LAYOUT_WIDTH"
+         jdbc-type="REAL"
+      />
+
+      <field-descriptor
+         name="layoutHeightProperty"
+         column="LAYOUT_HEIGHT"
+         jdbc-type="REAL"
+      />
+
+      <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"
+      />
+
+      <collection-descriptor
+          name="constraints::constraints"
+          element-class-ref="org.apache.jetspeed.om.page.impl.FragmentSecurityConstraintImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <orderby name="applyOrder" sort="ASC"/>
+         <inverse-foreignkey field-ref="fragmentId"/>
+      </collection-descriptor>
+
+      <collection-descriptor
+          name="constraints::constraintsRefs"
+          element-class-ref="org.apache.jetspeed.om.page.impl.FragmentSecurityConstraintsRef"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <orderby name="applyOrder" sort="ASC"/>
+         <inverse-foreignkey field-ref="fragmentId"/>
+      </collection-descriptor>
+
+      <collection-descriptor
+          name="preferences"
+          element-class-ref="org.apache.jetspeed.om.page.impl.FragmentPreferenceImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <orderby name="name" sort="ASC"/>
+         <inverse-foreignkey field-ref="fragmentId"/>
+      </collection-descriptor>
+
+      <!-- org.apache.jetspeed.om.page.impl.FragmentImpl mapping -->
+
+      <field-descriptor
+         name="name"
+         column="NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
+         name="type"
+         column="TYPE"
+         jdbc-type="VARCHAR"
+      />
+
+      <collection-descriptor
+          name="fragments"
+          element-class-ref="org.apache.jetspeed.om.page.impl.BaseFragmentElementImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <orderby name="id" sort="ASC"/>
+         <inverse-foreignkey field-ref="parentId"/>
+      </collection-descriptor>
    </class-descriptor>
 
    <class-descriptor
-      class="org.apache.jetspeed.om.page.impl.PageMenuIncludeDefinitionImpl"
-      table="PAGE_MENU"
+      class="org.apache.jetspeed.om.page.impl.FragmentReferenceImpl"
+      table="FRAGMENT"
    >
+      <!-- org.apache.jetspeed.om.page.impl.BaseFragmentElementImpl mapping -->
+
       <field-descriptor
          name="id"
-         column="MENU_ID"
+         column="FRAGMENT_ID"
          jdbc-type="INTEGER"
          primarykey="true"
          autoincrement="true"
@@ -1287,215 +2349,191 @@
       />
 
       <field-descriptor
-         name="parentId"
-         column="PARENT_ID"
-         jdbc-type="INTEGER"
-         access="anonymous"
+        name="parentId"
+        column="PARENT_ID"
+        jdbc-type="INTEGER"
+        access="anonymous"
       />
 
       <field-descriptor
-         name="elementOrder"
-         column="ELEMENT_ORDER"
-         jdbc-type="INTEGER"
+        name="pageId"
+        column="PAGE_ID"
+        jdbc-type="INTEGER"
+        access="anonymous"
       />
 
       <field-descriptor
-         name="name"
-         column="NAME"
+         name="fragmentId"
+         column="FRAGMENT_STRING_ID"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="nest"
-         column="IS_NEST"
-         jdbc-type="INTEGER"
-         conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
+         name="title"
+         column="TITLE"
+         jdbc-type="VARCHAR"
       />
-   </class-descriptor>
 
-   <class-descriptor
-      class="org.apache.jetspeed.om.page.impl.PageMenuOptionsDefinitionImpl"
-      table="PAGE_MENU"
-   >
       <field-descriptor
-         name="id"
-         column="MENU_ID"
-         jdbc-type="INTEGER"
-         primarykey="true"
-         autoincrement="true"
+         name="shortTitle"
+         column="SHORT_TITLE"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="ojbConcreteClass"
-         column="CLASS_NAME"
+         name="skin"
+         column="SKIN"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="parentId"
-         column="PARENT_ID"
-         jdbc-type="INTEGER"
-         access="anonymous"
+         name="decorator"
+         column="DECORATOR"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="elementOrder"
-         column="ELEMENT_ORDER"
-         jdbc-type="INTEGER"
+         name="state"
+         column="STATE"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="options"
-         column="OPTIONS"
+         name="mode"
+         column="PMODE"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="depth"
-         column="DEPTH"
+         name="layoutRowProperty"
+         column="LAYOUT_ROW"
          jdbc-type="INTEGER"
       />
 
       <field-descriptor
-         name="paths"
-         column="IS_PATHS"
+         name="layoutColumnProperty"
+         column="LAYOUT_COLUMN"
          jdbc-type="INTEGER"
-         conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
       />
 
       <field-descriptor
-         name="regexp"
-         column="IS_REGEXP"
-         jdbc-type="INTEGER"
-         conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
+         name="layoutSizesProperty"
+         column="LAYOUT_SIZES"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="profile"
-         column="PROFILE"
-         jdbc-type="VARCHAR"
+         name="layoutXProperty"
+         column="LAYOUT_X"
+         jdbc-type="REAL"
       />
 
       <field-descriptor
-         name="order"
-         column="OPTIONS_ORDER"
-         jdbc-type="VARCHAR"
+         name="layoutYProperty"
+         column="LAYOUT_Y"
+         jdbc-type="REAL"
       />
 
       <field-descriptor
-         name="skin"
-         column="SKIN"
-         jdbc-type="VARCHAR"
+         name="layoutZProperty"
+         column="LAYOUT_Z"
+         jdbc-type="REAL"
       />
-   </class-descriptor>
 
-   <class-descriptor
-      class="org.apache.jetspeed.om.page.impl.PageMenuSeparatorDefinitionImpl"
-      table="PAGE_MENU"
-   >
       <field-descriptor
-         name="id"
-         column="MENU_ID"
-         jdbc-type="INTEGER"
-         primarykey="true"
-         autoincrement="true"
+         name="layoutWidthProperty"
+         column="LAYOUT_WIDTH"
+         jdbc-type="REAL"
       />
 
       <field-descriptor
-         name="ojbConcreteClass"
-         column="CLASS_NAME"
-         jdbc-type="VARCHAR"
+         name="layoutHeightProperty"
+         column="LAYOUT_HEIGHT"
+         jdbc-type="REAL"
       />
 
       <field-descriptor
-         name="parentId"
-         column="PARENT_ID"
-         jdbc-type="INTEGER"
-         access="anonymous"
+         name="extendedPropertyName1"
+         column="EXT_PROP_NAME_1"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="elementOrder"
-         column="ELEMENT_ORDER"
-         jdbc-type="INTEGER"
+         name="extendedPropertyValue1"
+         column="EXT_PROP_VALUE_1"
+         jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="title"
-         column="TITLE"
+         name="extendedPropertyName2"
+         column="EXT_PROP_NAME_2"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="text"
-         column="TEXT"
+         name="extendedPropertyValue2"
+         column="EXT_PROP_VALUE_2"
          jdbc-type="VARCHAR"
       />
 
       <field-descriptor
-         name="skin"
-         column="SKIN"
+         name="constraints::owner"
+         column="OWNER_PRINCIPAL"
          jdbc-type="VARCHAR"
       />
 
       <collection-descriptor
-          name="metadataFields"
-          element-class-ref="org.apache.jetspeed.om.page.impl.PageMenuMetadataLocalizedFieldImpl"
+          name="constraints::constraints"
+          element-class-ref="org.apache.jetspeed.om.page.impl.FragmentSecurityConstraintImpl"
           auto-retrieve="true"
           auto-delete="object"
           auto-update="object"
-          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareCollection"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
       >
-         <inverse-foreignkey field-ref="menuId"/>
+         <orderby name="applyOrder" sort="ASC"/>
+         <inverse-foreignkey field-ref="fragmentId"/>
       </collection-descriptor>
-   </class-descriptor>
 
-   <class-descriptor
-      class="org.apache.jetspeed.om.page.impl.PageMenuMetadataLocalizedFieldImpl"
-      table="PAGE_MENU_METADATA"
-   >
-      <field-descriptor
-         name="id"
-         column="METADATA_ID"
-         jdbc-type="BIGINT"
-         primarykey="true"
-         autoincrement="true"
-         conversion="org.apache.jetspeed.util.ojb.ObjectIDtoLongFieldConversion"
-      />
+      <collection-descriptor
+          name="constraints::constraintsRefs"
+          element-class-ref="org.apache.jetspeed.om.page.impl.FragmentSecurityConstraintsRef"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <orderby name="applyOrder" sort="ASC"/>
+         <inverse-foreignkey field-ref="fragmentId"/>
+      </collection-descriptor>
 
-      <field-descriptor
-        name="menuId"
-        column="MENU_ID"
-        jdbc-type="INTEGER"
-        access="anonymous"
-      />
+      <collection-descriptor
+          name="preferences"
+          element-class-ref="org.apache.jetspeed.om.page.impl.FragmentPreferenceImpl"
+          auto-retrieve="true"
+          auto-delete="object"
+          auto-update="object"
+          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
+      >
+         <orderby name="name" sort="ASC"/>
+         <inverse-foreignkey field-ref="fragmentId"/>
+      </collection-descriptor>
 
-      <field-descriptor
-         name="name"
-         column="NAME"
-         jdbc-type="VARCHAR"
-      />
+      <!-- org.apache.jetspeed.om.page.impl.FragmentReferenceImpl mapping -->
 
       <field-descriptor
-         name="locale"
-         column="LOCALE"
+         name="fragmentRefId"
+         column="FRAGMENT_STRING_REFID"
          jdbc-type="VARCHAR"
-         conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
       />
 
-      <field-descriptor
-         name="value"
-         column="VALUE"
-         jdbc-type="VARCHAR"
-      />
    </class-descriptor>
 
-   <!-- Fragment mapping -->
-
    <class-descriptor
-      class="org.apache.jetspeed.om.page.impl.FragmentImpl"
+      class="org.apache.jetspeed.om.page.impl.PageFragmentImpl"
       table="FRAGMENT"
    >
+      <!-- org.apache.jetspeed.om.page.impl.BaseFragmentElementImpl mapping -->
+
       <field-descriptor
          name="id"
          column="FRAGMENT_ID"
@@ -1505,24 +2543,18 @@
       />
 
       <field-descriptor
+         name="ojbConcreteClass"
+         column="CLASS_NAME"
+         jdbc-type="VARCHAR"
+      />
+
+      <field-descriptor
         name="parentId"
         column="PARENT_ID"
         jdbc-type="INTEGER"
         access="anonymous"
       />
 
-      <collection-descriptor
-          name="fragments"
-          element-class-ref="org.apache.jetspeed.om.page.impl.FragmentImpl"
-          auto-retrieve="true"
-          auto-delete="object"
-          auto-update="object"
-          collection-class="org.apache.jetspeed.util.ojb.CollectionUtils$SynchronizedRemovalAwareList"
-      >
-         <orderby name="id" sort="ASC"/>
-         <inverse-foreignkey field-ref="parentId"/>
-      </collection-descriptor>
-
       <field-descriptor
         name="pageId"
         column="PAGE_ID"
@@ -1537,12 +2569,6 @@
       />
 
       <field-descriptor
-         name="name"
-         column="NAME"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
          name="title"
          column="TITLE"
          jdbc-type="VARCHAR"
@@ -1555,12 +2581,6 @@
       />
 
       <field-descriptor
-         name="type"
-         column="TYPE"
-         jdbc-type="VARCHAR"
-      />
-
-      <field-descriptor
          name="skin"
          column="SKIN"
          jdbc-type="VARCHAR"
@@ -1697,6 +2717,9 @@
          <orderby name="name" sort="ASC"/>
          <inverse-foreignkey field-ref="fragmentId"/>
       </collection-descriptor>
+
+      <!-- org.apache.jetspeed.om.page.impl.PageFragmentImpl mapping -->
+
    </class-descriptor>
 
    <class-descriptor

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/om/page/TestPageObjectModel.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/om/page/TestPageObjectModel.java?rev=881862&r1=881861&r2=881862&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/om/page/TestPageObjectModel.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/om/page/TestPageObjectModel.java Wed Nov 18 18:24:48 2009
@@ -92,11 +92,12 @@
 
         Page page = buildBasePage();
         assertTrue(page.getId().equals("MyPageID"));
-        Fragment root = page.getRootFragment();
-        assertNotNull(root);
+        BaseFragmentElement rootFragmentElement = page.getRootFragment();
+        assertTrue(rootFragmentElement instanceof Fragment);
+        Fragment root = (Fragment)rootFragmentElement;
         assertTrue(root.getId().equals("Frag1"));
-        assertTrue(root.getType().equals(Fragment.LAYOUT));
         assertNull(root.getTitle());
+        assertTrue(root.getType().equals(Fragment.LAYOUT));
     }
 
     public void testFragmentManipulation() throws Exception
@@ -105,7 +106,9 @@
 
         // Build a page with a few fragments
         Page page = buildBasePage();
-        Fragment root = page.getRootFragment();
+        BaseFragmentElement rootFragmentElement = page.getRootFragment();
+        assertTrue(rootFragmentElement instanceof Fragment);
+        Fragment root = (Fragment)rootFragmentElement;
         assertNotNull(root.getFragments());
 
         FragmentImpl frag1 = new FragmentImpl();

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=881862&r1=881861&r2=881862&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 Wed Nov 18 18:24:48 2009
@@ -51,14 +51,21 @@
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.folder.FolderNotFoundException;
 import org.apache.jetspeed.om.folder.psml.FolderMetaDataImpl;
+import org.apache.jetspeed.om.page.BaseFragmentElement;
+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.Link;
 import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.om.page.PageSecurity;
+import org.apache.jetspeed.om.page.PageTemplate;
 import org.apache.jetspeed.om.page.SecurityConstraintsDef;
+import org.apache.jetspeed.om.page.psml.DynamicPageImpl;
+import org.apache.jetspeed.om.page.psml.FragmentDefinitionImpl;
 import org.apache.jetspeed.om.page.psml.LinkImpl;
 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.page.document.DocumentHandler;
 import org.apache.jetspeed.page.document.DocumentHandlerFactory;
 import org.apache.jetspeed.page.document.FolderHandler;
@@ -138,12 +145,18 @@
             FileCache cache = new FileCache(new EhCacheImpl( CacheManager.getInstance().getEhcache("pageFileCache")), 10);
             
             DocumentHandler psmlHandler = new CastorFileSystemDocumentHandler(idGen, "/JETSPEED-INF/castor/page-mapping.xml", Page.DOCUMENT_TYPE, PageImpl.class, baseDir + "target/testdata/" + pagesDirName, cache);
+            DocumentHandler tpsmlHandler = new CastorFileSystemDocumentHandler(idGen, "/JETSPEED-INF/castor/page-mapping.xml", PageTemplate.DOCUMENT_TYPE, PageTemplateImpl.class, baseDir + "target/testdata/" + pagesDirName, cache);
+            DocumentHandler dpsmlHandler = new CastorFileSystemDocumentHandler(idGen, "/JETSPEED-INF/castor/page-mapping.xml", DynamicPage.DOCUMENT_TYPE, DynamicPageImpl.class, baseDir + "target/testdata/" + pagesDirName, cache);
+            DocumentHandler fpsmlHandler = new CastorFileSystemDocumentHandler(idGen, "/JETSPEED-INF/castor/page-mapping.xml", FragmentDefinition.DOCUMENT_TYPE, FragmentDefinitionImpl.class, baseDir + "target/testdata/" + pagesDirName, cache);
             DocumentHandler linkHandler = new CastorFileSystemDocumentHandler(idGen, "/JETSPEED-INF/castor/page-mapping.xml", Link.DOCUMENT_TYPE, LinkImpl.class, baseDir + "target/testdata/" + pagesDirName, cache);
             DocumentHandler folderMetaDataHandler = new CastorFileSystemDocumentHandler(idGen, "/JETSPEED-INF/castor/page-mapping.xml", FolderMetaDataImpl.DOCUMENT_TYPE, FolderMetaDataImpl.class, baseDir + "target/testdata/" + pagesDirName, cache);
             DocumentHandler pageSecurityHandler = new CastorFileSystemDocumentHandler(idGen, "/JETSPEED-INF/castor/page-mapping.xml", PageSecurityImpl.DOCUMENT_TYPE, PageSecurity.class, baseDir + "target/testdata/" + pagesDirName, cache);
             
             DocumentHandlerFactory handlerFactory = new DocumentHandlerFactoryImpl();
             handlerFactory.registerDocumentHandler(psmlHandler);
+            handlerFactory.registerDocumentHandler(tpsmlHandler);
+            handlerFactory.registerDocumentHandler(dpsmlHandler);
+            handlerFactory.registerDocumentHandler(fpsmlHandler);
             handlerFactory.registerDocumentHandler(linkHandler);
             handlerFactory.registerDocumentHandler(folderMetaDataHandler);
             handlerFactory.registerDocumentHandler(pageSecurityHandler);
@@ -321,8 +334,10 @@
                             constraintsRefs = new ArrayList(1);
                             constraintsRefs.add("public-view");
                             constraints.setSecurityConstraintsRefs(constraintsRefs);
-                            page.setSecurityConstraints(constraints);                        
-                            Fragment root = page.getRootFragment();
+                            page.setSecurityConstraints(constraints);
+                            BaseFragmentElement rootFragmentElement = page.getRootFragment();
+                            TestCase.assertTrue(rootFragmentElement instanceof Fragment);
+                            Fragment root = (Fragment)rootFragmentElement;
                             root.setName("jetspeed-layouts::VelocityTwoColumns");
                             Fragment portlet = pageManager.newPortletFragment();
                             portlet.setName("security::LoginPortlet");
@@ -334,12 +349,17 @@
                             portlet.setSecurityConstraints(fragmentConstraints);
                             root.getFragments().add(portlet);
                             pageManager.updatePage(page);
-                            TestCase.assertNotNull(page.getRootFragment());
-                            TestCase.assertNotNull(page.getRootFragment().getFragments());
-                            TestCase.assertEquals(2, page.getRootFragment().getFragments().size());
-                            TestCase.assertEquals("some-app::SomePortlet", ((Fragment)page.getRootFragment().getFragments().get(1)).getName());
-                            TestCase.assertFalse("0".equals(((Fragment)page.getRootFragment().getFragments().get(1)).getId()));
-                            somePortletId[0] = ((Fragment)page.getRootFragment().getFragments().get(1)).getId();
+                            BaseFragmentElement validateRootFragmentElement = page.getRootFragment();
+                            TestCase.assertTrue(validateRootFragmentElement instanceof Fragment);
+                            Fragment validateRoot = (Fragment)validateRootFragmentElement;                            
+                            TestCase.assertNotNull(validateRoot.getFragments());
+                            TestCase.assertEquals(2, validateRoot.getFragments().size());
+                            BaseFragmentElement validateFragmentElement = (BaseFragmentElement)validateRoot.getFragments().get(1);
+                            TestCase.assertTrue(validateFragmentElement instanceof Fragment);
+                            Fragment validateFragment = (Fragment)validateFragmentElement;
+                            TestCase.assertEquals("some-app::SomePortlet", validateFragment.getName());
+                            TestCase.assertFalse("0".equals(validateFragment.getId()));
+                            somePortletId[0] = validateFragment.getId();
                         
                             page = pageManager.newPage("/user-page.psml");
                             constraints = pageManager.newSecurityConstraints();
@@ -397,9 +417,11 @@
                             TestCase.assertEquals(2, pageManager.getPages(folder).size());
                             PageSecurity pageSecurity = pageManager.getPageSecurity();
                             Page page0 = pageManager.getPage("/default-page.psml");
-                            TestCase.assertNotNull(page0.getRootFragment());
-                            TestCase.assertNotNull(page0.getRootFragment().getFragments());
-                            TestCase.assertEquals(2, page0.getRootFragment().getFragments().size());
+                            BaseFragmentElement validateRootFragmentElement = page0.getRootFragment();
+                            TestCase.assertTrue(validateRootFragmentElement instanceof Fragment);
+                            Fragment validateRoot = (Fragment)validateRootFragmentElement;                            
+                            TestCase.assertNotNull(validateRoot.getFragments());
+                            TestCase.assertEquals(2, validateRoot.getFragments().size());
                             TestCase.assertNotNull(page0.getFragmentById(somePortletId[0]));
                             TestCase.assertNotNull(page0.getFragmentsByName("some-app::SomePortlet"));
                             TestCase.assertEquals(1, page0.getFragmentsByName("some-app::SomePortlet").size());
@@ -437,10 +459,12 @@
                             TestCase.assertNotNull(folder.getPages());
                             TestCase.assertEquals(2, folder.getPages().size());
                             PageSecurity pageSecurity = pageManager.getPageSecurity();
-                            Page page0 = pageManager.getPage("/default-page.psml");
-                            TestCase.assertNotNull(page0.getRootFragment());
-                            TestCase.assertNotNull(page0.getRootFragment().getFragments());
-                            TestCase.assertEquals(2, page0.getRootFragment().getFragments().size());
+                            Page page0 = pageManager.getPage("/default-page.psml");                            
+                            BaseFragmentElement validateRootFragmentElement = page0.getRootFragment();
+                            TestCase.assertTrue(validateRootFragmentElement instanceof Fragment);
+                            Fragment validateRoot = (Fragment)validateRootFragmentElement;                            
+                            TestCase.assertNotNull(validateRoot.getFragments());
+                            TestCase.assertEquals(2, validateRoot.getFragments().size());
                             TestCase.assertNotNull(page0.getFragmentById(somePortletId[0]));
                             TestCase.assertNotNull(page0.getFragmentsByName("some-app::SomePortlet"));
                             TestCase.assertEquals(1, page0.getFragmentsByName("some-app::SomePortlet").size());
@@ -507,9 +531,11 @@
                             TestCase.assertEquals(1, folder.getPages().size());
                             PageSecurity pageSecurity = pageManager.getPageSecurity();
                             Page page0 = pageManager.getPage("/default-page.psml");
-                            TestCase.assertNotNull(page0.getRootFragment());
-                            TestCase.assertNotNull(page0.getRootFragment().getFragments());
-                            TestCase.assertEquals(1, page0.getRootFragment().getFragments().size());
+                            BaseFragmentElement validateRootFragmentElement = page0.getRootFragment();
+                            TestCase.assertTrue(validateRootFragmentElement instanceof Fragment);
+                            Fragment validateRoot = (Fragment)validateRootFragmentElement;
+                            TestCase.assertNotNull(validateRoot.getFragments());
+                            TestCase.assertEquals(1, validateRoot.getFragments().size());
                             TestCase.assertNull(page0.getFragmentById(somePortletId[0]));
                             TestCase.assertTrue(page0.getFragmentsByName("some-app::SomePortlet").isEmpty());
                             Link link = pageManager.getLink("/default.link");
@@ -567,9 +593,11 @@
                             TestCase.assertEquals(1, folder.getPages().size());
                             PageSecurity pageSecurity = pageManager.getPageSecurity();
                             Page page0 = pageManager.getPage("/default-page.psml");
-                            TestCase.assertNotNull(page0.getRootFragment());
-                            TestCase.assertNotNull(page0.getRootFragment().getFragments());
-                            TestCase.assertEquals(1, page0.getRootFragment().getFragments().size());
+                            BaseFragmentElement validateRootFragmentElement = page0.getRootFragment();
+                            TestCase.assertTrue(validateRootFragmentElement instanceof Fragment);
+                            Fragment validateRoot = (Fragment)validateRootFragmentElement;                            
+                            TestCase.assertNotNull(validateRoot.getFragments());
+                            TestCase.assertEquals(1, validateRoot.getFragments().size());
                             TestCase.assertNull(page0.getFragmentById(somePortletId[0]));
                             TestCase.assertTrue(page0.getFragmentsByName("some-app::SomePortlet").isEmpty());
                             Link link = pageManager.getLink("/default.link");
@@ -680,8 +708,6 @@
             org.apache.jetspeed.om.page.impl.BaseElementImpl.setPermissionsFactory(pf);
             org.apache.jetspeed.om.folder.impl.FolderImpl.setPermissionsFactory(pf);
             org.apache.jetspeed.om.folder.psml.FolderImpl.setPermissionsFactory(pf);
-            org.apache.jetspeed.om.page.impl.FragmentImpl.setPermissionsFactory(pf);
-            org.apache.jetspeed.om.page.psml.FragmentImpl.setPermissionsFactory(pf);
         }
 
         public PageManagerPermissionsPolicy(Policy defaultPolicy)



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