portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r209305 [4/10] - in /portals/jetspeed-2/branches/MENUS_BRANCH: components/locator/src/java/org/apache/jetspeed/profiler/impl/ components/page-manager/ components/page-manager/src/java/META-INF/ components/page-manager/src/java/org/apache/je...
Date Tue, 05 Jul 2005 18:58:14 GMT
Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/test/org/apache/jetspeed/page/TestCastorXmlPageManager.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/test/org/apache/jetspeed/page/TestCastorXmlPageManager.java?rev=209305&r1=209304&r2=209305&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/test/org/apache/jetspeed/page/TestCastorXmlPageManager.java (original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/test/org/apache/jetspeed/page/TestCastorXmlPageManager.java Tue Jul  5 11:58:05 2005
@@ -18,6 +18,7 @@
 // Java imports
 import java.io.File;
 import java.io.FileFilter;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
@@ -31,9 +32,13 @@
 import org.apache.jetspeed.idgenerator.IdGenerator;
 import org.apache.jetspeed.idgenerator.JetspeedIdGenerator;
 import org.apache.jetspeed.om.common.GenericMetadata;
-import org.apache.jetspeed.om.folder.DocumentSet;
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.folder.FolderMetaData;
+import org.apache.jetspeed.om.folder.MenuDefinition;
+import org.apache.jetspeed.om.folder.MenuExcludeDefinition;
+import org.apache.jetspeed.om.folder.MenuIncludeDefinition;
+import org.apache.jetspeed.om.folder.MenuOptionsDefinition;
+import org.apache.jetspeed.om.folder.MenuSeparatorDefinition;
 import org.apache.jetspeed.om.page.Document;
 import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.om.page.Link;
@@ -67,39 +72,36 @@
      * 
      * @see junit.framework.TestCase#setUp()
      */
-protected void setUp() throws Exception
+    protected void setUp() throws Exception
     {
         super.setUp();
         dirHelper = new DirectoryHelper(new File("target/testdata/pages"));
-        FileFilter noCVS = new FileFilter() {
+        FileFilter noCVSorSVNorBackups = new FileFilter() {
 
             public boolean accept( File pathname )
             {
-                return !pathname.getName().equals("CVS");                
+                return !pathname.getName().equals("CVS") && !pathname.getName().equals(".svn") && !pathname.getName().endsWith("~");
             }
             
         };
-        dirHelper.copyFrom(new File("testdata/pages"), noCVS);
+        dirHelper.copyFrom(new File("testdata/pages"), noCVSorSVNorBackups);
         IdGenerator idGen = new JetspeedIdGenerator(65536,"P-","");
         FileCache cache = new FileCache(10, 12);
         
-        
         DocumentHandler psmlHandler = new CastorFileSystemDocumentHandler("/META-INF/page-mapping.xml", Page.DOCUMENT_TYPE, Page.class, "target/testdata/pages", cache);
         DocumentHandler linkHandler = new CastorFileSystemDocumentHandler("/META-INF/page-mapping.xml", Link.DOCUMENT_TYPE, Link.class, "target/testdata/pages", cache);
         DocumentHandler folderMetaDataHandler = new CastorFileSystemDocumentHandler("/META-INF/page-mapping.xml", FolderMetaData.DOCUMENT_TYPE, FolderMetaData.class, "target/testdata/pages", cache);
-        DocumentHandler documentSetHandler = new CastorFileSystemDocumentHandler("/META-INF/page-mapping.xml", DocumentSet.DOCUMENT_TYPE, DocumentSet.class, "target/testdata/pages", cache);
         DocumentHandler pageSecurityHandler = new CastorFileSystemDocumentHandler("/META-INF/page-mapping.xml", PageSecurity.DOCUMENT_TYPE, PageSecurity.class, "target/testdata/pages", cache);
         
         DocumentHandlerFactory handlerFactory = new DocumentHandlerFactoryImpl();
         handlerFactory.registerDocumentHandler(psmlHandler);
         handlerFactory.registerDocumentHandler(linkHandler);
         handlerFactory.registerDocumentHandler(folderMetaDataHandler);        
-        handlerFactory.registerDocumentHandler(documentSetHandler);        
         handlerFactory.registerDocumentHandler(pageSecurityHandler);        
         
         FolderHandler folderHandler = new FileSystemFolderHandler("target/testdata/pages", handlerFactory, cache);
         
-        pageManager = new CastorXmlPageManager(idGen, handlerFactory, folderHandler, cache, -1, false, false, false);
+        pageManager = new CastorXmlPageManager(idGen, handlerFactory, folderHandler, cache, false, false);
         
         
     }
@@ -266,7 +268,7 @@
         }
         catch (Exception e)
         {
-            String errmsg = "Exception in page registratio: " + e.toString();
+            String errmsg = "Exception in page registration: " + e.toString();
             e.printStackTrace();
             System.err.println(errmsg);
             assertNotNull(errmsg, null);
@@ -306,34 +308,6 @@
         assertTrue(page.getTitle().equals("Updated Title"));
     }
 
-    public void testRemovePage() throws Exception
-    {
-        Page page = pageManager.getPage(this.testId);
-
-        try
-        {
-            pageManager.removePage(page);
-        }
-        catch (Exception e)
-        {
-            String errmsg = "Exception in page remove: " + e.toString();
-            e.printStackTrace();
-            System.err.println(errmsg);
-            assertNotNull(errmsg, null);
-        }
-
-        boolean exceptionFound = false;
-        try
-        {
-            page = pageManager.getPage(this.testId);
-        }
-        catch (PageNotFoundException pnfe)
-        {
-            exceptionFound = true;
-        }
-        assertTrue(exceptionFound);
-    }
-
     public void testFolders() throws Exception
     {
 
@@ -383,14 +357,12 @@
         assertNull(folder3.getAll().exclusiveSubset("Jetspeed2\\.link").get("Jetspeed2.link"));
         assertNull(folder3.getAll().inclusiveSubset("apache\\.link").get("Jetspeed2.link"));
         assertNotNull(folder3.getAll().inclusiveSubset("apache\\.link").get("apache.link"));
-        
-
     }
 
     public void testFolderMetaData() throws Exception
     {
         Folder folder1French = pageManager.getFolder("/folder1");        
-;
+
         assertEquals("Titre francais pour la chemise 1", folder1French.getTitle(Locale.FRENCH));
         assertEquals("Titre francais pour la chemise 1", folder1French.getTitle(Locale.FRANCE));
 
@@ -405,11 +377,19 @@
         
         // Test folder with no metadata assigned
         Folder rootFolder = pageManager.getFolder("/");
-
-        assertEquals("/", rootFolder.getTitle());
         assertEquals(rootFolder.getTitle(), rootFolder.getTitle(Locale.FRENCH));
     }
 
+    public void testDefaultTitles() throws Exception
+    {
+        Page defaultPage = pageManager.getPage("/folder1/folder2/default-page.psml");
+        assertNotNull(defaultPage);
+        assertEquals("Default Page", defaultPage.getTitle());
+
+        Folder rootFolder = pageManager.getFolder("/");
+        assertEquals("Top", rootFolder.getTitle());
+    }
+
     public void testPageMetaData() throws Exception
     {
         Page page = pageManager.getPage("/default-page.psml");
@@ -435,6 +415,179 @@
         assertNotNull(folder.getLinks());
         assertEquals(folder.getLinks().size(), 1);
         assertEquals("http://portals.apache.org", ((Document) folder.getLinks().iterator().next()).getUrl());
-       
+    }
+
+    public void testMenuDefinitions() throws Exception
+    {
+        // test folder resident menu definitions
+        Folder folder = pageManager.getFolder("/");
+        assertNotNull(folder);
+        List menus = folder.getMenuDefinitions();
+        assertNotNull(menus);
+        assertEquals(5, menus.size());
+
+        MenuDefinition simpleMenu = (MenuDefinition)menus.get(0);
+        assertNotNull(simpleMenu);
+        assertEquals("simple", simpleMenu.getName());
+        assertNotNull(simpleMenu.getMenuElements());
+        assertEquals(1, simpleMenu.getMenuElements().size());
+        assertTrue(simpleMenu.getMenuElements().get(0) instanceof MenuOptionsDefinition);
+        assertEquals("/test001.psml,/folder1/folder2", ((MenuOptionsDefinition)simpleMenu.getMenuElements().get(0)).getOptions());
+
+        MenuDefinition top2LevelsMenu = (MenuDefinition)menus.get(1);
+        assertNotNull(top2LevelsMenu);
+        assertEquals("top-2-levels", top2LevelsMenu.getName());
+        assertNull(top2LevelsMenu.getMenuElements());
+        assertEquals("/", top2LevelsMenu.getOptions());
+        assertEquals(2, top2LevelsMenu.getDepth());
+        assertEquals("dhtml-pull-down", top2LevelsMenu.getSkin());
+
+        MenuDefinition topRolePagesMenu = (MenuDefinition)menus.get(2);
+        assertNotNull(topRolePagesMenu);
+        assertEquals("top-role-pages", topRolePagesMenu.getName());
+        assertTrue(topRolePagesMenu.isRegexp());
+        assertEquals("roles", topRolePagesMenu.getProfile());
+        assertEquals("*.psml,*.link", topRolePagesMenu.getOrder());
+
+        MenuDefinition breadCrumbsMenu = (MenuDefinition)menus.get(3);
+        assertNotNull(breadCrumbsMenu);
+        assertEquals("bread-crumbs", breadCrumbsMenu.getName());
+        assertTrue(breadCrumbsMenu.isPaths());
+
+        MenuDefinition topCustomMenu = (MenuDefinition)menus.get(4);
+        assertNotNull(topCustomMenu);
+        assertEquals("top-custom", topCustomMenu.getName());
+        assertEquals("Top Menu", topCustomMenu.getTitle());
+        assertEquals("Top", topCustomMenu.getShortTitle());
+        assertEquals("Haut", topCustomMenu.getTitle(Locale.FRENCH));
+        assertEquals("H", topCustomMenu.getShortTitle(Locale.FRENCH));
+        assertNotNull(topCustomMenu.getMenuElements());
+        assertEquals(5, topCustomMenu.getMenuElements().size());
+        assertTrue(topCustomMenu.getMenuElements().get(0) instanceof MenuOptionsDefinition);
+        assertTrue(((MenuOptionsDefinition)topCustomMenu.getMenuElements().get(0)).isRegexp());
+        assertEquals("groups", ((MenuOptionsDefinition)topCustomMenu.getMenuElements().get(0)).getProfile());
+        assertTrue(topCustomMenu.getMenuElements().get(1) instanceof MenuDefinition);
+        assertTrue(topCustomMenu.getMenuElements().get(2) instanceof MenuExcludeDefinition);
+        assertEquals("top-role-pages", ((MenuExcludeDefinition)topCustomMenu.getMenuElements().get(2)).getName());
+        assertTrue(topCustomMenu.getMenuElements().get(3) instanceof MenuSeparatorDefinition);
+        assertEquals("More Top Pages", ((MenuSeparatorDefinition)topCustomMenu.getMenuElements().get(3)).getText());
+        assertTrue(topCustomMenu.getMenuElements().get(4) instanceof MenuIncludeDefinition);
+        assertEquals("simple", ((MenuIncludeDefinition)topCustomMenu.getMenuElements().get(4)).getName());
+        assertTrue(((MenuIncludeDefinition)topCustomMenu.getMenuElements().get(4)).isNest());
+
+        MenuDefinition topCustomNestedMenu = (MenuDefinition)topCustomMenu.getMenuElements().get(1);
+        assertEquals("/", topCustomNestedMenu.getOptions());
+        assertEquals("page", topCustomNestedMenu.getProfile());
+        assertEquals(5, topCustomNestedMenu.getMenuElements().size());
+        assertTrue(topCustomNestedMenu.getMenuElements().get(0) instanceof MenuSeparatorDefinition);
+        assertEquals("Top Pages", ((MenuSeparatorDefinition)topCustomNestedMenu.getMenuElements().get(0)).getText());
+        assertEquals("Ye Olde Top Pages", ((MenuSeparatorDefinition)topCustomNestedMenu.getMenuElements().get(0)).getText(Locale.ENGLISH));
+        assertEquals("Select from Top Pages menu...", ((MenuSeparatorDefinition)topCustomNestedMenu.getMenuElements().get(0)).getTitle());
+        assertEquals("Haut", ((MenuSeparatorDefinition)topCustomNestedMenu.getMenuElements().get(0)).getTitle(Locale.FRENCH));
+        assertTrue(topCustomNestedMenu.getMenuElements().get(1) instanceof MenuOptionsDefinition);
+        assertTrue(topCustomNestedMenu.getMenuElements().get(2) instanceof MenuSeparatorDefinition);
+        assertEquals("bold", ((MenuSeparatorDefinition)topCustomNestedMenu.getMenuElements().get(2)).getSkin());
+        assertEquals("Custom Pages", ((MenuSeparatorDefinition)topCustomNestedMenu.getMenuElements().get(2)).getTitle());
+        assertTrue(topCustomNestedMenu.getMenuElements().get(3) instanceof MenuOptionsDefinition);
+        assertEquals(1, ((MenuOptionsDefinition)topCustomNestedMenu.getMenuElements().get(3)).getDepth());
+        assertEquals("*.psml", ((MenuOptionsDefinition)topCustomNestedMenu.getMenuElements().get(3)).getOrder());
+        assertTrue(topCustomNestedMenu.getMenuElements().get(4) instanceof MenuOptionsDefinition);
+        assertTrue(((MenuOptionsDefinition)topCustomNestedMenu.getMenuElements().get(4)).isPaths());
+        assertEquals("*", ((MenuOptionsDefinition)topCustomNestedMenu.getMenuElements().get(4)).getProfile());
+        assertEquals("links", ((MenuOptionsDefinition)topCustomNestedMenu.getMenuElements().get(4)).getSkin());
+        assertEquals("@", ((MenuOptionsDefinition)topCustomNestedMenu.getMenuElements().get(4)).getOptions());
+
+        // test page resident menu definitions
+        Page page = pageManager.getPage("/test001.psml");
+        assertNotNull(page);
+        menus = page.getMenuDefinitions();
+        assertNotNull(menus);
+        assertEquals(1, menus.size());
+
+        simpleMenu = (MenuDefinition)menus.get(0);
+        assertNotNull(simpleMenu);
+        assertEquals("simple", simpleMenu.getName());
+        assertNotNull(simpleMenu.getMenuElements());
+        assertEquals(2, simpleMenu.getMenuElements().size());
+
+        // test writing page menu definitions
+        page = pageManager.getPage(this.testId);
+        page.setMenuDefinitions(new ArrayList());
+        MenuDefinition newMenu = pageManager.newMenuDefinition();
+        newMenu.setName("updated-menu");
+        newMenu.setSkin("tabs");
+        newMenu.setMenuElements(new ArrayList());
+        MenuSeparatorDefinition newSeparator = pageManager.newMenuSeparatorDefinition();
+        newSeparator.setText("-- Updated Menu --");
+        newMenu.getMenuElements().add(newSeparator);
+        MenuOptionsDefinition newOptions0 = pageManager.newMenuOptionsDefinition();
+        newOptions0.setOptions("/*.psml");
+        newOptions0.setRegexp(true);
+        newMenu.getMenuElements().add(newOptions0);
+        MenuOptionsDefinition newOptions1 = pageManager.newMenuOptionsDefinition();
+        newOptions1.setOptions("/folder0");
+        newMenu.getMenuElements().add(newOptions1);
+        MenuDefinition newNestedMenu = pageManager.newMenuDefinition();
+        newNestedMenu.setOptions("/*/");
+        newNestedMenu.setRegexp(true);
+        newMenu.getMenuElements().add(newNestedMenu);
+        MenuExcludeDefinition newExcludeMenu = pageManager.newMenuExcludeDefinition();
+        newExcludeMenu.setName("exclude-menu");
+        newMenu.getMenuElements().add(newExcludeMenu);
+        MenuIncludeDefinition newIncludeMenu = pageManager.newMenuIncludeDefinition();
+        newIncludeMenu.setName("include-menu");
+        newIncludeMenu.setNest(true);
+        newMenu.getMenuElements().add(newIncludeMenu);
+        page.getMenuDefinitions().add(newMenu);
+        try
+        {
+            pageManager.updatePage(page);
+        }
+        catch (Exception e)
+        {
+            String errmsg = "Exception in page update: " + e.toString();
+            e.printStackTrace();
+            System.err.println(errmsg);
+            assertNotNull(errmsg, null);
+        }
+        page = pageManager.getPage(this.testId);
+        assertNotNull(page.getMenuDefinitions());
+        assertEquals(1, page.getMenuDefinitions().size());
+        assertNotNull(((MenuDefinition)page.getMenuDefinitions().get(0)).getMenuElements());
+        assertEquals(6,((MenuDefinition)page.getMenuDefinitions().get(0)).getMenuElements().size());
+        assertTrue(((MenuDefinition)page.getMenuDefinitions().get(0)).getMenuElements().get(0) instanceof MenuSeparatorDefinition);
+        assertTrue(((MenuDefinition)page.getMenuDefinitions().get(0)).getMenuElements().get(1) instanceof MenuOptionsDefinition);
+        assertTrue(((MenuDefinition)page.getMenuDefinitions().get(0)).getMenuElements().get(2) instanceof MenuOptionsDefinition);
+        assertTrue(((MenuDefinition)page.getMenuDefinitions().get(0)).getMenuElements().get(3) instanceof MenuDefinition);
+        assertTrue(((MenuDefinition)page.getMenuDefinitions().get(0)).getMenuElements().get(4) instanceof MenuExcludeDefinition);
+        assertTrue(((MenuDefinition)page.getMenuDefinitions().get(0)).getMenuElements().get(5) instanceof MenuIncludeDefinition);
+    }
+
+    public void testRemovePage() throws Exception
+    {
+        Page page = pageManager.getPage(this.testId);
+
+        try
+        {
+            pageManager.removePage(page);
+        }
+        catch (Exception e)
+        {
+            String errmsg = "Exception in page remove: " + e.toString();
+            e.printStackTrace();
+            System.err.println(errmsg);
+            assertNotNull(errmsg, null);
+        }
+
+        boolean exceptionFound = false;
+        try
+        {
+            page = pageManager.getPage(this.testId);
+        }
+        catch (PageNotFoundException pnfe)
+        {
+            exceptionFound = true;
+        }
+        assertTrue(exceptionFound);
     }
 }

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/testdata/pages/folder.metadata
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/testdata/pages/folder.metadata?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/testdata/pages/folder.metadata (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/testdata/pages/folder.metadata Tue Jul  5 11:58:05 2005
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<folder>
+
+  <menu name="simple">
+    <options>/test001.psml,/folder1/folder2</options>
+  </menu>
+
+  <menu name="top-2-levels" options="/" depth="2" skin="dhtml-pull-down"/>
+
+  <menu name="top-role-pages" regexp="true" options="/*" profile="roles" order="*.psml,*.link"/>
+
+  <menu name="bread-crumbs" options="./" paths="true"/>
+
+  <menu name="top-custom">
+    <title>Top Menu</title>
+    <short-title>Top</short-title>
+    <metadata name="title" xml:lang="fr">Haut</metadata>
+    <metadata name="short-title" xml:lang="fr">H</metadata>
+    <options regexp="true" profile="groups">/folder1/folder3/*</options>
+    <menu options="/" profile="page">
+      <separator>
+        <text>Top Pages</text>
+        <title>Select from Top Pages menu...</title>
+        <metadata name="title" xml:lang="fr">Haut</metadata>
+        <metadata name="text" xml:lang="en">Ye Olde Top Pages</metadata>
+      </separator>
+      <options regexp="true">/*</options>
+      <separator skin="bold">
+        <title>Custom Pages</title>
+      </separator>
+      <options depth="1" order="*.psml">/folder1/</options>
+      <options paths="true" profile="*" skin="links">@</options>
+    </menu>
+    <exclude>top-role-pages</exclude>
+    <separator>More Top Pages</separator>
+    <include nest="true">simple</include>
+  </menu>
+
+</folder>

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/testdata/pages/folder1/folder2/default-page.psml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/testdata/pages/folder1/folder2/default-page.psml?rev=209305&r1=209304&r2=209305&view=diff
==============================================================================
Binary files - no diff available.

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/testdata/pages/test001.psml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/testdata/pages/test001.psml?rev=209305&r1=209304&r2=209305&view=diff
==============================================================================
Binary files - no diff available.

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/.cvsignore
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/.cvsignore?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/.cvsignore (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/.cvsignore Tue Jul  5 11:58:05 2005
@@ -0,0 +1,3 @@
+target
+*.log
+jcoverage.ser
\ No newline at end of file

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/locator.ent
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/locator.ent?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/locator.ent (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/locator.ent Tue Jul  5 11:58:05 2005
@@ -0,0 +1,2 @@
+<!-- derive locator.ent from parent -->
+<!ENTITY % locator-ent SYSTEM "file:../../locator.ent"> %locator-ent;

Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/locator.ent
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/locator.path
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/locator.path?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/locator.path (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/locator.path Tue Jul  5 11:58:05 2005
@@ -0,0 +1 @@
+../../
\ No newline at end of file

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/maven.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/maven.xml?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/maven.xml (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/maven.xml Tue Jul  5 11:58:05 2005
@@ -0,0 +1,39 @@
+<!--
+Copyright 2005 The Apache Software Foundation
+
+Licensed 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.
+-->
+
+<project default="java:jar"
+         xmlns:j="jelly:core" 
+         xmlns:define="jelly:define">
+
+  <goal name="deployJar">
+    <property name='maven.test.skip' value='true'/> 
+    <attainGoal name="jar:install"/>
+    <copy file="${basedir}/target/${maven.final.name}.jar" todir="${org.apache.jetspeed.deploy.war.dir}/jetspeed/WEB-INF/lib"/>
+  </goal>
+
+  <preGoal name="test:test">
+    <copy todir="target/testdata">
+      <fileset dir="testdata"/>
+    </copy>
+  </preGoal>
+
+  <preGoal name="test:single">
+    <copy todir="target/testdata">
+      <fileset dir="testdata"/>
+    </copy>
+  </preGoal>
+
+</project>

Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/maven.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/project.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/project.properties?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/project.properties (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/project.properties Tue Jul  5 11:58:05 2005
@@ -0,0 +1,20 @@
+# Copyright 2005 The Apache Software Foundation
+#
+# Licensed 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.properties,v 1.4 2004/07/11 03:23:45 paulsp Exp $
+#
+
+maven.multiproject.type=jar
+maven.license.licenseFile=${basedir}/../../LICENSE.TXT
+

Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/project.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/project.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/project.xml?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/project.xml (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/project.xml Tue Jul  5 11:58:05 2005
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+  <!ENTITY % locator-entities SYSTEM "file:locator.ent"> %locator-entities;
+]>
+
+<!--
+Copyright 2005 The Apache Software Foundation
+
+Licensed 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.
+-->
+
+<project>
+  <extend>${basedir}/../../project.xml</extend>
+  <pomVersion>3</pomVersion>
+  <id>jetspeed-portal-site</id>
+  <groupId>jetspeed2</groupId>
+  <name>Jetspeed-2 Portal Site</name>
+  
+  <package>org.apache.jetspeed</package>
+  <description>
+      Portal Site implementation.
+  </description>
+
+  <repository>                 
+    <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:jakarta-jetspeed-2/components/registry</connection>
+    <url>http://cvs.apache.org/viewcvs/jakarta-jetspeed-2/components/registry/</url>
+  </repository>
+
+  <shortDescription>Portal Site</shortDescription>
+  <dependencies>
+  
+    &spring-deps;
+    
+    &db-ojb-deps;
+    
+    &commons-config-dep;
+    
+  	<dependency>
+      <id>jetspeed-cm</id>
+      <groupId>jetspeed2</groupId>
+      <version>&jetspeed-version;</version>
+      <properties>
+        <war.bundle>true</war.bundle>
+      </properties>
+    </dependency>  	
+    <dependency>
+      <id>jetspeed2:jetspeed-commons</id>
+      <version>&jetspeed-version;</version>
+    </dependency>
+    <dependency>
+      <id>jetspeed2:jetspeed-api</id>
+      <version>&jetspeed-version;</version>
+    </dependency>
+    <dependency>
+      <id>jetspeed2:jetspeed-persistence</id>
+      <version>&jetspeed-version;</version>
+    </dependency>
+    <dependency>
+      <id>jetspeed2:jetspeed-registry</id>
+      <version>&jetspeed-version;</version>
+    </dependency>      
+    <dependency>
+      <id>jetspeed2:jetspeed-file-cache</id>
+      <version>&jetspeed-version;</version>
+    </dependency>
+    <dependency>
+      <id>jetspeed2:jetspeed-id-generator</id>
+      <version>&jetspeed-version;</version>
+    </dependency>       
+    <dependency>
+      <id>jetspeed2:jetspeed-security</id>
+      <version>&jetspeed-version;</version>
+    </dependency>
+    <dependency>
+      <id>jetspeed2:jetspeed-locator</id>
+      <version>&jetspeed-version;</version>
+    </dependency>
+    <dependency>
+      <id>jetspeed2:jetspeed-profiler</id>
+      <version>&jetspeed-version;</version>
+    </dependency>
+    <dependency>
+      <id>jetspeed2:jetspeed-page-manager</id>
+      <version>&jetspeed-version;</version>
+    </dependency>
+
+    <!-- Testing only -->
+    <dependency>
+      <id>jetspeed2:jetspeed-rdbms</id>
+      <version>&jetspeed-version;</version>
+    </dependency>       
+     <dependency>
+      <id>commons-lang</id>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
+      <id>commons-logging</id>
+      <version>1.0.3</version>
+    </dependency>
+    <dependency>
+      <id>commons-beanutils</id>
+      <version>1.6.1</version>
+    </dependency>
+    <dependency>
+      <id>commons-configuration</id>
+      <version>1.0-dev</version>
+    </dependency>
+    <dependency>
+      <id>junit</id>
+      <version>3.8.1</version>
+    </dependency>
+    <dependency>
+      <id>log4j</id>
+      <version>1.2.6</version>
+    </dependency>   
+    <dependency>
+      <id>commons-collections</id>
+      <version>3.0</version>
+    </dependency>
+    <dependency>
+      <id>commons-io</id>
+      <version>0.1</version>
+    </dependency>
+    <dependency>
+      <id>xerces</id>
+      <version>2.3.0</version>
+    </dependency>
+    <dependency>
+      <id>xml-apis</id>
+      <version>2.0.2</version>
+    </dependency>
+    <dependency>
+      <id>tyrex</id>
+      <version>1.0.1</version>
+    </dependency>
+    <dependency>
+      <id>jta</id>
+      <jar>jta1.0.1.jar</jar>
+    </dependency>
+    
+    <dependency>
+      <id>commons-pool</id>
+      <version>1.2</version>
+    </dependency>
+    <dependency>
+      <id>commons-dbcp</id>
+      <version>1.2.1</version>
+    </dependency>
+    <dependency>
+      <id>castor</id>
+      <version>0.9.4.3</version>
+    </dependency>
+    <dependency>
+      <id>xerces</id>
+      <version>2.3.0</version>
+    </dependency>
+    <dependency>
+      <id>xml-apis</id>
+      <version>2.0.2</version>
+    </dependency>
+    <dependency>
+      <id>saxpath</id>
+      <version>1.0-FCS</version>
+      <properties>
+        <war.bundle>true</war.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <id>jaxen</id>
+      <version>1.0-FCS-full</version>
+      <properties>
+        <war.bundle>true</war.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <id>jdom</id>
+      <version>1.0</version>
+      <properties>
+        <war.bundle>true</war.bundle>
+      </properties>
+    </dependency>
+    <!-- This is only a test dependency -->
+    <dependency>
+      <id>hsqldb</id>
+      <version>1.7.1</version>
+    </dependency>
+      
+      &pluto-deps;
+      
+    <dependency>
+      <!-- portlet-api.jar must be in %MAVEN_HOME%respository/portlet-api/jars -->
+      <id>portlet-api</id>
+      <version>1.0</version>
+    </dependency>
+    <dependency>
+      <id>servletapi</id>
+      <version>2.3</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <sourceDirectory>src/java</sourceDirectory>
+    
+    <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
+    <unitTest>
+      <resources>
+        <resource>
+          <directory>${basedir}/src/test</directory>
+          <excludes>
+           <exclude>**/*.java</exclude>
+          </excludes>
+        </resource>
+        <resource>
+          <directory>${basedir}/src/java</directory>
+          <excludes>
+           <exclude>**/*.java</exclude>
+           <exclude>**/META-INF/**</exclude>
+          </excludes>
+        </resource>
+        
+        &db-ojb-resources;
+        
+        &log4j-resources;
+        
+      </resources>
+    </unitTest>
+    
+    <resources>
+      <resource>
+        <directory>${basedir}/src/java</directory>
+        <excludes>
+          <exclude>**/*.java</exclude>
+        </excludes>
+      </resource>
+    </resources>
+  </build>
+
+  <reports>
+    
+    &j2-reports;
+    
+  </reports>  
+</project>

Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/project.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuDefinitionImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuDefinitionImpl.java?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuDefinitionImpl.java (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuDefinitionImpl.java Tue Jul  5 11:58:05 2005
@@ -0,0 +1,295 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.om.folder.impl;
+
+import java.util.List;
+import java.util.Locale;
+
+import org.apache.jetspeed.om.folder.MenuDefinition;
+import org.apache.jetspeed.om.common.GenericMetadata;
+
+/**
+ * This abstract class implements the menu definition interface
+ * in a default manner to allow derived classes to easily describe
+ * standard menu definitions supported natively by the portal site
+ * component.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public abstract class StandardMenuDefinitionImpl implements MenuDefinition
+{
+    /**
+     * StandardMenuDefinitionImpl - constructor
+     */
+    public StandardMenuDefinitionImpl()
+    {
+    }
+
+    /**
+     * getName - get menu name
+     *
+     * @return menu name
+     */
+    public String getName()
+    {
+        return null;
+    }
+
+    /**
+     * setName - set menu name
+     *
+     * @param name menu name
+     */
+    public void setName(String name)
+    {
+        throw new RuntimeException("StandardMenuDefinitionImpl instance immutable");
+    }
+
+    /**
+     * getOptions - get comma separated menu options if not specified as elements
+     *
+     * @return option paths specification
+     */
+    public String getOptions()
+    {
+        return null;
+    }
+
+    /**
+     * setOptions - set comma separated menu options if not specified as elements
+     *
+     * @param option option paths specification
+     */
+    public void setOptions(String options)
+    {
+        throw new RuntimeException("StandardMenuDefinitionImpl instance immutable");
+    }
+
+    /**
+     * getDepth - get depth of inclusion for folder menu options
+     *
+     * @return inclusion depth
+     */
+    public int getDepth()
+    {
+        return 0;
+    }
+
+    /**
+     * setDepth - set depth of inclusion for folder menu options
+     *
+     * @param depth inclusion depth
+     */
+    public void setDepth(int depth)
+    {
+        throw new RuntimeException("StandardMenuDefinitionImpl instance immutable");
+    }
+
+    /**
+     * isPaths - get generate ordered path options for specified options
+     *
+     * @return paths options flag
+     */
+    public boolean isPaths()
+    {
+        return false;
+    }
+    
+    /**
+     * setPaths - set generate ordered path options for specified options
+     *
+     * @param paths paths options flag
+     */
+    public void setPaths(boolean paths)
+    {
+        throw new RuntimeException("StandardMenuDefinitionImpl instance immutable");
+    }
+    
+    /**
+     * isRegexp - get regexp flag for interpreting specified options
+     *
+     * @return regexp flag
+     */
+    public boolean isRegexp()
+    {
+        return false;
+    }
+
+    /**
+     * setRegexp - set regexp flag for interpreting specified options
+     *
+     * @param regexp regexp flag
+     */
+    public void setRegexp(boolean regexp)
+    {
+        throw new RuntimeException("StandardMenuDefinitionImpl instance immutable");
+    }
+
+    /**
+     * getProfile - get profile locator used to filter specified options
+     *
+     * @return profile locator name
+     */
+    public String getProfile()
+    {
+        return null;
+    }
+
+    /**
+     * setProfile - set profile locator used to filter specified options
+     *
+     * @param locatorName profile locator name
+     */
+    public void setProfile(String locatorName)
+    {
+        throw new RuntimeException("StandardMenuDefinitionImpl instance immutable");
+    }
+
+    /**
+     * getOrder - get comma separated regexp ordering patterns for options
+     *
+     * @return ordering patterns list
+     */
+    public String getOrder()
+    {
+        return null;
+    }
+
+    /**
+     * setOrder - set comma separated regexp ordering patterns for options
+     *
+     * @param order ordering patterns list
+     */
+    public void setOrder(String order)
+    {
+        throw new RuntimeException("StandardMenuDefinitionImpl instance immutable");
+    }
+
+    /**
+     * getSkin - get skin name for menu
+     *
+     * @return skin name
+     */
+    public String getSkin()
+    {
+        return null;
+    }
+
+    /**
+     * setSkin - set skin name for menu
+     *
+     * @param name skin name
+     */
+    public void setSkin(String name)
+    {
+        throw new RuntimeException("StandardMenuDefinitionImpl instance immutable");
+    }
+
+    /**
+     * getTitle - get default title for menu
+     *
+     * @return title text
+     */
+    public String getTitle()
+    {
+        return getName();
+    }
+
+    /**
+     * setTitle - set default title for menu
+     *
+     * @param title title text
+     */
+    public void setTitle(String title)
+    {
+        throw new RuntimeException("StandardMenuDefinitionImpl instance immutable");
+    }
+
+    /**
+     * getShortTitle - get default short title for menu
+     *
+     * @return short title text
+     */
+    public String getShortTitle()
+    {
+        return getTitle();
+    }
+
+    /**
+     * setShortTitle - set default short title for menu
+     *
+     * @param title short title text
+     */
+    public void setShortTitle(String title)
+    {
+        throw new RuntimeException("StandardMenuDefinitionImpl instance immutable");
+    }
+
+    /**
+     * getTitle - get locale specific title for menu from metadata
+     *
+     * @param locale preferred locale
+     * @return title text
+     */
+    public String getTitle(Locale locale)
+    {
+        return getTitle();
+    }
+
+    /**
+     * getShortTitle - get locale specific short title for menu from metadata
+     *
+     * @param locale preferred locale
+     * @return short title text
+     */
+    public String getShortTitle(Locale locale)
+    {
+        return getShortTitle();
+    }
+
+    /**
+     * getMetadata - get generic metadata instance for menu
+     *
+     * @return metadata instance
+     */
+    public GenericMetadata getMetadata()
+    {
+        return null;
+    }
+
+    /**
+     * getMenuElements - get ordered list of menu options,
+     *                   nested menus, separators, included
+     *                   menu, and excluded menu elements
+     *
+     * @return element list
+     */
+    public List getMenuElements()
+    {
+        return null;
+    }
+
+    /**
+     * setMenuElements - set ordered list of menu options
+     *
+     * @param elements element list
+     */
+    public void setMenuElements(List elements)
+    {
+        throw new RuntimeException("StandardMenuDefinitionImpl instance immutable");
+    }
+}

Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuExcludeDefinitionImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuExcludeDefinitionImpl.java?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuExcludeDefinitionImpl.java (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuExcludeDefinitionImpl.java Tue Jul  5 11:58:05 2005
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.om.folder.impl;
+
+import org.apache.jetspeed.om.folder.MenuExcludeDefinition;
+
+/**
+ * This abstract class implements the menu exclude definition
+ * interface in a default manner to allow derived classes to
+ * easily describe standard menu definitions.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public abstract class StandardMenuExcludeDefinitionImpl implements MenuExcludeDefinition
+{
+    /**
+     * StandardMenuExcludeDefinitionImpl - constructor
+     */
+    public StandardMenuExcludeDefinitionImpl()
+    {
+    }
+
+    /**
+     * getName - get menu name with options to exclude
+     *
+     * @return menu name
+     */
+    public String getName()
+    {
+        return null;
+    }
+
+    /**
+     * setName - set menu name with options to exclude
+     *
+     * @param name menu name
+     */
+    public void setName(String name)
+    {
+        throw new RuntimeException("StandardMenuExcludeDefinitionImpl instance immutable");
+    }
+}

Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuExcludeDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuIncludeDefinitionImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuIncludeDefinitionImpl.java?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuIncludeDefinitionImpl.java (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuIncludeDefinitionImpl.java Tue Jul  5 11:58:05 2005
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.om.folder.impl;
+
+import org.apache.jetspeed.om.folder.MenuIncludeDefinition;
+
+/**
+ * This interface describes the object used to define
+ * portal site menu included menus.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public abstract class StandardMenuIncludeDefinitionImpl implements MenuIncludeDefinition
+{
+    /**
+     * StandardMenuIncludeDefinitionImpl - constructor
+     */
+    public StandardMenuIncludeDefinitionImpl()
+    {
+    }
+
+    /**
+     * getName - get menu name to nest or with options to include
+     *
+     * @return menu name
+     */
+    public String getName()
+    {
+        return null;
+    }
+
+    /**
+     * setName - set menu name to nest or with options to include
+     *
+     * @param name menu name
+     */
+    public void setName(String name)
+    {
+        throw new RuntimeException("StandardMenuIncludeDefinitionImpl instance immutable");
+    }
+
+    /**
+     * isNest - get nesting for included menu
+     *
+     * @return nest options flag
+     */
+    public boolean isNest()
+    {
+        return false;
+    }
+    
+    /**
+     * setNest - set nesting for included menu
+     *
+     * @param nest nest menu flag
+     */
+    public void setNest(boolean nest)
+    {
+        throw new RuntimeException("StandardMenuIncludeDefinitionImpl instance immutable");
+    }
+}

Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuIncludeDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuOptionsDefinitionImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuOptionsDefinitionImpl.java?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuOptionsDefinitionImpl.java (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuOptionsDefinitionImpl.java Tue Jul  5 11:58:05 2005
@@ -0,0 +1,176 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.om.folder.impl;
+
+import org.apache.jetspeed.om.folder.MenuOptionsDefinition;
+
+/**
+ * This abstract class implements the menu options definition
+ * interface in a default manner to allow derived classes to
+ * easily describe standard menu definitions.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public abstract class StandardMenuOptionsDefinitionImpl implements MenuOptionsDefinition
+{
+    /**
+     * StandardMenuOptionsDefinitionImpl - constructor
+     */
+    public StandardMenuOptionsDefinitionImpl()
+    {
+    }
+
+    /**
+     * getOptions - get comma separated menu options
+     *
+     * @return option paths specification
+     */
+    public String getOptions()
+    {
+        return null;
+    }
+
+    /**
+     * setOptions - set comma separated menu options
+     *
+     * @param options option paths specification
+     */
+    public void setOptions(String options)
+    {
+        throw new RuntimeException("StandardMenuOptionsDefinitionImpl instance immutable");
+    }
+
+    /**
+     * getDepth - get depth of inclusion for folder options
+     *
+     * @return inclusion depth
+     */
+    public int getDepth()
+    {
+        return 0;
+    }
+
+    /**
+     * setDepth - set depth of inclusion for folder options
+     *
+     * @param depth inclusion depth
+     */
+    public void setDepth(int depth)
+    {
+        throw new RuntimeException("StandardMenuOptionsDefinitionImpl instance immutable");
+    }
+
+    /**
+     * isPaths - get generate ordered path options
+     *
+     * @return paths options flag
+     */
+    public boolean isPaths()
+    {
+        return false;
+    }
+    
+    /**
+     * setPaths - set generate ordered path options
+     *
+     * @param paths paths options flag
+     */
+    public void setPaths(boolean paths)
+    {
+        throw new RuntimeException("StandardMenuOptionsDefinitionImpl instance immutable");
+    }
+    
+    /**
+     * isRegexp - get regexp flag for interpreting options
+     *
+     * @return regexp flag
+     */
+    public boolean isRegexp()
+    {
+        return false;
+    }
+
+    /**
+     * setRegexp - set regexp flag for interpreting options
+     *
+     * @param regexp regexp flag
+     */
+    public void setRegexp(boolean regexp)
+    {
+        throw new RuntimeException("StandardMenuOptionsDefinitionImpl instance immutable");
+    }
+
+    /**
+     * getProfile - get profile locator used to filter options
+     *
+     * @return profile locator name
+     */
+    public String getProfile()
+    {
+        return null;
+    }
+
+    /**
+     * setProfile - set profile locator used to filter options
+     *
+     * @param locatorName profile locator name
+     */
+    public void setProfile(String locatorName)
+    {
+        throw new RuntimeException("StandardMenuOptionsDefinitionImpl instance immutable");
+    }
+
+    /**
+     * getOrder - get comma separated regexp ordering patterns
+     *
+     * @return ordering patterns list
+     */
+    public String getOrder()
+    {
+        return null;
+    }
+
+    /**
+     * setOrder - set comma separated regexp ordering patterns
+     *
+     * @param order ordering patterns list
+     */
+    public void setOrder(String order)
+    {
+        throw new RuntimeException("StandardMenuOptionsDefinitionImpl instance immutable");
+    }
+
+    /**
+     * getSkin - get skin name for options
+     *
+     * @return skin name
+     */
+    public String getSkin()
+    {
+        return null;
+    }
+
+    /**
+     * setSkin - set skin name for options
+     *
+     * @param name skin name
+     */
+    public void setSkin(String name)
+    {
+        throw new RuntimeException("StandardMenuOptionsDefinitionImpl instance immutable");
+    }
+}

Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuOptionsDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuSeparatorDefinitionImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuSeparatorDefinitionImpl.java?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuSeparatorDefinitionImpl.java (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuSeparatorDefinitionImpl.java Tue Jul  5 11:58:05 2005
@@ -0,0 +1,131 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.om.folder.impl;
+
+import java.util.Locale;
+
+import org.apache.jetspeed.om.folder.MenuSeparatorDefinition;
+import org.apache.jetspeed.om.common.GenericMetadata;
+
+/**
+ * This abstract class implements the menu separator definition
+ * interface in a default manner to allow derived classes to
+ * easily describe standard menu definitions.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public abstract class StandardMenuSeparatorDefinitionImpl implements MenuSeparatorDefinition
+{
+    /**
+     * StandardMenuSeparatorDefinitionImpl - constructor
+     */
+    public StandardMenuSeparatorDefinitionImpl()
+    {
+    }
+
+    /**
+     * getSkin - get skin name for separator
+     *
+     * @return skin name
+     */
+    public String getSkin()
+    {
+        return null;
+    }
+
+    /**
+     * setSkin - set skin name for separator
+     *
+     * @param name skin name
+     */
+    public void setSkin(String name)
+    {
+        throw new RuntimeException("StandardMenuSeparatorDefinitionImpl instance immutable");        
+    }
+
+    /**
+     * getTitle - get default title for separator
+     *
+     * @return title text
+     */
+    public String getTitle()
+    {
+        return null;
+    }
+
+    /**
+     * setTitle - set default title for separator
+     *
+     * @param title title text
+     */
+    public void setTitle(String title)
+    {
+        throw new RuntimeException("StandardMenuSeparatorDefinitionImpl instance immutable");        
+    }
+
+    /**
+     * getText - get default text for separator
+     *
+     * @return text
+     */
+    public String getText()
+    {
+        return null;
+    }
+
+    /**
+     * setText - set default text for separator
+     *
+     * @param text text
+     */
+    public void setText(String text)
+    {
+        throw new RuntimeException("StandardMenuSeparatorDefinitionImpl instance immutable");        
+    }
+
+    /**
+     * getTitle - get locale specific title for separator from metadata
+     *
+     * @param locale preferred locale
+     * @return title text
+     */
+    public String getTitle(Locale locale)
+    {
+        return getTitle();
+    }
+
+    /**
+     * getText - get locale specific text for separator from metadata
+     *
+     * @param locale preferred locale
+     * @return text
+     */
+    public String getText(Locale locale)
+    {
+        return getText();
+    }
+
+    /**
+     * getMetadata - get generic metadata instance for menu
+     *
+     * @return metadata instance
+     */
+    public GenericMetadata getMetadata()
+    {
+        return null;
+    }
+}

Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuSeparatorDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native



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