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 [1/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
Author: rwatler
Date: Tue Jul  5 11:58:05 2005
New Revision: 209305

URL: http://svn.apache.org/viewcvs?rev=209305&view=rev
Log:
COMMITTED:

- implemented new portal-site component
- added design document for portal-site component
- removed deprecated profiled page context from profiler and page manager
- stripped request page selection implementation from page manager
- tightened access to folders in page manager to require view permission
- expanded page manager support and tests to include PSML menu definitions
- modified page manager internals to include marshal/unmarshal hooks
- changed Castor page mananager implementation to use SAX XML processing
- integrated new portal-site component removing deprecated page mananger support in profiler valve
- ported portal pages site PSML, removing deprecated document sets

TODO:

- convert tigris decorators to use standard menu definitions from portal-site component
- fix visibilty of hidden pages in portal-site profiled page context compatibility mode
- commit HTML version of design document
- integrate portal-site component into page manager PSML change notification to dump internal caches
- profile new portal-site component and optimize


Added:
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuDefinitionImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuElementImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuExcludeDefinitionImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuIncludeDefinitionImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuMetadataImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuOptionsDefinitionImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuSeparatorDefinitionImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/testdata/pages/folder.metadata
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/.cvsignore
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/locator.ent   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/locator.path
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/maven.xml   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/project.properties   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/project.xml   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuDefinitionImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuExcludeDefinitionImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuIncludeDefinitionImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuOptionsDefinitionImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/impl/StandardMenuSeparatorDefinitionImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/proxy/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/page/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/page/proxy/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/page/proxy/LinkProxy.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/om/page/proxy/PageProxy.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/page/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/page/document/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/page/document/proxy/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/page/document/proxy/NodeProxy.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/page/document/proxy/NodeSetImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/MenuElementImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/MenuImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/MenuOptionImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/MenuSeparatorImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteRequestContextImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/DefaultMenuDefinition.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/DefaultMenuOptionsDefinition.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/StandardBackMenuDefinition.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/StandardNavigationsMenuDefinition.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/StandardPagesMenuDefinition.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteViewMenuDefinitionLocator.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteViewProxy.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteViewSearchPath.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/META-INF/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/META-INF/test-spring.xml   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/org/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/org/apache/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/org/apache/jetspeed/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/org/apache/jetspeed/portalsite/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/org/apache/jetspeed/portalsite/TestPortalSite.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/__subsite-root/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/__subsite-root/folder.metadata
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/__subsite-root/link0.link
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/__subsite-root/page0.psml
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_group/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_group/group/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_group/group/folder1/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_group/group/folder1/folder.metadata
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_group/group/folder1/page1.psml
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_group/group/link0.link
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_role/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_role/role0/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_role/role0/page2.psml
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_role/role1/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_role/role1/page2.psml
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_user/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_user/user/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_user/user/_mediatype/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_user/user/_mediatype/html/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_user/user/_mediatype/html/page2.psml
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_user/user/folder.metadata
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_user/user/folder1/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_user/user/folder1/page0.psml
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_user/user/page2.psml
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/folder.metadata
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/folder0/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/folder0/folder.metadata
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/folder0/page0.psml
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/folder1/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/folder1/folder.metadata
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/folder1/page0.psml
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/folder2/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/link0.link
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/link1.link
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/page0.psml
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/page1.psml
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/page2.psml
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/xdocs/
    portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/xdocs/navigation.xml   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/design-docs/src/portal-site/
    portals/jetspeed-2/branches/MENUS_BRANCH/design-docs/src/portal-site/portal-site-component.sxw   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/om/folder/MenuDefinition.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/om/folder/MenuExcludeDefinition.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/om/folder/MenuIncludeDefinition.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/om/folder/MenuOptionsDefinition.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/om/folder/MenuSeparatorDefinition.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/portalsite/
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/portalsite/Menu.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/portalsite/MenuElement.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/portalsite/MenuOption.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/portalsite/MenuSeparator.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/portalsite/PortalSite.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/portalsite/PortalSiteRequestContext.java   (with props)
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/portalsite/PortalSiteSessionContext.java   (with props)
Removed:
    portals/jetspeed-2/branches/MENUS_BRANCH/components/locator/src/java/org/apache/jetspeed/profiler/impl/JetspeedProfiledPageContext.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/DocumentSetImpl.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/DocumentSetPathImpl.java
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/om/folder/DocumentSet.java
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/om/folder/DocumentSetPath.java
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/profiler/ProfiledPageContext.java
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/Administrative/user-admin.ds
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/_role/user/top-links/more-pages.ds
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/_user/user/top-pages.ds
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/non-java.ds
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/pages.ds
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/top-pages.ds
Modified:
    portals/jetspeed-2/branches/MENUS_BRANCH/components/locator/src/java/org/apache/jetspeed/profiler/impl/ProfileFallbackIterator.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/project.xml
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/META-INF/page-mapping.xml
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderMetaDataImpl.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/AbstractBaseElement.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/ContentPageImpl.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/LinkImpl.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageImpl.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/PageMetadataImpl.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/page/document/AbstractNode.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/page/document/CastorFileSystemDocumentHandler.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/page/document/FileSystemFolderHandler.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/page/impl/AbstractPageManager.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/page/impl/CastorXmlPageManager.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/test/org/apache/jetspeed/page/TestCastorXmlPageManager.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/testdata/pages/folder1/folder2/default-page.psml
    portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/testdata/pages/test001.psml
    portals/jetspeed-2/branches/MENUS_BRANCH/components/profiler/src/java/org/apache/jetspeed/profiler/impl/JetspeedProfiler.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/profiler/src/java/org/apache/jetspeed/profiler/impl/JetspeedProfilerImpl.java
    portals/jetspeed-2/branches/MENUS_BRANCH/components/registry/src/java/org/apache/jetspeed/om/impl/GenericMetadataImpl.java
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/om/folder/Folder.java
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/om/folder/FolderMetaData.java
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/om/page/Page.java
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/profiler/ProfileLocator.java
    portals/jetspeed-2/branches/MENUS_BRANCH/jetspeed-api/src/java/org/apache/jetspeed/profiler/Profiler.java
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/project.xml
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/java/org/apache/jetspeed/profiler/impl/ProfilerValveImpl.java
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/assembly/page-manager.xml
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/assembly/pipelines.xml
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/Administrative/folder.metadata
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/_user/user/folder.metadata
    portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/pages/folder.metadata
    portals/jetspeed-2/branches/MENUS_BRANCH/src/sql/populate-db-default.sql

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/locator/src/java/org/apache/jetspeed/profiler/impl/ProfileFallbackIterator.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/locator/src/java/org/apache/jetspeed/profiler/impl/ProfileFallbackIterator.java?rev=209305&r1=209304&r2=209305&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/locator/src/java/org/apache/jetspeed/profiler/impl/ProfileFallbackIterator.java (original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/locator/src/java/org/apache/jetspeed/profiler/impl/ProfileFallbackIterator.java Tue Jul  5 11:58:05 2005
@@ -75,9 +75,6 @@
             hasNext = true;
         }
         
-        ProfileLocatorPropertyImpl element = (ProfileLocatorPropertyImpl)elements.get(last);
-        state = element.getFallbackType();
-                
         return hasNext;
     }
     
@@ -90,11 +87,21 @@
 
         if (last >= 0)
         {
+            // generate properties list to return
             List elements = locator.getElements();
             properties = new ProfileLocatorProperty[last+1];
+            ProfileLocatorProperty lastElement = null;
             Iterator it = elements.listIterator();
             for (int count = 0; (count <= last) && it.hasNext(); count++)
-                properties[count] = (ProfileLocatorProperty)it.next();
+            {
+                lastElement = (ProfileLocatorProperty)it.next();
+                properties[count] = lastElement;
+            }
+
+            // modify iterator state based on fallback type;
+            // performed here to prevent multiple calls to
+            // hasNext() from changing iterator state
+            state = lastElement.getFallbackType();
             last--;
         }
 

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/project.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/project.xml?rev=209305&r1=209304&r2=209305&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/project.xml (original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/project.xml Tue Jul  5 11:58:05 2005
@@ -74,14 +74,6 @@
       <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>
     <!-- Testing only -->
     <dependency>
       <id>jetspeed2:jetspeed-rdbms</id>

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/META-INF/page-mapping.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/META-INF/page-mapping.xml?rev=209305&r1=209304&r2=209305&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/META-INF/page-mapping.xml (original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/META-INF/page-mapping.xml Tue Jul  5 11:58:05 2005
@@ -39,6 +39,12 @@
            collection="collection">
       <bind-xml name="metadata"/>
     </field>
+
+	<field name="menuDefinitions"
+           type="org.apache.jetspeed.om.folder.impl.MenuDefinitionImpl" 
+           collection="collection">
+      <bind-xml name="menu"/>
+    </field>
   </class>
   
   <class name="org.apache.jetspeed.om.page.psml.PageLocalizedFieldImpl">
@@ -108,8 +114,7 @@
       <bind-xml name="property"/>
     </field>
   </class>
-  
-  
+    
   <class name="org.apache.jetspeed.om.page.psml.LinkImpl">
     <map-to xml="link"/>
 
@@ -145,27 +150,83 @@
     </field>
   </class>
   
-  <class name="org.apache.jetspeed.om.folder.impl.DocumentSetImpl">
-    <map-to xml="document-set"/>
+  <class name="org.apache.jetspeed.om.folder.impl.FolderMetaDataImpl">
+    <map-to xml="folder"/>
 
     <field name="hidden" type="boolean">
       <bind-xml name="hidden" node="attribute"/>
-    </field>
+    </field>    
 
     <field name="securityConstraints"
            type="org.apache.jetspeed.om.page.psml.SecurityConstraintsImpl">
       <bind-xml name="security-constraints"/>
     </field>
     
-    <field name="profileLocatorName" type="java.lang.String">
-      <bind-xml name="profile-locator" />
+    <field name="title" type="java.lang.String">
+      <bind-xml name="title"/>
+    </field>
+    
+    <field name="shortTitle" type="java.lang.String">
+      <bind-xml name="short-title"/>
+    </field>
+    
+    <field name="defaultPage" type="java.lang.String">
+      <bind-xml name="default-page"/>
+    </field>
+
+    <field name="documentOrder"
+           type="java.lang.String" 
+           collection="vector">
+      <bind-xml name="document-order"/>
+    </field>    
+
+	<field name="metadataFields"
+           type="org.apache.jetspeed.om.page.psml.PageLocalizedFieldImpl" 
+           collection="collection">
+      <bind-xml name="metadata"/>
     </field>
 
-	<field name="documentPaths"
-           type="org.apache.jetspeed.om.folder.impl.DocumentSetPathImpl"
+	<field name="menuDefinitions"
+           type="org.apache.jetspeed.om.folder.impl.MenuDefinitionImpl" 
            collection="collection">
-      <bind-xml name="document-path"/>
+      <bind-xml name="menu"/>
     </field>
+  </class>
+
+  <class name="org.apache.jetspeed.om.folder.impl.MenuDefinitionImpl">
+    <map-to xml="menu"/>
+
+    <field name="name" type="java.lang.String">
+      <bind-xml name="name" node="attribute"/>
+    </field>    
+
+    <field name="options" type="java.lang.String">
+      <bind-xml name="options" node="attribute"/>
+    </field>    
+
+    <field name="depth" type="integer">
+      <bind-xml name="depth" node="attribute"/>
+    </field>    
+
+    <field name="paths" type="boolean">
+      <bind-xml name="paths" node="attribute"/>
+    </field>    
+
+    <field name="regexp" type="boolean">
+      <bind-xml name="regexp" node="attribute"/>
+    </field>    
+
+    <field name="profile" type="java.lang.String">
+      <bind-xml name="profile" node="attribute"/>
+    </field>    
+
+    <field name="order" type="java.lang.String">
+      <bind-xml name="order" node="attribute"/>
+    </field>    
+
+    <field name="skin" type="java.lang.String">
+      <bind-xml name="skin" node="attribute"/>
+    </field>    
 
     <field name="title" type="java.lang.String">
       <bind-xml name="title"/>
@@ -175,60 +236,124 @@
       <bind-xml name="short-title"/>
     </field>
     
- 	<field name="metadataFields"
+	<field name="metadataFields"
            type="org.apache.jetspeed.om.page.psml.PageLocalizedFieldImpl" 
            collection="collection">
       <bind-xml name="metadata"/>
     </field>
+
+	<field name="menuElementImpls"
+           type="org.apache.jetspeed.om.folder.impl.MenuElementImpl" 
+           collection="collection">
+      <bind-xml name="menu-element"/>
+    </field>
   </class>
 
-  <class name="org.apache.jetspeed.om.folder.impl.DocumentSetPathImpl">
-    <map-to xml="document-path"/>
+  <class name="org.apache.jetspeed.om.folder.impl.MenuElementImpl">
+    <map-to xml="menu-element"/>
 
-    <field name="regexp" type="boolean">
-      <bind-xml name="regexp" node="attribute"/>
+    <field name="options"
+           type="org.apache.jetspeed.om.folder.impl.MenuOptionsDefinitionImpl">
+      <bind-xml name="options"/>
     </field>
 
-    <field name="path" type="java.lang.String">
-      <bind-xml node="text"/>
+    <field name="menu"
+           type="org.apache.jetspeed.om.folder.impl.MenuDefinitionImpl">
+      <bind-xml name="menu"/>
+    </field>
+
+    <field name="separator"
+           type="org.apache.jetspeed.om.folder.impl.MenuSeparatorDefinitionImpl">
+      <bind-xml name="separator"/>
+    </field>
+
+    <field name="include"
+           type="org.apache.jetspeed.om.folder.impl.MenuIncludeDefinitionImpl">
+      <bind-xml name="include"/>
+    </field>
+
+    <field name="exclude"
+           type="org.apache.jetspeed.om.folder.impl.MenuExcludeDefinitionImpl">
+      <bind-xml name="exclude"/>
     </field>
   </class>
 
-  <class name="org.apache.jetspeed.om.folder.impl.FolderMetaDataImpl">
-    <map-to xml="folder"/>
+  <class name="org.apache.jetspeed.om.folder.impl.MenuOptionsDefinitionImpl">
+    <map-to xml="options"/>
 
-    <field name="hidden" type="boolean">
-      <bind-xml name="hidden" node="attribute"/>
+    <field name="options" type="java.lang.String">
+      <bind-xml node="text"/>
+    </field>    
+
+    <field name="depth" type="integer">
+      <bind-xml name="depth" node="attribute"/>
+    </field>    
+
+    <field name="paths" type="boolean">
+      <bind-xml name="paths" node="attribute"/>
+    </field>    
+
+    <field name="regexp" type="boolean">
+      <bind-xml name="regexp" node="attribute"/>
+    </field>    
+
+    <field name="profile" type="java.lang.String">
+      <bind-xml name="profile" node="attribute"/>
+    </field>    
+
+    <field name="order" type="java.lang.String">
+      <bind-xml name="order" node="attribute"/>
+    </field>    
+
+    <field name="skin" type="java.lang.String">
+      <bind-xml name="skin" node="attribute"/>
+    </field>    
+  </class>
+
+  <class name="org.apache.jetspeed.om.folder.impl.MenuSeparatorDefinitionImpl">
+    <map-to xml="separator"/>
+
+    <field name="skin" type="java.lang.String">
+      <bind-xml name="skin" node="attribute"/>
     </field>    
 
-    <field name="securityConstraints"
-           type="org.apache.jetspeed.om.page.psml.SecurityConstraintsImpl">
-      <bind-xml name="security-constraints"/>
-    </field>
-    
     <field name="title" type="java.lang.String">
       <bind-xml name="title"/>
     </field>
     
-    <field name="shortTitle" type="java.lang.String">
-      <bind-xml name="short-title"/>
+    <field name="textChild" type="java.lang.String">
+      <bind-xml name="text"/>
     </field>
     
-    <field name="defaultPage" type="java.lang.String">
-      <bind-xml name="default-page"/>
+    <field name="textBody" type="java.lang.String">
+      <bind-xml node="text"/>
     </field>
-
-    <field name="documentOrder"
-           type="java.lang.String" 
-           collection="vector">
-      <bind-xml name="document-order"/>
-    </field>    
-
+    
 	<field name="metadataFields"
            type="org.apache.jetspeed.om.page.psml.PageLocalizedFieldImpl" 
            collection="collection">
       <bind-xml name="metadata"/>
     </field>
+  </class>
+
+  <class name="org.apache.jetspeed.om.folder.impl.MenuIncludeDefinitionImpl">
+    <map-to xml="include"/>
+
+    <field name="name" type="java.lang.String">
+      <bind-xml node="text"/>
+    </field>    
+
+    <field name="nest" type="boolean">
+      <bind-xml name="nest" node="attribute"/>
+    </field>
+  </class>
+
+  <class name="org.apache.jetspeed.om.folder.impl.MenuExcludeDefinitionImpl">
+    <map-to xml="exclude"/>
+
+    <field name="name" type="java.lang.String">
+      <bind-xml node="text"/>
+    </field>    
   </class>
 
   <class name="org.apache.jetspeed.om.page.psml.Defaults">

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java?rev=209305&r1=209304&r2=209305&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java (original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java Tue Jul  5 11:58:05 2005
@@ -18,6 +18,7 @@
 import java.security.AccessController;
 import java.io.File;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Locale;
 
 import org.apache.commons.logging.Log;
@@ -25,7 +26,6 @@
 import org.apache.jetspeed.om.common.GenericMetadata;
 import org.apache.jetspeed.om.common.SecuredResource;
 import org.apache.jetspeed.om.common.SecurityConstraints;
-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.FolderNotFoundException;
@@ -57,9 +57,6 @@
  */
 public class FolderImpl extends AbstractNode implements Folder, Reset
 {
-    public static final String FALLBACK_DEFAULT_PAGE = "default-page.psml";
-
-    private static final String PAGE_NOT_FOUND_PAGE = "page_not_found.psml";
     private final static String FOLDER_PERMISSION_WILD_CHAR = new String(new char[]{FolderPermission.WILD_CHAR});
     
     private String defaultTheme;
@@ -77,23 +74,22 @@
         this.metadata.setParent(this);
         this.folderHandler = folderHandler;
         setId(path);
+        setPath(path);
         setHandlerFactory(handlerFactory);
         setPermissionsEnabled(handlerFactory.getPermissionsEnabled());
         setConstraintsEnabled(handlerFactory.getConstraintsEnabled());
-        setPath(path);
     }
 
     public FolderImpl( String path, DocumentHandlerFactory handlerFactory, FolderHandler folderHandler )
     {
         this.metadata = new FolderMetaDataImpl();
-        this.metadata.setTitle(path);
         this.metadata.setParent(this);
         this.folderHandler = folderHandler;
         setId(path);
+        setPath(path);
         setHandlerFactory(handlerFactory);
         setPermissionsEnabled(handlerFactory.getPermissionsEnabled());
         setConstraintsEnabled(handlerFactory.getConstraintsEnabled());
-        setPath(path);
     }
 
     /*
@@ -108,7 +104,7 @@
             String defaultPage = metadata.getDefaultPage();
             if(defaultPage == null)
             {
-                defaultPage = FALLBACK_DEFAULT_PAGE;
+                defaultPage = Folder.FALLBACK_DEFAULT_PAGE;
             }
             return getPage(defaultPage, false).getName();
         }
@@ -125,12 +121,12 @@
                     }
                     else
                     {
-                        return PAGE_NOT_FOUND_PAGE;
+                        return Folder.PAGE_NOT_FOUND_PAGE;
                     }
                 }
                 catch (NodeException e1)
                 {
-                    return PAGE_NOT_FOUND_PAGE;
+                    return Folder.PAGE_NOT_FOUND_PAGE;
                 }
             }
         }
@@ -197,8 +193,8 @@
      */
     public NodeSet getFolders() throws FolderNotFoundException, DocumentException
     {
-        // by default disable access checks to facilitate navigation
-        return getFolders(false);
+        // by default enable access checks
+        return getFolders(true);
     }
 
     /**
@@ -236,8 +232,8 @@
      */
     public Folder getFolder(String name) throws FolderNotFoundException, DocumentException
     {
-        // by default disable access checks to facilitate navigation
-        return getFolder(name, false);
+        // by default enable access checks
+        return getFolder(name, true);
     }
 
     /**
@@ -386,78 +382,6 @@
 
     /**
      * <p>
-     * getDocumentSets
-     * </p>
-     * 
-     * @param checkAccess flag
-     * @return documentSets node set
-     * @throws NodeException
-     */
-    public NodeSet getDocumentSets(boolean checkAccess) throws NodeException
-    {
-        // get list of all documentSets
-        NodeSet documentSets = getAllNodes().subset(DocumentSet.DOCUMENT_TYPE);
-
-        // filter node set by access
-        if (checkAccess)
-        {
-            documentSets = checkAccess(documentSets, SecuredResource.VIEW_ACTION);
-        }
-        return documentSets;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.om.folder.Folder#getDocumentSets()
-     */
-    public NodeSet getDocumentSets() throws NodeException
-    {
-        // by default enable access checks
-        return getDocumentSets(true);
-    }
-
-    /**
-     * <p>
-     * getDocumentSet
-     * </p>
-     * 
-     * @param name
-     * @param checkAccess flag
-     * @return document set
-     * @throws DocumentNotFoundException
-     * @throws NodeException
-     */
-    public DocumentSet getDocumentSet(String name, boolean checkAccess) throws DocumentNotFoundException, NodeException
-    {
-        // get documentSet
-        DocumentSet documentSet = (DocumentSet) getAllNodes().subset(DocumentSet.DOCUMENT_TYPE).get(name);
-        if (documentSet == null)
-        {
-            throw new DocumentNotFoundException("Jetspeed PSML document set not found: " + name);
-        }
-
-        // check access
-        if (checkAccess)
-        {
-            documentSet.checkAccess(SecuredResource.VIEW_ACTION);
-        }
-        return documentSet;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.om.folder.Folder#getDocumentSet(java.lang.String)
-     */
-    public DocumentSet getDocumentSet(String name) throws DocumentNotFoundException, NodeException
-    {
-        // by default enable access checks
-        return getDocumentSet(name, true);
-    }
-
-    /**
-     * <p>
      * getPageSecurity
      * </p>
      * 
@@ -502,9 +426,8 @@
      */
     public NodeSet getAll() throws FolderNotFoundException, DocumentException
     {
-        // return secure set of all nodes: disable access checks on
-        // folders to facilitate navigation, but enforce on documents
-        // while creating filtered nodes
+        // return secure set of all nodes: enforce access checks
+        // on folders and documents while creating filtered nodes
         NodeSet nodes = getAllNodes();
         NodeSet filteredNodes = null;
         Iterator checkAccessIter = nodes.iterator();
@@ -628,13 +551,13 @@
 
     /**
      * <p>
-     * getMetaData
+     * getFolderMetaData
      * </p>
      * 
-     * @see org.apache.jetspeed.om.folder.Folder#getMetaData()
+     * @see org.apache.jetspeed.om.folder.Folder#getFolderMetaData()
      * @return
      */
-    public FolderMetaData getMetaData()
+    public FolderMetaData getFolderMetaData()
     {
         return metadata;
     }
@@ -822,5 +745,41 @@
     {
         allNodes = null;
         
+    }
+
+    /**
+     * getMenuDefinitions - get list of menu definitions
+     *
+     * @return definition list
+     */
+    public List getMenuDefinitions()
+    {
+        return metadata.getMenuDefinitions();
+    }
+
+    /**
+     * setMenuDefinitions - set list of menu definitions
+     *
+     * @param definitions definition list
+     */
+    public void setMenuDefinitions(List definitions)
+    {
+        metadata.setMenuDefinitions(definitions);
+    }
+
+    /**
+     * unmarshalled - notification that this instance has been
+     *                loaded from the persistent store
+     */
+    public void unmarshalled()
+    {
+        // notify super class implementation
+        super.unmarshalled();
+
+        // default title of pages to name
+        if (getTitle() == null)
+        {
+            setTitle(getTitleName());
+        }
     }
 }

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderMetaDataImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderMetaDataImpl.java?rev=209305&r1=209304&r2=209305&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderMetaDataImpl.java (original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/FolderMetaDataImpl.java Tue Jul  5 11:58:05 2005
@@ -15,6 +15,8 @@
  */
 package org.apache.jetspeed.om.folder.impl;
 
+import java.util.Iterator;
+import java.util.List;
 import java.util.Vector;
 
 import org.apache.jetspeed.om.folder.FolderMetaData;
@@ -36,6 +38,11 @@
 {
     private Vector docOrder;
     private String defaultPage;
+
+    /**
+     * menuDefinitions - menu definitions for folder
+     */
+    private List menuDefinitions;
     
     public FolderMetaDataImpl()
     {
@@ -52,7 +59,6 @@
      */
     public String getType()
     {
-        
         return DOCUMENT_TYPE;
     }
     /**
@@ -65,7 +71,6 @@
      */
     public String getUrl()
     {
-       
         return getParent(false).getPath() + PATH_SEPARATOR + getType();
     }
     /**
@@ -91,7 +96,6 @@
     public void setDocumentOrder( Vector docIndexes )
     {
         docOrder = docIndexes;
-
     }
     /**
      * @return Returns the defaultPage.
@@ -106,5 +110,67 @@
     public void setDefaultPage( String defaultPage )
     {
         this.defaultPage = defaultPage;
+    }
+
+    /**
+     * getMenuDefinitions - get list of menu definitions
+     *
+     * @return definition list
+     */
+    public List getMenuDefinitions()
+    {
+        return menuDefinitions;
+    }
+
+    /**
+     * setMenuDefinitions - set list of menu definitions
+     *
+     * @param definitions definition list
+     */
+    public void setMenuDefinitions(List definitions)
+    {
+        menuDefinitions = definitions;
+    }
+
+    /**
+     * unmarshalled - notification that this instance has been
+     *                loaded from the persistent store
+     */
+    public void unmarshalled()
+    {
+        // notify super class implementation
+        super.unmarshalled();
+
+        // propagate unmarshalled notification
+        // to all menu definitions
+        if (menuDefinitions != null)
+        {
+            Iterator menuIter = menuDefinitions.iterator();
+            while (menuIter.hasNext())
+            {
+                ((MenuDefinitionImpl)menuIter.next()).unmarshalled();
+            }
+        }
+    }
+
+    /**
+     * marshalling - notification that this instance is to
+     *               be saved to the persistent store
+     */
+    public void marshalling()
+    {
+        // propagate marshalling notification
+        // to all menu definitions
+        if (menuDefinitions != null)
+        {
+            Iterator menuIter = menuDefinitions.iterator();
+            while (menuIter.hasNext())
+            {
+                ((MenuDefinitionImpl)menuIter.next()).marshalling();
+            }
+        }
+
+        // notify super class implementation
+        super.marshalling();
     }
 }

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuDefinitionImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuDefinitionImpl.java?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuDefinitionImpl.java (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuDefinitionImpl.java Tue Jul  5 11:58:05 2005
@@ -0,0 +1,409 @@
+/*
+ * 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.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.jetspeed.om.folder.MenuDefinition;
+
+/**
+ * This class implements the MenuDefinition
+ * interface in a persistent object form for use by
+ * the page manager component.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public class MenuDefinitionImpl extends MenuMetadataImpl implements MenuDefinition
+{
+    /**
+     * name - name of menu definition
+     */
+    private String name;
+
+    /**
+     * options - comma separated option paths specification for menu
+     */
+    private String options;
+
+    /**
+     * depth - depth of inclusion for folder options
+     */
+    private int depth;
+
+    /**
+     * paths - generate ordered path options for options
+     */
+    private boolean paths;
+
+    /**
+     * regexp - interpret specified optionsas regexp
+     */
+    private boolean regexp;
+
+    /**
+     * profile - profile locator name filter for options
+     */
+    private String profile;
+    
+    /**
+     * order - comma separated list of ordering patterns for options
+     */
+    private String order;
+    
+    /**
+     * skin - skin name for menu
+     */
+    private String skin;
+    
+    /**
+     * title - title for menu
+     */
+    private String title;
+
+    /**
+     * shortTitle - short title for menu
+     */
+    private String shortTitle;
+
+    /**
+     * menuElements - ordered polymorphic list of menu options nested
+     *                menu, separator, include, and exclude definitions
+     */
+    private List menuElements;
+
+    /**
+     * menuElementImpls - ordered homogeneous list of menu elements
+     */
+    private List menuElementImpls;
+
+    /**
+     * MenuDefinitionImpl - constructor
+     */
+    public MenuDefinitionImpl()
+    {
+    }
+
+    /**
+     * getName - get menu name
+     *
+     * @return menu name
+     */
+    public String getName()
+    {
+        return name;
+    }
+
+    /**
+     * setName - set menu name
+     *
+     * @param name menu name
+     */
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    /**
+     * getOptions - get comma separated menu options if not specified as elements
+     *
+     * @return option paths specification
+     */
+    public String getOptions()
+    {
+        return options;
+    }
+
+    /**
+     * setOptions - set comma separated menu options if not specified as elements
+     *
+     * @param options option paths specification
+     */
+    public void setOptions(String options)
+    {
+        this.options = options;
+    }
+
+    /**
+     * getDepth - get depth of inclusion for folder menu options
+     *
+     * @return inclusion depth
+     */
+    public int getDepth()
+    {
+        return depth;
+    }
+
+    /**
+     * setDepth - set depth of inclusion for folder menu options
+     *
+     * @param depth inclusion depth
+     */
+    public void setDepth(int depth)
+    {
+        this.depth = depth;
+    }
+
+    /**
+     * isPaths - get generate ordered path options for specified options
+     *
+     * @return paths options flag
+     */
+    public boolean isPaths()
+    {
+        return paths;
+    }
+    
+    /**
+     * setPaths - set generate ordered path options for specified options
+     *
+     * @param paths paths options flag
+     */
+    public void setPaths(boolean paths)
+    {
+        this.paths = paths;
+    }
+    
+    /**
+     * isRegexp - get regexp flag for interpreting specified options
+     *
+     * @return regexp flag
+     */
+    public boolean isRegexp()
+    {
+        return regexp;
+    }
+
+    /**
+     * setRegexp - set regexp flag for interpreting specified options
+     *
+     * @param regexp regexp flag
+     */
+    public void setRegexp(boolean regexp)
+    {
+        this.regexp = regexp;
+    }
+
+    /**
+     * getProfile - get profile locator used to filter specified options
+     *
+     * @return profile locator name
+     */
+    public String getProfile()
+    {
+        return profile;
+    }
+
+    /**
+     * setProfile - set profile locator used to filter specified options
+     *
+     * @param locatorName profile locator name
+     */
+    public void setProfile(String locatorName)
+    {
+        profile = locatorName;
+    }
+
+    /**
+     * getOrder - get comma separated regexp ordering patterns for options
+     *
+     * @return ordering patterns list
+     */
+    public String getOrder()
+    {
+        return order;
+    }
+
+    /**
+     * setOrder - set comma separated regexp ordering patterns for options
+     *
+     * @param order ordering patterns list
+     */
+    public void setOrder(String order)
+    {
+        this.order = order;
+    }
+
+    /**
+     * getSkin - get skin name for menu
+     *
+     * @return skin name
+     */
+    public String getSkin()
+    {
+        return skin;
+    }
+
+    /**
+     * setSkin - set skin name for menu
+     *
+     * @param name skin name
+     */
+    public void setSkin(String name)
+    {
+        skin = name;
+    }
+
+    /**
+     * getTitle - get default title for menu
+     *
+     * @return title text
+     */
+    public String getTitle()
+    {
+        return title;
+    }
+
+    /**
+     * setTitle - set default title for menu
+     *
+     * @param title title text
+     */
+    public void setTitle(String title)
+    {
+        this.title = title;
+    }
+
+    /**
+     * getShortTitle - get default short title for menu
+     *
+     * @return short title text
+     */
+    public String getShortTitle()
+    {
+        return shortTitle; 
+    }
+
+    /**
+     * setShortTitle - set default short title for menu
+     *
+     * @param title short title text
+     */
+    public void setShortTitle(String title)
+    {
+        this.shortTitle = title;
+    }
+
+    /**
+     * getMenuElements - get ordered list of menu options,
+     *                   nested menus, separators, included
+     *                   menu, and excluded menu elements
+     *
+     * @return element list
+     */
+    public List getMenuElements()
+    {
+        return menuElements;
+    }
+
+    /**
+     * setMenuElements - set ordered list of menu elements
+     *
+     * @param elements element list
+     */
+    public void setMenuElements(List elements)
+    {
+        menuElements = elements;
+    }
+
+    /**
+     * getMenuElementImpls - get ordered list of wrapped menu elements
+     *
+     * @return element list
+     */
+    public List getMenuElementImpls()
+    {
+        return menuElementImpls;
+    }
+
+    /**
+     * setMenuElementImpls - set ordered list of menu elements using
+     *                       a list of wrapped menu elements
+     *
+     * @param elements element list
+     */
+    public void setMenuElementImpls(List elements)
+    {
+        menuElementImpls = elements;
+    }
+
+    /**
+     * unmarshalled - notification that this instance has been
+     *                loaded from the persistent store
+     */
+    public void unmarshalled()
+    {
+        // notify super class implementation
+        super.unmarshalled();
+
+        // unwrap menu elements and propagate
+        // unmarshalled notification
+        if (menuElementImpls != null)
+        {
+            menuElements = new ArrayList(menuElementImpls.size());
+            Iterator menuElementIter = menuElementImpls.iterator();
+            while (menuElementIter.hasNext())
+            {
+                // unwrap menu element
+                Object menuElement = ((MenuElementImpl)menuElementIter.next()).getElement();
+                menuElements.add(menuElement);
+
+                // propagate unmarshalled notification
+                if (menuElement instanceof MenuMetadataImpl)
+                {
+                    ((MenuMetadataImpl)menuElement).unmarshalled();
+                }
+            }
+        }
+        else
+        {
+            menuElements = null;            
+        }
+    }
+
+    /**
+     * marshalling - notification that this instance is to
+     *               be saved to the persistent store
+     */
+    public void marshalling()
+    {
+        // wrap menu elements and propagate
+        // marshalling notification
+        if (menuElements != null)
+        {
+            menuElementImpls = new ArrayList(menuElements.size());
+            Iterator menuElementIter = menuElements.iterator();
+            while (menuElementIter.hasNext())
+            {
+                // wrap menu element
+                Object menuElement = menuElementIter.next();
+                menuElementImpls.add(new MenuElementImpl(menuElement));
+
+                // propagate marshalling notification
+                if (menuElement instanceof MenuDefinitionImpl)
+                {
+                    ((MenuDefinitionImpl)menuElement).unmarshalled();
+                }
+            }
+        }
+        else
+        {
+            menuElementImpls = null;            
+        }
+    }
+}

Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuElementImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuElementImpl.java?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuElementImpl.java (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuElementImpl.java Tue Jul  5 11:58:05 2005
@@ -0,0 +1,164 @@
+/*
+ * 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;
+
+/**
+ * This class implements a wrapper used to implement
+ * the ordered polymorphic menu elements collection.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public class MenuElementImpl
+{
+    /**
+     * element - wrapped menu element
+     */
+    private Object element;
+
+    /**
+     * MenuElementImpl - constructor
+     */
+    public MenuElementImpl()
+    {
+    }
+
+    /**
+     * MenuElementImpl - constructor
+     */
+    public MenuElementImpl(Object element)
+    {
+        this.element = element;
+    }
+
+    /**
+     * getOption - get wrapped menu element
+     */
+    public Object getElement()
+    {
+        return element;
+    }
+
+    /**
+     * getOption - get wrapped menu options definition
+     */
+    public MenuOptionsDefinitionImpl getOptions()
+    {
+        if (element instanceof MenuOptionsDefinitionImpl)
+        {
+            return (MenuOptionsDefinitionImpl)element;
+        }
+        return null;
+    }
+
+    /**
+     * setOption - set wrapped menu options definition
+     *
+     * @param options menu options definition
+     */
+    public void setOptions(MenuOptionsDefinitionImpl options)
+    {
+        this.element = options;
+    }
+
+    /**
+     * getMenu - get wrapped menu menu definition
+     */
+    public MenuDefinitionImpl getMenu()
+    {
+        if (element instanceof MenuDefinitionImpl)
+        {
+            return (MenuDefinitionImpl)element;
+        }
+        return null;
+    }
+
+    /**
+     * setMenu - set wrapped menu menu definition
+     *
+     * @param menu menu definition
+     */
+    public void setMenu(MenuDefinitionImpl menu)
+    {
+        this.element = menu;
+    }
+
+    /**
+     * getSeparator - get wrapped menu separator definition
+     */
+    public MenuSeparatorDefinitionImpl getSeparator()
+    {
+        if (element instanceof MenuSeparatorDefinitionImpl)
+        {
+            return (MenuSeparatorDefinitionImpl)element;
+        }
+        return null;
+    }
+
+    /**
+     * setSeparator - set wrapped menu separator definition
+     *
+     * @param separator menu separator definition
+     */
+    public void setSeparator(MenuSeparatorDefinitionImpl separator)
+    {
+        this.element = separator;
+    }
+
+    /**
+     * getInclude - get wrapped menu include definition
+     */
+    public MenuIncludeDefinitionImpl getInclude()
+    {
+        if (element instanceof MenuIncludeDefinitionImpl)
+        {
+            return (MenuIncludeDefinitionImpl)element;
+        }
+        return null;
+    }
+
+    /**
+     * setInclude - set wrapped menu include definition
+     *
+     * @param include menu include definition
+     */
+    public void setInclude(MenuIncludeDefinitionImpl include)
+    {
+        this.element = include;
+    }
+
+    /**
+     * getExclude - get wrapped menu exclude definition
+     */
+    public MenuExcludeDefinitionImpl getExclude()
+    {
+        if (element instanceof MenuExcludeDefinitionImpl)
+        {
+            return (MenuExcludeDefinitionImpl)element;
+        }
+        return null;
+    }
+
+    /**
+     * setExclude - set wrapped menu exclude definition
+     *
+     * @param exclude menu exclude definition
+     */
+    public void setExclude(MenuExcludeDefinitionImpl exclude)
+    {
+        this.element = exclude;
+    }
+}

Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuElementImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuExcludeDefinitionImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuExcludeDefinitionImpl.java?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuExcludeDefinitionImpl.java (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuExcludeDefinitionImpl.java Tue Jul  5 11:58:05 2005
@@ -0,0 +1,61 @@
+/*
+ * 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 class implements the MenuExcludeDefinition
+ * interface in a persistent object form for use by
+ * the page manager component.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public class MenuExcludeDefinitionImpl implements MenuExcludeDefinition
+{
+    /**
+     * name - name of menu with options to exclude
+     */
+    private String name;
+
+    /**
+     * MenuExcludeDefinitionImpl - constructor
+     */
+    public MenuExcludeDefinitionImpl()
+    {
+    }
+
+    /**
+     * getName - get menu name with options to exclude
+     *
+     * @return menu name
+     */
+    public String getName()
+    {
+        return name;
+    }
+
+    /**
+     * setName - set menu name with options to exclude
+     *
+     * @param name menu name
+     */
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+}

Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuExcludeDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuIncludeDefinitionImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuIncludeDefinitionImpl.java?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuIncludeDefinitionImpl.java (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuIncludeDefinitionImpl.java Tue Jul  5 11:58:05 2005
@@ -0,0 +1,86 @@
+/*
+ * 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 class implements the MenuIncludeDefinition
+ * interface in a persistent object form for use by
+ * the page manager component.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public class MenuIncludeDefinitionImpl implements MenuIncludeDefinition
+{
+    /**
+     * name - name of menu to include
+     */
+    private String name;
+
+    /**
+     * nest - nesting flag for included menu
+     */
+    private boolean nest;
+
+    /**
+     * MenuIncludeDefinitionImpl - constructor
+     */
+    public MenuIncludeDefinitionImpl()
+    {
+    }
+
+    /**
+     * getName - get menu name to nest or with options to include
+     *
+     * @return menu name
+     */
+    public String getName()
+    {
+        return name;
+    }
+
+    /**
+     * setName - set menu name to nest or with options to include
+     *
+     * @param name menu name
+     */
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    /**
+     * isNest - get nesting for included menu
+     *
+     * @return nest options flag
+     */
+    public boolean isNest()
+    {
+        return nest;
+    }
+    
+    /**
+     * setNest - set nesting for included menu
+     *
+     * @param nest nest menu flag
+     */
+    public void setNest(boolean nest)
+    {
+        this.nest = nest;
+    }
+}

Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuIncludeDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuMetadataImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuMetadataImpl.java?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuMetadataImpl.java (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuMetadataImpl.java Tue Jul  5 11:58:05 2005
@@ -0,0 +1,199 @@
+/*
+ * 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.Collection;
+import java.util.Locale;
+
+import org.apache.jetspeed.om.common.GenericMetadata;
+import org.apache.jetspeed.om.page.psml.PageMetadataImpl;
+
+/**
+ * This class implements metadata protocols for menu
+ * definition implementations.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public abstract class MenuMetadataImpl
+{
+    /**
+     * metadata - page metadata to hold title information
+     */
+    private PageMetadataImpl metadata;
+
+    /**
+     * MenuDefinitionImpl - constructor
+     */
+    public MenuMetadataImpl()
+    {
+    }
+
+    /**
+     * getTitle - get default title protocol stub
+     *
+     * @return null
+     */
+    public String getTitle()
+    {
+        return null;
+    }
+
+    /**
+     * getShortTitle - get default short title protocol stub
+     *
+     * @return short title text
+     */
+    public String getShortTitle()
+    {
+        return null;
+    }
+
+    /**
+     * getText - get default text protocol stub
+     *
+     * @return text
+     */
+    public String getText()
+    {
+        return null;
+    }
+
+    /**
+     * getTitle - get locale specific title from metadata
+     *
+     * @param locale preferred locale
+     * @return title text
+     */
+    public String getTitle(Locale locale)
+    {
+        // get title from metadata or use default title
+        String title = getPageMetadata().getText("title", locale);
+        if (title == null)
+        {
+            title = getTitle();
+        }
+        return title;
+    }
+
+    /**
+     * getShortTitle - get locale specific short title from metadata
+     *
+     * @param locale preferred locale
+     * @return short title text
+     */
+    public String getShortTitle(Locale locale)
+    {
+        // get short title from metadata or use title from metadata,
+        // default short title, or default title
+        String shortTitle = getPageMetadata().getText("short-title", locale);
+        if (shortTitle == null)
+        {
+            shortTitle = getPageMetadata().getText("title", locale);
+            if (shortTitle == null)
+            {
+                shortTitle = getShortTitle();
+                if (shortTitle == null)
+                {
+                    shortTitle = getTitle();
+                }
+            }
+        }
+        return shortTitle;
+    }
+
+    /**
+     * getText - get locale specific text from metadata
+     *
+     * @param locale preferred locale
+     * @return text
+     */
+    public String getText(Locale locale)
+    {
+        // get title from metadata or use default title
+        String text = getPageMetadata().getText("text", locale);
+        if (text == null)
+        {
+            text = getText();
+        }
+        return text;
+    }
+
+    /**
+     * getMetadata - get generic metadata instance
+     *
+     * @return metadata instance
+     */
+    public GenericMetadata getMetadata()
+    {
+        return getPageMetadata();
+    }
+
+    /**
+     * getMetadataFields - get metadata fields collection
+     *
+     * @return metadata fields collection
+     */
+    public Collection getMetadataFields()
+    {
+        // return metadata fields collection that
+        // may in fact be side effected on unmarshall
+        return getPageMetadata().getFields();
+    }
+
+    /**
+     * setMetadataFields - set metadata fields collection
+     *
+     * @param metadataFields metadata fields collection
+     */
+    public void setMetadataFields(Collection metadataFields)
+    {
+        // set metadata fields collection that
+        // may in fact be side effected after
+        // invocation on unmarshall
+        getPageMetadata().setFields(metadataFields);
+    }
+
+    /**
+     * getPageMetadata - get/construct page metadata instance
+     *
+     * @return metadata instance
+     */
+    private PageMetadataImpl getPageMetadata()
+    {
+        if (metadata == null)
+        {
+            metadata = new PageMetadataImpl();
+        }
+        return metadata;
+    }
+
+    /**
+     * unmarshalled - notification that this instance has been
+     *                loaded from the persistent store
+     */
+    public void unmarshalled()
+    {
+        // force metadata update after unmarshalled since
+        // metadata collection can be side effected by
+        // unmarshalling colection accessors
+        Collection metadataFields = getMetadataFields();
+        if (metadataFields != null)
+        {
+            setMetadataFields(metadataFields);
+        }
+    }
+}

Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuMetadataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuOptionsDefinitionImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuOptionsDefinitionImpl.java?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuOptionsDefinitionImpl.java (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuOptionsDefinitionImpl.java Tue Jul  5 11:58:05 2005
@@ -0,0 +1,211 @@
+/*
+ * 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 class implements the MenuOptionsDefinition
+ * interface in a persistent object form for use by
+ * the page manager component.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public class MenuOptionsDefinitionImpl implements MenuOptionsDefinition
+{
+    /**
+     * options - comma separated option paths specification for menu
+     */
+    private String options;
+
+    /**
+     * depth - depth of inclusion for folder options
+     */
+    private int depth;
+
+    /**
+     * paths - generate ordered path options for options
+     */
+    private boolean paths;
+
+    /**
+     * regexp - interpret specified optionsas regexp
+     */
+    private boolean regexp;
+
+    /**
+     * profile - profile locator name filter for options
+     */
+    private String profile;
+    
+    /**
+     * order - comma separated list of ordering patterns for options
+     */
+    private String order;
+    
+    /**
+     * skin - skin name for menu
+     */
+    private String skin;
+    
+    /**
+     * MenuOptionsDefinitionImpl - constructor
+     */
+    public MenuOptionsDefinitionImpl()
+    {
+    }
+
+    /**
+     * getOptions - get comma separated menu options
+     *
+     * @return option paths specification
+     */
+    public String getOptions()
+    {
+        return options;
+    }
+
+    /**
+     * setOptions - set comma separated menu options
+     *
+     * @param options option paths specification
+     */
+    public void setOptions(String options)
+    {
+        this.options = options;
+    }
+
+    /**
+     * getDepth - get depth of inclusion for folder options
+     *
+     * @return inclusion depth
+     */
+    public int getDepth()
+    {
+        return depth;
+    }
+
+    /**
+     * setDepth - set depth of inclusion for folder options
+     *
+     * @param depth inclusion depth
+     */
+    public void setDepth(int depth)
+    {
+        this.depth = depth;
+    }
+
+    /**
+     * isPaths - get generate ordered path options
+     *
+     * @return paths options flag
+     */
+    public boolean isPaths()
+    {
+        return paths;
+    }
+    
+    /**
+     * setPaths - set generate ordered path options
+     *
+     * @param paths paths options flag
+     */
+    public void setPaths(boolean paths)
+    {
+        this.paths = paths;
+    }
+    
+    /**
+     * isRegexp - get regexp flag for interpreting options
+     *
+     * @return regexp flag
+     */
+    public boolean isRegexp()
+    {
+        return regexp;
+    }
+
+    /**
+     * setRegexp - set regexp flag for interpreting options
+     *
+     * @param regexp regexp flag
+     */
+    public void setRegexp(boolean regexp)
+    {
+        this.regexp = regexp;
+    }
+
+    /**
+     * getProfile - get profile locator used to filter options
+     *
+     * @return profile locator name
+     */
+    public String getProfile()
+    {
+        return profile;
+    }
+
+    /**
+     * setProfile - set profile locator used to filter options
+     *
+     * @param locatorName profile locator name
+     */
+    public void setProfile(String locatorName)
+    {
+        profile = locatorName;
+    }
+
+    /**
+     * getOrder - get comma separated regexp ordering patterns
+     *
+     * @return ordering patterns list
+     */
+    public String getOrder()
+    {
+        return order;
+    }
+
+    /**
+     * setOrder - set comma separated regexp ordering patterns
+     *
+     * @param order ordering patterns list
+     */
+    public void setOrder(String order)
+    {
+        this.order = order;
+    }
+
+    /**
+     * getSkin - get skin name for options
+     *
+     * @return skin name
+     */
+    public String getSkin()
+    {
+        return skin;
+    }
+
+    /**
+     * setSkin - set skin name for options
+     *
+     * @param name skin name
+     */
+    public void setSkin(String name)
+    {
+        skin = name;
+    }
+}

Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuOptionsDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuSeparatorDefinitionImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuSeparatorDefinitionImpl.java?rev=209305&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuSeparatorDefinitionImpl.java (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuSeparatorDefinitionImpl.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.MenuSeparatorDefinition;
+
+/**
+ * This class implements the MenuSeparatorDefinition
+ * interface in a persistent object form for use by
+ * the page manager component.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public class MenuSeparatorDefinitionImpl extends MenuMetadataImpl implements MenuSeparatorDefinition 
+{
+    /**
+     * skin - skin name for separator
+     */
+    private String skin;
+    
+    /**
+     * title - title for separator
+     */
+    private String title;
+
+    /**
+     * text - text for separator
+     */
+    private String text;
+
+    /**
+     * MenuSeparatorDefinitionImpl - constructor
+     */
+    public MenuSeparatorDefinitionImpl()
+    {
+    }
+
+    /**
+     * getSkin - get skin name for separator
+     *
+     * @return skin name
+     */
+    public String getSkin()
+    {
+        return skin;
+    }
+
+    /**
+     * setSkin - set skin name for separator
+     *
+     * @param name skin name
+     */
+    public void setSkin(String name)
+    {
+        skin = name;
+    }
+
+    /**
+     * getTitle - get default title for separator
+     *
+     * @return title text
+     */
+    public String getTitle()
+    {
+        return title;
+    }
+
+    /**
+     * setTitle - set default title for separator
+     *
+     * @param title title text
+     */
+    public void setTitle(String title)
+    {
+        this.title = title;
+    }
+
+    /**
+     * getText - get default text for separator
+     *
+     * @return text
+     */
+    public String getText()
+    {
+        return text;
+    }
+
+    /**
+     * setText - set default text for separator
+     *
+     * @param text text
+     */
+    public void setText(String text)
+    {
+        this.text = text;
+    }
+
+    /**
+     * getTextChild - get default text for separator
+     *
+     * @return text
+     */
+    public String getTextChild()
+    {
+        // return text as child if any other child of
+        // separator is defined
+        if ((getTitle() != null) || (getMetadata() != null))
+        {
+            return getText();
+        }
+        return null;
+    }
+
+    /**
+     * setTextChild - set default text for separator
+     *
+     * @param text text
+     */
+    public void setTextChild(String text)
+    {
+        // make sure text is non-null since it is being unmarshalled
+        if (text != null)
+        {
+            setText(text);
+        }
+    }
+
+    /**
+     * getTextBody - get default text for separator
+     *
+     * @return text
+     */
+    public String getTextBody()
+    {
+        // return text as body only if no other child of
+        // separator is defined
+        if ((getTitle() == null) && (getMetadata() == null))
+        {
+            return getText();
+        }
+        return null;
+    }
+
+    /**
+     * setTextBody - set default text for separator
+     *
+     * @param text text
+     */
+    public void setTextBody(String text)
+    {
+        // make sure text is non-null and non-whitespace since
+        // it is being unmarshalled
+        if (text != null)
+        {
+            text = text.trim();
+            if (text.length() > 0)
+            {
+                setText(text);
+            }
+        }
+    }
+}

Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/folder/impl/MenuSeparatorDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/AbstractBaseElement.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/AbstractBaseElement.java?rev=209305&r1=209304&r2=209305&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/AbstractBaseElement.java (original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/AbstractBaseElement.java Tue Jul  5 11:58:05 2005
@@ -85,6 +85,7 @@
     {
         return this.title;
     }
+
     /**
      * <p>
      * setTitle
@@ -651,5 +652,23 @@
             }
         }
         return nodes;
+    }
+
+    /**
+     * unmarshalled - notification that this instance has been
+     *                loaded from the persistent store
+     */
+    public void unmarshalled()
+    {
+        // by default, no action required
+    }
+
+    /**
+     * marshalling - notification that this instance is to
+     *               be saved to the persistent store
+     */
+    public void marshalling()
+    {
+        // by default, no action required
     }
 }

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/ContentPageImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/ContentPageImpl.java?rev=209305&r1=209304&r2=209305&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/ContentPageImpl.java (original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/ContentPageImpl.java Tue Jul  5 11:58:05 2005
@@ -2,6 +2,7 @@
 
 import java.util.HashMap;
 import java.util.Locale;
+import java.util.List;
 import java.util.Map;
 
 import org.apache.jetspeed.om.common.GenericMetadata;
@@ -131,6 +132,22 @@
     {
         
         page.setRootFragment(fragment);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Page#getMenuDefinitions()
+     */
+    public List getMenuDefinitions()
+    {
+        return page.getMenuDefinitions();
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Page#setMenuDefinitions(java.util.List)
+     */
+    public void setMenuDefinitions(List definitions)
+    {
+        page.setMenuDefinitions(definitions);
     }
 
     /* (non-Javadoc)

Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/LinkImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/LinkImpl.java?rev=209305&r1=209304&r2=209305&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/LinkImpl.java (original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/page-manager/src/java/org/apache/jetspeed/om/page/psml/LinkImpl.java Tue Jul  5 11:58:05 2005
@@ -65,14 +65,6 @@
     }
 
     /**
-     * @return Flag indicating whether url is set.
-     */
-    public boolean isUrlSet()
-    {
-        return true;
-    }
-
-    /**
      * <p>
      * grantViewActionAccess
      * </p>
@@ -86,5 +78,21 @@
         // should always be viewable, (subject to folder access)
         String hrefUrl = getUrl();
         return ((hrefUrl != null) && (hrefUrl.startsWith("http://") || hrefUrl.startsWith("https://")));
+    }
+
+    /**
+     * unmarshalled - notification that this instance has been
+     *                loaded from the persistent store
+     */
+    public void unmarshalled()
+    {
+        // notify super class implementation
+        super.unmarshalled();
+
+        // default title of pages to name
+        if (getTitle() == null)
+        {
+            setTitle(getTitleName());
+        }
     }
 }



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