portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r903904 [1/2] - in /portals/jetspeed-2/portal/trunk: applications/jetspeed/src/main/webapp/WEB-INF/min-pages/ applications/jetspeed/src/main/webapp/WEB-INF/min-pages/Administrative/security/ applications/jetspeed/src/main/webapp/WEB-INF/min...
Date Wed, 27 Jan 2010 23:30:45 GMT
Author: taylor
Date: Wed Jan 27 23:30:43 2010
New Revision: 903904

URL: http://svn.apache.org/viewvc?rev=903904&view=rev
Log:
rewrote spaces and environments service from prototype to a full implementation
integrating with j2-admin now... (still ongoing)
moved psml templates out of /_user to /_template

Added:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/Administrative/security/spaces.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/dev/
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/dev/account.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/dev/default-page.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/dev/folder.metadata
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/account.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/default-page.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/folder.metadata
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/min.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/space/
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/space/default-page.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/space/folder.metadata
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/spaces.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/system/folder.metadata
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/template.tpsml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_template/
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_template/dev/
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_template/dev/default-page.psml
      - copied unchanged from r903551, portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template-dev/default-page.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_template/dev/folder.metadata
      - copied unchanged from r903551, portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template-dev/folder.metadata
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_template/new-user/
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_template/new-user/default-page.psml
      - copied unchanged from r903551, portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template/default-page.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_template/new-user/min.psml
      - copied unchanged from r903551, portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template/min.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_template/space/
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_template/space/default-page.psml
      - copied unchanged from r903551, portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template-space/default-page.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_template/space/folder.metadata
      - copied unchanged from r903551, portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template-space/folder.metadata
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/spaces.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/system/folder.metadata
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/BaseSpaceImpl.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/SpacesException.java
Removed:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_user/template/
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_user/template-dev/
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_user/template-space/
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template/
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template-dev/
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template-space/
Modified:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/Administrative/spaces.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/folder.metadata
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/administration/AdminUtil.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/profiler/impl/CreateUserTemplatePagesValveImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/profiler/impl/RefreshUserHomepageValveImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/EnvironmentImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/SpaceImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/testdata/test-pa/WEB-INF/portlet.xml
    portals/jetspeed-2/portal/trunk/components/jetspeed-serializer/src/resources/jetspeed-import.xml
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Environment.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Space.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/seed/j2-seed.xml

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/Administrative/security/spaces.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/Administrative/security/spaces.psml?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/Administrative/security/spaces.psml (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/Administrative/security/spaces.psml Wed Jan 27 23:30:43 2010
@@ -0,0 +1,35 @@
+<?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="rpad"
+    xmlns="http://portals.apache.org/jetspeed"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.1/schemas/psml.xsd">
+
+  <title>Spaces</title>
+  <metadata name="short-title" xml:lang="es">Spaces</metadata>
+
+  <fragment id="spaces-layout" type="layout" name="jetspeed-layouts::VelocityTwoColumns">
+    <fragment id="spaces-list" type="portlet" name="j2-admin::SpacesList">
+    	<property name="row" value="0" />
+    	<property name="column" value="0" />    	
+    </fragment>
+    <fragment id="spaces-app" type="portlet" name="j2-admin::SpacesManager">
+    	<property name="row" value="0" />
+    	<property name="column" value="1" />    	
+    </fragment>    
+  </fragment>
+
+</page>

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/dev/account.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/dev/account.psml?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/dev/account.psml (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/dev/account.psml Wed Jan 27 23:30:43 2010
@@ -0,0 +1,42 @@
+<?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="my-account3" hidden="false"
+    xmlns="http://portals.apache.org/jetspeed"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.1/schemas/psml.xsd">
+ 
+  <title>My Account</title>
+  <metadata name="title" xml:lang="ja">アカウント</metadata>
+  <metadata name="title" xml:lang="es">Mi cuenta</metadata>
+  <metadata name="title" xml:lang="hu">Személyes beállítások</metadata>
+  <metadata name="title" xml:lang="zh">我的帐户配置</metadata>
+  <metadata name="title" xml:lang="zh-TW">我的帳戶配置</metadata>
+  <metadata name="title" xml:lang="ko">내 계정</metadata>
+
+  <fragment id="dev-macc-1" type="layout" name="jetspeed-layouts::VelocityTwoColumns">
+    <fragment id="dev-macc-2" type="portlet" name="j2-admin::LoginPortlet">
+      <property layout="TwoColumns" name="row" value="0" />
+      <property layout="TwoColumns" name="column" value="0" />
+    </fragment>
+   <fragment id="dev-macc-3" type="portlet" name="j2-admin::ChangePasswordPortlet">
+      <property layout="TwoColumns" name="row" value="0" />
+      <property layout="TwoColumns" name="column" value="1" />
+    </fragment>    
+  </fragment>
+
+</page>

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/dev/default-page.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/dev/default-page.psml?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/dev/default-page.psml (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/dev/default-page.psml Wed Jan 27 23:30:43 2010
@@ -0,0 +1,39 @@
+<?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-default-page.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">
+ 
+  <title>User Home</title>
+  <metadata name="title" xml:lang="ja">ユーザーホーム</metadata>
+  <metadata name="title" xml:lang="es">Carpeta de Usuario</metadata>
+  <metadata name="title" xml:lang="hu">Felhasználó HOME-ja</metadata>
+  <metadata name="title" xml:lang="zh">用户主页</metadata>
+  <metadata name="title" xml:lang="zh-TW">用戶主頁</metadata>
+  <metadata name="title" xml:lang="ko">사용자 홈</metadata>
+
+  <fragment id="devtemp-1000" type="layout" name="jetspeed-layouts::VelocityTwoColumns">
+    <fragment id="devtemp-1001" type="portlet" name="j2-admin::WelcomeToJetspeed">
+      <property layout="TwoColumns" name="row" value="0" />
+      <property layout="TwoColumns" name="column" value="0" />
+    </fragment>
+    <fragment id="devtemp-1010" type="portlet" name="j2-admin::AboutJetspeed">
+      <property layout="TwoColumns" name="row" value="0" />
+      <property layout="TwoColumns" name="column" value="1" />
+    </fragment>
+   </fragment>
+</page>

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/dev/folder.metadata
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/dev/folder.metadata?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/dev/folder.metadata (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/dev/folder.metadata Wed Jan 27 23:30:43 2010
@@ -0,0 +1,28 @@
+<?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.
+-->
+<folder
+    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/folder-metadata.xsd">
+  <title >Home</title>  
+
+  <document-order>default-page.psml</document-order>
+  <document-order>account.psml</document-order>
+
+  <security-constraints>
+    <security-constraints-ref>delegated</security-constraints-ref>
+  </security-constraints>
+</folder>

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/account.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/account.psml?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/account.psml (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/account.psml Wed Jan 27 23:30:43 2010
@@ -0,0 +1,42 @@
+<?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="my-account2" hidden="false"
+    xmlns="http://portals.apache.org/jetspeed"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.1/schemas/psml.xsd">
+ 
+  <title>My Account</title>
+  <metadata name="title" xml:lang="ja">アカウント</metadata>
+  <metadata name="title" xml:lang="es">Mi cuenta</metadata>
+  <metadata name="title" xml:lang="hu">Személyes beállítások</metadata>
+  <metadata name="title" xml:lang="zh">我的帐户配置</metadata>
+  <metadata name="title" xml:lang="zh-TW">我的帳戶配置</metadata>
+  <metadata name="title" xml:lang="ko">내 계정</metadata>
+
+  <fragment id="jp-macc-1" type="layout" name="jetspeed-layouts::VelocityTwoColumns">
+    <fragment id="jp-macc-2" type="portlet" name="j2-admin::LoginPortlet">
+      <property layout="TwoColumns" name="row" value="0" />
+      <property layout="TwoColumns" name="column" value="0" />
+    </fragment>
+   <fragment id="jp-macc-3" type="portlet" name="j2-admin::ChangePasswordPortlet">
+      <property layout="TwoColumns" name="row" value="0" />
+      <property layout="TwoColumns" name="column" value="1" />
+    </fragment>    
+  </fragment>
+
+</page>

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/default-page.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/default-page.psml?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/default-page.psml (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/default-page.psml Wed Jan 27 23:30:43 2010
@@ -0,0 +1,39 @@
+<?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-default-page.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">
+ 
+  <title>User Home</title>
+  <metadata name="title" xml:lang="ja">ユーザーホーム</metadata>
+  <metadata name="title" xml:lang="es">Carpeta de Usuario</metadata>
+  <metadata name="title" xml:lang="hu">Felhasználó HOME-ja</metadata>
+  <metadata name="title" xml:lang="zh">用户主页</metadata>
+  <metadata name="title" xml:lang="zh-TW">用戶主頁</metadata>
+  <metadata name="title" xml:lang="ko">사용자 홈</metadata>
+
+  <fragment id="uhtemp-1000" type="layout" name="jetspeed-layouts::VelocityTwoColumns">
+    <fragment id="uhtemp-1001" type="portlet" name="j2-admin::WelcomeToJetspeed">
+      <property layout="TwoColumns" name="row" value="0" />
+      <property layout="TwoColumns" name="column" value="0" />
+    </fragment>
+    <fragment id="uhtemp-1010" type="portlet" name="j2-admin::AboutJetspeed">
+      <property layout="TwoColumns" name="row" value="0" />
+      <property layout="TwoColumns" name="column" value="1" />
+    </fragment>
+   </fragment>
+</page>

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/folder.metadata
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/folder.metadata?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/folder.metadata (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/folder.metadata Wed Jan 27 23:30:43 2010
@@ -0,0 +1,25 @@
+<?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.
+-->
+<folder
+    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/folder-metadata.xsd">
+  <title >Home</title>  
+
+  <document-order>default-page.psml</document-order>
+  <document-order>account.psml</document-order>
+
+</folder>

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/min.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/min.psml?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/min.psml (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/new-user/min.psml Wed Jan 27 23:30:43 2010
@@ -0,0 +1,29 @@
+<?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-default-page.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">
+  <title>Page</title>
+
+  <fragment id="_jsspacemin-1000" type="layout" name="jetspeed-layouts::VelocityTwoColumns">
+    <fragment id="_jsspacemin-1010" type="portlet" name="j2-admin::DateTimePortlet">
+      <property layout="TwoColumns" name="row" value="0" />
+      <property layout="TwoColumns" name="column" value="0" />
+    </fragment>	        
+  </fragment>
+
+</page>

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/space/default-page.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/space/default-page.psml?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/space/default-page.psml (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/space/default-page.psml Wed Jan 27 23:30:43 2010
@@ -0,0 +1,29 @@
+<?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-default-page.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">
+  <title>Space Home</title>
+
+  <fragment id="_jsspace-1000" type="layout" name="jetspeed-layouts::VelocityTwoColumns">
+    <fragment id="_jsspace-1010" type="portlet" name="j2-admin::WelcomeToJetspeed">
+      <property layout="TwoColumns" name="row" value="0" />
+      <property layout="TwoColumns" name="column" value="0" />
+    </fragment>	        
+  </fragment>
+
+</page>

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/space/folder.metadata
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/space/folder.metadata?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/space/folder.metadata (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/_template/space/folder.metadata Wed Jan 27 23:30:43 2010
@@ -0,0 +1,24 @@
+<?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.
+-->
+<folder
+    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/folder-metadata.xsd">
+  
+  <menu name="space-navigations" regexp="true" options="/@1/*/,/@1/*.psml" depth="-1"/>
+  <menu name="space-links" regexp="true" options="/@1/*.link"/>
+  
+</folder>

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/spaces.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/spaces.psml?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/spaces.psml (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/spaces.psml Wed Jan 27 23:30:43 2010
@@ -0,0 +1,32 @@
+<?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="rpad" hidden='true'
+    xmlns="http://portals.apache.org/jetspeed"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.1/schemas/psml.xsd">
+
+  <title>New Space</title>
+  <metadata name="short-title" xml:lang="es">Space</metadata>
+
+  <fragment id="spaces-layout" type="layout" name="jetspeed-layouts::VelocityOneColumn">
+    <fragment id="new-spaces-app" type="portlet" name="j2-admin::SpacesManager"/>
+  </fragment>
+
+
+  <security-constraints>
+    <security-constraints-ref>admin</security-constraints-ref>
+  </security-constraints>
+</page>

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/system/folder.metadata
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/system/folder.metadata?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/system/folder.metadata (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/system/folder.metadata Wed Jan 27 23:30:43 2010
@@ -0,0 +1,24 @@
+<?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.
+-->
+<folder hidden='true'
+    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/folder-metadata.xsd">
+    
+  <title>System Folder</title>  
+  <metadata name='space-owner' xml:lang='en'>admin</metadata>  
+  
+</folder>

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/template.tpsml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/template.tpsml?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/template.tpsml (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/template.tpsml Wed Jan 27 23:30:43 2010
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<page-template id="definition"
+    xmlns="http://portals.apache.org/jetspeed"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.1/schemas/psml.xsd">
+
+  <title>TEMPLATE</title>
+  <fragment id="template-top2" type="layout" name="jetspeed-layouts::VelocityThreeColumns">
+    <property name="sizes" value="15%,70%,15%"></property>
+
+    <fragment id="jsSpaceNavigator" type="portlet" name="j2-admin::SpaceNavigator" decorator='clear'>
+            <property name="y" value="300"></property>
+            <property name="x" value="20"></property>            
+            <property name="state" value="detach"></property>                        
+    </fragment>
+
+   <fragment id="jstbLeft" type="layout" name="jetspeed-layouts::VelocityOneColumn">
+        <property name="row" value="0"></property>
+        <property name="column" value="0"></property>
+	    <property name="state" value="normal"></property>
+	    <property name='toolbar' value='true'></property>                                
+	    <property name='class' value='jsLeftToolbar'></property>                                
+	    <fragment id="jsPageNavigator" type="portlet" name="j2-admin::PageNavigator">
+	  	        <property name="row" value="0"></property>
+	            <property name="column" value="0"></property>
+	            <property name="state" value="normal"></property>
+	            <property name="tool" value="true"></property>                        
+	    </fragment>
+	</fragment>
+    
+    <page-fragment id="page-template">
+      <property name="column" value="1"/>
+      <property name="row" value="0"/>
+    </page-fragment>
+
+   <fragment id="jstbRight" type="layout" name="jetspeed-layouts::VelocityOneColumn">
+        <property name="row" value="0"></property>
+        <property name="column" value="2"></property>    
+	    <property name="state" value="normal"></property>                                
+	    <property name='toolbar' value='true'></property>
+        <property name="state" scope="user" scopeValue="guest" value="closed"></property>	    
+	    <property name='class' value='jsRightToolbar'></property>                                
+	    <fragment id="jsToolbox" type="portlet" name="j2-admin::JetspeedToolbox">
+	            <property name="row" value="0"></property>
+	            <property name="column" value="0"></property>
+	            <property name="state" value="normal"></property>                        
+	            <property name="tool" value="true"></property>	                                    
+	    </fragment>
+   </fragment>
+    
+<!--    
+    <fragment-reference id="page-template-wp-reference" refid="wp-definition">
+      <property name="row" value="1"/>
+    </fragment-reference>
+  -->   
+  </fragment>  
+</page-template>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/Administrative/spaces.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/Administrative/spaces.psml?rev=903904&r1=903903&r2=903904&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/Administrative/spaces.psml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/Administrative/spaces.psml Wed Jan 27 23:30:43 2010
@@ -21,9 +21,15 @@
   <title>Spaces</title>
   <metadata name="short-title" xml:lang="es">Spaces</metadata>
 
-  <fragment id="spaces-layout" type="layout" name="jetspeed-layouts::VelocityOneColumn">
-    <fragment id="spaces-app" type="portlet" name="j2-admin::SpacesManager">
+  <fragment id="spaces-layout" type="layout" name="jetspeed-layouts::VelocityTwoColumns">
+    <fragment id="spaces-list" type="portlet" name="j2-admin::SpacesList">
+    	<property name="row" value="0" />
+    	<property name="column" value="0" />    	
     </fragment>
+    <fragment id="spaces-app" type="portlet" name="j2-admin::SpacesManager">
+    	<property name="row" value="0" />
+    	<property name="column" value="1" />    	
+    </fragment>    
   </fragment>
 
 </page>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/folder.metadata
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/folder.metadata?rev=903904&r1=903903&r2=903904&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/folder.metadata (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/folder.metadata Wed Jan 27 23:30:43 2010
@@ -18,6 +18,7 @@
     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>Root Folder</title>  
+  <metadata name='space-owner' xml:lang='en'>admin</metadata>  
   <metadata name="title" xml:lang="fr">Répertoire racine</metadata>
   <metadata name="title" xml:lang="ja">ルートフォルダ</metadata>
   <metadata name="title" xml:lang="es">Carpeta raiz</metadata>

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/spaces.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/spaces.psml?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/spaces.psml (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/spaces.psml Wed Jan 27 23:30:43 2010
@@ -0,0 +1,32 @@
+<?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="rpad" hidden='true'
+    xmlns="http://portals.apache.org/jetspeed"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.1/schemas/psml.xsd">
+
+  <title>New Space</title>
+  <metadata name="short-title" xml:lang="es">Space</metadata>
+
+  <fragment id="spaces-layout" type="layout" name="jetspeed-layouts::VelocityOneColumn">
+    <fragment id="new-spaces-app" type="portlet" name="j2-admin::SpacesManager"/>
+  </fragment>
+
+
+  <security-constraints>
+    <security-constraints-ref>admin</security-constraints-ref>
+  </security-constraints>
+</page>

Added: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/system/folder.metadata
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/system/folder.metadata?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/system/folder.metadata (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/system/folder.metadata Wed Jan 27 23:30:43 2010
@@ -0,0 +1,24 @@
+<?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.
+-->
+<folder hidden='true'
+    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/folder-metadata.xsd">
+    
+  <title>System Folder</title>  
+  <metadata name='space-owner' xml:lang='en'>admin</metadata>  
+  
+</folder>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/administration/AdminUtil.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/administration/AdminUtil.java?rev=903904&r1=903903&r2=903904&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/administration/AdminUtil.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/administration/AdminUtil.java Wed Jan 27 23:30:43 2010
@@ -71,7 +71,7 @@
         return retval;        
     }
     
-    protected String concatenatePaths(String base, String path)
+    static public String concatenatePaths(String base, String path)
     {
         String result = "";
         if (base == null)

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/profiler/impl/CreateUserTemplatePagesValveImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/profiler/impl/CreateUserTemplatePagesValveImpl.java?rev=903904&r1=903903&r2=903904&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/profiler/impl/CreateUserTemplatePagesValveImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/profiler/impl/CreateUserTemplatePagesValveImpl.java Wed Jan 27 23:30:43 2010
@@ -49,7 +49,7 @@
     public static final String USER_TEMPLATE_FOLDER_REQUEST_ATTR_KEY = "org.apache.jetspeed.profiler.UserTemplateFolder";
     
     protected PageManager pageManager;
-    protected String defaultTemplateFolder = "/_user/template/";
+    protected String defaultTemplateFolder = "/_template/new-user/";
 
     /**
      * CreateUserTemplatePagesValveImpl - constructor

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/profiler/impl/RefreshUserHomepageValveImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/profiler/impl/RefreshUserHomepageValveImpl.java?rev=903904&r1=903903&r2=903904&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/profiler/impl/RefreshUserHomepageValveImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/profiler/impl/RefreshUserHomepageValveImpl.java Wed Jan 27 23:30:43 2010
@@ -54,7 +54,7 @@
 
     protected PageManager pageManager;
     protected UserManager userManager;
-    protected String defaultTemplateFolder = "/_user/template/";
+    protected String defaultTemplateFolder = "/_template/new-user/";
     protected boolean removeBeforeCopy;
 
     /**

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/BaseSpaceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/BaseSpaceImpl.java?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/BaseSpaceImpl.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/BaseSpaceImpl.java Wed Jan 27 23:30:43 2010
@@ -0,0 +1,97 @@
+/*
+ * 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.Locale;
+
+import org.apache.jetspeed.om.folder.Folder;
+
+abstract public class BaseSpaceImpl implements Serializable
+{
+    public static final String META_DESCRIPTION = "description";
+    public static final String META_TITLE       = "title";
+
+    protected transient Folder backingFolder = null;
+
+    abstract protected String getOwnerFieldName();
+    
+    public String getName()
+    {
+        return backingFolder.getName();
+    }
+        
+    public String getPath()
+    {
+        return backingFolder.getPath();       
+    }
+
+	public String getOwner() 
+	{
+        return SpacesServiceImpl.retrieveField(backingFolder, Locale.ENGLISH, getOwnerFieldName());
+	}
+
+    public void setOwner(String owner)
+    {
+        SpacesServiceImpl.updateField(backingFolder, Locale.ENGLISH, getOwnerFieldName(), owner);
+    }
+    
+	public String getTitle() 
+	{
+	    return backingFolder.getTitle();
+	}
+
+	public void setTitle(String title) 
+	{
+	    backingFolder.setTitle(title);
+	}
+
+    public String getTitle(Locale locale) 
+    {
+        return SpacesServiceImpl.retrieveField(backingFolder, locale, META_TITLE);
+    }
+    
+    public void setTitle(String title, Locale locale)
+    {
+        SpacesServiceImpl.updateField(backingFolder, locale, META_TITLE, title);
+    }
+	
+    public String getDescription() 
+    {
+        return SpacesServiceImpl.retrieveField(backingFolder, null, META_DESCRIPTION);
+    }
+    
+    public void setDescription(String description)
+    {
+        SpacesServiceImpl.updateField(backingFolder, null, META_DESCRIPTION, description);
+    }
+	
+    public String getDescription(Locale locale) 
+    {
+        return SpacesServiceImpl.retrieveField(backingFolder, locale, META_DESCRIPTION);
+    }
+	
+    public void setDescription(String description, Locale locale)
+    {
+        SpacesServiceImpl.updateField(backingFolder, locale, META_DESCRIPTION, description);
+    }
+
+	protected Folder getBackingFolder()
+	{
+		return this.backingFolder;
+	}    
+}

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/EnvironmentImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/EnvironmentImpl.java?rev=903904&r1=903903&r2=903904&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/EnvironmentImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/EnvironmentImpl.java Wed Jan 27 23:30:43 2010
@@ -16,93 +16,29 @@
  */
 package org.apache.jetspeed.spaces;
 
-import java.util.ArrayList;
-import java.util.List;
+import java.io.Serializable;
+
+import org.apache.jetspeed.om.folder.Folder;
 
 /**
- * Environment object 
+ * Environment implementation, environments are collections of folders holding links to other folders 
  *
  * @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 class EnvironmentImpl extends BaseSpaceImpl implements Environment, Serializable
+{  
+    private static final long serialVersionUID = 1L;    
     
-    public EnvironmentImpl(String name, String path, String owner)
+    public EnvironmentImpl(Folder folder)
     {
-        this.name = name;        
-        this.path = path;
-        this.owner = owner;
-    }
+        this.backingFolder = folder;
+    }   
     
-
-    public String getDescription()
-    {
-        return description;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-
-    public String getTitle()
+	@Override    
+    protected String getOwnerFieldName()
     {
-        return title;
-    }
-
-
-    public void setDescription(String description)
-    {
-        this.description = description;
-    }
-
-    public void setTitle(String title)
-    {
-        this.title = title;
-    }
+    	return META_ENV_OWNER;
+    }	
     
-    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
-        
-    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/SpaceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/SpaceImpl.java?rev=903904&r1=903903&r2=903904&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/SpaceImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/SpaceImpl.java Wed Jan 27 23:30:43 2010
@@ -17,83 +17,129 @@
 package org.apache.jetspeed.spaces;
 
 import java.io.Serializable;
-import java.util.ArrayList;
 import java.util.List;
+import java.util.Locale;
+
+import org.apache.jetspeed.om.folder.Folder;
+import org.apache.jetspeed.om.page.Fragment;
 
 /**
- * Space object 
+ * Space implementation, wrappers around a root level folder 
  *
  * @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 class SpaceImpl extends BaseSpaceImpl implements Space, Serializable
+{    
+    private static final long serialVersionUID = 1L;    
+    
+    public SpaceImpl(Folder folder)
+    {
+        this.backingFolder = folder;
+    }   
     
-    public SpaceImpl(String name, String path, String owner)
+	@Override
+	protected String getOwnerFieldName() 
+	{
+		return META_SPACE_OWNER;
+	}
+
+    public void setTheme(String themeName)
     {
-        this.name = name;        
-        this.path = path;
-        this.owner = owner;
+    	backingFolder.setDefaultDecorator(themeName, Fragment.LAYOUT);
+    	backingFolder.setDefaultDecorator(themeName, Fragment.PORTLET);
+    }
+
+    public String getTheme()
+    {
+    	return backingFolder.getDefaultDecorator(Fragment.LAYOUT);
+    }
+
+    public String getDomainPath()
+    {
+        return SpacesServiceImpl.retrieveField(backingFolder, Locale.ENGLISH, META_SPACE_DOMAIN_PATH);
     }
     
-    public void addTemplate(String template)
+    public void setDomainPath(String domainPath)
     {
-        templates.add(template);
+        SpacesServiceImpl.updateField(backingFolder, Locale.ENGLISH, META_SPACE_DOMAIN_PATH, domainPath);    	
     }
 
-    public String getDescription()
+    public String getImage()
     {
-        return description;
+        return SpacesServiceImpl.retrieveField(backingFolder, Locale.ENGLISH, META_SPACE_IMAGE);
     }
+	    
+    public void setImage(String pathToImage)
+    {
+        SpacesServiceImpl.updateField(backingFolder, Locale.ENGLISH, META_SPACE_DOMAIN_PATH, pathToImage);    	    	
+    }
+    
+	public String getDashboard() 
+	{
+		String name = backingFolder.getDefaultPage();
+		if (name == null)
+			name = Folder.FALLBACK_DEFAULT_PAGE;
+		return name;
+	}
 
-    public String getName()
+    public void setDashboard(String dashboard)
     {
-        return name;
+    	backingFolder.setDefaultPage(dashboard);
+    }
+    	
+    public void addSecuredGroup(String group)
+    {
+    	// TODO Auto-generated method stub
     }
 
-    public List<String> getTemplates()
+    public void addSecuredRole(String role)
     {
-        return templates;
+        // TODO Auto-generated method stub
+        
     }
 
-    public String getTitle()
+    public void addSecuredUser(String user)
     {
-        return title;
+        // TODO Auto-generated method stub
+        
     }
 
-    public void removeTemplate(String template)
+    public List<String> getSecuredGroup()
     {
-        templates.remove(template);
+        // TODO Auto-generated method stub
+        return null;
     }
 
-    public void setDescription(String description)
+    public List<String> getSecuredRoles()
     {
-        this.description = description;
+        // TODO Auto-generated method stub
+        return null;
     }
 
-    public void setTitle(String title)
+    public List<String> getSecuredUsers()
     {
-        this.title = title;
+        // TODO Auto-generated method stub
+        return null;
     }
-    
-    public String getPath()
+
+
+    public void removeSecuredGroup(String group)
     {
-        return path;       
+        // TODO Auto-generated method stub
+        
     }
 
-    public void setPath(String path)
+    public void removeSecuredRole(String role)
     {
-        this.path = path;
+        // TODO Auto-generated method stub
+        
     }
-    
-    public String getOwner()
+
+    public void removeSecuredUser(String user)
     {
-        return owner;
+        // TODO Auto-generated method stub
+        
     }
-}
+    
+ }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java?rev=903904&r1=903903&r2=903904&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/spaces/SpacesServiceImpl.java Wed Jan 27 23:30:43 2010
@@ -19,21 +19,22 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.List;
+import java.util.Locale;
 
+import org.apache.jetspeed.administration.AdminUtil;
 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.GenericMetadata;
 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;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Spaces Services
@@ -43,6 +44,8 @@
  */
 public class SpacesServiceImpl implements Spaces
 {
+    protected static Logger log = LoggerFactory.getLogger(SpacesServiceImpl.class);    
+  	
     private PageManager pageManager;
     private TemplateLocator decoratorLocator;
     
@@ -51,95 +54,341 @@
         this.pageManager = pageManager;
         this.decoratorLocator = decoratorLocator;
     }
+
+    public List<Environment> listEnvironments()
+    {
+        List<Environment> envs = new LinkedList<Environment>();
+        Folder envFolder = null;
+        try
+        {
+            envFolder = pageManager.getFolder(ENVIRONMENTS_LOCATION);
+            Iterator<Folder> it = envFolder.getFolders().iterator(); 
+            while (it.hasNext())
+            {
+                Folder backingFolder = it.next();
+                Environment env = loadEnvironment(backingFolder);
+                envs.add(env);
+            }            
+        }
+        catch (Exception e)
+        {
+            // its OK to have no environments, optional feature
+        }
+        return envs;
+    }
     
-    public Space addSpace(Space space)
+    public Environment createEnvironment(String envName, String owner) throws SpacesException
     {
-        // TODO Auto-generated method stub
-        return null;
+    	Folder folder = pageManager.newFolder(makeEnvironmentPath(envName));
+    	// TODO: store owner in security constraints
+    	updateField(folder, Locale.ENGLISH, Environment.META_ENV_OWNER, owner);
+    	try
+    	{
+    		pageManager.updateFolder(folder);
+    	}
+    	catch (Exception e)
+    	{
+    		throw new SpacesException(e);
+    	}
+    	return new EnvironmentImpl(folder);
+    }
+
+    public void storeEnvironment(Environment env) throws SpacesException
+    {
+    	try
+    	{
+	    	if (env instanceof EnvironmentImpl)
+	    	{
+	    		pageManager.updateFolder(((EnvironmentImpl)env).getBackingFolder());
+	    	}
+    	}
+    	catch (Exception e)
+    	{
+    		throw new SpacesException(e);
+    	}
+    }
+
+    public void deleteEnvironment(Environment env) throws SpacesException    
+    {
+    	try
+    	{
+	    	if (env instanceof EnvironmentImpl)
+	    	{
+	    		pageManager.removeFolder(((EnvironmentImpl)env).getBackingFolder());
+	    	}
+    	}
+    	catch (Exception e)
+    	{
+    		throw new SpacesException(e);
+    	}
     }
-
+    
+    public Environment lookupEnvironment(String envName) 
+    {
+    	try 
+    	{
+			Environment env = new EnvironmentImpl(pageManager.getFolder(makeEnvironmentPath(envName)));
+			return env;
+		} 
+    	catch (FolderNotFoundException e) 
+    	{
+		} 
+    	catch (Exception e) 
+    	{
+    		log.error("lookupEnvironment", e);        	    		
+		}
+    	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("/");
-            defaultSpace.setTitle(root.getTitle());
-            Iterator spaces = root.getFolders().iterator();
+            Folder root = pageManager.getFolder(Folder.PATH_SEPARATOR);
+            Space defaultSpace = loadSpace(root);
+            result.add(defaultSpace);            
+            Iterator<Folder> spaces = root.getFolders().iterator();
             for (int ix = 0; spaces.hasNext(); ix++)
             {
-                Node node = (Node)spaces.next();
-                if (node.isHidden())
+                Folder folder = spaces.next();
+                if (folder.isHidden() || folder.isReserved())
                     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);
-                    }
-                }
+                Space space = loadSpace(folder);
+                result.add(space);
             }
         }
-        catch (FolderNotFoundException e)
+        catch (Exception e)
         {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
+    		log.error("listSpaces", e);        	
+        }            
+        return result;
+    }
+    
+    public List<Space> listSpaces(String envName)
+    {
+        List<Space> result = new ArrayList<Space>();
+        Folder envFolder = null;
+        try
+        {    	
+        	envFolder = pageManager.getFolder(makeEnvironmentPath(envName));        	
         }
-        catch (InvalidFolderException e)
+    	catch (FolderNotFoundException e) 
+    	{
+    		return result;
+    	}
+        catch (Exception e)
         {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
+    		log.error("listSpaces", e);        	
         }
-        catch (NodeException e)
+        try
         {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }            
+	        Iterator<Link> links = envFolder.getLinks().iterator();
+	        while (links.hasNext())
+	        {
+	        	Link link = links.next();
+	        	String spacePath = link.getPath();
+	        	Folder folder = pageManager.getFolder(spacePath);
+                if (folder.isHidden() || folder.isReserved())
+                	continue;
+	        	result.add(loadSpace(folder));
+	        }
+        }
+    	catch (FolderNotFoundException e) 
+    	{
+		} 
+    	catch (Exception e) 
+    	{
+    		log.error("listSpaces", e);        	
+		}        
         return result;
     }
 
-    public void removeSpace(Space space)
+    public Space createSpace(String spaceName, Folder templateFolder, String owner) throws SpacesException
     {
-        // TODO Auto-generated method stub
-
+    	String spacePath = makeSpacePath(spaceName);
+        Folder spaceFolder = null;
+        boolean found = false;        
+        try
+        {
+            spaceFolder = this.pageManager.getFolder(spacePath);
+            found = (spaceFolder != null);
+        }
+        catch (Exception ignore)
+        {}        
+        try
+        {
+            if (!found)
+            {
+                pageManager.deepCopyFolder(templateFolder, spacePath, owner);
+            }
+            else
+            {
+                pageManager.deepMergeFolder(templateFolder, spacePath, owner);
+            }
+            
+            spaceFolder = pageManager.getFolder(spacePath);
+            Space space = loadSpace(spaceFolder);
+            space.setOwner(owner);
+            storeSpace(space);
+            return space;    	
+        }
+        catch (Exception e)
+        {
+        	throw new SpacesException(e);
+        }        
     }
-
-    public Environment addEnvironment(Environment env)
+    
+    public Space createSpace(String spaceName, String owner) throws SpacesException
     {
-        // TODO Auto-generated method stub
-        return null;
+    	Folder folder = pageManager.newFolder(makeSpacePath(spaceName));
+    	// TODO: store owner in security constraints
+    	updateField(folder, Locale.ENGLISH, Space.META_SPACE_OWNER, owner);
+    	try
+    	{
+    		pageManager.updateFolder(folder);
+    	}
+    	catch (Exception e)
+    	{
+    		throw new SpacesException(e);
+    	}
+    	return new SpaceImpl(folder);    	
+    }
+
+    public void storeSpace(Space space) throws SpacesException
+    {
+    	try
+    	{
+	    	if (space instanceof SpaceImpl)
+	    	{
+	    		pageManager.updateFolder(((SpaceImpl)space).getBackingFolder());
+	    	}
+    	}
+    	catch (Exception e)
+    	{
+    		throw new SpacesException(e);
+    	}    	
     }
-
-    public Space addPage(Space space, Page page)
+    
+    public void deleteSpace(Space space) throws SpacesException
     {
-        // TODO Auto-generated method stub
-        return null;
+    	try
+    	{
+	    	if (space instanceof SpaceImpl)
+	    	{
+	    		pageManager.removeFolder(((SpaceImpl)space).getBackingFolder());
+	    		// TODO: remove from environments
+	    	}
+    	}
+    	catch (Exception e)
+    	{
+    		throw new SpacesException(e);
+    	}
     }
-
-    public Space addSpace(Environment env, Space space)
+        
+    public Space lookupSpace(String spaceName) 
     {
-        // TODO Auto-generated method stub
-        return null;
+    	try 
+    	{
+			Space space = new SpaceImpl(pageManager.getFolder(makeSpacePath(spaceName)));
+			return space;
+		} 
+    	catch (FolderNotFoundException e) 
+    	{
+		} 
+    	catch (Exception e) 
+    	{
+    		log.error("lookupSpace", e);        	
+		}
+    	return null;
     }
-
-    public List<Environment> listEnvironments()
+    
+    public void addSpaceToEnvironment(Space space, Environment env) throws SpacesException
     {
-        // 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;
+		try
+		{
+    		String path = AdminUtil.concatenatePaths(ENVIRONMENTS_LOCATION, env.getPath());
+    		path = AdminUtil.concatenatePaths(path, space.getName());
+			Link link = pageManager.newLink(path);
+    		link.setUrl(space.getPath());
+    		pageManager.updateLink(link);
+		}
+		catch (Exception e)
+		{
+			throw new SpacesException(e);
+		}
     }
-
+    
+    public void removeSpaceFromEnvironment(Space space, Environment env) throws SpacesException
+    {
+		try
+		{
+    		String path = AdminUtil.concatenatePaths(ENVIRONMENTS_LOCATION, env.getPath());
+    		path = AdminUtil.concatenatePaths(path, space.getName());
+    		Link link ;
+    		try
+    		{
+    			link = pageManager.getLink(path);
+    		}
+    		catch (Exception e)
+    		{
+    			return; // not found
+    		}    		
+    		pageManager.removeLink(link);
+		}
+		catch (Exception e)
+		{
+			throw new SpacesException(e);
+		}
+    }
+    
+    public boolean isSpaceInEnvironment(Space space, Environment env)
+    {
+		String path = AdminUtil.concatenatePaths(ENVIRONMENTS_LOCATION, env.getPath());
+		path = AdminUtil.concatenatePaths(path, space.getName());
+    	try
+		{
+    		Link link = pageManager.getLink(path);
+    		return true;
+		}
+		catch (Exception e)
+		{
+		}    		    
+		return false; // not found		
+    }
+        
+    public void deletePage(Page page) throws SpacesException
+    {
+    	try
+    	{
+    		pageManager.removePage(page);    		
+    	}
+    	catch (Exception e)
+    	{
+    		throw new SpacesException(e);
+    	}
+    }
+ 
+	public List<Folder> listFolders(Space space) 
+	{
+        List<Folder> result = new ArrayList<Folder>();
+        try
+        {
+            Folder root = pageManager.getFolder(space.getPath());
+            Iterator folders = root.getFolders().iterator();
+            for (int ix = 0; folders.hasNext(); ix++)
+            {
+                Node folder = (Node)folders.next();
+                result.add((Folder)folder);
+            }
+        }
+        catch (Exception e)
+        {
+        	log.error("listFolders", e);
+        }
+        return result;        
+	}
+    
     public List<Link> listLinks(Space space)
     {
         List<Link> result = new ArrayList<Link>();
@@ -155,8 +404,7 @@
         }
         catch (Exception e)
         {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
+        	log.error("listLinks", e);
         }
         return result;        
     }
@@ -176,34 +424,83 @@
         }
         catch (Exception e)
         {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
+        	log.error("listPages", e);
         }
         return result;        
     }
+    
+    /*
+     * Helpers
+     */
+    static protected boolean updateMetaField(Collection<LocalizedField> fields, Locale locale, String name, String value)
+    {
+        Iterator<LocalizedField> it = fields.iterator();
+        while (it.hasNext())
+        {
+            LocalizedField field = it.next();
+            if (locale == null || field.getLocale().equals(locale))
+            {
+                field.setValue(value);
+                return true;
+            }
+        }       
+        return false;
+    }
 
-    public List<Space> listSpaces(Environment env)
+    static protected String retrieveField(Folder folder, Locale locale, String name)
     {
-        // TODO Auto-generated method stub
+        GenericMetadata metadata = folder.getMetadata();
+        Collection<LocalizedField> fields = metadata.getFields();
+        if (fields != null)
+        {
+            Iterator<LocalizedField> it = fields.iterator();
+            while (it.hasNext())
+            {
+                LocalizedField field = it.next();
+                if (locale == null || field.getLocale().equals(locale))
+                {                
+                    return field.getValue();
+                }
+            }
+        }
         return null;
     }
-
-    public void removeEnvironment(Environment env)
+    
+    static protected void updateField(Folder folder, Locale locale, String name, String value)
     {
-        // TODO Auto-generated method stub
+    	Locale addLocale = (locale == null) ? Locale.ENGLISH : locale;
+        GenericMetadata metadata = folder.getMetadata();
+        Collection<LocalizedField> fields = metadata.getFields();
+        if (fields == null || fields.size() == 0)
+            metadata.addField(addLocale, name, value);
+        else
+        {
+            if (!updateMetaField(fields, locale, name, value))
+            {
+                metadata.addField(addLocale, name, value); 
+            }
+        }
         
     }
 
-    public void removePage(Space space, Page page)
+    protected Space loadSpace(Folder f)
     {
-        // TODO Auto-generated method stub
-        
+        return new SpaceImpl(f);
     }
 
-    public void removeSpace(Environment env, Space space)
+    protected Environment loadEnvironment(Folder f)
     {
-        // TODO Auto-generated method stub
-        
-    }        
+        return new EnvironmentImpl(f);
+    }
 
+    protected String makeSpacePath(String spaceName)
+    {
+    	return AdminUtil.concatenatePaths(Folder.PATH_SEPARATOR, spaceName);
+    }
+
+    protected String makeEnvironmentPath(String envName)
+    {
+    	return AdminUtil.concatenatePaths(ENVIRONMENTS_LOCATION, envName); 
+    }
+    
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/testdata/test-pa/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/testdata/test-pa/WEB-INF/portlet.xml?rev=903904&r1=903903&r2=903904&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/testdata/test-pa/WEB-INF/portlet.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/testdata/test-pa/WEB-INF/portlet.xml Wed Jan 27 23:30:43 2010
@@ -1188,7 +1188,7 @@
         </preference>    
         <preference>
             <name>newUserTemplateDirectory</name>
-            <value>/_user/template/</value>
+            <value>/_template/new-user/</value>
         </preference>        
         <preference>
      		<name>subsiteRootFolder</name>
@@ -1815,7 +1815,7 @@
         </preference>
         <preference>
             <name>newUserTemplateDirectory</name>
-            <value>/_user/template-dev/</value>
+            <value>/_template/dev/</value>
         </preference>        
         <preference>
      		<name>requiredRole</name>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-serializer/src/resources/jetspeed-import.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-serializer/src/resources/jetspeed-import.xml?rev=903904&r1=903903&r2=903904&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-serializer/src/resources/jetspeed-import.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-serializer/src/resources/jetspeed-import.xml Wed Jan 27 23:30:43 2010
@@ -88,7 +88,7 @@
      <user>
 	   <name>joe</name>
 	   <password>xxx</password>
-       <template>/_user/template/</template>
+       <template>/_template/new-user/</template>
 		 
        <roles>admin, user</roles>
        <groups>dev,groupa, groupb</groups>

Modified: 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=903904&r1=903903&r2=903904&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Environment.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Environment.java Wed Jan 27 23:30:43 2010
@@ -16,7 +16,8 @@
  */
 package org.apache.jetspeed.spaces;
 
-import java.util.List;
+import java.util.Locale;
+
 
 /**
  * Container for spaces
@@ -25,17 +26,93 @@
  * @version $Id$
  */
 public interface Environment
-{
+{    
+    public static final String META_ENV_OWNER   = "env-owner";
+	
+	/**
+	 * Retrieve the name of the environment
+	 * 
+	 * @return the name of the environment
+	 */
     String getName();
+    
+    /**
+     * Retrieve the localized title of the environment for the requested locale
+     * 
+     * @param locale the locale of the string
+     * @return the localized title
+     */
+    String getTitle(Locale locale);
+
+    /**
+     * Retrieve unlocalized title of the environment 
+     * 
+     * @return the unlocalized title
+     */
     String getTitle();
-    String getPath();
-    void setPath(String path);
-    String getOwner();
+    
+    /**
+     * Set the title of environment for the given locale
+     * 
+     * @param locale the locale of the string
+     * @param title
+     */
+    void setTitle(String title, Locale locale);
+
+    /**
+     * Set the title of environment 
+     * 
+     * @param title
+     */
     void setTitle(String title);
+    
+	/**
+	 * Retrieve the path of the environment, which can be implementation specific
+	 * 
+	 * @return the path to where the environment is stored
+	 */    
+    String getPath();
+        
+    /**
+     * Retrieve the description of this environment
+     * @param locale the locale of the string
+     * @return
+     */
+    String getDescription(Locale locale);
+    
+    /**
+     * Sets the description on this environment
+     *  
+     * @param description
+     * @param locale the locale of the string
+     */
+    void setDescription(String description, Locale locale);
+
+    /**
+     * Retrieve the description of this environment
+     * @return
+     */
     String getDescription();
+    
+    /**
+     * Sets the description on this environment
+     *  
+     * @param description
+     */
     void setDescription(String description);
-    List<Space> getSpaces();
-    void addSpace(Space space);
-    void removeSpace(Space space);
-    Dashboard getDashboard();
+    
+    /**
+     * Retrieves the owner, a portal user name, for this environment
+     * 
+     * @return the name of the environment owner
+     */
+    String getOwner();
+
+    /**
+     * Sets the owner on this environment
+     *  
+     * @param owner
+     */
+    void setOwner(String owner);
+        
 }

Modified: 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=903904&r1=903903&r2=903904&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Space.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Space.java Wed Jan 27 23:30:43 2010
@@ -17,6 +17,7 @@
 package org.apache.jetspeed.spaces;
 
 import java.util.List;
+import java.util.Locale;
 
 /**
  * Space object represents a single space in the Jetspeed site or somewhere else
@@ -26,15 +27,235 @@
  */
 public interface Space
 {
+    public static final String META_SPACE_OWNER = "space-owner";
+    public static final String META_SPACE_DOMAIN_PATH = "space-domain-path";
+    public static final String META_SPACE_IMAGE = "space-image";
+	
+	/**
+	 * Retrieve the name of the space
+	 * 
+	 * @return the name of the space
+	 */	
     String getName();
+
+    /**
+     * Retrieve the localized title of the space for the requested locale
+     * 
+     * @return the localized title
+     */
+    String getTitle(Locale locale);
+
+    /**
+     * Retrieve the unlocalized title of the space 
+     * 
+     * @return the unlocalized title
+     */
     String getTitle();
-    String getPath();
-    void setPath(String path);
-    String getOwner();
+    
+    /**
+     * Set the title of space for the given locale
+     * 
+     * @param locale
+     * @param title
+     */
+    void setTitle(String title, Locale locale);
+
+    /**
+     * Set the title of space 
+     * 
+     * @param title
+     */
     void setTitle(String title);
+    
+	/**
+	 * Retrieve the path of the space, which can be implementation specific
+	 * 
+	 * @return the path to where the space is stored
+	 */    
+    String getPath();
+        
+    /**
+     * Retrieve the description of this space
+     * 
+     * @param locale the locale of the string
+     * @return
+     */
+    String getDescription(Locale locale);
+    
+    /**
+     * Retrieve the description of this space
+     * 
+     * @return
+     */
     String getDescription();
+    
+    /**
+     * Sets the description on this space
+     *  
+     * @param description
+     * @param locale the locale of the string
+     */
+    void setDescription(String description, Locale locale);
+    
+    /**
+     * Sets the description on this space
+     *  
+     * @param description
+     */
     void setDescription(String description);
-    List<String> getTemplates();
-    void addTemplate(String template);
-    void removeTemplate(String template);
+    
+    /**
+     * Retrieves the owner, a portal user name, for this space
+     * 
+     * @return the name of the space owner
+     */
+    String getOwner();
+    
+    /**
+     * Sets the owner on this environment
+     *  
+     * @param owner
+     */
+    void setOwner(String owner);
+    
+    /**
+     * Retrieves the image associated with this space
+     * 
+     * @return a portal context relative path to the image
+     */
+    String getImage();
+    
+    /**
+     * Sets the portal context relative path to the image associated with this space
+     * 
+     * @param pathToImage the portal context relative path to the image
+     */
+    void setImage(String pathToImage);
+       
+    /**
+     * Retrieves the default dashboard for this space. There can only be one dashboard per space
+     * 
+     * @return a dashboard name, the page which represents the dashboard 
+     */
+    String getDashboard();    
+    
+    /**
+     * Sets the dashboard for this space. Dashboards are really just pages
+     * 
+     * @param page
+     */
+    void setDashboard(String dashboard);
+
+    /**
+     * Retrieves the domain path associated with this space 
+     * For example, employees.localhost.com, or employees.* where * is the SERVER_NAME of this request
+     *  
+     * @return the domain path string
+     */
+    String getDomainPath();
+    
+    /**
+     * Sets the domain path associated with this space
+     * For example, employees.localhost.com, or employees.* where * is the SERVER_NAME of this request
+     * 
+     * @param domain the domain path string
+     */
+    void setDomainPath(String domain);
+    
+    /**
+     * Retrieves the theme name for this space
+     * 
+     * @return the theme name
+     */
+    String getTheme();
+    
+    /**
+     * Sets the theme name to be associated with this space
+     * All pages in this space will inherit the theme (unless the theme is overriden on the specific page or folder)
+     * 
+     * @param themeName the name of the theme
+     */
+    void setTheme(String themeName);
+
+    /**
+     * Retrieve the list of secured roles constraining access to this space
+     * 
+     * @return the list of role name strings 
+     */
+    List<String> getSecuredRoles();
+    
+    /**
+     * Add a role to the list of required roles to view this space
+     * @param role
+     */
+    void addSecuredRole(String role);
+    
+    /**
+     * Remove a role from the list of required roles to view this space
+     * 
+     * @param role
+     */
+    void removeSecuredRole(String role);
+
+    /**
+     * Retrieve the list of secured groups constraining access to this space
+     * 
+     * @return the list of group name strings 
+     */    
+    List<String> getSecuredGroup();
+
+    /**
+     * Add a group to the list of required group to view this space
+     * @param group
+     */    
+    void addSecuredGroup(String group);
+    
+    /**
+     * Remove a group from the list of required roles to view this space
+     * 
+     * @param group
+     */    
+    void removeSecuredGroup(String group);
+    
+    /**
+     * Retrieve the list of secured users constraining access to this space
+     * 
+     * @return the list of users name strings 
+     */    
+    List<String> getSecuredUsers();
+    
+    /**
+     * Add a username to the list of users who can view this page
+     * @param user the name of user
+     */    
+    void addSecuredUser(String user);
+    
+    /**
+     * Remove a user from the list of required users to view this space
+     * 
+     * @param user the name of user
+     */    
+    void removeSecuredUser(String user);
+    
+    /**
+     * Get a list of page templates configured for this space
+     *  
+     * @return a list of one or more page templates
+     */
+//    List<String> getTemplates();
+    
+    /**
+     * Add a template to the list of templates for this space
+     * 
+     * @param template
+     */
+//    void addTemplate(String template);
+    
+    /**
+     * Remove a template from the list of templates for this space
+     * 
+     * @param template
+     */
+//    void removeTemplate(String template);    
+    
 }



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