portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r920191 [1/5] - in /portals/jetspeed-2/portal/trunk: components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/proxy/ components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/ components/jetspeed-por...
Date Mon, 08 Mar 2010 03:54:18 GMT
Author: rwatler
Date: Mon Mar  8 03:54:17 2010
New Revision: 920191

URL: http://svn.apache.org/viewvc?rev=920191&view=rev
Log:
JS2-1117: enhance portal site implementation to support non-profiled physical site view

Added:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/AbstractSiteView.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/PhysicalSiteView.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SearchPathsSiteView.java
      - copied, changed from r919260, 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/main/java/org/apache/jetspeed/portalsite/view/SearchPathsSiteViewProxy.java
      - copied, changed from r918638, portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteViewProxy.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteViewUtils.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/resources/webapp/WEB-INF/pages/contentfolder/folder.metadata
Removed:
    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/main/java/org/apache/jetspeed/portalsite/view/SiteViewProxy.java
Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/DynamicPageProxy.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/FragmentDefinitionProxy.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/LinkProxy.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/PageProxy.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/PageTemplateProxy.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/page/document/proxy/NodeProxy.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuElementImpl.java
    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/MenuSeparatorImpl.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/menu/StandardBackMenuDefinition.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/menu/StandardBreadcrumbsMenuDefinition.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/menu/StandardNavigationsMenuDefinition.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/menu/StandardPagesMenuDefinition.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.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

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java?rev=920191&r1=920190&r2=920191&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java Mon Mar  8 03:54:17 2010
@@ -49,7 +49,7 @@
 import org.apache.jetspeed.page.document.NodeSet;
 import org.apache.jetspeed.page.document.proxy.NodeProxy;
 import org.apache.jetspeed.page.document.proxy.NodeSetImpl;
-import org.apache.jetspeed.portalsite.view.SiteView;
+import org.apache.jetspeed.portalsite.view.SearchPathsSiteView;
 import org.apache.jetspeed.portalsite.view.SiteViewSearchPath;
 
 /**
@@ -210,7 +210,7 @@
      * @param folder proxy delegate
      * @param forceReservedVisible suppress reserved/hidden folder visibility checks
      */
-    public static Folder newInstance(SiteView view, String locatorName, Folder parentFolder, Folder folder, boolean forceReservedVisible)
+    public static Folder newInstance(SearchPathsSiteView view, String locatorName, Folder parentFolder, Folder folder, boolean forceReservedVisible)
     {
         return (Folder)Proxy.newProxyInstance(folder.getClass().getClassLoader(), new Class[]{Folder.class}, new FolderProxy(view, locatorName, parentFolder, folder, forceReservedVisible));
     }
@@ -225,7 +225,7 @@
      * @param folder proxy delegate
      * @param forceReservedVisible suppress reserved/hidden folder visibility checks
      */
-    private FolderProxy(SiteView view, String locatorName, Folder parentFolder, Folder folder, boolean forceReservedVisible)
+    private FolderProxy(SearchPathsSiteView view, String locatorName, Folder parentFolder, Folder folder, boolean forceReservedVisible)
     {
         super(view, locatorName, parentFolder, folder.getName(), folder.isHidden());
         this.defaultFolder = selectDefaultFromAggregateFolders(folder);
@@ -780,6 +780,7 @@
      *                               part of the view are by definition
      *                               accessible
      *
+     * @param folderName name of child folder to check
      * @throws SecurityException if view access to folder not granted
      */
     public void checkAccessToFolderNotFound(String folderName)

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/DynamicPageProxy.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/DynamicPageProxy.java?rev=920191&r1=920190&r2=920191&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/DynamicPageProxy.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/DynamicPageProxy.java Mon Mar  8 03:54:17 2010
@@ -25,7 +25,7 @@
 import org.apache.jetspeed.om.folder.proxy.FolderProxy;
 import org.apache.jetspeed.om.page.DynamicPage;
 import org.apache.jetspeed.page.document.proxy.NodeProxy;
-import org.apache.jetspeed.portalsite.view.SiteView;
+import org.apache.jetspeed.portalsite.view.SearchPathsSiteView;
 
 /**
  * This class proxies PSML DynamicPage instances to create a logical
@@ -55,7 +55,7 @@
      * @param parentFolder view parent proxy folder
      * @param dynamicPage proxy delegate
      */
-    public static DynamicPage newInstance(SiteView view, String locatorName, Folder parentFolder, DynamicPage dynamicPage)
+    public static DynamicPage newInstance(SearchPathsSiteView view, String locatorName, Folder parentFolder, DynamicPage dynamicPage)
     {
         return (DynamicPage)Proxy.newProxyInstance(dynamicPage.getClass().getClassLoader(), new Class[]{DynamicPage.class}, new DynamicPageProxy(view, locatorName, parentFolder, dynamicPage));
     }
@@ -69,7 +69,7 @@
      * @param parentFolder view parent proxy folder
      * @param dynamicPage proxy delegate
      */
-    private DynamicPageProxy(SiteView view, String locatorName, Folder parentFolder, DynamicPage dynamicPage)
+    private DynamicPageProxy(SearchPathsSiteView view, String locatorName, Folder parentFolder, DynamicPage dynamicPage)
     {
         super(view, locatorName, parentFolder, dynamicPage.getName(), dynamicPage.isHidden());
         this.dynamicPage = dynamicPage;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/FragmentDefinitionProxy.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/FragmentDefinitionProxy.java?rev=920191&r1=920190&r2=920191&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/FragmentDefinitionProxy.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/FragmentDefinitionProxy.java Mon Mar  8 03:54:17 2010
@@ -24,7 +24,7 @@
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.page.FragmentDefinition;
 import org.apache.jetspeed.page.document.proxy.NodeProxy;
-import org.apache.jetspeed.portalsite.view.SiteView;
+import org.apache.jetspeed.portalsite.view.SearchPathsSiteView;
 
 /**
  * This class proxies PSML FragmentDefinition instances to create
@@ -49,7 +49,7 @@
      * @param parentFolder view parent proxy folder
      * @param fragmentDefinition proxy delegate
      */
-    public static FragmentDefinition newInstance(SiteView view, String locatorName, Folder parentFolder, FragmentDefinition fragmentDefinition)
+    public static FragmentDefinition newInstance(SearchPathsSiteView view, String locatorName, Folder parentFolder, FragmentDefinition fragmentDefinition)
     {
         return (FragmentDefinition)Proxy.newProxyInstance(fragmentDefinition.getClass().getClassLoader(), new Class[]{FragmentDefinition.class}, new FragmentDefinitionProxy(view, locatorName, parentFolder, fragmentDefinition));
     }
@@ -63,7 +63,7 @@
      * @param parentFolder view parent proxy folder
      * @param fragmentDefinition proxy delegate
      */
-    private FragmentDefinitionProxy(SiteView view, String locatorName, Folder parentFolder, FragmentDefinition fragmentDefinition)
+    private FragmentDefinitionProxy(SearchPathsSiteView view, String locatorName, Folder parentFolder, FragmentDefinition fragmentDefinition)
     {
         super(view, locatorName, parentFolder, fragmentDefinition.getName(), false);
         this.fragmentDefinition = fragmentDefinition;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/LinkProxy.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/LinkProxy.java?rev=920191&r1=920190&r2=920191&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/LinkProxy.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/LinkProxy.java Mon Mar  8 03:54:17 2010
@@ -24,7 +24,7 @@
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.page.Link;
 import org.apache.jetspeed.page.document.proxy.NodeProxy;
-import org.apache.jetspeed.portalsite.view.SiteView;
+import org.apache.jetspeed.portalsite.view.SearchPathsSiteView;
 
 /**
  * This class proxies PSML Link instances to create a logical view
@@ -49,7 +49,7 @@
      * @param parentFolder view parent proxy folder
      * @param link proxy delegate
      */
-    public static Link newInstance(SiteView view, String locatorName, Folder parentFolder, Link link)
+    public static Link newInstance(SearchPathsSiteView view, String locatorName, Folder parentFolder, Link link)
     {
         return (Link)Proxy.newProxyInstance(link.getClass().getClassLoader(), new Class[]{Link.class}, new LinkProxy(view, locatorName, parentFolder, link));
     }
@@ -63,7 +63,7 @@
      * @param parentFolder view parent proxy folder
      * @param link proxy delegate
      */
-    private LinkProxy(SiteView view, String locatorName, Folder parentFolder, Link link)
+    private LinkProxy(SearchPathsSiteView view, String locatorName, Folder parentFolder, Link link)
     {
         super(view, locatorName, parentFolder, link.getName(), link.isHidden());
         this.link = link;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/PageProxy.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/PageProxy.java?rev=920191&r1=920190&r2=920191&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/PageProxy.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/PageProxy.java Mon Mar  8 03:54:17 2010
@@ -25,7 +25,7 @@
 import org.apache.jetspeed.om.folder.proxy.FolderProxy;
 import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.page.document.proxy.NodeProxy;
-import org.apache.jetspeed.portalsite.view.SiteView;
+import org.apache.jetspeed.portalsite.view.SearchPathsSiteView;
 
 /**
  * This class proxies PSML Page instances to create a logical view
@@ -55,7 +55,7 @@
      * @param parentFolder view parent proxy folder
      * @param page proxy delegate
      */
-    public static Page newInstance(SiteView view, String locatorName, Folder parentFolder, Page page)
+    public static Page newInstance(SearchPathsSiteView view, String locatorName, Folder parentFolder, Page page)
     {
         return (Page)Proxy.newProxyInstance(page.getClass().getClassLoader(), new Class[]{Page.class}, new PageProxy(view, locatorName, parentFolder, page));
     }
@@ -69,7 +69,7 @@
      * @param parentFolder view parent proxy folder
      * @param page proxy delegate
      */
-    private PageProxy(SiteView view, String locatorName, Folder parentFolder, Page page)
+    private PageProxy(SearchPathsSiteView view, String locatorName, Folder parentFolder, Page page)
     {
         super(view, locatorName, parentFolder, page.getName(), page.isHidden());
         this.page = page;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/PageTemplateProxy.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/PageTemplateProxy.java?rev=920191&r1=920190&r2=920191&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/PageTemplateProxy.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/page/proxy/PageTemplateProxy.java Mon Mar  8 03:54:17 2010
@@ -24,7 +24,7 @@
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.page.PageTemplate;
 import org.apache.jetspeed.page.document.proxy.NodeProxy;
-import org.apache.jetspeed.portalsite.view.SiteView;
+import org.apache.jetspeed.portalsite.view.SearchPathsSiteView;
 
 /**
  * This class proxies PSML PageTemplate instances to create a logical
@@ -54,7 +54,7 @@
      * @param parentFolder view parent proxy folder
      * @param pageTemplate proxy delegate
      */
-    public static PageTemplate newInstance(SiteView view, String locatorName, Folder parentFolder, PageTemplate pageTemplate)
+    public static PageTemplate newInstance(SearchPathsSiteView view, String locatorName, Folder parentFolder, PageTemplate pageTemplate)
     {
         return (PageTemplate)Proxy.newProxyInstance(pageTemplate.getClass().getClassLoader(), new Class[]{PageTemplate.class}, new PageTemplateProxy(view, locatorName, parentFolder, pageTemplate));
     }
@@ -68,7 +68,7 @@
      * @param parentFolder view parent proxy folder
      * @param pageTemplate proxy delegate
      */
-    private PageTemplateProxy(SiteView view, String locatorName, Folder parentFolder, PageTemplate pageTemplate)
+    private PageTemplateProxy(SearchPathsSiteView view, String locatorName, Folder parentFolder, PageTemplate pageTemplate)
     {
         super(view, locatorName, parentFolder, pageTemplate.getName(), false);
         this.pageTemplate = pageTemplate;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/page/document/proxy/NodeProxy.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/page/document/proxy/NodeProxy.java?rev=920191&r1=920190&r2=920191&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/page/document/proxy/NodeProxy.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/page/document/proxy/NodeProxy.java Mon Mar  8 03:54:17 2010
@@ -28,9 +28,10 @@
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.folder.MenuDefinition;
 import org.apache.jetspeed.page.document.Node;
-import org.apache.jetspeed.portalsite.view.SiteView;
+import org.apache.jetspeed.portalsite.view.SearchPathsSiteView;
 import org.apache.jetspeed.portalsite.view.SiteViewMenuDefinitionLocator;
-import org.apache.jetspeed.portalsite.view.SiteViewProxy;
+import org.apache.jetspeed.portalsite.view.SearchPathsSiteViewProxy;
+import org.apache.jetspeed.portalsite.view.SiteViewUtils;
 
 /**
  * This class proxies Node instances to create a logical
@@ -39,7 +40,7 @@
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-public abstract class NodeProxy extends SiteViewProxy
+public abstract class NodeProxy extends SearchPathsSiteViewProxy
 {
     /**
      * URL_ENCODING - the name of a character encoding to be used in encoding path component name.
@@ -111,7 +112,7 @@
      * @param name name of node to proxy
      * @param hidden hidden status of node to proxy
      */
-    protected NodeProxy(SiteView view, String locatorName, Folder parent, String name, boolean hidden)
+    protected NodeProxy(SearchPathsSiteView view, String locatorName, Folder parent, String name, boolean hidden)
     {
         super(view, locatorName);
         this.parent = parent;
@@ -238,143 +239,59 @@
     }
 
     /**
-     * getMenuDefinitionLocator - get menu definition locator by name
-     *
-     * @param name menu definition name
-     * @return menu definition locator
-     */
-    public SiteViewMenuDefinitionLocator getMenuDefinitionLocator(String name)
-    {
-        // get menu definition locators and find by name
-        List locators = getMenuDefinitionLocators();
-        if (locators != null)
-        {
-            return findMenuDefinitionLocator(name);
-        }
-        return null;
-    }
-
-    /**
-     * aggregateMenuDefinitionLocators - aggregate all menu definition locators
-     *                                   in site view for this folder or page
-     */
-    protected void aggregateMenuDefinitionLocators()
-    {
-        // no menu definition locators by default
-    }
-
-    /**
-     * mergeMenuDefinitionLocators - utilty to merge menu definition locator lists
+     * mergeMenuDefinitionLocators - utility to merge menu definition locator lists
      *                               to be used by derived implementations to aggregate
      *                               menu definition locators
      *
-     * @param definitions list of menu definitions to merge
-     * @param node page or folder node that defines menu definitions
-     * @param override menu definition flag
+     * @param locators list of menu definition locators to merge
+     * @param node node view
+     * @param override override menu definition
      */
-    protected void mergeMenuDefinitionLocators(List definitions, Node node, boolean override)
+    public void mergeMenuDefinitionLocators(List definitions, Node node, boolean override)
     {
         // merge definitions into aggregated menu definition
         // locators if defined
-        if (definitions != null)
-        {
-            Iterator definitionsIter = definitions.iterator();
-            while (definitionsIter.hasNext())
-            {
-                // aggregate menu definition by valid name
-                MenuDefinition definition = (MenuDefinition)definitionsIter.next();
-                String definitionName = definition.getName();
-                if (definitionName != null)
-                {
-                    // add unique menu definition to end of
-                    // ordered menu definition locators list
-                    if (!menuDefinitionLocatorsContains(definitionName))
-                    {
-                        if (menuDefinitionLocators == null)
-                        {
-                            menuDefinitionLocators = Collections.synchronizedList(new ArrayList(definitions.size() * 2));
-                        }
-                        menuDefinitionLocators.add(new SiteViewMenuDefinitionLocator(definition, node, override));
-                    }
-                    else if (override)
-                    {
-                        throw new RuntimeException("Override menu definitions must be merged/added before others!");
-                    }
-                }
-            }
-        }
+        menuDefinitionLocators = SiteViewUtils.mergeMenuDefinitionLocators(definitions, node, override, menuDefinitionLocators);
     }
 
     /**
-     * mergeMenuDefinitionLocators - utilty to merge menu definition locator lists
+     * mergeMenuDefinitionLocators - utility to merge menu definition locator lists
      *                               to be used by derived implementations to aggregate
      *                               menu definition locators
      *
      * @param locators list of menu definition locators to merge
      */
-    protected void mergeMenuDefinitionLocators(List locators)
+    public void mergeMenuDefinitionLocators(List locators)
     {
         // merge locators into aggregated menu definition
         // locators if defined
-        if (locators != null)
-        {
-            Iterator locatorsIter = locators.iterator();
-            while (locatorsIter.hasNext())
-            {
-                // aggregate menu definition by valid name
-                SiteViewMenuDefinitionLocator locator = (SiteViewMenuDefinitionLocator)locatorsIter.next();
-                String definitionName = locator.getName();
-
-                // add unique menu definition to end of
-                // ordered menu definition locators list
-                if (!menuDefinitionLocatorsContains(definitionName))
-                {
-                    if (menuDefinitionLocators == null)
-                    {
-                        menuDefinitionLocators = Collections.synchronizedList(new ArrayList(locators.size() * 2));
-                    }
-                    menuDefinitionLocators.add(locator);
-                }
-            }
-        }
+        menuDefinitionLocators = SiteViewUtils.mergeMenuDefinitionLocators(locators, menuDefinitionLocators);
     }
-
+    
     /**
-     * menuDefinitionLocatorsContains - contains test for menu definition locators by name
+     * getMenuDefinitionLocator - get menu definition locator by name
      *
      * @param name menu definition name
-     * @return contains name result
+     * @return menu definition locator
      */
-    private boolean menuDefinitionLocatorsContains(String name)
+    public SiteViewMenuDefinitionLocator getMenuDefinitionLocator(String name)
     {
-        // test for matching name in menu definition locators
-        return (findMenuDefinitionLocator(name) != null);
+        // get menu definition locators and find by name
+        List locators = getMenuDefinitionLocators();
+        if (locators != null)
+        {
+            return SiteViewUtils.findMenuDefinitionLocator(locators, name);
+        }
+        return null;
     }
 
     /**
-     * findMenuDefinitionLocator - find menu definition locator by name
-     *
-     * @param name menu definition name
-     * @return menu definition locator
+     * aggregateMenuDefinitionLocators - aggregate all menu definition locators
+     *                                   in site view for this folder or page
      */
-    private SiteViewMenuDefinitionLocator findMenuDefinitionLocator(String name)
+    protected void aggregateMenuDefinitionLocators()
     {
-        // find matching menu definition locator by name
-        if ((menuDefinitionLocators != null) && (name != null))
-        {
-            synchronized (menuDefinitionLocators) {
-                Iterator locatorsIter = menuDefinitionLocators.iterator();
-                while (locatorsIter.hasNext())
-                {
-                    SiteViewMenuDefinitionLocator locator = (SiteViewMenuDefinitionLocator)locatorsIter.next();
-                    if (name.equals(locator.getName()))
-                    {
-                        return locator;
-                    }
-                }
-            }
-        }
-        return null;
+        // no menu definition locators by default
     }
 
     /**

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuElementImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuElementImpl.java?rev=920191&r1=920190&r2=920191&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuElementImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuElementImpl.java Mon Mar  8 03:54:17 2010
@@ -26,7 +26,7 @@
 import org.apache.jetspeed.page.document.Node;
 import org.apache.jetspeed.portalsite.Menu;
 import org.apache.jetspeed.portalsite.MenuElement;
-import org.apache.jetspeed.portalsite.view.SiteView;
+import org.apache.jetspeed.portalsite.view.AbstractSiteView;
 
 /**
  * This abstract class implements common features of portal-site
@@ -38,9 +38,9 @@
 public abstract class MenuElementImpl implements MenuElement, Cloneable
 {
     /**
-     * view - site view this proxy is part of
+     * view - site view this menu element is part of
      */
-    private SiteView view;
+    private AbstractSiteView view;
 
     /**
      * parentMenu - parent menu implementation
@@ -48,7 +48,7 @@
     private MenuImpl parent;
 
     /**
-     * node - underlying node proxy associated with this
+     * node - underlying node view associated with this
      *        menu element in the site view
      */
     private Node node;
@@ -71,20 +71,20 @@
      * @param view site view used to construct menu element
      * @param parent containing menu implementation
      */
-    protected MenuElementImpl(SiteView view, MenuImpl parent)
+    protected MenuElementImpl(AbstractSiteView view, MenuImpl parent)
     {
         this.view = view;
         this.parent = parent;
     }
 
     /**
-     * MenuElementImpl - node proxy constructor
+     * MenuElementImpl - node view constructor
      *
      * @param view site view used to construct menu element
      * @param parent containing menu implementation
-     * @param node menu element node proxy
+     * @param node menu element node view
      */
-    protected MenuElementImpl(SiteView view, MenuImpl parent, Node node)
+    protected MenuElementImpl(AbstractSiteView view, MenuImpl parent, Node node)
     {
         this(view, parent);
         this.node = node;
@@ -143,7 +143,7 @@
      *
      * @return site view
      */
-    protected SiteView getView()
+    protected AbstractSiteView getView()
     {
         return view;
     }
@@ -294,9 +294,9 @@
     }
 
     /**
-     * getNode - get menu element node proxy in the site view
+     * getNode - get menu element node in the site view
      *
-     * @return node proxy
+     * @return node view
      */
     public Node getNode()
     {
@@ -304,9 +304,9 @@
     } 
 
     /**
-     * setNode - set menu element node proxy in the site view
+     * setNode - set menu element node in the site view
      *
-     * @param node node proxy
+     * @param node node view
      */
     protected void setNode(Node node)
     {
@@ -342,7 +342,6 @@
      */
     public Node getManagedNode()
     {
-        SiteView view = getView();
         if (view != null)
         {
             Node node = getNode();

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=920191&r1=920190&r2=920191&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 Mon Mar  8 03:54:17 2010
@@ -42,7 +42,7 @@
 import org.apache.jetspeed.portalsite.PortalSiteRequestContext;
 import org.apache.jetspeed.portalsite.menu.DefaultMenuDefinition;
 import org.apache.jetspeed.portalsite.menu.DefaultMenuOptionsDefinition;
-import org.apache.jetspeed.portalsite.view.SiteView;
+import org.apache.jetspeed.portalsite.view.AbstractSiteView;
 
 /**
  * This class implements the portal-site menu elements
@@ -60,7 +60,7 @@
 
     /**
      * elements - ordered list of menu elements that
-     *            make up this instaniated menu
+     *            make up this instantiated menu
      */
     private List elements;
 
@@ -107,21 +107,21 @@
      * @param context request context
      * @param menus related menu definition names set
      */
-    protected MenuImpl(SiteView view, MenuImpl parent, MenuDefinition definition, PortalSiteRequestContextImpl context, Set menus)
+    protected MenuImpl(AbstractSiteView view, MenuImpl parent, MenuDefinition definition, PortalSiteRequestContextImpl context, Set menus)
     {
         super(view, parent);
         this.definition = definition;
         if (view != null)
         {
             // define menu node for titles and metadata if options
-            // specifies a single visible page or folder proxy
+            // specifies a single visible page or folder view
             String options = definition.getOptions();
-            Node optionProxy = null;
+            Node optionView = null;
             if ((options != null) && (options.indexOf(',') == -1))
             {
                 try
                 {
-                    optionProxy = view.getNodeProxy(options, context.getPage(), true, true);
+                    optionView = view.getNodeView(options, context.getPage(), true, true);
                 }
                 catch (NodeNotFoundException nnfe)
                 {
@@ -129,9 +129,9 @@
                 catch (SecurityException se)
                 {
                 }
-                if (optionProxy != null)
+                if (optionView != null)
                 {
-                    setNode(optionProxy);
+                    setNode(optionView);
                 }
             }
 
@@ -140,14 +140,14 @@
             // menu elements override menu options attribute
             if ((definition.getMenuElements() == null) || definition.getMenuElements().isEmpty())
             {
-                // if options optionProxy is a single folder, force
+                // if options optionView is a single folder, force
                 // options to include all folder children if not to
                 // be expanded with paths and depth inclusion is
                 // specified
-                List overrideOptionProxies = null;
-                if (optionProxy != null)
+                List overrideOptionViews = null;
+                if (optionView != null)
                 {
-                    if ((optionProxy instanceof Folder) && !definition.isPaths() && (definition.getDepth() != 0))
+                    if ((optionView instanceof Folder) && !definition.isPaths() && (definition.getDepth() != 0))
                     {
                         // assemble folder children path using wildcard
                         String folderChildrenPath = null;
@@ -165,7 +165,7 @@
                         List folderChildren = null;
                         try
                         {
-                            folderChildren = view.getNodeProxies(folderChildrenPath, context.getPage(), true, true);
+                            folderChildren = view.getNodeViews(folderChildrenPath, context.getPage(), true, true);
                         }
                         catch (NodeNotFoundException nnfe)
                         {
@@ -175,7 +175,7 @@
                         }
                         if ((folderChildren != null) && !folderChildren.isEmpty())
                         {
-                            overrideOptionProxies = folderChildren;
+                            overrideOptionViews = folderChildren;
                         }
                         else
                         {
@@ -185,16 +185,16 @@
                     else
                     {
                         // override menu options with single folder/page/link
-                        overrideOptionProxies = new ArrayList(1);
-                        overrideOptionProxies.add(optionProxy);
+                        overrideOptionViews = new ArrayList(1);
+                        overrideOptionViews.add(optionView);
                     }
                     
                     // set relative element flag if options path is relative
-                    this.elementRelative = (this.elementRelative || !options.startsWith(Folder.PATH_SEPARATOR) || options.contains(SiteView.ALT_CURRENT_PAGE_PATH));
+                    this.elementRelative = (this.elementRelative || !options.startsWith(Folder.PATH_SEPARATOR) || options.contains(AbstractSiteView.ALT_CURRENT_PAGE_PATH));
                 }
 
                 // menu defined only with menu definition options
-                this.elements = constructMenuElements(view, context, options, overrideOptionProxies, definition.getDepth(), definition.isPaths(), definition.isRegexp(), definition.getProfile(), definition.getOrder());
+                this.elements = constructMenuElements(view, context, options, overrideOptionViews, definition.getDepth(), definition.isPaths(), definition.isRegexp(), definition.getProfile(), definition.getOrder());
             }
             else
             {
@@ -555,42 +555,42 @@
      * @param context request context
      * @param view context site view
      * @param options option paths specification
-     * @param overrideElementProxies override menu element node proxies
+     * @param overrideElementViews override menu element node views
      * @param depth inclusion depth
      * @param paths paths elements flag
      * @param regexp regexp flag
      * @param locatorName profile locator name
      * @param order ordering patterns list
      */
-    private List constructMenuElements(SiteView view, PortalSiteRequestContextImpl context, String options, List overrideElementProxies, int depth, boolean paths, boolean regexp, String locatorName, String order)
+    private List constructMenuElements(AbstractSiteView view, PortalSiteRequestContextImpl context, String options, List overrideElementViews, int depth, boolean paths, boolean regexp, String locatorName, String order)
     {
         if (options != null)
         {
-            // use override element proxies if specified; otherwise
-            // compute proxy list using specified menu options
-            List elementProxies = overrideElementProxies;
-            if (elementProxies == null)
+            // use override element views if specified; otherwise
+            // compute view list using specified menu options
+            List elementViews = overrideElementViews;
+            if (elementViews == null)
             {
                 // split multiple comma separated option paths from specified options 
                 String [] optionPaths = options.split(",");
                 
                 // use regexp processing if specified or simple
-                // path evaluation to retrieve list of proxies from
+                // path evaluation to retrieve list of views from
                 // the site view for the specified options
                 for (int i = 0; (i < optionPaths.length); i++)
                 {
                     String optionPath = optionPaths[i].trim();
                     if (optionPath.length() > 0)
                     {
-                        // get proxies/proxy for path
+                        // get views/view for path
                         if (regexp)
                         {
-                            // get list of visible proxies for path from view and append
+                            // get list of visible views for path from view and append
                             // to list if unique and pass profile locator name filter
-                            List pathProxies = null;
+                            List pathViews = null;
                             try
                             {
-                                pathProxies = view.getNodeProxies(optionPath, context.getPage(), true, true);
+                                pathViews = view.getNodeViews(optionPath, context.getPage(), true, true);
                             }
                             catch (NodeNotFoundException nnfe)
                             {
@@ -598,32 +598,32 @@
                             catch (SecurityException se)
                             {
                             }
-                            if (pathProxies != null)
+                            if (pathViews != null)
                             {
-                                Iterator pathProxiesIter = pathProxies.iterator();
-                                while (pathProxiesIter.hasNext())
+                                Iterator pathViewsIter = pathViews.iterator();
+                                while (pathViewsIter.hasNext())
                                 {
-                                    Node pathProxy = (Node)pathProxiesIter.next();
+                                    Node pathView = (Node)pathViewsIter.next();
                                     if ((locatorName == null) || locatorName.equals(MenuOptionsDefinition.ANY_PROFILE_LOCATOR) ||
-                                        locatorName.equals(view.getProfileLocatorName(pathProxy)))
+                                        locatorName.equals(view.getProfileLocatorName(pathView)))
                                     {
-                                        if (elementProxies == null)
+                                        if (elementViews == null)
                                         {
-                                            elementProxies = new ArrayList();
+                                            elementViews = new ArrayList();
                                         }
-                                        appendMenuElementProxies(pathProxy, elementProxies);
+                                        appendMenuElementViews(pathView, elementViews);
                                     }
                                 }
                             }
                         }
                         else
                         {
-                            // get visible proxy for path from view and append to
+                            // get visible view for path from view and append to
                             // list if unique and pass profile locator name filter
-                            Node pathProxy = null;
+                            Node pathView = null;
                             try
                             {
-                                pathProxy = view.getNodeProxy(optionPath, context.getPage(), true, true);
+                                pathView = view.getNodeView(optionPath, context.getPage(), true, true);
                             }
                             catch (NodeNotFoundException nnfe)
                             {
@@ -631,43 +631,43 @@
                             catch (SecurityException se)
                             {
                             }
-                            if ((pathProxy != null) &&
+                            if ((pathView != null) &&
                                 ((locatorName == null) || locatorName.equals(MenuOptionsDefinition.ANY_PROFILE_LOCATOR) ||
-                                 locatorName.equals(view.getProfileLocatorName(pathProxy))))
+                                 locatorName.equals(view.getProfileLocatorName(pathView))))
                             {
-                                if (elementProxies == null)
+                                if (elementViews == null)
                                 {
-                                    elementProxies = new ArrayList();
+                                    elementViews = new ArrayList();
                                 }
-                                appendMenuElementProxies(pathProxy, elementProxies);
+                                appendMenuElementViews(pathView, elementViews);
                             }
                         }
 
                         // set relative element flag if path is relative
-                        elementRelative = (elementRelative || !optionPath.startsWith(Folder.PATH_SEPARATOR) || options.contains(SiteView.ALT_CURRENT_PAGE_PATH));
+                        elementRelative = (elementRelative || !optionPath.startsWith(Folder.PATH_SEPARATOR) || options.contains(AbstractSiteView.ALT_CURRENT_PAGE_PATH));
                     }
                 }
 
-                // return if no proxies available
-                if (elementProxies == null)
+                // return if no views available
+                if (elementViews == null)
                 {
                     return null;
                 }
             }
             
-            // sort elements proxies using url and/or names if order
-            // specified and more than one element proxy in list
-            if ((order != null) && (elementProxies.size() > 1))
+            // sort elements views using url and/or names if order
+            // specified and more than one element view in list
+            if ((order != null) && (elementViews.size() > 1))
             {
-                // create ordered element proxies
-                List orderedElementProxies = new ArrayList(elementProxies.size());
+                // create ordered element views
+                List orderedElementViews = new ArrayList(elementViews.size());
                 
                 // split multiple comma separated elements orderings
                 // after converted to regexp pattern
                 String [] orderings = orderRegexpPattern(order).split(",");
                 
-                // copy ordered proxies per ordering
-                for (int i=0; ((i < orderings.length) && (elementProxies.size() > 1)); i++)
+                // copy ordered views per ordering
+                for (int i=0; ((i < orderings.length) && (elementViews.size() > 1)); i++)
                 {
                     String ordering = orderings[i].trim();
                     if (ordering.length() > 0)
@@ -677,22 +677,22 @@
                         Matcher matcher = null;
                         
                         // use regular expression to match urls or names of
-                        // element proxies; matched proxies are removed and
-                        // placed in the ordered elements proxies list
-                        Iterator elementProxiesIter = elementProxies.iterator();
-                        while (elementProxiesIter.hasNext())
+                        // element views; matched views are removed and
+                        // placed in the ordered elements views list
+                        Iterator elementViewsIter = elementViews.iterator();
+                        while (elementViewsIter.hasNext())
                         {
-                            Node elementProxy = (Node)elementProxiesIter.next(); 
+                            Node elementView = (Node)elementViewsIter.next(); 
                             
                             // get url or name to test ordering match against
                             String test = null;
                             if (ordering.charAt(0) == Folder.PATH_SEPARATOR_CHAR)
                             {
-                                test = elementProxy.getUrl();
+                                test = elementView.getUrl();
                             }
                             else
                             {
-                                test = elementProxy.getName();
+                                test = elementView.getName();
                             }
                             
                             // construct or reset ordering matcher
@@ -705,51 +705,51 @@
                                 matcher.reset(test);
                             }
                             
-                            // move proxy to ordered list if matched
+                            // move view to ordered list if matched
                             if (matcher.matches())
                             {
-                                orderedElementProxies.add(elementProxy);
-                                elementProxiesIter.remove();
+                                orderedElementViews.add(elementView);
+                                elementViewsIter.remove();
                             }
                         }
                     }
                 }
                 
-                // copy remaining unordered proxies
-                orderedElementProxies.addAll(elementProxies);
+                // copy remaining unordered views
+                orderedElementViews.addAll(elementViews);
                 
-                // replace element proxies with ordered list
-                elementProxies = orderedElementProxies;
+                // replace element views with ordered list
+                elementViews = orderedElementViews;
             }
             
-            // expand paths if single page or folder element proxy
+            // expand paths if single page or folder element view
             // has been specified in elements with no depth expansion
-            if (paths && (depth == 0) && (elementProxies.size() == 1) &&
-                ((elementProxies.get(0) instanceof Folder) || (elementProxies.get(0) instanceof Page)))
+            if (paths && (depth == 0) && (elementViews.size() == 1) &&
+                ((elementViews.get(0) instanceof Folder) || (elementViews.get(0) instanceof Page)))
             {
-                Node parentNode = ((Node)elementProxies.get(0)).getParent();
+                Node parentNode = ((Node)elementViews.get(0)).getParent();
                 while (parentNode != null)
                 {
-                    elementProxies.add(0, parentNode);
+                    elementViews.add(0, parentNode);
                     parentNode = parentNode.getParent();
                 }
             }
             
-            // convert elements proxies into menu elements
+            // convert elements views into menu elements
             DefaultMenuOptionsDefinition defaultMenuOptionsDefinition = null;
-            ListIterator elementProxiesIter = elementProxies.listIterator();
-            while (elementProxiesIter.hasNext())
+            ListIterator elementViewsIter = elementViews.listIterator();
+            while (elementViewsIter.hasNext())
             {
-                Node elementProxy = (Node)elementProxiesIter.next();
+                Node elementView = (Node)elementViewsIter.next();
                 MenuElement menuElement = null;
 
                 // convert folders into nested menus if depth specified
                 // with no paths expansion, (negative depth values are
                 // interpreted as complete menu expansion)
-                if ((elementProxy instanceof Folder) && ((depth < 0) || (depth > 1)) && !paths)
+                if ((elementView instanceof Folder) && ((depth < 0) || (depth > 1)) && !paths)
                 {
                     // construct menu definition and associated menu
-                    MenuDefinition nestedMenuDefinition = new DefaultMenuDefinition(elementProxy.getUrl(), depth - 1, locatorName);
+                    MenuDefinition nestedMenuDefinition = new DefaultMenuDefinition(elementView.getUrl(), depth - 1, locatorName);
                     menuElement = new MenuImpl(view, this, nestedMenuDefinition, context, null);
                 }
                 else
@@ -759,15 +759,15 @@
                     {
                         defaultMenuOptionsDefinition = new DefaultMenuOptionsDefinition(options, depth, paths, regexp, locatorName, order);
                     }
-                    menuElement = new MenuOptionImpl(view, this, elementProxy, defaultMenuOptionsDefinition);
+                    menuElement = new MenuOptionImpl(view, this, elementView, defaultMenuOptionsDefinition);
                 }
 
-                // replace element proxy with menu element
-                elementProxiesIter.set(menuElement);
+                // replace element view with menu element
+                elementViewsIter.set(menuElement);
             }
-            List menuElements = elementProxies;
+            List menuElements = elementViews;
 
-            // return list of menu elements constructed from element proxies
+            // return list of menu elements constructed from element views
             return menuElements;
         }
 
@@ -776,19 +776,19 @@
     }
 
     /**
-     * appendMenuElementProxies - append to ordered list of unique menu
-     *                            element proxies
+     * appendMenuElementViews - append to ordered list of unique menu
+     *                          element views
      * 
-     * @param pathProxy menu element page, folder, or link proxy at path
-     * @param elementProxies element proxies list
+     * @param pathView menu element page, folder, or link view at path
+     * @param elementViews element views list
      */
-    private void appendMenuElementProxies(Node pathProxy, List elementProxies)
+    private void appendMenuElementViews(Node pathView, List elementViews)
     {
-        // make sure new proxy is unique and add
-        // to element proxies list
-        if (!elementProxies.contains(pathProxy))
+        // make sure new view is unique and add
+        // to element views list
+        if (!elementViews.contains(pathView))
         {
-            elementProxies.add(pathProxy);
+            elementViews.add(pathView);
         }
     }
     

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=920191&r1=920190&r2=920191&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 Mon Mar  8 03:54:17 2010
@@ -25,7 +25,7 @@
 import org.apache.jetspeed.page.document.NodeNotFoundException;
 import org.apache.jetspeed.portalsite.MenuOption;
 import org.apache.jetspeed.portalsite.PortalSiteRequestContext;
-import org.apache.jetspeed.portalsite.view.SiteView;
+import org.apache.jetspeed.portalsite.view.AbstractSiteView;
 
 /**
  * This class implements the portal-site menu option
@@ -46,10 +46,10 @@
      *
      * @param view site view used to construct menu option
      * @param parent containing menu implementation
-     * @param node menu option node proxy
+     * @param node menu option node view
      * @param definition menu option definition
      */
-    public MenuOptionImpl(SiteView view, MenuImpl parent, Node node, MenuOptionsDefinition definition)
+    public MenuOptionImpl(AbstractSiteView view, MenuImpl parent, Node node, MenuOptionsDefinition definition)
     {
         super(view, parent, node);
         this.definition = definition;
@@ -73,7 +73,7 @@
      */
     public String getType()
     {
-        // return type of menu option node proxy
+        // return type of menu option node view
         Node node = getNode();
         if (node instanceof Page)
         {
@@ -98,7 +98,7 @@
     public String getSkin()
     {
         // get skin from definition, from menu option
-        // node proxy, or inherit from parent menu
+        // node view, or inherit from parent menu
         String skin = definition.getSkin();
         if (skin == null)
         {
@@ -185,8 +185,8 @@
     public boolean isSelected(PortalSiteRequestContext context)
     {
         // compare the site view url of the page or
-        // folder menu option proxy with the url of
-        // the context request profiled page proxy
+        // folder menu option view with the url of
+        // the context request profiled page view
         if (context != null)
         {
             // get request page

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuSeparatorImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuSeparatorImpl.java?rev=920191&r1=920190&r2=920191&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuSeparatorImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuSeparatorImpl.java Mon Mar  8 03:54:17 2010
@@ -21,7 +21,7 @@
 import org.apache.jetspeed.om.folder.MenuSeparatorDefinition;
 import org.apache.jetspeed.om.portlet.GenericMetadata;
 import org.apache.jetspeed.portalsite.MenuSeparator;
-import org.apache.jetspeed.portalsite.view.SiteView;
+import org.apache.jetspeed.portalsite.view.AbstractSiteView;
 
 /**
  * This class implements the portal-site menu separator
@@ -44,7 +44,7 @@
      * @param parent containing menu implementation
      * @param definition menu separator definition
      */
-    public MenuSeparatorImpl(SiteView view, MenuImpl parent, MenuSeparatorDefinition definition)
+    public MenuSeparatorImpl(AbstractSiteView view, MenuImpl parent, MenuSeparatorDefinition definition)
     {
         super(view, parent);
         this.definition = definition;

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=920191&r1=920190&r2=920191&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 Mon Mar  8 03:54:17 2010
@@ -61,6 +61,16 @@
     private Map requestProfileLocators;
 
     /**
+     * requestPath - request path if not using profile locators
+     */
+    private String requestPath;
+    
+    /**
+     * requestServerName - request server name if not using profile locators
+     */
+    private String requestServerName;
+        
+    /**
      * requestFallback - flag indicating whether request should fallback to root folder
      *                   if locators do not select a page or access is forbidden
      */
@@ -78,7 +88,7 @@
     private boolean forceReservedVisible;
 
     /**
-     * requestPage - cached request profiled page proxy
+     * requestPage - cached request profiled page view
      */
     private BaseConcretePageElement requestPage;
     
@@ -88,57 +98,57 @@
     private String requestPageContentPath;
     
     /**
-     * requestPageTemplate - cached request page template proxy
+     * requestPageTemplate - cached request page template view
      */
     private PageTemplate requestPageTemplate;
 
     /**
-     * requestPageTemplateCached - cached flag for request page template proxy
+     * requestPageTemplateCached - cached flag for request page template view
      */
     private boolean requestPageTemplateCached;
 
     /**
-     * requestFragmentDefinitions - cached request request fragment definition proxies map
+     * requestFragmentDefinitions - cached request request fragment definition views map
      */
     private Map requestFragmentDefinitions;
 
     /**
-     * requestFragmentDefinitionsCached - cached flag for request fragment definition proxies map
+     * requestFragmentDefinitionsCached - cached flag for request fragment definition views map
      */
     private boolean requestFragmentDefinitionsCached;
 
     /**
-     * siblingPages - cached node set of visible sibling page proxies
+     * siblingPages - cached node set of visible sibling page views
      */
     private NodeSet siblingPages;
 
     /**
-     * siblingPagesCached - cached flag for sibling page proxies
+     * siblingPagesCached - cached flag for sibling page views
      */
     private boolean siblingPagesCached;
 
     /**
-     * siblingFolders - cached node set of visible sibling folder proxies
+     * siblingFolders - cached node set of visible sibling folder views
      */
     private NodeSet siblingFolders;
 
     /**
-     * siblingFoldersCached - cached flag for sibling folder proxies
+     * siblingFoldersCached - cached flag for sibling folder views
      */
     private boolean siblingFoldersCached;
 
     /**
-     * rootFolder - cached request profiled root folder proxy
+     * rootFolder - cached request profiled root folder view
      */
     private Folder requestRootFolder;
 
     /**
-     * rootLinks - cached node set of visible link proxies
+     * rootLinks - cached node set of visible link views
      */
     private NodeSet rootLinks;
 
     /**
-     * rootLinksCached - cached flag for link proxies
+     * rootLinksCached - cached flag for link views
      */
     private boolean rootLinksCached;
 
@@ -164,8 +174,7 @@
      *                   history to select default page per site folder
      * @param forceReservedVisible force reserved/hidden folders visible in site view
      */
-    public PortalSiteRequestContextImpl(PortalSiteSessionContextImpl sessionContext, Map requestProfileLocators,
-                                        boolean requestFallback, boolean useHistory, boolean forceReservedVisible)
+    public PortalSiteRequestContextImpl(PortalSiteSessionContextImpl sessionContext, Map requestProfileLocators, boolean requestFallback, boolean useHistory, boolean forceReservedVisible)
     {
         this.sessionContext = sessionContext;
         this.requestProfileLocators = requestProfileLocators;
@@ -184,8 +193,7 @@
      * @param useHistory flag indicating whether to use visited page
      *                   history to select default page per site folder
      */
-    public PortalSiteRequestContextImpl(PortalSiteSessionContextImpl sessionContext, Map requestProfileLocators,
-                                        boolean requestFallback, boolean useHistory)
+    public PortalSiteRequestContextImpl(PortalSiteSessionContextImpl sessionContext, Map requestProfileLocators, boolean requestFallback, boolean useHistory)
     {
         this(sessionContext, requestProfileLocators, requestFallback, useHistory, false);
     }
@@ -198,8 +206,7 @@
      * @param requestFallback flag specifying whether to fallback to root folder
      *                        if locators do not select a page or access is forbidden
      */
-    public PortalSiteRequestContextImpl(PortalSiteSessionContextImpl sessionContext, Map requestProfileLocators,
-                                        boolean requestFallback)
+    public PortalSiteRequestContextImpl(PortalSiteSessionContextImpl sessionContext, Map requestProfileLocators, boolean requestFallback)
     {
         this(sessionContext, requestProfileLocators, requestFallback, true, false);
     }
@@ -216,6 +223,52 @@
     }
 
     /**
+     * PortalSiteRequestContextImpl - non-profiling constructor
+     *
+     * @param sessionContext session context
+     * @param requestPath request path
+     * @param requestServerName request server name
+     * @param requestFallback flag specifying whether to fallback to root folder
+     *                        if locators do not select a page or access is forbidden
+     * @param useHistory flag indicating whether to use visited page
+     *                   history to select default page per site folder
+     */
+    public PortalSiteRequestContextImpl(PortalSiteSessionContextImpl sessionContext, String requestPath, String requestServerName, boolean requestFallback, boolean useHistory)
+    {
+        this.sessionContext = sessionContext;
+        this.requestPath = requestPath;
+        this.requestServerName = requestServerName;
+        this.requestFallback = requestFallback;
+        this.useHistory = useHistory;
+    }
+
+    /**
+     * PortalSiteRequestContextImpl - non-profiling constructor
+     *
+     * @param sessionContext session context
+     * @param requestPath request path
+     * @param requestServerName request server name
+     * @param requestFallback flag specifying whether to fallback to root folder
+     *                        if locators do not select a page or access is forbidden
+     */
+    public PortalSiteRequestContextImpl(PortalSiteSessionContextImpl sessionContext, String requestPath, String requestServerName, boolean requestFallback)
+    {
+        this(sessionContext, requestPath, requestServerName, requestFallback, true);
+    }
+
+    /**
+     * PortalSiteRequestContextImpl - non-profiling constructor
+     *
+     * @param sessionContext session context
+     * @param requestPath request path
+     * @param requestServerName request server name
+     */
+    public PortalSiteRequestContextImpl(PortalSiteSessionContextImpl sessionContext, String requestPath, String requestServerName)
+    {
+        this(sessionContext, requestPath, requestServerName, true, true);
+    }
+
+    /**
      * getSessionContext - get component session context
      *
      * @return component session context
@@ -273,7 +326,7 @@
      */
     public Map getManagedFragmentDefinitions() throws NodeNotFoundException
     {
-        // convert map of proxies to map of managed fragment definitions
+        // convert map of views to map of managed fragment definitions
         Map fragmentDefinitions = getFragmentDefinitions();
         if (fragmentDefinitions != null)
         {
@@ -309,21 +362,29 @@
     }
 
     /**
-     * getPage - get request profiled page proxy
+     * getPage - get request profiled page view
      *  
-     * @return page proxy
+     * @return page view
      * @throws NodeNotFoundException if page not found
      * @throws SecurityException if page view access not granted
      */
     public BaseConcretePageElement getPage() throws NodeNotFoundException
     {
         // select request page and associated content path from
-        // session context using request profile locators if not
-        // previously cached in this context
+        // session context using request profile locators or
+        // request path and server name if not previously cached
+        // in this context
         if (requestPage == null)
         {
             String [] selectedRequestPageContentPath = new String[]{null};
-            requestPage = sessionContext.selectRequestPage(requestProfileLocators, requestFallback, useHistory, forceReservedVisible, selectedRequestPageContentPath);
+            if (requestProfileLocators != null)
+            {
+                requestPage = sessionContext.selectRequestPage(requestProfileLocators, requestFallback, useHistory, forceReservedVisible, selectedRequestPageContentPath);
+            }
+            else
+            {
+                requestPage = sessionContext.selectRequestPage(requestPath, requestServerName, requestFallback, useHistory, selectedRequestPageContentPath);                
+            }
             if (requestPage != null)
             {
                 requestPageContentPath = selectedRequestPageContentPath[0];
@@ -345,9 +406,9 @@
     }
 
     /**
-     * getPageTemplate - get page template proxy for request profiled page
+     * getPageTemplate - get page template view for request profiled page
      *  
-     * @return page template proxy if found or null
+     * @return page template view if found or null
      * @throws NodeNotFoundException if page not found
      * @throws SecurityException if page view access not granted
      */
@@ -389,10 +450,10 @@
     }
 
     /**
-     * getFragmentDefinitions - get fragment definition proxy map for request
+     * getFragmentDefinitions - get fragment definition view map for request
      *                          profiled page and page template
      *  
-     * @return map of fragment definition proxies by fragment id
+     * @return map of fragment definition views by fragment id
      * @throws NodeNotFoundException if page or fragment definition not found
      * @throws SecurityException if page view access not granted
      */
@@ -498,9 +559,9 @@
     }
 
     /**
-     * getFolder - get folder proxy relative to request profiled page
+     * getFolder - get folder view relative to request profiled page
      *  
-     * @return page folder proxy
+     * @return page folder view
      * @throws NodeNotFoundException if page not found
      * @throws SecurityException if page view access not granted
      */
@@ -516,11 +577,11 @@
     }
 
     /**
-     * getSiblingPages - get node set of sibling page proxies relative
+     * getSiblingPages - get node set of sibling page views relative
      *                   to request profiled page, (includes profiled
-     *                   page proxy)
+     *                   page view)
      *  
-     * @return sibling page proxies
+     * @return sibling page views
      * @throws NodeNotFoundException if page not found
      * @throws SecurityException if page view access not granted
      */
@@ -551,10 +612,10 @@
     }
 
     /**
-     * getParentFolder - get parent folder proxy relative to request
+     * getParentFolder - get parent folder view relative to request
      *                   profiled page
      *  
-     * @return parent folder proxy or null
+     * @return parent folder view or null
      * @throws NodeNotFoundException if page not found
      * @throws SecurityException if page view access not granted
      */
@@ -575,11 +636,11 @@
     }
 
     /**
-     * getSiblingFolders - get node set of sibling folder proxies relative
+     * getSiblingFolders - get node set of sibling folder views relative
      *                     to request profiled page, (includes profiled
-     *                     page folder proxy)
+     *                     page folder view)
      *  
-     * @return sibling folder proxies
+     * @return sibling folder views
      * @throws NodeNotFoundException if page not found
      * @throws SecurityException if page view access not granted
      */
@@ -610,29 +671,36 @@
     }
 
     /**
-     * getRootFolder - get root profiled folder proxy
+     * getRootFolder - get root profiled folder view
      *  
-     * @return parent folder proxy
+     * @return parent folder view
      * @throws NodeNotFoundException if page not found
      * @throws SecurityException if page view access not granted
      */
     public Folder getRootFolder() throws NodeNotFoundException
     {
         // get request root folder from session context
-        // using request profile locators if not previously
-        // cached in this context
+        // using request profile locators or default if not
+        // previously cached in this context
         if (requestRootFolder == null)
         {
-            requestRootFolder = sessionContext.getRequestRootFolder(requestProfileLocators, forceReservedVisible);
+            if (requestProfileLocators != null)
+            {
+                requestRootFolder = sessionContext.getRequestRootFolder(requestProfileLocators, forceReservedVisible);
+            }
+            else
+            {
+                requestRootFolder = sessionContext.getRequestRootFolder();                
+            }
         }
         return requestRootFolder;
     }
 
     /**
-     * getRootLinks - get node set of link proxies relative to
+     * getRootLinks - get node set of link views relative to
      *                profiled root folder
      *  
-     * @return root link proxies
+     * @return root link views
      * @throws NodeNotFoundException if page not found
      * @throws SecurityException if page view access not granted
      */
@@ -844,26 +912,26 @@
     }
 
     /**
-     * filterHiddenNodes - utility to filter hidden node proxies out of node sets
+     * filterHiddenNodes - utility to filter hidden node views out of node sets
      *
-     * @param nodes proxy node set to filter
-     * @return input or filtered proxy node set
+     * @param nodes view node set to filter
+     * @return input or filtered view node set
      */
     private static NodeSet filterHiddenNodes(NodeSet nodes)
     {
         if ((nodes != null) && !nodes.isEmpty())
         {
-            // filter node proxies in node set
+            // filter node views in node set
             List filteredNodes = null;
             Iterator nodesIter = nodes.iterator();
             while (nodesIter.hasNext())
             {
-                // test hidden status of individual node proxies
+                // test hidden status of individual node views
                 Node node = (Node)nodesIter.next();
                 if (node.isHidden())
                 {
                     // if not copying, create new node set
-                    // and copy preceding node proxies
+                    // and copy preceding node views
                     if (filteredNodes == null)
                     {
                         filteredNodes = new ArrayList(nodes.size());
@@ -884,13 +952,13 @@
                 }
                 else if (filteredNodes != null)
                 {
-                    // if copying, copy node proxy to filtered set
+                    // if copying, copy node view to filtered set
                     filteredNodes.add(node);
                 }
             }
 
-            // return filteredNodes node proxies if generated
-            // in new immutable proxy node set
+            // return filteredNodes node views if generated
+            // in new immutable view node set
             if (filteredNodes != null)
             {
                 return new NodeSetImpl(filteredNodes);



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