portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r808138 - in /portals/jetspeed-2/portal/trunk: ./ applications/jetspeed-dependencies/ applications/jetspeed/src/main/webapp/WEB-INF/pages/Administrative/ applications/jetspeed/src/main/webapp/WEB-INF/pages/Public/ applications/jetspeed/src/...
Date Wed, 26 Aug 2009 17:52:19 GMT
Author: taylor
Date: Wed Aug 26 17:52:15 2009
New Revision: 808138

URL: http://svn.apache.org/viewvc?rev=808138&view=rev
Log:
https://issues.apache.org/jira/browse/JS2-1057

Initial implementation of JetspeedToolbox and JetspeedNavigator. Also committing Spaces services, to support new navigation requirements.
In order to get these two portlets to display on all pages without adding them to each and every page, I wrote some prototype code to hack in the portlet references.
I would like to better formulate these hacks into a standard way to lock in columns to all pages globally.
For hacks see:

* jetspeed layout header.vm
* templates columns/layout.vm
* GetPageAction.java (desktop)
* PageAggregator.java
* new psml file as a template, navigation.psml

Added:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template/navigator.psml   (with props)
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/system/env/
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/system/env/public/
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/images/page-layouts.png   (with props)
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/images/page-themes.png   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/
    portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/pom.xml   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/
    portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/
    portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/
    portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/
    portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/
    portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/
    portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/
    portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/EnvironmentImpl.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/SpaceImpl.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java   (with props)
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Dashboard.java   (with props)
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Environment.java   (with props)
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Space.java   (with props)
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java   (with props)
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/spaces.xml   (with props)
Modified:
    portals/jetspeed-2/portal/trunk/applications/jetspeed-dependencies/pom.xml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/Administrative/folder.metadata
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/Public/folder.metadata
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/columns/layout.vm
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/css/styles.css
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/desktop.vm
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/header.vm
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/jetspeed/css/desktop.css
    portals/jetspeed-2/portal/trunk/components/jetspeed-locator/src/main/java/org/apache/jetspeed/locator/JetspeedTemplateLocator.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/administration/PortalAdministrationImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PageAggregatorImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPageAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java
    portals/jetspeed-2/portal/trunk/components/pom.xml
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/locator/TemplateLocator.java
    portals/jetspeed-2/portal/trunk/jetspeed-installer/jetspeed-mvn-database-pom.xml
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-services.xml
    portals/jetspeed-2/portal/trunk/pom.xml

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed-dependencies/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed-dependencies/pom.xml?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed-dependencies/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed-dependencies/pom.xml Wed Aug 26 17:52:15 2009
@@ -109,6 +109,10 @@
     </dependency>
     <dependency>
       <groupId>org.apache.portals.jetspeed-2</groupId>
+      <artifactId>jetspeed-spaces</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.portals.jetspeed-2</groupId>
       <artifactId>jetspeed-serializer</artifactId>
     </dependency>
     <dependency>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/Administrative/folder.metadata
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/Administrative/folder.metadata?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/Administrative/folder.metadata (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/Administrative/folder.metadata Wed Aug 26 17:52:15 2009
@@ -18,12 +18,12 @@
     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/folder-metadata.xsd">
   <title >Jetspeed Administrative Portlets</title>  
+  <metadata name='space-owner' xml:lang='en'>admin</metadata>
   <metadata name="title" xml:lang="fr">Jetspeed Portlets Administratif</metadata>
   <metadata name="title" xml:lang="ja">Jetspeed 管理ポートレット</metadata>
   <metadata name="title" xml:lang="es">Administración de Jetspeed</metadata>
   <metadata name="title" xml:lang="zh">Jetspeed 管理Portlets</metadata>
   <metadata name="title" xml:lang="ko">Jetspeed 관리 포틀릿들</metadata>
-
   <document-order>user-mgt.psml</document-order>
   <document-order>role-mgt.psml</document-order>
   <document-order>group-mgt.psml</document-order>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/Public/folder.metadata
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/Public/folder.metadata?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/Public/folder.metadata (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/Public/folder.metadata Wed Aug 26 17:52:15 2009
@@ -26,6 +26,7 @@
   -->
 
   <title>Public Folders</title>  
+  <metadata name='space-owner' xml:lang='en'>admin</metadata>  
   <metadata name="title" xml:lang="ja">公開フォルダ</metadata>
   <metadata name="title" xml:lang="es">Carpetas públicas</metadata>
   <metadata name="title" xml:lang="zh">公开文件夹</metadata>

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template/navigator.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template/navigator.psml?rev=808138&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template/navigator.psml (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template/navigator.psml Wed Aug 26 17:52:15 2009
@@ -0,0 +1,45 @@
+<?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.
+-->
+<page id="_user-template-navigator.psml"
+    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">
+
+  <fragment id="_jsNavigator-1000" type="layout" name="jetspeed-layouts::VelocityOneColumn">
+    <fragment id="_jsNavigator-1001" type="portlet" name="j2-admin::JetspeedNavigator">
+  	        <property name="z" value="201.0"></property>
+            <property name="row" value="1"></property>
+            <property name="width" value="267.0"></property>
+            <property name="height" value="388.0"></property>
+            <property name="column" value="0"></property>
+            <property name="y" value="104.0"></property>
+            <property name="x" value="1.0"></property>
+            <property name="jsdesktop" value="staticpos=false;fitheight=false"></property>                        
+    </fragment>
+    <fragment id="_jsToolbox-1001" type="portlet" name="j2-admin::JetspeedToolbox">
+  	        <property name="z" value="201.0"></property>
+            <property name="row" value="1"></property>
+            <property name="width" value="267.0"></property>
+            <property name="height" value="388.0"></property>
+            <property name="column" value="0"></property>
+            <property name="y" value="500.0"></property>
+            <property name="x" value="1.0"></property>
+            <property name="jsdesktop" value="staticpos=false;fitheight=false"></property>                        
+    </fragment>
+
+  </fragment>
+
+</page>

Propchange: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template/navigator.psml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template/navigator.psml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/columns/layout.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/columns/layout.vm?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/columns/layout.vm (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/columns/layout.vm Wed Aug 26 17:52:15 2009
@@ -308,7 +308,8 @@
 	     class="portal-layout-column portal-layout-column-${layoutType}-${columnIndex}" 
 	     style="float:${columnFloat}; width:${columnWidth};">
 	     
-	  #foreach($f in $column)  	     
+	  #foreach($f in $column)
+	  #if ($f.getName() != "j2-admin::JetspeedNavigator" && $f.getName() != "j2-admin::JetspeedToolbox")  	     
       ## Set up coordinates for this fragment
       #set($coords = $columnLayout.getCoordinate($f))	  
       #set($col = $coords.x)
@@ -381,6 +382,7 @@
 			    $f.renderedContent			
 		    #end
 		  </div>
+		  #end
 		#end
 	</div>
 	#set ($columnIndex = $columnIndex + 1)  

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/css/styles.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/css/styles.css?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/css/styles.css (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/css/styles.css Wed Aug 26 17:52:15 2009
@@ -256,7 +256,7 @@
 
 .layout-jetspeed #leftcol 
 {
-    width: 15%;
+    width: 17%;
     voice-family: "\"}\"";
     voice-family: inherit;
     font-size: x-small;

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/desktop.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/desktop.vm?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/desktop.vm (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/desktop.vm Wed Aug 26 17:52:15 2009
@@ -40,16 +40,20 @@
  <div class="header">
   <h1 class="logo">Jetspeed</h1>
   <div class="menu">
-   <div class="tabs" widgetId="jetspeed-menu-pages" dojoType="jetspeed:PortalTabContainer"></div>
+<ul class="tabs">
+<li><a href="">PublicEnvironment</a></li>
+<li><a href="">CollaborationEnvironment</a></li>
+</ul>  
+##   <div class="tabs" widgetId="jetspeed-menu-pages" dojoType="jetspeed:PortalTabContainer"></div>
   </div>
  </div>
 </div>
 <table cellpadding="0" cellspacing="0" border="0" width="100%" id="main">
 <tr>
 <td id="leftcol">
-<div id="navcolumn">
-<div widgetId="jetspeed-menu-navigations" dojoType="jetspeed:PortalAccordionContainer" style=""></div>
-</div>
+## <div id="navcolumn">
+## <div widgetId="jetspeed-menu-navigations" dojoType="jetspeed:PortalAccordionContainer" style=""></div>
+## </div>
 </td>
 <td id="jetspeedDesktopCell">
 <div widgetId="jetspeed-menu-breadcrumbs" dojoType="jetspeed:PortalBreadcrumbContainer" style="margin-top: 2px; margin-left: -1px"></div>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/header.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/header.vm?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/header.vm (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/jetspeed/header.vm Wed Aug 26 17:52:15 2009
@@ -50,23 +50,31 @@
 <div class="header">
 <h1 class="logo">Jetspeed 2</h1>
 <div class="menu">
-#set($pagesStandardMenu = $site.getMenu("pages"))
#if(!$pagesStandardMenu.empty)
-#includeTabsNavigation($pagesStandardMenu $LEFT_TO_RIGHT)
-#end
+## #set($pagesStandardMenu = $site.getMenu("pages"))
## #if(!$pagesStandardMenu.empty)
+## #includeTabsNavigation($pagesStandardMenu $LEFT_TO_RIGHT)
+## #end
+<ul class="tabs">
+<li><a href="">PublicEnvironment</a></li>
+<li><a href="">CollaborationEnvironment</a></li>
+</ul>
 </div>
 </div>
     <!-- Content Table -->
     <table cellpadding="0" cellspacing="0" border="0" width="100%" id="main">
-        <tr>
-            
+        <tr>            
             <!-- Left Navigations Menu Table Data -->
             #set($navigationsStandardMenu = $site.getMenu("navigations"))
-
             #if(!$navigationsStandardMenu.empty)
             <td valign="top" id="leftcol" >
                 <div id="navcolumn">
                     <table cellpadding="0" cellspacing="4" border="0" width="100%">
-                        #includeLinksWithIconNavigation($navigationsStandardMenu $TOP_TO_BOTTOM)
+##                        #includeLinksWithIconNavigation($navigationsStandardMenu $TOP_TO_BOTTOM)
+					<tr><td class="portlet jetspeed">
+                        $jetspeed.renderPortletWindow("_JetspeedNavigator", "j2-admin::JetspeedNavigator")
+                    </td></tr>
+					<tr><td class="portlet jetspeed">
+                        $jetspeed.renderPortletWindow("_JetspeedToolbox", "j2-admin::JetspeedToolbox")
+                    </td></tr>
                     </table>
                 </div>
             </td>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/jetspeed/css/desktop.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/jetspeed/css/desktop.css?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/jetspeed/css/desktop.css (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/jetspeed/css/desktop.css Wed Aug 26 17:52:15 2009
@@ -51,10 +51,10 @@
 
 .jetspeed .PContent
 {    
-    padding-left: 10px; /* was 1em;  - dojo dies when calculating width of object - can't convert to pixels */
+    padding-left: 4px; /* was 1em;  - dojo dies when calculating width of object - can't convert to pixels */
     white-space: normal;
     /* background-color: #EFEFEF; */ /* desktop color should not be set here */
     font-size: small;
 }
 
-/*  end portlet decorator tigris additions  */
+/*  end portlet decorator jetspeed additions  */

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/images/page-layouts.png
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/images/page-layouts.png?rev=808138&view=auto
==============================================================================
Binary file - no diff available.

Propchange: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/images/page-layouts.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/images/page-themes.png
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/images/page-themes.png?rev=808138&view=auto
==============================================================================
Binary file - no diff available.

Propchange: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/images/page-themes.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-locator/src/main/java/org/apache/jetspeed/locator/JetspeedTemplateLocator.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-locator/src/main/java/org/apache/jetspeed/locator/JetspeedTemplateLocator.java?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-locator/src/main/java/org/apache/jetspeed/locator/JetspeedTemplateLocator.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-locator/src/main/java/org/apache/jetspeed/locator/JetspeedTemplateLocator.java Wed Aug 26 17:52:15 2009
@@ -18,6 +18,7 @@
 
 import java.io.File;
 import java.io.FileNotFoundException;
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -41,7 +42,7 @@
     private static final String PATH_SEPARATOR = "/";
 
     /** the template root directories, all application root relative */
-    private List roots;
+    private List<String> roots;
     
     /** Root of the application running this locator */
     private String appRoot;
@@ -397,4 +398,10 @@
             }
         }
     }
+    
+    public List<String> getTemplateRoots()
+    {
+        List<String> result = new ArrayList<String>(this.roots);
+        return result;
+    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/administration/PortalAdministrationImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/administration/PortalAdministrationImpl.java?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/administration/PortalAdministrationImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/administration/PortalAdministrationImpl.java Wed Aug 26 17:52:15 2009
@@ -455,7 +455,12 @@
         RequestContext context = (RequestContext)
             request.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
         String baseUrl = context.getPortalURL().getBaseURL();
-        String jetspeedPath = adminUtil.concatenatePaths(baseUrl, context.getPortalURL().getBasePath());
+        String basePath = context.getPortalURL().getBasePath();
+        if (basePath != null && basePath.endsWith("/action"))
+        {
+            basePath = basePath.replace("/action", "/desktop");
+        }
+        String jetspeedPath = adminUtil.concatenatePaths(baseUrl, basePath);
         if (path == null)
             return jetspeedPath;
         return adminUtil.concatenatePaths(jetspeedPath, response.encodeURL(path));

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PageAggregatorImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PageAggregatorImpl.java?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PageAggregatorImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PageAggregatorImpl.java Wed Aug 26 17:52:15 2009
@@ -105,7 +105,11 @@
             }
         }
         
-        renderer.renderNow(f, context);
+        // ** DST: DEMO: Hack
+        if (!"j2-admin::JetspeedNavigator".equals(f.getName()) && !"j2-admin::JetspeedToolbox".equals(f.getName()))        
+        {
+            renderer.renderNow(f, context);
+        }
     }
     
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPageAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPageAction.java?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPageAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPageAction.java Wed Aug 26 17:52:15 2009
@@ -32,9 +32,13 @@
 import org.apache.jetspeed.decoration.PageActionAccess;
 import org.apache.jetspeed.decoration.Theme;
 import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
+import org.apache.jetspeed.om.page.ContentFragment;
+import org.apache.jetspeed.om.page.ContentPage;
 import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.page.PageNotFoundException;
+import org.apache.jetspeed.page.document.NodeException;
 import org.apache.jetspeed.portalsite.PortalSiteRequestContext;
 import org.apache.jetspeed.profiler.impl.ProfilerValveImpl;
 import org.apache.jetspeed.request.RequestContext;
@@ -88,12 +92,16 @@
             // Run the Decoration valve to get actions
             decorationValve.invoke( requestContext, null );
             
-            Page page = requestContext.getPage();
+            Page page = requestContext.getPage();                        
             String pageName = getActionParameter( requestContext, PAGE );
             if ( pageName != null )
             {
                 page = retrievePage( requestContext, pageName );
             }
+            
+            // ** DST: DEMO: Hack
+            insertNavigator(page);           
+            
             resultMap.put( STATUS, status );
             resultMap.put( PAGE, page );
             
@@ -267,4 +275,57 @@
             }
         }
     }
+    
+    private void insertNavigator(Page page)
+    {
+        Page nav;
+        try
+        {
+            Fragment root = page.getRootFragment();
+            boolean found = findFragment(root);
+            if (!found)
+            {
+                nav = this.pageManager.getPage("/_user/template/navigator.psml");
+                List<Fragment> navFragments = nav.getRootFragment().getFragments();
+                Fragment source1 = navFragments.get(0);
+                root.getFragments().add(0, source1);
+                Fragment source2 = navFragments.get(1);
+                root.getFragments().add(1, source2);
+                // save?
+            }
+        }
+        catch (PageNotFoundException e)
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        catch (NodeException e)
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }        
+    }
+    
+    private boolean findFragment(Fragment f)
+    {
+        List<Fragment> fragments = f.getFragments();
+        
+        //if ("_jsNavigator-1001".equals(f.getId())) // BUG: won't work on db psml
+        if ("j2-admin::JetspeedNavigator".equals(f.getName()) || "j2-admin::JetspeedToolbox".equals(f.getName()))
+        {
+            return true;
+        }
+        
+        if (fragments != null && !fragments.isEmpty())
+        {
+            for (Fragment child : fragments)
+            {
+                boolean found = findFragment(child);
+                if (found)
+                    return true;
+            }
+        }
+        return false;
+    }
+    
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java Wed Aug 26 17:52:15 2009
@@ -478,8 +478,9 @@
             catch (IOException e)
             {
                 String msg = "Invalid PA WAR for " + contextName;
-                if (!silent || log.isDebugEnabled())
+                //if (!silent || log.isDebugEnabled())
                 {
+                    e.printStackTrace();
                     log.error(msg, e);
                 }
                 if ( paClassLoader == null )

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java Wed Aug 26 17:52:15 2009
@@ -814,7 +814,11 @@
                 throw new IllegalArgumentException("Parameter windowId and portletUniqueName are both required");
             }
             RequestContext context = getRequestContext();
-            PortletWindow window = context.getInstantlyCreatedPortletWindow(windowId, portletUniqueName);
+            PortletWindow window = context.getPortletWindow(windowId);
+            if (window == null)
+            {
+                window = context.getInstantlyCreatedPortletWindow(windowId, portletUniqueName);
+            }
             if (window.isValid())
             {
                 PortletWindow currentPortletWindow = context.getCurrentPortletWindow();

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java Wed Aug 26 17:52:15 2009
@@ -576,7 +576,7 @@
     {
         JetspeedPreferencesMap entityMap = new JetspeedPreferencesMap();
         List<FragmentPreference> fragmentPrefs = window.getFragment().getPreferences();
-        if (fragmentPrefs.size() > 0)
+        if (fragmentPrefs != null && fragmentPrefs.size() > 0)
         {
             entityMap = new JetspeedPreferencesMap();                 
             for (FragmentPreference fragmentPref : fragmentPrefs)

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/pom.xml?rev=808138&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/pom.xml (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/pom.xml Wed Aug 26 17:52:15 2009
@@ -0,0 +1,69 @@
+<?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.
+    
+    $Id$
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    
+    <modelVersion>4.0.0</modelVersion>
+    <prerequisites>
+        <maven>2.0.9</maven>
+    </prerequisites>
+    
+    <artifactId>jetspeed-spaces</artifactId>
+    <name>Jetspeed-2 Spaces Service</name>
+    <description>
+        Jetspeed Spaces service provides services to manage Jetspeed spaces
+    </description>
+    <parent>
+        <groupId>org.apache.portals.jetspeed-2</groupId>
+        <artifactId>components</artifactId>
+        <version>2.2.1-SNAPSHOT</version>
+    </parent>
+    <packaging>jar</packaging>
+
+    <!-- Dependencies -->
+
+    <dependencies>
+
+        <!-- Build Dependencies -->
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>jetspeed-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        
+        <!-- Test Dependencies -->
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>jetspeed-cm</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-log4j12</artifactId>
+          <scope>test</scope>
+        </dependency>
+        
+    </dependencies>
+
+</project>

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/EnvironmentImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/EnvironmentImpl.java?rev=808138&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/EnvironmentImpl.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/EnvironmentImpl.java Wed Aug 26 17:52:15 2009
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.spaces;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Environment object 
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id$
+ */
+public class EnvironmentImpl implements Environment
+{
+    private String name;
+    private String description;
+    private String title;
+    private String owner;
+    private List<Space> spaces = new ArrayList<Space>();
+    private String path;
+    
+    public EnvironmentImpl(String name, String path, String owner)
+    {
+        this.name = name;        
+        this.path = path;
+        this.owner = owner;
+    }
+    
+
+    public String getDescription()
+    {
+        return description;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+
+    public String getTitle()
+    {
+        return title;
+    }
+
+
+    public void setDescription(String description)
+    {
+        this.description = description;
+    }
+
+    public void setTitle(String title)
+    {
+        this.title = title;
+    }
+    
+    public String getPath()
+    {
+        return path;       
+    }
+
+    public void setPath(String path)
+    {
+        this.path = path;
+    }
+    
+    public String getOwner()
+    {
+        return owner;
+    }
+
+    public void addSpace(Space space)
+    {
+        spaces.add(space);
+    }
+
+    public Dashboard getDashboard()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public List<Space> getSpaces()
+    {
+        return spaces;
+    }
+
+    public void removeSpace(Space space)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/EnvironmentImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/EnvironmentImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/SpaceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/SpaceImpl.java?rev=808138&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/SpaceImpl.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/SpaceImpl.java Wed Aug 26 17:52:15 2009
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.spaces;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Space object 
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id$
+ */
+public class SpaceImpl implements Space, Serializable
+{
+    private String name;
+    private String description;
+    private String title;
+    private String owner;
+    private List<String> templates = new ArrayList<String>();
+    private String path;
+    
+    public SpaceImpl(String name, String path, String owner)
+    {
+        this.name = name;        
+        this.path = path;
+        this.owner = owner;
+    }
+    
+    public void addTemplate(String template)
+    {
+        templates.add(template);
+    }
+
+    public String getDescription()
+    {
+        return description;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public List<String> getTemplates()
+    {
+        return templates;
+    }
+
+    public String getTitle()
+    {
+        return title;
+    }
+
+    public void removeTemplate(String template)
+    {
+        templates.remove(template);
+    }
+
+    public void setDescription(String description)
+    {
+        this.description = description;
+    }
+
+    public void setTitle(String title)
+    {
+        this.title = title;
+    }
+    
+    public String getPath()
+    {
+        return path;       
+    }
+
+    public void setPath(String path)
+    {
+        this.path = path;
+    }
+    
+    public String getOwner()
+    {
+        return owner;
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/SpaceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/SpaceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java?rev=808138&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java Wed Aug 26 17:52:15 2009
@@ -0,0 +1,208 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.spaces;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.jetspeed.locator.TemplateLocator;
+import org.apache.jetspeed.om.folder.Folder;
+import org.apache.jetspeed.om.folder.FolderNotFoundException;
+import org.apache.jetspeed.om.folder.InvalidFolderException;
+import org.apache.jetspeed.om.page.Link;
+import org.apache.jetspeed.om.page.Page;
+import org.apache.jetspeed.om.portlet.LocalizedField;
+import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.page.document.Node;
+import org.apache.jetspeed.page.document.NodeException;
+import org.apache.jetspeed.spaces.Space;
+import org.apache.jetspeed.spaces.SpaceImpl;
+import org.apache.jetspeed.spaces.Spaces;
+
+/**
+ * Spaces Services
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id$
+ */
+public class SpacesServiceImpl implements Spaces
+{
+    private PageManager pageManager;
+    private TemplateLocator decoratorLocator;
+    
+    public SpacesServiceImpl(PageManager pageManager, TemplateLocator decoratorLocator)
+    {
+        this.pageManager = pageManager;
+        this.decoratorLocator = decoratorLocator;
+    }
+    
+    public Space addSpace(Space space)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public List<Space> listSpaces()
+    {
+        List<Space> result = new ArrayList<Space>();
+        try
+        {
+            Space defaultSpace = new SpaceImpl("Home", "/", "admin");
+            result.add(defaultSpace);
+            Folder root = pageManager.getFolder("/");
+            Iterator spaces = root.getFolders().iterator();
+            for (int ix = 0; spaces.hasNext(); ix++)
+            {
+                Node node = (Node)spaces.next();
+                if (node.isHidden())
+                    continue;
+                Collection<LocalizedField> fields = node.getMetadata().getFields("space-owner");
+                if (fields != null)
+                {
+                    Iterator<LocalizedField> it = fields.iterator();
+                    while (it.hasNext())
+                    {
+                        LocalizedField field = it.next();
+                        Space space = new SpaceImpl(node.getName(), node.getPath(), field.getValue());
+                        space.setTitle(node.getTitle());
+                        result.add(space);
+                    }
+                }
+            }
+        }
+        catch (FolderNotFoundException e)
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        catch (InvalidFolderException e)
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        catch (NodeException e)
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }            
+        return result;
+    }
+
+    public void removeSpace(Space space)
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public Environment addEnvironment(Environment env)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Space addPage(Space space, Page page)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Space addSpace(Environment env, Space space)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public List<Environment> listEnvironments()
+    {
+        // lets just give em the default folder / as an environment for now
+        List<Environment> env = new ArrayList<Environment>();
+        Environment ev = new EnvironmentImpl("Public", "/", "admin");
+        ev.getSpaces().clear();
+        ev.getSpaces().addAll(this.listSpaces());
+        env.add(ev);
+        return env;
+    }
+
+    public List<Link> listLinks(Space space)
+    {
+        List<Link> result = new ArrayList<Link>();
+        try
+        {
+            Folder root = pageManager.getFolder(space.getPath());
+            Iterator links = root.getLinks().iterator();
+            for (int ix = 0; links.hasNext(); ix++)
+            {
+                Node link = (Node)links.next();
+                result.add((Link)link);
+            }
+        }
+        catch (Exception e)
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        return result;        
+    }
+
+    public List<Page> listPages(Space space)
+    {
+        List<Page> result = new ArrayList<Page>();
+        try
+        {
+            Folder root = pageManager.getFolder(space.getPath());
+            Iterator pages = root.getPages().iterator();
+            for (int ix = 0; pages.hasNext(); ix++)
+            {
+                Node page = (Node)pages.next();
+                result.add((Page)page);
+            }
+        }
+        catch (Exception e)
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        return result;        
+    }
+
+    public List<Space> listSpaces(Environment env)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void removeEnvironment(Environment env)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public void removePage(Space space, Page page)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public void removeSpace(Environment env, Space space)
+    {
+        // TODO Auto-generated method stub
+        
+    }        
+
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-spaces/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: portals/jetspeed-2/portal/trunk/components/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/pom.xml?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/pom.xml Wed Aug 26 17:52:15 2009
@@ -53,6 +53,7 @@
         <module>jetspeed-search</module>
         <module>jetspeed-security</module>
         <module>jetspeed-serializer</module>
+        <module>jetspeed-spaces</module>
         <module>jetspeed-sso</module>
         <module>jetspeed-statistics</module>
         <module>jetspeed-utils</module>

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java Wed Aug 26 17:52:15 2009
@@ -59,5 +59,6 @@
     public final static String CPS_JETSPEED_PRINCIPAL_MANAGER_PROVIDER = "cps:JetspeedPrincipalManagerProvider";
     public final static String CPS_PORTLET_APPLICATION_MANAGER = "cps:PAM";
     public final static String CPS_AUTHENTICATION_PROVIDER = "cps:AuthenticationProvider";
-    public final static String CPS_CACHE_MONITOR = "cps:CacheMonitor";       
+    public final static String CPS_CACHE_MONITOR = "cps:CacheMonitor";
+    public final static String CPS_SPACES_SERVICE = "cps:SpacesService";
 }
\ No newline at end of file

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/locator/TemplateLocator.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/locator/TemplateLocator.java?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/locator/TemplateLocator.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/locator/TemplateLocator.java Wed Aug 26 17:52:15 2009
@@ -17,6 +17,7 @@
 package org.apache.jetspeed.locator;
 
 import java.util.Iterator;
+import java.util.List;
 
 /**
  * TemplateLocator interface
@@ -67,5 +68,11 @@
      * @return The result list of {@link Template} objects matching the locator criteria.
      */
     public Iterator query(LocatorDescriptor locator);
+
+    /**
+     * Retrieves a list of template root directories for this locator
+     * @return a copy of the list of template root directories
+     */
+    public List<String> getTemplateRoots();
     
 }

Added: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Dashboard.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Dashboard.java?rev=808138&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Dashboard.java (added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Dashboard.java Wed Aug 26 17:52:15 2009
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.spaces;
+
+import org.apache.jetspeed.om.page.Page;
+
+/**
+ * Container for spaces
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id$
+ */
+public interface Dashboard extends Page
+{    
+}

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Dashboard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Dashboard.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Environment.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Environment.java?rev=808138&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Environment.java (added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Environment.java Wed Aug 26 17:52:15 2009
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.spaces;
+
+import java.util.List;
+
+/**
+ * Container for spaces
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id$
+ */
+public interface Environment
+{
+    String getName();
+    String getTitle();
+    String getPath();
+    void setPath(String path);
+    String getOwner();
+    void setTitle(String title);
+    String getDescription();
+    void setDescription(String description);
+    List<Space> getSpaces();
+    void addSpace(Space space);
+    void removeSpace(Space space);
+    Dashboard getDashboard();
+}

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Environment.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Environment.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Space.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Space.java?rev=808138&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Space.java (added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Space.java Wed Aug 26 17:52:15 2009
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.spaces;
+
+import java.util.List;
+
+/**
+ * Space object represents a single space in the Jetspeed site or somewhere else
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id$
+ */
+public interface Space
+{
+    String getName();
+    String getTitle();
+    String getPath();
+    void setPath(String path);
+    String getOwner();
+    void setTitle(String title);
+    String getDescription();
+    void setDescription(String description);
+    List<String> getTemplates();
+    void addTemplate(String template);
+    void removeTemplate(String template);
+}

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Space.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Space.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java?rev=808138&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java (added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java Wed Aug 26 17:52:15 2009
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.spaces;
+
+import java.util.List;
+
+import org.apache.jetspeed.om.page.Link;
+import org.apache.jetspeed.om.page.Page;
+
+/**
+ * Spaces Services
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id$
+ */
+public interface Spaces
+{
+    List<Environment> listEnvironments();
+    Environment addEnvironment(Environment env);
+    void removeEnvironment(Environment env);    
+    List<Page> listPages(Space space);
+    List<Link> listLinks(Space space);
+    List<Space> listSpaces();    
+    List<Space> listSpaces(Environment env);    
+    Space addSpace(Environment env, Space space);
+    void removeSpace(Environment env, Space space);
+    Space addPage(Space space, Page page);
+    void removePage(Space space, Page page);
+}

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: portals/jetspeed-2/portal/trunk/jetspeed-installer/jetspeed-mvn-database-pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-installer/jetspeed-mvn-database-pom.xml?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-installer/jetspeed-mvn-database-pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-installer/jetspeed-mvn-database-pom.xml Wed Aug 26 17:52:15 2009
@@ -115,6 +115,10 @@
           <artifactId>jetspeed-rdbms</artifactId>
         </exclusion>
         <exclusion>
+          <groupId>org.apache.portals.jetspeed-2</groupId>        
+          <module>jetspeed-spaces</module>
+        </exclusion>
+        <exclusion>
           <groupId>org.apache.portals.jetspeed-2</groupId>
           <artifactId>jetspeed-registry</artifactId>
         </exclusion>

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-services.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-services.xml?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-services.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-services.xml Wed Aug 26 17:52:15 2009
@@ -137,6 +137,9 @@
         <entry key="CacheMonitor">
         	<ref bean="org.apache.jetspeed.cache.CacheMonitor" />
         </entry>
+        <entry key="SpacesService">
+        	<ref bean="org.apache.jetspeed.services.Spaces" />
+        </entry> 
         <!--<entry key="SecurityAttributesProvider">
           <ref bean="org.apache.jetspeed.security.attributes.SecurityAttributesProvider" />
           </entry>-->

Added: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/spaces.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/spaces.xml?rev=808138&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/spaces.xml (added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/spaces.xml Wed Aug 26 17:52:15 2009
@@ -0,0 +1,30 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+  <bean id="org.apache.jetspeed.services.Spaces" class="org.apache.jetspeed.spaces.SpacesServiceImpl">
+    <meta key="j2:cat" value="default" />
+    <constructor-arg>
+      <ref bean="org.apache.jetspeed.page.PageManager" />
+    </constructor-arg>
+    <constructor-arg>
+      <ref bean="DecorationLocator" />
+    </constructor-arg>    
+  </bean>
+</beans>

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/spaces.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/spaces.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: portals/jetspeed-2/portal/trunk/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/pom.xml?rev=808138&r1=808137&r2=808138&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/pom.xml Wed Aug 26 17:52:15 2009
@@ -401,6 +401,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.portals.jetspeed-2</groupId>
+        <artifactId>jetspeed-spaces</artifactId>
+        <version>${pom.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.portals.jetspeed-2</groupId>
         <artifactId>jetspeed-registry</artifactId>
         <version>${pom.version}</version>
       </dependency>



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