portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r891420 [1/2] - in /portals/jetspeed-2/portal/trunk: applications/jetspeed/src/main/webapp/WEB-INF/pages/ components/jetspeed-locator/src/main/java/org/apache/jetspeed/profiler/impl/ components/jetspeed-page-layout/src/main/java/org/apache/...
Date Wed, 16 Dec 2009 20:38:23 GMT
Author: rwatler
Date: Wed Dec 16 20:38:20 2009
New Revision: 891420

URL: http://svn.apache.org/viewvc?rev=891420&view=rev
Log:
Jetspeed DynamicPage Support
-----------------------------------------------------------
- DynamicPage support added to PortalSite and PageLayout components
- DynamicPage test cases added to PortalSite unit tests
- minor implementation details addressed in exisiting low-level DynamicPage PageManager support, (requires DBPSML schema update)
- added content type mapping component to the PortalSite infrastructure that implements content type and request path mapping via Spring configuration
- removed old profiler content url mapping hooks and cleaned up portal request url processing to preserve request urls
- added example content mapping page/portlet to demonstrate and test these features

To test Apache Portals Website "mounted" in portal using DynamicPages:

http://localhost:8080/jetspeed/portal/content/

Significant files:

applications/jetspeed/src/main/webapp/WEB-INF/pages/default-content.dpsml                   - DynamicPage used to support Apache Portals Website
components/jetspeed-portal/src/test/assembly/page-manager.xml                               - configuration of PortalSiteContentTypeMapper
jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/PortalSiteContentTypeMapper.java  - portal URL and content Type Mapping in PortalSite



Added:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/default-content.dpsml
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/AbstractPatternMapping.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/ContentTypeMapping.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteContentTypeMapperImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/RequestPathMapping.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/resources/webapp/WEB-INF/pages/contentfolder/
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/resources/webapp/WEB-INF/pages/contentfolder/docpage.dpsml
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/resources/webapp/WEB-INF/pages/contentfolder/pub/
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/resources/webapp/WEB-INF/pages/contentfolder/pub/docpage.dpsml
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/resources/webapp/WEB-INF/pages/contentpage.dpsml
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/resources/webapp/WEB-INF/pages/docpage.dpsml
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/PortalSiteContentTypeMapper.java
Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-locator/src/main/java/org/apache/jetspeed/profiler/impl/JetspeedProfileLocator.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/PageLayoutComponentImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentFragmentImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentPageImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/DynamicPageImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/DynamicPageImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/AbstractPageManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/castor/page-mapping.xml
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/resources/JETSPEED-INF/ojb/page-manager-repository.xml
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCastorXmlPageManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestDatabasePageManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/clonetest.dpsml
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/test001.dpsml
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuOptionImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteRequestContextImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteView.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/JETSPEED-INF/spring/test-spring.xml
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/url/impl/AbstractPortalURL.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/url/impl/PathInfoEncodingPortalURL.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdatePageAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/profiler/impl/ProfilerValveImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/assembly/page-manager.xml
    portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/src/main/java/org/apache/jetspeed/profiler/impl/JetspeedProfilerImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/src/main/java/org/apache/jetspeed/profiler/rules/impl/PathSessionResolver.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/layout/PageLayoutComponent.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentPage.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/DynamicPage.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/PortalSite.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/PortalSiteRequestContext.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/PortalSiteSessionContext.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/profiler/ProfileLocator.java
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/ddl-schema/phase2-schema.xml
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/page-manager.xml

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/default-content.dpsml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/default-content.dpsml?rev=891420&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/default-content.dpsml (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/default-content.dpsml Wed Dec 16 20:38:20 2009
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<dynamic-page id="default-content" content-type="*"
+    xmlns="http://portals.apache.org/jetspeed"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.1/schemas/psml.xsd">
+ 
+  <title>Jetspeed 2 Portals Content</title>
+
+  <fragment id="dcdp-1-layout" type="layout" name="jetspeed-layouts::VelocityTwoColumns">
+    <property name="sizes" value="80%,20%" />
+    <fragment id="dcdp-2-dynamic-content" type="portlet" name="j2-admin::DynamicWebContentPortlet" decorator="gray-gradient-noborder">
+      <property name="row" value="0" />
+      <property name="column" value="0" />
+      <preference name="SRC">
+        <value>http://portals.apache.org/</value>
+      </preference>
+      <preference name="PORTALPATH">
+        <value>/content/</value>
+      </preference>
+    </fragment>
+    <fragment-reference id="dcdp-3-wp-reference" refid="wp-definition">
+        <property name="row" value="0"/>
+        <property name="column" value="1"/>
+    </fragment-reference>
+  </fragment>
+
+  <security-constraints>
+    <security-constraints-ref>public-view</security-constraints-ref>
+  </security-constraints>
+
+</dynamic-page>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-locator/src/main/java/org/apache/jetspeed/profiler/impl/JetspeedProfileLocator.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-locator/src/main/java/org/apache/jetspeed/profiler/impl/JetspeedProfileLocator.java?rev=891420&r1=891419&r2=891420&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-locator/src/main/java/org/apache/jetspeed/profiler/impl/JetspeedProfileLocator.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-locator/src/main/java/org/apache/jetspeed/profiler/impl/JetspeedProfileLocator.java Wed Dec 16 20:38:20 2009
@@ -37,6 +37,7 @@
 {    
     private LinkedList elements = new LinkedList();
     private String requestPath;
+    private String requestServerName;
 
     public List getElements()
     {
@@ -45,13 +46,27 @@
 
     public void init(Profiler profiler, String requestPath)
     {
+        init(profiler, requestPath, null);
+    }
+
+    public void init(Profiler profiler, String requestPath, String requestServerName)
+    {
         if (requestPath != null)
+        {
             if (requestPath.indexOf("/") != -1)
+            {
                 this.requestPath = requestPath;
+            }
             else
+            {
                 this.requestPath = "/" + requestPath;
+            }
+        }
         else
+        {
             this.requestPath = "/";
+        }
+        this.requestServerName = requestServerName;
     }
 
     public Iterator iterator()
@@ -176,4 +191,9 @@
     {
         return requestPath;
     }
+
+    public String getRequestServerName()
+    {
+        return requestServerName;
+    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/PageLayoutComponentImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/PageLayoutComponentImpl.java?rev=891420&r1=891419&r2=891420&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/PageLayoutComponentImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/PageLayoutComponentImpl.java Wed Dec 16 20:38:20 2009
@@ -28,15 +28,20 @@
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.layout.PageLayoutComponent;
 import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.page.PageNotFoundException;
+import org.apache.jetspeed.page.PageNotRemovedException;
+import org.apache.jetspeed.page.PageNotUpdatedException;
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.page.BaseFragmentElement;
 import org.apache.jetspeed.om.page.BaseFragmentsElement;
 import org.apache.jetspeed.om.page.BasePageElement;
 import org.apache.jetspeed.om.page.ContentFragment;
 import org.apache.jetspeed.om.page.ContentPage;
+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.FragmentReference;
+import org.apache.jetspeed.om.page.BaseConcretePageElement;
 import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.om.page.PageFragment;
 import org.apache.jetspeed.om.page.PageTemplate;
@@ -46,6 +51,7 @@
 import org.apache.jetspeed.om.page.impl.ContentPageImpl;
 import org.apache.jetspeed.om.portlet.LocalizedField;
 import org.apache.jetspeed.om.preference.FragmentPreference;
+import org.apache.jetspeed.page.document.NodeException;
 import org.apache.pluto.container.PortletPreference;
 
 import org.slf4j.Logger;
@@ -96,7 +102,7 @@
             }
 
             // retrieve current page and root fragment from page manager
-            Page page = pageManager.getPage(contentPageImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentPageImpl.getPage().getPath());
             BaseFragmentElement rootFragment = page.getRootFragment();
             if (!(rootFragment instanceof Fragment))
             {
@@ -126,7 +132,7 @@
             fragment.getFragments().add(newFragment);
 
             // update page in page manager
-            pageManager.updatePage(page);
+            updatePage(page);
             
             // update content page context
             ContentFragmentImpl contentFragmentImpl = (ContentFragmentImpl)contentFragment;
@@ -178,14 +184,14 @@
             {
                 throw new IllegalArgumentException("Locked content fragment is not mutable");
             }
-            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof Page) && contentFragmentImpl.getDefinition().getPath().equals(contentFragmentImpl.getPage().getPath()));
+            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof BaseConcretePageElement) && contentFragmentImpl.getDefinition().getPath().equals(contentFragmentImpl.getPage().getPath()));
             if (!contentFragmentDefinitionIsPage)
             {
                 throw new IllegalArgumentException("Only page fragments can be modified");                
             }
 
             // retrieve current page and fragment from page manager
-            Page page = pageManager.getPage(contentFragmentImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentFragmentImpl.getPage().getPath());
             BaseFragmentElement parentFragment = page.getFragmentById(contentFragmentImpl.getFragment().getId());
             if (!(parentFragment instanceof Fragment))
             {
@@ -215,7 +221,7 @@
             fragment.getFragments().add(newFragment);
 
             // update page in page manager
-            pageManager.updatePage(page);
+            updatePage(page);
 
             // update content context
             ContentFragmentImpl newContentFragmentImpl = newContentFragment(contentFragmentImpl.getId(), page, null, page, newFragment, false);
@@ -251,7 +257,7 @@
             }
 
             // retrieve current page and root fragment from page manager
-            Page page = pageManager.getPage(contentPage.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentPage.getPage().getPath());
             BaseFragmentElement rootFragment = page.getRootFragment();
             if (!(rootFragment instanceof Fragment))
             {
@@ -273,7 +279,7 @@
             fragment.getFragments().add(newFragment);
 
             // update page in page manager
-            pageManager.updatePage(page);
+            updatePage(page);
 
             // update content page context
             ContentFragmentImpl newContentFragmentImpl = newContentFragment(pageRootContentFragmentImpl.getId(), page, null, page, newFragment, false);
@@ -296,7 +302,7 @@
         {
             // retrieve current page and parent folders from page manager
             ContentPageImpl contentPageImpl = (ContentPageImpl)contentPage;
-            Page page = pageManager.getPage(contentPageImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentPageImpl.getPage().getPath());
             Folder pageFolder = (Folder)page.getParent();
             Folder documentOrderingFolder = (Folder)pageFolder.getParent();
             if (documentOrderingFolder != null)
@@ -328,7 +334,7 @@
         {
             // retrieve current page and parent folder from page manager
             ContentPageImpl contentPageImpl = (ContentPageImpl)contentPage;
-            Page page = pageManager.getPage(contentPageImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentPageImpl.getPage().getPath());
             Folder documentOrderingFolder = (Folder)page.getParent();
 
             // check for edit permission
@@ -357,7 +363,7 @@
         {
             // retrieve current page and parent folders from page manager
             ContentPageImpl contentPageImpl = (ContentPageImpl)contentPage;
-            Page page = pageManager.getPage(contentPageImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentPageImpl.getPage().getPath());
             Folder pageFolder = (Folder)page.getParent();
             Folder documentOrderingFolder = (Folder)pageFolder.getParent();
             if (documentOrderingFolder != null)
@@ -389,7 +395,7 @@
         {
             // retrieve current page and parent folder from page manager
             ContentPageImpl contentPageImpl = (ContentPageImpl)contentPage;
-            Page page = pageManager.getPage(contentPageImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentPageImpl.getPage().getPath());
             Folder documentOrderingFolder = (Folder)page.getParent();
 
             // check for edit permission
@@ -439,14 +445,14 @@
             {
                 throw new IllegalArgumentException("Cannot use move fragment operation between pages");                
             }
-            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof Page) && contentFragmentImpl.getDefinition().getPath().equals(contentPageImpl.getPath()));
+            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof BaseConcretePageElement) && contentFragmentImpl.getDefinition().getPath().equals(contentPageImpl.getPath()));
             if (!contentFragmentDefinitionIsPage && (contentFragmentImpl.getReference() == null))
             {
                 throw new IllegalArgumentException("Fragment reference and page not consistent or mutable");
             }
             
             // retrieve current page and fragments from page manager
-            Page page = pageManager.getPage(contentPageImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentPageImpl.getPage().getPath());
             BaseFragmentElement fromFragmentElement = page.getFragmentById(fromContentFragmentImpl.getFragment().getId());
             if (!(fromFragmentElement instanceof Fragment))
             {
@@ -472,7 +478,7 @@
             // move page fragment and update page in page manager
             fragment = fromFragment.removeFragmentById(fragment.getId());
             toFragment.getFragments().add(fragment);
-            pageManager.updatePage(page);
+            updatePage(page);
 
             // update content context
             fromContentFragmentImpl.removeFragmentById(fragmentId);
@@ -489,7 +495,7 @@
     /* (non-Javadoc)
      * @see org.apache.jetspeed.layout.PageLayoutComponent#newContentPage(org.apache.jetspeed.om.page.Page, org.apache.jetspeed.om.page.PageTemplate, java.util.Map)
      */
-    public ContentPage newContentPage(Page page, PageTemplate pageTemplate, Map fragmentDefinitions)
+    public ContentPage newContentPage(BaseConcretePageElement page, PageTemplate pageTemplate, Map fragmentDefinitions)
     {
         // generate content page
         String contentPageId = page.getId();
@@ -573,7 +579,7 @@
         {
             // retrieve current page and parent folder from page manager
             ContentPageImpl contentPageImpl = (ContentPageImpl)contentPage;
-            Page page = pageManager.getPage(contentPageImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentPageImpl.getPage().getPath());
             Folder folder = (Folder)page.getParent();
             
             // check for edit permission
@@ -681,7 +687,7 @@
         {
             // retrieve current page and parent folder from page manager
             ContentPageImpl contentPageImpl = (ContentPageImpl)contentPage;
-            Page page = pageManager.getPage(contentPageImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentPageImpl.getPage().getPath());
             Folder folder = (Folder)page.getParent();
 
             // check for edit permission
@@ -751,7 +757,7 @@
         {
             // retrieve current page and document ordering folder from page manager
             ContentPageImpl contentPageImpl = (ContentPageImpl)contentPage;
-            Page page = pageManager.getPage(contentPageImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentPageImpl.getPage().getPath());
             String documentName = page.getName();
             Folder documentOrderingFolder = (Folder)page.getParent();
 
@@ -759,7 +765,7 @@
             page.checkAccess(JetspeedActions.EDIT);
 
             // remove in page manager
-            pageManager.removePage(page);
+            removePage(page);
 
             // check for ordering folder edit permission
             documentOrderingFolder.checkAccess(JetspeedActions.EDIT);
@@ -788,7 +794,7 @@
         {
             // retrieve current page and parent folder from page manager
             ContentPageImpl contentPageImpl = (ContentPageImpl)contentPage;
-            Page page = pageManager.getPage(contentPageImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentPageImpl.getPage().getPath());
             Folder folder = (Folder)page.getParent();
             String documentName = folder.getName();
             Folder documentOrderingFolder = (Folder)folder.getParent();
@@ -837,14 +843,14 @@
             {
                 throw new IllegalArgumentException("Parent content fragment and page not consistent or locked");                
             }
-            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof Page) && contentFragmentImpl.getDefinition().getPath().equals(contentPageImpl.getPath()));
+            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof BaseConcretePageElement) && contentFragmentImpl.getDefinition().getPath().equals(contentPageImpl.getPath()));
             if (!contentFragmentDefinitionIsPage && (contentFragmentImpl.getReference() == null))
             {
                 throw new IllegalArgumentException("Fragment reference and page not consistent or mutable");
             }
             
             // retrieve current page and fragment from page manager
-            Page page = pageManager.getPage(contentPageImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentPageImpl.getPage().getPath());
             String pageFragmentId = (contentFragmentDefinitionIsPage ? contentFragmentImpl.getFragment().getId() : contentFragmentImpl.getReference().getId());
             BaseFragmentElement fragment = page.getFragmentById(pageFragmentId);
             if (fragment == null)
@@ -859,7 +865,7 @@
             boolean update = (page.removeFragmentById(pageFragmentId) != null);
             if (update)
             {
-                pageManager.updatePage(page);
+                updatePage(page);
             }
             
             // update content context
@@ -881,14 +887,14 @@
         {
             // validate content fragment
             ContentFragmentImpl contentFragmentImpl = (ContentFragmentImpl)contentFragment;
-            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof Page) && contentFragmentImpl.getDefinition().getPath().equals(contentFragmentImpl.getPage().getPath()));
+            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof BaseConcretePageElement) && contentFragmentImpl.getDefinition().getPath().equals(contentFragmentImpl.getPage().getPath()));
             if (!contentFragmentDefinitionIsPage && (contentFragmentImpl.getReference() == null))
             {
                 throw new IllegalArgumentException("Only page fragments and fragment references are mutable");
             }
             
             // retrieve current fragment and page from page manager
-            Page page = pageManager.getPage(contentFragmentImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentFragmentImpl.getPage().getPath());
             String pageFragmentId = (contentFragmentDefinitionIsPage ? contentFragmentImpl.getFragment().getId() : contentFragmentImpl.getReference().getId());
             BaseFragmentElement fragment = page.getFragmentById(pageFragmentId);
             if (fragment == null)
@@ -910,7 +916,7 @@
             }
             if (update)
             {
-                pageManager.updatePage(page);
+                updatePage(page);
             }
             
             // update content context
@@ -938,7 +944,7 @@
             
             // retrieve current page from page manager
             ContentPageImpl contentPageImpl = (ContentPageImpl)contentPage;
-            Page page = pageManager.getPage(contentPageImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentPageImpl.getPage().getPath());
 
             // check for edit permission
             page.checkAccess(JetspeedActions.EDIT);            
@@ -954,7 +960,7 @@
             }
             if (update)
             {
-                pageManager.updatePage(page);
+                updatePage(page);
             }
 
             // update content context
@@ -979,7 +985,7 @@
         {
             // retrieve current page and parent folder from page manager
             ContentPageImpl contentPageImpl = (ContentPageImpl)contentPage;
-            Page page = pageManager.getPage(contentPageImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentPageImpl.getPage().getPath());
             Folder folder = (Folder)page.getParent();
 
             // check for edit permission
@@ -1034,14 +1040,14 @@
             {
                 throw new IllegalArgumentException("Locked content fragment is not mutable");                
             }
-            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof Page) && contentFragmentImpl.getDefinition().getPath().equals(contentFragmentImpl.getPage().getPath()));
+            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof BaseConcretePageElement) && contentFragmentImpl.getDefinition().getPath().equals(contentFragmentImpl.getPage().getPath()));
             if (!contentFragmentDefinitionIsPage)
             {
                 throw new IllegalArgumentException("Only page fragments can be modified");                
             }
             
             // retrieve current fragment and page from page manager
-            Page page = pageManager.getPage(contentFragmentImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentFragmentImpl.getPage().getPath());
             BaseFragmentElement foundFragment = page.getFragmentById(contentFragmentImpl.getFragment().getId());
             if (!(foundFragment instanceof Fragment))
             {
@@ -1061,7 +1067,7 @@
             }
             if (update)
             {
-                pageManager.updatePage(page);
+                updatePage(page);
             }
 
             // update content context
@@ -1083,14 +1089,14 @@
         {
             // validate content fragment
             ContentFragmentImpl contentFragmentImpl = (ContentFragmentImpl)contentFragment;
-            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof Page) && contentFragmentImpl.getDefinition().getPath().equals(contentFragmentImpl.getPage().getPath()));
+            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof BaseConcretePageElement) && contentFragmentImpl.getDefinition().getPath().equals(contentFragmentImpl.getPage().getPath()));
             if (!contentFragmentDefinitionIsPage && (contentFragmentImpl.getReference() == null))
             {
                 throw new IllegalArgumentException("Only page fragments and fragment references are mutable");
             }
             
             // retrieve current fragment and page from page manager
-            Page page = pageManager.getPage(contentFragmentImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentFragmentImpl.getPage().getPath());
             String pageFragmentId = (contentFragmentDefinitionIsPage ? contentFragmentImpl.getFragment().getId() : contentFragmentImpl.getReference().getId());
             BaseFragmentElement fragment = page.getFragmentById(pageFragmentId);
             if (fragment == null)
@@ -1145,7 +1151,7 @@
             }
             if (update)
             {
-                pageManager.updatePage(page);
+                updatePage(page);
             }
 
             // update content context
@@ -1186,14 +1192,14 @@
         {
             // validate content fragment
             ContentFragmentImpl contentFragmentImpl = (ContentFragmentImpl)contentFragment;
-            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof Page) && contentFragmentImpl.getDefinition().getPath().equals(contentFragmentImpl.getPage().getPath()));
+            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof BaseConcretePageElement) && contentFragmentImpl.getDefinition().getPath().equals(contentFragmentImpl.getPage().getPath()));
             if (!contentFragmentDefinitionIsPage && (contentFragmentImpl.getReference() == null))
             {
                 throw new IllegalArgumentException("Only page fragments and fragment references are mutable");
             }
             
             // retrieve current fragment and page from page manager
-            Page page = pageManager.getPage(contentFragmentImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentFragmentImpl.getPage().getPath());
             String pageFragmentId = (contentFragmentDefinitionIsPage ? contentFragmentImpl.getFragment().getId() : contentFragmentImpl.getReference().getId());
             BaseFragmentElement fragment = page.getFragmentById(pageFragmentId);
             if (fragment == null)
@@ -1242,7 +1248,7 @@
                     fragment.getPreferences().add(preference);
                 }
             }
-            pageManager.updatePage(page);
+            updatePage(page);
 
             // update content context
             contentFragmentImpl.setPreferences(preferences);
@@ -1263,14 +1269,14 @@
         {
             // validate content fragment
             ContentFragmentImpl contentFragmentImpl = (ContentFragmentImpl)contentFragment;
-            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof Page) && contentFragmentImpl.getDefinition().getPath().equals(contentFragmentImpl.getPage().getPath()));
+            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof BaseConcretePageElement) && contentFragmentImpl.getDefinition().getPath().equals(contentFragmentImpl.getPage().getPath()));
             if (!contentFragmentDefinitionIsPage && (contentFragmentImpl.getReference() == null))
             {
                 throw new IllegalArgumentException("Only page fragments and fragment references are mutable");
             }
             
             // retrieve current fragment and page from page manager
-            Page page = pageManager.getPage(contentFragmentImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentFragmentImpl.getPage().getPath());
             String pageFragmentId = (contentFragmentDefinitionIsPage ? contentFragmentImpl.getFragment().getId() : contentFragmentImpl.getReference().getId());
             BaseFragmentElement fragment = page.getFragmentById(pageFragmentId);
             if (fragment == null)
@@ -1301,7 +1307,7 @@
             }
             if (update)
             {
-                pageManager.updatePage(page);
+                updatePage(page);
             }
 
             // update content context
@@ -1330,14 +1336,14 @@
         {
             // validate content fragment
             ContentFragmentImpl contentFragmentImpl = (ContentFragmentImpl)contentFragment;
-            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof Page) && contentFragmentImpl.getDefinition().getPath().equals(contentFragmentImpl.getPage().getPath()));
+            boolean contentFragmentDefinitionIsPage = ((contentFragmentImpl.getDefinition() instanceof BaseConcretePageElement) && contentFragmentImpl.getDefinition().getPath().equals(contentFragmentImpl.getPage().getPath()));
             if (!contentFragmentDefinitionIsPage && (contentFragmentImpl.getReference() == null))
             {
                 throw new IllegalArgumentException("Only page fragments and fragment references are mutable");
             }
             
             // retrieve current fragment and page from page manager
-            Page page = pageManager.getPage(contentFragmentImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentFragmentImpl.getPage().getPath());
             String pageFragmentId = (contentFragmentDefinitionIsPage ? contentFragmentImpl.getFragment().getId() : contentFragmentImpl.getReference().getId());
             BaseFragmentElement fragment = page.getFragmentById(pageFragmentId);
             if (fragment == null)
@@ -1368,7 +1374,7 @@
             }
             if (update)
             {
-                pageManager.updatePage(page);
+                updatePage(page);
             }
 
             // update content context
@@ -1397,7 +1403,7 @@
         {
             // retrieve current page from page manager
             ContentPageImpl contentPageImpl = (ContentPageImpl)contentPage;
-            Page page = pageManager.getPage(contentPageImpl.getPage().getPath());
+            BaseConcretePageElement page = getPage(contentPageImpl.getPage().getPath());
 
             // check for edit permission
             page.checkAccess(JetspeedActions.EDIT);            
@@ -1422,7 +1428,7 @@
             }
             if (update)
             {
-                pageManager.updatePage(page);
+                updatePage(page);
             }
             
             // update content context
@@ -1568,7 +1574,7 @@
      * @param locked locked fragment flag
      * @return content fragment hierarchy or null if undefined
      */
-    private ContentFragmentImpl newContentFragment(String parentId, Page page, Map fragmentDefinitions, BaseFragmentsElement definition, BaseFragmentElement fragment, boolean locked)
+    private ContentFragmentImpl newContentFragment(String parentId, BaseConcretePageElement page, Map fragmentDefinitions, BaseFragmentsElement definition, BaseFragmentElement fragment, boolean locked)
     {
         // generate content fragment hierarchy for specific fragment;
         // merges fragment hierarchy and attributes from fragments,
@@ -1645,7 +1651,7 @@
      * @param fragmentFragment referenced root PSML fragment from fragment definition
      * @return content fragment hierarchy or null if undefined
      */
-    private ContentFragmentImpl newContentFragment(String parentId, Page page, Map fragmentDefinitions, BaseFragmentsElement definition, FragmentReference fragmentReference, Fragment [] fragmentFragment)
+    private ContentFragmentImpl newContentFragment(String parentId, BaseConcretePageElement page, Map fragmentDefinitions, BaseFragmentsElement definition, FragmentReference fragmentReference, Fragment [] fragmentFragment)
     {
         // generate content fragment hierarchy for reference fragment from
         // fragment definition root fragment if located
@@ -1672,7 +1678,7 @@
      * @param locked locked fragment flag
      * @return content fragment hierarchy or null if undefined
      */
-    private ContentFragmentImpl newContentFragment(String id, Page page, Map fragmentDefinitions, BaseFragmentsElement definition, Fragment fragment, FragmentReference reference, boolean locked)
+    private ContentFragmentImpl newContentFragment(String id, BaseConcretePageElement page, Map fragmentDefinitions, BaseFragmentsElement definition, Fragment fragment, FragmentReference reference, boolean locked)
     {
         // generate content fragment hierarchy for fragment
         ContentFragmentImpl contentFragmentImpl = new ContentFragmentImpl(this, id, page, definition, fragment, reference, locked);
@@ -1846,4 +1852,69 @@
         }
         return false;
     }
+    
+    /**
+     * Get page or dynamic page from page manager.
+     * 
+     * @param pagePath path to page
+     * @return page or dynamic page
+     * @throws PageNotFoundException
+     * @throws NodeException
+     */
+    private BaseConcretePageElement getPage(String pagePath) throws PageNotFoundException, NodeException
+    {
+        if (pagePath.endsWith(Page.DOCUMENT_TYPE))
+        {
+            return pageManager.getPage(pagePath);
+        }
+        if (pagePath.endsWith(DynamicPage.DOCUMENT_TYPE))
+        {
+            return pageManager.getDynamicPage(pagePath);            
+        }
+        throw new PageNotFoundException("Unable to classify page path by type: "+pagePath);
+    }
+    
+    /**
+     * Update page or dynamic page using page manager.
+     * 
+     * @param page page or dynamic page to update
+     * @throws NodeException
+     * @throws PageNotUpdatedException
+     */
+    private void updatePage(BaseConcretePageElement page) throws NodeException, PageNotUpdatedException
+    {
+        if (page instanceof Page)
+        {
+            pageManager.updatePage((Page)page);
+            return;
+        }
+        if (page instanceof DynamicPage)
+        {
+            pageManager.updateDynamicPage((DynamicPage)page);
+            return;
+        }
+        throw new PageNotUpdatedException("Unable to classify page by type: "+((page != null) ? page.getClass().getName() : "null"));
+    }
+
+    /**
+     * Remove page or dynamic page using page manager.
+     * 
+     * @param page page or dynamic page to update
+     * @throws NodeException
+     * @throws PageNotRemovedException
+     */
+    private void removePage(BaseConcretePageElement page) throws NodeException, PageNotRemovedException
+    {
+        if (page instanceof Page)
+        {
+            pageManager.removePage((Page)page);
+            return;
+        }
+        if (page instanceof DynamicPage)
+        {
+            pageManager.removeDynamicPage((DynamicPage)page);
+            return;
+        }
+        throw new PageNotRemovedException("Unable to classify page by type: "+((page != null) ? page.getClass().getName() : "null"));
+    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentFragmentImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentFragmentImpl.java?rev=891420&r1=891419&r2=891420&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentFragmentImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentFragmentImpl.java Wed Dec 16 20:38:20 2009
@@ -27,11 +27,11 @@
 import org.apache.jetspeed.decoration.Decoration;
 import org.apache.jetspeed.layout.PageLayoutComponent;
 import org.apache.jetspeed.layout.impl.PageLayoutComponentUtils;
+import org.apache.jetspeed.om.page.BaseConcretePageElement;
 import org.apache.jetspeed.om.page.BaseFragmentsElement;
 import org.apache.jetspeed.om.page.ContentFragment;
 import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.om.page.FragmentReference;
-import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.om.preference.FragmentPreference;
 import org.apache.pluto.container.PortletPreference;
 
@@ -50,7 +50,7 @@
 
     private PageLayoutComponent pageLayoutComponent;
     private String id;
-    private Page page;
+    private BaseConcretePageElement page;
     private BaseFragmentsElement definition;
     private Fragment fragment;
     private FragmentReference reference;
@@ -116,7 +116,7 @@
      * @param reference PSML page fragment reference
      * @param locked locked flag
      */
-    public ContentFragmentImpl(PageLayoutComponent pageLayoutComponent, String id, Page page, BaseFragmentsElement definition, Fragment fragment, FragmentReference reference, boolean locked)
+    public ContentFragmentImpl(PageLayoutComponent pageLayoutComponent, String id, BaseConcretePageElement page, BaseFragmentsElement definition, Fragment fragment, FragmentReference reference, boolean locked)
     {
         this.pageLayoutComponent = pageLayoutComponent;
         this.id = id;
@@ -838,7 +838,7 @@
      * 
      * @return the PSML page
      */
-    public Page getPage()
+    public BaseConcretePageElement getPage()
     {
         return page;
     }
@@ -884,7 +884,7 @@
      * @param reference PSML page fragment reference
      * @param locked locked flag
      */
-    public void initialize(PageLayoutComponent pageLayoutComponent, Page page, BaseFragmentsElement definition, Fragment fragment, FragmentReference reference, boolean locked)
+    public void initialize(PageLayoutComponent pageLayoutComponent, BaseConcretePageElement page, BaseFragmentsElement definition, Fragment fragment, FragmentReference reference, boolean locked)
     {
         this.pageLayoutComponent = pageLayoutComponent;
         this.page = page;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentPageImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentPageImpl.java?rev=891420&r1=891419&r2=891420&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentPageImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentPageImpl.java Wed Dec 16 20:38:20 2009
@@ -23,9 +23,9 @@
 
 import org.apache.jetspeed.layout.PageLayoutComponent;
 import org.apache.jetspeed.layout.impl.PageLayoutComponentUtils;
+import org.apache.jetspeed.om.page.BaseConcretePageElement;
 import org.apache.jetspeed.om.page.ContentFragment;
 import org.apache.jetspeed.om.page.ContentPage;
-import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.om.page.PageTemplate;
 import org.apache.jetspeed.om.portlet.GenericMetadata;
 
@@ -39,7 +39,7 @@
 {
     private PageLayoutComponent pageLayoutComponent;
     private String id;
-    private Page page;
+    private BaseConcretePageElement page;
     private PageTemplate pageTemplate;
     private Map fragmentDefinitions;
 
@@ -83,7 +83,7 @@
      * @param pageTemplate PSML page template
      * @param fragmentDefinitions PSML fragment definitions
      */
-    public ContentPageImpl(PageLayoutComponent pageLayoutComponent, String id, Page page, PageTemplate pageTemplate, Map fragmentDefinitions)
+    public ContentPageImpl(PageLayoutComponent pageLayoutComponent, String id, BaseConcretePageElement page, PageTemplate pageTemplate, Map fragmentDefinitions)
     {
         this.pageLayoutComponent = pageLayoutComponent;
         this.id = id;
@@ -208,7 +208,7 @@
     /* (non-Javadoc)
      * @see org.apache.jetspeed.om.page.ContentPage#getPage()
      */
-    public Page getPage()
+    public BaseConcretePageElement getPage()
     {
         return page;
     }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/DynamicPageImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/DynamicPageImpl.java?rev=891420&r1=891419&r2=891420&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/DynamicPageImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/DynamicPageImpl.java Wed Dec 16 20:38:20 2009
@@ -28,22 +28,22 @@
 {
     private static final long serialVersionUID = 1L;
     
-    private String pageType;
+    private String contentType;
 
     /* (non-Javadoc)
-     * @see org.apache.jetspeed.om.page.DynamicPage#getPageType()
+     * @see org.apache.jetspeed.om.page.DynamicPage#getContentType()
      */
-    public String getPageType()
+    public String getContentType()
     {
-        return pageType;
+        return contentType;
     }
 
     /* (non-Javadoc)
-     * @see org.apache.jetspeed.om.page.DynamicPage#setPageType(java.lang.String)
+     * @see org.apache.jetspeed.om.page.DynamicPage#setContentType(java.lang.String)
      */
-    public void setPageType(String pageType)
+    public void setContentType(String contentType)
     {
-        this.pageType = pageType;
+        this.contentType = contentType;
     }
 
     /* (non-Javadoc)

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/DynamicPageImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/DynamicPageImpl.java?rev=891420&r1=891419&r2=891420&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/DynamicPageImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/DynamicPageImpl.java Wed Dec 16 20:38:20 2009
@@ -28,22 +28,22 @@
 {
     private static final long serialVersionUID = 1L;
 
-    private String pageType;
+    private String contentType;
     
     /* (non-Javadoc)
-     * @see org.apache.jetspeed.om.page.DynamicPage#getPageType()
+     * @see org.apache.jetspeed.om.page.DynamicPage#getContentType()
      */
-    public String getPageType()
+    public String getContentType()
     {
-        return pageType;
+        return contentType;
     }
 
     /* (non-Javadoc)
-     * @see org.apache.jetspeed.om.page.DynamicPage#setPageType(java.lang.String)
+     * @see org.apache.jetspeed.om.page.DynamicPage#setContentType(java.lang.String)
      */
-    public void setPageType(String pageType)
+    public void setContentType(String contentType)
     {
-        this.pageType = pageType;
+        this.contentType = contentType;
     }
 
     /* (non-Javadoc)

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/AbstractPageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/AbstractPageManager.java?rev=891420&r1=891419&r2=891420&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/AbstractPageManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/AbstractPageManager.java Wed Dec 16 20:38:20 2009
@@ -1122,7 +1122,7 @@
         DynamicPage dynamicPage = newDynamicPage(path);
         copyPageAttributes(source, copyIds, dynamicPage);
         dynamicPage.setHidden(source.isHidden());
-        dynamicPage.setPageType(source.getPageType());
+        dynamicPage.setContentType(source.getContentType());
         return dynamicPage;
     }
 

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=891420&r1=891419&r2=891420&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 Dec 16 20:38:20 2009
@@ -95,8 +95,8 @@
          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 name="contentType" type="string">
+      <bind-xml name="content-type" node="attribute"/>
     </field>
   </class>
 

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=891420&r1=891419&r2=891420&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 Dec 16 20:38:20 2009
@@ -1578,8 +1578,8 @@
       <!-- org.apache.jetspeed.om.page.impl.DynamicPageImpl mapping -->
 
       <field-descriptor
-         name="pageType"
-         column="PAGE_TYPE"
+         name="contentType"
+         column="CONTENT_TYPE"
          jdbc-type="VARCHAR"
       />
 

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=891420&r1=891419&r2=891420&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 Wed Dec 16 20:38:20 2009
@@ -336,7 +336,7 @@
 
         DynamicPage testdynamicpage = pageManager.getDynamicPage("/test001.dpsml");
         assertTrue(testdynamicpage.getId().equals("/test001.dpsml"));
-        assertTrue(testdynamicpage.getPageType().equals("default"));        
+        assertTrue(testdynamicpage.getContentType().equals("default"));        
         assertTrue(testdynamicpage.getTitle().equals("Test Dynamic Page"));
         assertTrue(testdynamicpage.getVersion().equals("2.77"));
         rootFragmentElement = testdynamicpage.getRootFragment();
@@ -501,7 +501,7 @@
         assertTrue(bf instanceof PageFragment);
 
         DynamicPage dynamicpage = pageManager.newDynamicPage("/test002.dpsml");
-        dynamicpage.setPageType("default");        
+        dynamicpage.setContentType("default");        
         dynamicpage.setTitle("Created Dynamic Page");
         rootFragmentElement = dynamicpage.getRootFragment();
         assertTrue(rootFragmentElement instanceof Fragment);
@@ -528,7 +528,7 @@
         dynamicpage = pageManager.getDynamicPage("/test002.dpsml");
         assertNotNull(dynamicpage);
         assertTrue(dynamicpage.getId().equals("/test002.dpsml"));
-        assertEquals("default", dynamicpage.getPageType());
+        assertEquals("default", dynamicpage.getContentType());
         assertEquals("Created Dynamic Page", dynamicpage.getTitle());
         assertNotNull(dynamicpage.getRootFragment());
         rootFragmentElement = dynamicpage.getRootFragment();
@@ -1422,7 +1422,7 @@
         DynamicPage clonedynamicpage = pageManager.copyDynamicPage(testdynamicpage, "/cloned.dpsml");
         assertNotNull(clonedynamicpage);
         assertTrue(clonedynamicpage.getId().equals("/cloned.dpsml"));
-        assertTrue(clonedynamicpage.getPageType().equals("default"));        
+        assertTrue(clonedynamicpage.getContentType().equals("default"));        
         assertTrue(clonedynamicpage.getTitle().equals("Clone Test Dynamic Page"));
         rootFragmentElement = clonedynamicpage.getRootFragment();
         assertTrue(rootFragmentElement instanceof Fragment);

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=891420&r1=891419&r2=891420&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 Wed Dec 16 20:38:20 2009
@@ -454,7 +454,7 @@
         pageManager.updatePageTemplate(pageTemplate);
 
         DynamicPage dynamicPage = pageManager.newDynamicPage("/dynamic-page.dpsml");
-        dynamicPage.setPageType("default");        
+        dynamicPage.setContentType("default");        
         dynamicPage.setTitle("Created Dynamic Page");
         rootFragmentElement = dynamicPage.getRootFragment();
         assertTrue(rootFragmentElement instanceof Fragment);
@@ -694,7 +694,7 @@
         {
             DynamicPage check = pageManager.getDynamicPage("/dynamic-page.dpsml");
             assertNotNull(check);
-            assertEquals("default", check.getPageType());
+            assertEquals("default", check.getContentType());
             assertEquals("Created Dynamic Page", check.getTitle());
             assertNotNull(check.getRootFragment());
             BaseFragmentElement rootFragmentElement = check.getRootFragment();
@@ -1062,7 +1062,7 @@
         DynamicPage dynamicPage = pageManager.getDynamicPage("/dynamic-page.dpsml");
         assertEquals("/dynamic-page.dpsml", dynamicPage.getPath());
         dynamicPage.setTitle("UPDATED");
-        dynamicPage.setPageType("UPDATED");
+        dynamicPage.setContentType("UPDATED");
         pageManager.updateDynamicPage(dynamicPage);
 
         FragmentDefinition fragmentDefinition = pageManager.getFragmentDefinition("/fragment-definition.fpsml");

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/clonetest.dpsml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/clonetest.dpsml?rev=891420&r1=891419&r2=891420&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/clonetest.dpsml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/clonetest.dpsml Wed Dec 16 20:38:20 2009
@@ -15,7 +15,7 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<dynamic-page id="clonetest" type="default"
+<dynamic-page id="clonetest" content-type="default"
     xmlns="http://portals.apache.org/jetspeed"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.1/schemas/psml.xsd">

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/test001.dpsml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/test001.dpsml?rev=891420&r1=891419&r2=891420&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/test001.dpsml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/testdata/pages/test001.dpsml Wed Dec 16 20:38:20 2009
@@ -15,7 +15,7 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<dynamic-page id="test001" type="default" version='2.77'
+<dynamic-page id="test001" content-type="default" version='2.77'
     xmlns="http://portals.apache.org/jetspeed"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.1/schemas/psml.xsd">

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/AbstractPatternMapping.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/AbstractPatternMapping.java?rev=891420&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/AbstractPatternMapping.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/AbstractPatternMapping.java Wed Dec 16 20:38:20 2009
@@ -0,0 +1,39 @@
+package org.apache.jetspeed.portalsite.impl;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * This class specifies an abstract pattern mapping definition for use
+ * by the portal-site content type mapper component mappings.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id:$
+ */
+public class AbstractPatternMapping
+{
+    private String pattern;
+    private Pattern compiledPattern;
+    
+    /**
+     * Construct pattern mapping.
+     * 
+     * @param pattern mapping pattern
+     */
+    protected AbstractPatternMapping(String pattern)
+    {
+        this.pattern = pattern;
+        this.compiledPattern = Pattern.compile(pattern);
+    }
+    
+    /**
+     * Allocate new matcher for mapping pattern.
+     * 
+     * @param input input string
+     * @return allocated matcher
+     */
+    protected Matcher getPatternMatcher(String input)
+    {
+        return compiledPattern.matcher(input);
+    }
+}

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/ContentTypeMapping.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/ContentTypeMapping.java?rev=891420&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/ContentTypeMapping.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/ContentTypeMapping.java Wed Dec 16 20:38:20 2009
@@ -0,0 +1,55 @@
+package org.apache.jetspeed.portalsite.impl;
+
+import java.util.regex.Matcher;
+
+/**
+ * This class specifies a content type mapping definition for use
+ * by the portal-site content type mapper component.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id:$
+ */
+public class ContentTypeMapping extends AbstractPatternMapping
+{
+    private String mappedType;
+    private boolean mappedTypeReplacements;
+    
+    /**
+     * Construct content type pattern mapping.
+     * 
+     * @param pattern request path matching pattern
+     * @param mappedType resulting content type
+     */
+    public ContentTypeMapping(String pattern, String mappedType)
+    {
+        super(pattern);
+        this.mappedType = mappedType;
+        this.mappedTypeReplacements = (mappedType.indexOf('$') != -1);
+    }
+
+    /**
+     * Match content type pattern against request path, replacing
+     * all subsequence expressions in the mapped type.
+     * 
+     * @param requestPath request path to match
+     * @return mapped content type or null if not matched
+     */
+    public String map(String requestPath)
+    {
+        Matcher patternMatcher = getPatternMatcher(requestPath);
+        if (patternMatcher.find())
+        {
+            String type = mappedType;
+            if (mappedTypeReplacements)
+            {
+                for (int i = 0; (i <= patternMatcher.groupCount()); i++)
+                {
+                    String groupMatch = requestPath.substring(patternMatcher.start(i), patternMatcher.end(i));
+                    type = type.replace("$"+i, groupMatch);
+                }
+            }
+            return type;
+        }
+        return null;
+    }
+}

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuImpl.java?rev=891420&r1=891419&r2=891420&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuImpl.java Wed Dec 16 20:38:20 2009
@@ -175,7 +175,7 @@
             else
             {
                 // limit cyclic references to this menu if named and
-                // referencable as root menu instance
+                // referenced as root menu instance
                 boolean menuNameReferenced = false;
                 if ((definition.getName() != null) && (parent == null))
                 {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuOptionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuOptionImpl.java?rev=891420&r1=891419&r2=891420&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuOptionImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuOptionImpl.java Wed Dec 16 20:38:20 2009
@@ -19,6 +19,7 @@
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.folder.MenuOptionsDefinition;
 import org.apache.jetspeed.om.page.Link;
+import org.apache.jetspeed.om.page.BaseConcretePageElement;
 import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.page.document.Node;
 import org.apache.jetspeed.page.document.NodeNotFoundException;
@@ -187,7 +188,7 @@
         if (context != null)
         {
             // get request page
-            Page requestPage = null;
+            BaseConcretePageElement requestPage = null;
             try
             {
                 requestPage = context.getPage();

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteContentTypeMapperImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteContentTypeMapperImpl.java?rev=891420&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteContentTypeMapperImpl.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteContentTypeMapperImpl.java Wed Dec 16 20:38:20 2009
@@ -0,0 +1,110 @@
+package org.apache.jetspeed.portalsite.impl;
+
+import java.util.List;
+
+import org.apache.jetspeed.om.page.Page;
+import org.apache.jetspeed.portalsite.PortalSiteContentTypeMapper;
+
+/**
+ * This class implements the the content type mapper component
+ * for use with the portal-site component.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id:$
+ */
+public class PortalSiteContentTypeMapperImpl implements PortalSiteContentTypeMapper
+{
+    public static final String DEFAULT_PAGE_SYSTEM_TYPE_SUFFIX = Page.DOCUMENT_TYPE;
+    
+    private List<ContentTypeMapping> contentTypeMappings;
+    private List<RequestPathMapping> requestPathMappings;
+    
+    /**
+     * Construct default PortalSite content type mapper implementation.
+     */
+    public PortalSiteContentTypeMapperImpl()
+    {        
+        this(null);
+    }
+
+    /**
+     * Construct default PortalSite content type mapper implementation.
+     * 
+     * @param contentTypeMappings mappings to determine content type from request path
+     */
+    public PortalSiteContentTypeMapperImpl(List<ContentTypeMapping> contentTypeMappings)
+    {
+        this(contentTypeMappings, null);
+    }
+
+    /**
+     * Construct default PortalSite content type mapper implementation.
+     * 
+     * @param contentTypeMappings mappings to determine content type from request path
+     * @param requestPathMappings mappings to determine request path from server name,
+     *                            content type, and request path
+     */
+    public PortalSiteContentTypeMapperImpl(List<ContentTypeMapping> contentTypeMappings, List<RequestPathMapping> requestPathMappings)
+    {        
+        this.contentTypeMappings = contentTypeMappings;
+        this.requestPathMappings = requestPathMappings;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.portalsite.PortalSiteContentTypeMapper#mapContentType(java.lang.String)
+     */
+    public String mapContentType(String requestPath)
+    {
+        // match content type patterns to determine content types
+        if (contentTypeMappings != null)
+        {
+            for (ContentTypeMapping mapping : contentTypeMappings)
+            {
+                String contentType = mapping.map(requestPath);
+                if (contentType != null)
+                {
+                    return contentType;
+                }
+            }
+        }
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.portalsite.PortalSiteContentTypeMapper#mapRequestPath(java.lang.String, java.lang.String, java.lang.String)
+     */
+    public String mapRequestPath(String serverName, String contentType, String requestPath)
+    {
+        if (requestPathMappings != null)
+        {
+            boolean requestPathMapped = false;
+            for (RequestPathMapping mapping : requestPathMappings)
+            {
+                String mappedRequestPath = mapping.map(serverName, contentType, requestPath);
+                if ((mappedRequestPath != null) && !mappedRequestPath.equals(requestPath))
+                {
+                    requestPath = mappedRequestPath;
+                    requestPathMapped = true;
+                }
+            }
+            if (requestPathMapped)
+            {
+                return requestPath;
+            }
+        }
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.portalsite.PortalSiteContentTypeMapper#mapSystemType(java.lang.String)
+     */
+    public String mapSystemType(String requestPath)
+    {
+        // match request path suffixes to determine page requests
+        if (requestPath.endsWith(DEFAULT_PAGE_SYSTEM_TYPE_SUFFIX))
+        {
+            return PAGE_SYSTEM_TYPE;
+        }
+        return null;
+    }
+}

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteImpl.java?rev=891420&r1=891419&r2=891420&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteImpl.java Wed Dec 16 20:38:20 2009
@@ -18,6 +18,7 @@
 
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.portalsite.PortalSite;
+import org.apache.jetspeed.portalsite.PortalSiteContentTypeMapper;
 import org.apache.jetspeed.portalsite.PortalSiteSessionContext;
 
 /**
@@ -32,15 +33,22 @@
      * pageManager - PageManager component
      */
     private PageManager pageManager;
+    
+    /**
+     * contentTypeMapper - PortalSiteContentTypeMapper component
+     */
+    private PortalSiteContentTypeMapper contentTypeMapper;
 
     /**
      * PortalSiteImpl - component constructor
      *
      * @param pageManager PageManager component instance
+     * @param contentTypeMapper PortalSiteContentTypeMapper component instance
      */
-    public PortalSiteImpl(PageManager pageManager)
+    public PortalSiteImpl(PageManager pageManager, PortalSiteContentTypeMapper contentTypeMapper)
     {
         this.pageManager = pageManager;
+        this.contentTypeMapper = contentTypeMapper;
     }
 
     /**
@@ -50,7 +58,7 @@
      */
     public PortalSiteSessionContext newSessionContext()
     {
-        return new PortalSiteSessionContextImpl(pageManager);
+        return new PortalSiteSessionContextImpl(pageManager, contentTypeMapper);
     }
 
     /**
@@ -62,4 +70,14 @@
     {
         return pageManager;
     }
+
+    /**
+     * getContentTypeMapper - return PortalSiteContentTypeMapper component instance
+     *
+     * @return PortalSiteContentTypeMapper instance
+     */
+    public PortalSiteContentTypeMapper getContentTypeMapper()
+    {
+        return contentTypeMapper;
+    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteRequestContextImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteRequestContextImpl.java?rev=891420&r1=891419&r2=891420&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteRequestContextImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteRequestContextImpl.java Wed Dec 16 20:38:20 2009
@@ -28,7 +28,7 @@
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.page.FragmentDefinition;
 import org.apache.jetspeed.om.page.FragmentReference;
-import org.apache.jetspeed.om.page.Page;
+import org.apache.jetspeed.om.page.BaseConcretePageElement;
 import org.apache.jetspeed.om.page.PageTemplate;
 import org.apache.jetspeed.page.document.Node;
 import org.apache.jetspeed.page.document.NodeException;
@@ -79,7 +79,7 @@
     /**
      * requestPage - cached request profiled page proxy
      */
-    private Page requestPage;
+    private BaseConcretePageElement requestPage;
 
     /**
      * requestPageTemplate - cached request page template proxy
@@ -230,14 +230,14 @@
     }
 
     /**
-     * getManagedPage - get request profiled concrete page instance
-     *                  as managed by the page manager
+     * getManagedPage - get request profiled concrete page or dynamic page
+     *                  instance as managed by the page manager
      *  
      * @return managed page
      * @throws NodeNotFoundException if page not found
      * @throws SecurityException if page view access not granted
      */
-    public Page getManagedPage() throws NodeNotFoundException
+    public BaseConcretePageElement getManagedPage() throws NodeNotFoundException
     {
         return sessionContext.getManagedPage(getPage());            
     }
@@ -296,7 +296,7 @@
      * @throws NodeNotFoundException if page not found
      * @throws SecurityException if page view access not granted
      */
-    public Page getPage() throws NodeNotFoundException
+    public BaseConcretePageElement getPage() throws NodeNotFoundException
     {
         // select request page from session context using
         // request profile locators if not previously
@@ -320,7 +320,7 @@
         if (!requestPageTemplateCached)
         {
             // get requested page
-            Page page = getPage();
+            BaseConcretePageElement page = getPage();
             if (page != null)
             {
                 // scan through site looking for first page template
@@ -365,7 +365,7 @@
         if (!requestFragmentDefinitionsCached)
         {
             // get requested page and optional page template
-            Page page = getPage();
+            BaseConcretePageElement page = getPage();
             PageTemplate pageTemplate = getPageTemplate();
             if (page != null)
             {
@@ -471,7 +471,7 @@
     public Folder getFolder() throws NodeNotFoundException
     {
         // return parent folder of request page
-        Page page = getPage();
+        BaseConcretePageElement page = getPage();
         if (page != null)
         {
             return (Folder)page.getParent();
@@ -650,7 +650,7 @@
     {
         // access page and page templates to force request
         // page resolution
-        Page page = getPage();
+        BaseConcretePageElement page = getPage();
         PageTemplate pageTemplate = getPageTemplate();
 
         // return available menu definition names from
@@ -732,7 +732,7 @@
     {
         // access page and page template to force request
         // page resolution
-        Page page = getPage();
+        BaseConcretePageElement page = getPage();
         PageTemplate pageTemplate = getPageTemplate();
         if ((page != null) && (name != null))
         {



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