portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r746641 [1/5] - in /portals/jetspeed-2/portal/branches/JPA_BRANCH: applications/jetspeed/src/main/webapp/WEB-INF/min-pages/Administrative/portal-admin/ applications/jetspeed/src/main/webapp/WEB-INF/pages/ applications/jetspeed/src/main/weba...
Date Sun, 22 Feb 2009 06:06:23 GMT
Author: rwatler
Date: Sun Feb 22 06:06:20 2009
New Revision: 746641

URL: http://svn.apache.org/viewvc?rev=746641&view=rev
Log:
Merge update from trunk 736693:746605
----------------------------------------------
- replace JPA bulk deletes with query and removes
- implement JPA persistence for recent registry updates
- implement category filter logical expressions for Spring configuration
- integrate JPA configurations into Spring configuration assemblies, keeping obj the default configuration
- remove separate profiler test Spring configuration


Added:
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/psml/NodeOrderComparator.java
      - copied unchanged from r746380, portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/psml/NodeOrderComparator.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/EventList.java
      - copied unchanged from r746380, portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/EventList.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ContainerRuntimeOptionValueImpl.java
      - copied unchanged from r746380, portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ContainerRuntimeOptionValueImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/EventAliasImpl.java
      - copied unchanged from r746380, portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/EventAliasImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ParameterAliasImpl.java
      - copied unchanged from r746380, portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ParameterAliasImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletQNameImpl.java
      - copied unchanged from r746380, portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletQNameImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ProcessingEventReferenceImpl.java
      - copied unchanged from r746380, portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ProcessingEventReferenceImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublishingEventReferenceImpl.java
      - copied unchanged from r746380, portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublishingEventReferenceImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SupportedPublicRenderParameterImpl.java
      - copied, changed from r746380, portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SupportedPublicRenderParameterImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/ContainerRuntimeOptionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/ContainerRuntimeOptionValueImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/EventAliasImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/EventDefinitionDescriptionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/EventDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/EventDefinitionReferenceImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/ParameterAliasImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/PortletApplicationContainerRuntimeOptionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/PortletDefinitionContainerRuntimeOptionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/PortletQNameImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/ProcessingEventReferenceImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/PublicRenderParameterDescriptionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/PublicRenderParameterImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/PublishingEventReferenceImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/SupportedPublicRenderParameterImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/ContainerRuntimeOptionValue.java
      - copied unchanged from r746380, portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/ContainerRuntimeOptionValue.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/PortletQName.java
      - copied unchanged from r746380, portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/PortletQName.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/SupportedPublicRenderParameter.java
      - copied unchanged from r746380, portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/SupportedPublicRenderParameter.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-installer/etc/database/resources/
      - copied from r746380, portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/resources/
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-installer/etc/database/resources/spring-filter-key.properties
      - copied unchanged from r746380, portals/jetspeed-2/portal/trunk/jetspeed-installer/etc/database/resources/spring-filter-key.properties
Removed:
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/psml/NodeOrderCompartaor.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/RequestPropertyProviderImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-installer/etc/database/import/assembly/import-page-manager.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-installer/etc/database/import/assembly/repository-datasource-spring.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-installer/etc/database/import/import.properties
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-installer/etc/database/import/log4j.properties
Modified:
    portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/Administrative/portal-admin/profiler.psml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/pages/Administrative/profiler.psml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/pages/pdf.link
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/PortletContainerWrapper.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/EventProviderImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPortalCallbackServices.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/HybridNavigationalState.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateCodec.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateComponent.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/NavigationalStateCodec.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowBaseNavigationalState.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowExtendedNavigationalState.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowRequestNavigationalState.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowRequestNavigationalStates.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowSessionNavigationalStates.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/SessionNavigationalState.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/url/impl/AbstractPortalURL.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/url/impl/DesktopEncodingPortalURL.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/filter/PortalFilter.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/resource/BufferedHttpServletResponse.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/resource/ResourceValveImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/test/testdata/pages/pages/page.security
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/JETSPEED-INF/ojb/registry_repository.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/jpa/DatabasePreference.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/jpa/PortletPreferencesProviderImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PersistenceBrokerPortletRegistry.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/jpa/PortletRegistryImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/AbstractPortletApplicationDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/AbstractPortletDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ContainerRuntimeOptionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/DescriptionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/EventDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/EventDefinitionReferenceImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/GenericMetadataImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletApplicationDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/PortletApplicationDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/PortletDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/resources/META-INF/persistence.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/AbstractRegistryTest.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectAll.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/model/impl/AttributeImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/jpa/JetspeedPrincipalPermission.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/jpa/JetspeedSecurityPersistenceManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/TestPermissionManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/PortalReservedParameters.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletregistry/PortletRegistry.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/container/state/NavigationalState.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/container/url/PortalURL.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/GenericMetadata.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedContainerServlet.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/PortletObjectProxy.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/PortletResourceURLFactoryImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-installer/etc/ant-installer/antinstall-config-min.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-installer/etc/ant-installer/antinstall-config.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-installer/etc/ant-installer/build.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-installer/etc/database/build.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-installer/jetspeed-mvn-database-pom.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-installer/jetspeed-mvn-tomcat-portal-pom.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-installer/zip-tomcat-portal-descriptor.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/ddl-schema/registry-schema.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/assembly/pluto-services.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/maven/jetspeed-deploy-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/DeployMojo.java

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/Administrative/portal-admin/profiler.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/Administrative/portal-admin/profiler.psml?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/Administrative/portal-admin/profiler.psml (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/Administrative/portal-admin/profiler.psml Sun Feb 22 06:06:20 2009
@@ -29,6 +29,6 @@
   <metadata name="title" xml:lang="ko">프로파일 관리</metadata>
   
   <fragment id="pa-site" type="layout" name="jetspeed-layouts::VelocityOneColumn">
-    <fragment id="prof-1" type="portlet" name="j2-admin::ProfilerAdmin" />
+    <fragment id="prof-2" type="portlet" name="j2-admin::WicketProfilerAdmin" />
   </fragment>
 </page>

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/pages/Administrative/profiler.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/pages/Administrative/profiler.psml?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/pages/Administrative/profiler.psml (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/pages/Administrative/profiler.psml Sun Feb 22 06:06:20 2009
@@ -34,7 +34,7 @@
   
 
   <fragment id="pa-site" type="layout" name="jetspeed-layouts::VelocityOneColumn">
-    <fragment id="prof-1" type="portlet" name="j2-admin::ProfilerAdmin" >
+    <fragment id="prof-2" type="portlet" name="j2-admin::WicketProfilerAdmin" >
     </fragment>
   </fragment>
 </page>

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/pages/pdf.link
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/pages/pdf.link?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/pages/pdf.link (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/pages/pdf.link Sun Feb 22 06:06:20 2009
@@ -20,5 +20,5 @@
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.1/schemas/link.xsd">
  <title>PDF Portlet</title>
- <url>http://localhost:8080/jetspeed/fileserver/_content/sample_pdf.pdf</url>
+ <url>/../fileserver/_content/sample_pdf.pdf</url>
 </link>

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java Sun Feb 22 06:06:20 2009
@@ -50,7 +50,7 @@
 import org.apache.jetspeed.page.document.NodeSet;
 import org.apache.jetspeed.page.document.UnsupportedDocumentTypeException;
 import org.apache.jetspeed.page.document.psml.AbstractNode;
-import org.apache.jetspeed.page.document.psml.NodeOrderCompartaor;
+import org.apache.jetspeed.page.document.psml.NodeOrderComparator;
 import org.apache.jetspeed.page.document.psml.NodeSetImpl;
 import org.apache.jetspeed.security.PermissionFactory;
 
@@ -523,11 +523,11 @@
             {
                 if (getPath().endsWith(PATH_SEPARATOR))
                 {
-                    allNodes = new NodeSetImpl(getPath(), new NodeOrderCompartaor(metadata.getDocumentOrder(), getPath()));
+                    allNodes = new NodeSetImpl(getPath(), new NodeOrderComparator(metadata.getDocumentOrder(), getPath()));
                 }
                 else
                 {
-                    allNodes = new NodeSetImpl(getPath(), new NodeOrderCompartaor(metadata.getDocumentOrder(), getPath() + PATH_SEPARATOR));
+                    allNodes = new NodeSetImpl(getPath(), new NodeOrderComparator(metadata.getDocumentOrder(), getPath() + PATH_SEPARATOR));
                 }
             }
             else

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java Sun Feb 22 06:06:20 2009
@@ -18,6 +18,7 @@
 
 import java.io.IOException;
 
+import javax.portlet.Event;
 import javax.portlet.PortletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -26,6 +27,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.jetspeed.engine.servlet.ServletRequestFactory;
 import org.apache.jetspeed.engine.servlet.ServletResponseFactory;
+import org.apache.pluto.EventContainer;
 import org.apache.pluto.OptionalContainerServices;
 import org.apache.pluto.PortletContainer;
 import org.apache.pluto.PortletContainerException;
@@ -157,6 +159,13 @@
     {
         this.responseFactory = responseFactory;
     }
+
+    public void fireEvent(HttpServletRequest request,
+            HttpServletResponse response, PortletWindow window, Event event)
+            throws PortletException, IOException, PortletContainerException
+    {
+        ((EventContainer)pluto).fireEvent(request, response, window, event);
+    }
     
 
 }

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/PortletContainerWrapper.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/PortletContainerWrapper.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/PortletContainerWrapper.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/PortletContainerWrapper.java Sun Feb 22 06:06:20 2009
@@ -16,6 +16,7 @@
  */
 package org.apache.jetspeed.container;
 
+import org.apache.pluto.EventContainer;
 import org.apache.pluto.PortletContainer;
 
 /**
@@ -24,6 +25,6 @@
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  * @version $Id$
  */
-public interface PortletContainerWrapper extends PortletContainer
+public interface PortletContainerWrapper extends PortletContainer, EventContainer
 {
 }

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java Sun Feb 22 06:06:20 2009
@@ -171,6 +171,7 @@
         // gather all required data from request and response
         ServletRequest servletRequest = this.requestResponseUnwrapper.unwrapPortletRequest(portletRequest);
         ServletResponse servletResponse = this.requestResponseUnwrapper.unwrapPortletResponse(portletResponse);
+        boolean useForward = servletRequest.getAttribute(PortalReservedParameters.PORTLET_CONTAINER_INVOKER_USE_FORWARD) != null;
 
         try
         {
@@ -213,13 +214,20 @@
             }
 
             PortletRequestContext.createContext(portletDefinition, portletInstance, portletRequest, portletResponse);
-            dispatcher.include(servletRequest, servletResponse);
+            if (useForward)
+            {
+                dispatcher.forward(servletRequest, servletResponse);
+            }
+            else
+            {
+                dispatcher.include(servletRequest, servletResponse);
+            }
             
         }
         catch (Exception e)
         {
             String message =
-                "Failed to dispatch.include for Portlet Application: " + portletApplicationName + ", servlet: " + servletMappingName;
+                "Failed to dispatch."+(useForward?"forward":"include")+" for Portlet Application: " + portletApplicationName + ", servlet: " + servletMappingName;
             log.error(message, e);
             throw new PortletException(message, e);
         }

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/EventProviderImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/EventProviderImpl.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/EventProviderImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/EventProviderImpl.java Sun Feb 22 06:06:20 2009
@@ -17,33 +17,345 @@
 package org.apache.jetspeed.container.providers;
 
 import java.io.Serializable;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
 
+import javax.portlet.Event;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
 import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.aggregator.PortletAccessDeniedException;
+import org.apache.jetspeed.components.portletentity.PortletEntityNotStoredException;
+import org.apache.jetspeed.container.window.FailedToRetrievePortletWindow;
+import org.apache.jetspeed.container.window.PortletWindowAccessor;
+import org.apache.jetspeed.om.page.Fragment;
+import org.apache.jetspeed.om.portlet.PortletDefinition;
+import org.apache.jetspeed.om.window.impl.PortletWindowImpl;
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.pluto.Constants;
 import org.apache.pluto.EventContainer;
+import org.apache.pluto.PortletWindow;
+import org.apache.pluto.internal.impl.EventImpl;
+import org.apache.pluto.om.portlet.EventDefinition;
+import org.apache.pluto.om.portlet.EventDefinitionReference;
+import org.apache.pluto.om.portlet.PortletApplicationDefinition;
 import org.apache.pluto.spi.EventProvider;
 
 /**
- * TODO: 2.2 implement 
- * 
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  * @version $Id: $
  */
 public class EventProviderImpl implements EventProvider, Cloneable
 {
+    private static Log log = LogFactory.getLog(EventProviderImpl.class);
+    private final PortletWindow portletWindow;    
+    private final RequestContext rc;
+    private final PortletWindowAccessor windowAccessor;
+    
+    // IMPROVEME: (a lot) this is a simple-non-production implementation of an event queue
+    private static Map<String, EventList> eventQueue = new HashMap<String, EventList>();
+    
     public EventProviderImpl()
-    {}
+    {
+        windowAccessor = null;
+        rc = null;
+        portletWindow = null;
+    }
+
+    public EventProviderImpl(final RequestContext rc, final PortletWindow window, final PortletWindowAccessor windowAccessor)
+    {
+        this.portletWindow = window;
+        this.rc = rc;
+        this.windowAccessor = windowAccessor;
+    }
+        
+    public void registerToFireEvent(QName qname, Serializable value)
+            throws IllegalArgumentException
+    {
+        System.out.println("registering to fire events");
+        EventList savedEvents = new EventList();        
+        if (isDeclaredAsPublishingEvent(qname)) 
+        {
+            if (value != null && !isValueInstanceOfDefinedClass(qname, value))
+            {
+                throw new IllegalArgumentException("Payload has not the right class");
+            }
+            try 
+            {
+                if (value == null) 
+                {
+                    savedEvents.addEvent(new EventImpl(qname, value));
+                } 
+                else if (!(value instanceof Serializable)) 
+                {
+                    throw new IllegalArgumentException(
+                            "Object payload must implement Serializable");
+                } 
+                else 
+                {
+                    Writer out = new StringWriter();
+                    Class clazz = value.getClass();
+                    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+                    try
+                    {
+                        Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
+                        JAXBContext jc = JAXBContext.newInstance(clazz);
+                        Marshaller marshaller = jc.createMarshaller();
+                        JAXBElement<Serializable> element = new JAXBElement<Serializable>(
+                                qname, clazz, value);
+                        marshaller.marshal(element, out);
+                        // marshaller.marshal(value, out);
+                    }
+                    finally
+                    {
+                        Thread.currentThread().setContextClassLoader(cl);
+                    }
+                    out = null;
+                    if (out != null) 
+                    {
+                        savedEvents.addEvent(new EventImpl(qname,
+                                (Serializable) out.toString()));
+                    } 
+                    else 
+                    {
+                        savedEvents.addEvent(new EventImpl(qname, value));
+                    }
+                }
+            } catch (JAXBException e) 
+            {
+                // maybe there is no valid jaxb binding
+                // TODO wsrp:eventHandlingFailed
+                log.error("Event handling failed", e);
+            } 
+            catch (FactoryConfigurationError e) 
+            {
+                log.warn(e);
+            }
+        }
+        eventQueue.put(this.portletWindow.getId().toString(), savedEvents);
+    }
+    
+    public static final int MAX_EVENTS_SIZE = 10; // TODO
     
     public void fireEvents(EventContainer eventContainer)
     {
-        //throw new UnsupportedOperationException();
-        // TODO: 2.2 implement 
+        String eventTargetWindow = this.portletWindow.getId().toString();
+        System.out.println("firing events for " + eventTargetWindow);
+        EventList savedEvents = this.eventQueue.get(eventTargetWindow);
+        if (savedEvents == null)
+            return;
+        while (savedEvents.hasMoreEvents()
+                && savedEvents.getSize() < MAX_EVENTS_SIZE) 
+        {
+            Event event = getArbitraryEvent(savedEvents);
+            savedEvents.setProcessed(event);
+            
+            List<PortletWindow> windows = getAllPortletsRegisteredForEvent(event);
+
+            // iterate all portlets in the portal
+            for (PortletWindow window : windows) 
+            {
+                
+                HttpServletRequest request = rc.getRequestForWindow((org.apache.jetspeed.container.PortletWindow)window);
+                //this.request.setAttribute(PortalReservedParameters.FRAGMENT_ATTRIBUTE, fragment);
+                request.setAttribute(PortalReservedParameters.PAGE_ATTRIBUTE, rc.getPage());
+                request.setAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE, rc);
+                request.setAttribute(PortalReservedParameters.REQUEST_CONTEXT_OBJECTS, rc.getObjects());    
+                try
+                {
+                    eventContainer.fireEvent(request, 
+                          rc.getResponseForWindow((org.apache.jetspeed.container.PortletWindow)window), window, event);
+                }
+                catch (Exception e)
+                {
+                    // TODO: handle
+                    e.printStackTrace();
+                }
+                this.eventQueue.remove(eventTargetWindow);    
+// TODO: threading                
+//                PortletWindow window = new PortletWindowImpl(container, config, portalURL);
+//                if (portletNames != null) {
+//                    for (String portlet : portletNames) {
+//                        if (portlet.equals(config.getId())) {
+//
+//                            // the thread now is a new one, with possible
+//                            // waiting,
+//                            // for the old to exit
+//                            
+//
+//                            PortletWindowThread portletWindowThread = getPortletWindowThread(
+//                                    eventContainer, config, window, containerServletContext);
+//
+//                            // is this event
+//                            portletWindowThread.addEvent(eActual);
+//
+//                            portletWindowThread.start();
+//                        }
+//                    }
+                }
+            }
+        
+//            waitForEventExecution();
+//            try {
+//                Thread.sleep(WAITING_CYCLE);
+//            } catch (InterruptedException e) {
+//                LOG.warn(e);
+//            }
+        
+//        waitForEventExecution();        
+    }
+    
+    private boolean isDeclaredAsPublishingEvent(QName qname) 
+    {
+        PortletDefinition pd = (PortletDefinition)this.portletWindow.getPortletEntity().getPortletDefinition();         
+        List<? extends EventDefinitionReference> events = pd.getSupportedPublishingEvents();
+        if (events != null) 
+        {
+            String defaultNamespace = pd.getApplication().getDefaultNamespace();
+            for (EventDefinitionReference ref : events) 
+            {
+                QName name = ref.getQualifiedName(defaultNamespace);
+                if (name == null)
+                {
+                    continue;
+                }
+                if (qname.equals(name)) 
+                {
+                    return true;
+                }
+            }
+        }
+        return false;
     }
 
-    public void registerToFireEvent(QName name, Serializable value)
-            throws IllegalArgumentException
+    private boolean isValueInstanceOfDefinedClass(QName qname, Serializable value) 
+    {
+        PortletApplicationDefinition app = portletWindow.getPortletEntity().getPortletDefinition().getApplication();
+        List<? extends EventDefinition> events = app.getEventDefinitions();
+        if (events != null) 
+        {
+            for (EventDefinition def : events)
+            {
+                if (def.getQName() != null)
+                {
+                    if (def.getQName().equals(qname))
+                    {
+                        return value.getClass().getName().equals(def.getValueType());
+                    }
+                }
+                else
+                {
+                    QName tmp = new QName(app.getDefaultNamespace(),def.getName());
+                    if (tmp.equals(qname))
+                    {
+                        return value.getClass().getName().equals(def.getValueType());
+                    }
+                }
+            }
+        }
+        return true;
+    }
+    
+    private Event getArbitraryEvent(EventList savedEvents) 
+    {
+        Event eActual = null;
+        for (Event event : savedEvents.getEvents()) 
+        {
+            if (savedEvents.isNotProcessed(event)) 
+            {
+                eActual = event;
+            }
+        }
+        return eActual;
+    }
+    
+    private boolean optionsNotifyCurrentPage = true;
+    private boolean optionsNotifyAnyPortlet = false;
+    
+    private List<PortletWindow> getAllPortletsRegisteredForEvent(Event event)
+    {
+        if (optionsNotifyCurrentPage)
+        {
+            Fragment root = rc.getPage().getRootFragment();
+            List<PortletWindow> eventTargets = new LinkedList<PortletWindow>();            
+            return getPortletsRegisteredOnPage(root, event, eventTargets);
+        }
+        else if (optionsNotifyAnyPortlet)
+        {
+            
+        }
+        return null;
+    }
+ 
+    private List<PortletWindow> getPortletsRegisteredOnPage(Fragment fragment, Event event, List<PortletWindow> eventTargets)
     {
-        //throw new UnsupportedOperationException();
-        // TODO: 2.2 implement         
+        List<Fragment> fragments = fragment.getFragments();
+        if (fragments != null && fragments.size() > 0)
+        {
+            for (Fragment child : fragments)
+            {
+                getPortletsRegisteredOnPage(child, event, eventTargets);
+            }
+        }
+        PortletWindow portletWindow = windowAccessor.getPortletWindow(fragment.getId()); // TODO: support fragment to window id
+        if (portletWindow == null)
+            return eventTargets;
+        
+        PortletDefinition portlet = (PortletDefinition) portletWindow.getPortletEntity().getPortletDefinition();
+        
+// TODO: check security        
+//        if (checkSecurityConstraints && !checkSecurityConstraint(portletDefinition, fragment))
+//        {
+//            throw new PortletAccessDeniedException("Access Denied.");
+//        }
+        
+// TODO: check portlet tracking        
+//        if (portletTracking.isOutOfService(portletWindow))
+//        {
+//            log.info("Taking portlet out of service: " + portletDefinition.getUniqueName() + " for window " + fragment.getId());
+//            fragment.overrideRenderedContent(OUT_OF_SERVICE_MESSAGE);
+//            return;
+//        }
+        
+        List<? extends EventDefinitionReference> processingEvents = portlet.getSupportedProcessingEvents();
+        if (isEventSupported(processingEvents, event.getQName(), portlet.getApplication().getDefaultNamespace())) 
+        {
+            if (portlet.getPortletName().equals(portlet.getPortletName())) // BOZO: WTF?
+            {
+                eventTargets.add(portletWindow);
+            }
+        }
+        return eventTargets;
     }
+    
+
+    private boolean isEventSupported(List<? extends EventDefinitionReference> supportedEvents, QName eventName, String defaultNamespace)
+    {
+        if (supportedEvents != null)
+        {
+            for (EventDefinitionReference ref : supportedEvents)
+            {
+                QName refQName = ref.getQualifiedName(defaultNamespace);
+                if (refQName != null && refQName.equals(eventName))
+                {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }    
 }

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java Sun Feb 22 06:06:20 2009
@@ -17,6 +17,7 @@
 package org.apache.jetspeed.container.providers;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import javax.portlet.PortletMode;
@@ -37,15 +38,14 @@
  */
 public class PortletURLProviderImpl implements PortletURLProvider
 {
+    private PortalURL.URLType urlType = PortalURL.URLType.RENDER;
     private PortletWindow portletWindow = null;
     private PortletMode mode = null;
     private WindowState state = null;
-    private boolean action = false;
     private boolean secure = false;
     private Map<String, String[]> privateParameters = null;
     private Map<String, String[]> publicParameters = null;
     private Map<String, String[]> requestParameters = null;
-    private boolean resource = false;
 
     private PortalURL url;
     
@@ -81,7 +81,7 @@
     public String toString()
     {
         // TODO: handle publicParameters, resource url, resourceID, cacheability (last two needs to be added to the PortletURLPRovider interface)
-        return url.createPortletURL(portletWindow,privateParameters,mode,state,action,secure);
+        return url.createPortletURL(portletWindow,privateParameters,mode,state,urlType,secure);
     }
     
     public void setParameters(Map parameters)
@@ -102,7 +102,7 @@
 
     public boolean isResourceServing()
     {
-        return resource;
+        return PortalURL.URLType.RESOURCE.equals(urlType);
     }
 
     public boolean isSecureSupported()
@@ -118,7 +118,7 @@
 
     public void setAction(boolean isAction)
     {
-        action = isAction;
+        urlType = isAction ? PortalURL.URLType.ACTION : PortalURL.URLType.RENDER;
     }
 
     public void setPublicRenderParameters(Map parameters)
@@ -128,7 +128,7 @@
 
     public void setResourceServing(boolean isResourceServing)
     {
-        resource = isResourceServing;
+        urlType = isResourceServing ? PortalURL.URLType.RESOURCE : PortalURL.URLType.RENDER;
     }
 
     public Map<String, String[]> getRenderParameters()
@@ -140,5 +140,13 @@
     {
         return this.requestParameters = parentMap;
     }
-    
+
+    public Map<String, List<String>> getProperties()
+    {
+        return null;
+    }
+
+    public void setProperties(Map<String, List<String>> properties)
+    {
+    }
 }

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPortalCallbackServices.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPortalCallbackServices.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPortalCallbackServices.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPortalCallbackServices.java Sun Feb 22 06:06:20 2009
@@ -21,16 +21,19 @@
 
 import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.container.PortletEntity;
+import org.apache.jetspeed.container.providers.EventProviderImpl;
 import org.apache.jetspeed.container.providers.PortletURLProviderImpl;
 import org.apache.jetspeed.container.providers.ResourceURLProviderImpl;
+import org.apache.jetspeed.container.window.PortletWindowAccessor;
 import org.apache.jetspeed.request.RequestContext;
+import org.apache.pluto.EventContainer;
 import org.apache.pluto.om.portlet.PortletApplicationDefinition;
 import org.apache.pluto.spi.EventProvider;
 import org.apache.pluto.spi.FilterManager;
 import org.apache.pluto.spi.PortalCallbackService;
 import org.apache.pluto.spi.PortletURLListener;
 import org.apache.pluto.spi.PortletURLProvider;
-import org.apache.pluto.spi.RequestPropertyProvider;
+import org.apache.pluto.spi.PropertyManager;
 import org.apache.pluto.spi.ResourceURLProvider;
 
 /**
@@ -42,20 +45,28 @@
  */
 public class JetspeedPortalCallbackServices implements PortalCallbackService
 {
-    RequestPropertyProvider propertyProvider;   
-    EventProvider eventProvider; 
+    public static final String PER_REQUEST_EVENT_PROVIDER = "org.apache.jetspeed.container.EventProvider";
+
+    PropertyManager propertyManager;   
     FilterManager filterManager;
     PortletURLListener urlListener;
+    PortletWindowAccessor windowAccessor;
+    EventContainer eventContainer; 
     
-    public JetspeedPortalCallbackServices(RequestPropertyProvider propertyProvider,
-            EventProvider eventProvider, FilterManager filterManager, PortletURLListener urlListener)
+    public JetspeedPortalCallbackServices(final PropertyManager propertyManager,
+            final FilterManager filterManager, final PortletURLListener urlListener, final PortletWindowAccessor windowAccessor)
     {
-        this.propertyProvider = propertyProvider;
-        this.eventProvider = eventProvider;
+        this.propertyManager = propertyManager;
         this.filterManager = filterManager;
         this.urlListener = urlListener;
+        this.windowAccessor = windowAccessor;
     }
 
+    public void setEventContainer(final EventContainer eventContainer)
+    {
+        this.eventContainer = eventContainer;
+    }
+    
     public PortletURLProvider getPortletURLProvider(HttpServletRequest request,
             org.apache.pluto.PortletWindow portletWindow)
     {
@@ -72,21 +83,22 @@
         return new ResourceURLProviderImpl(rc, portletWindow);
     }
 
-    public RequestPropertyProvider getRequestPropertyProvider()
+    public PropertyManager getPropertyManager()
     {
-        return propertyProvider;
+        return propertyManager;
     }
         
-
+    
     public EventProvider getEventProvider(HttpServletRequest request,
             org.apache.pluto.PortletWindow portletWindow)
     {   
-        return eventProvider;
+        RequestContext rc = (RequestContext) request.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
+        return new EventProviderImpl(rc, portletWindow, this.windowAccessor);
     }
 
     public EventProvider getEventProvider()
     {
-        return eventProvider;
+        throw new RuntimeException("TODO: need to deprecate this");
     }
 
     /**

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java Sun Feb 22 06:06:20 2009
@@ -27,6 +27,7 @@
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.cache.JetspeedContentCache;
 import org.apache.jetspeed.container.state.MutableNavigationalState;
+import org.apache.jetspeed.container.url.PortalURL;
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.container.PortletWindow;
 
@@ -196,7 +197,8 @@
         return requestStates.getMaximizedWindow();
     }
 
-    public Iterator getParameterNames(PortletWindow window)
+    @SuppressWarnings("unchecked")
+    public Iterator<String> getParameterNames(PortletWindow window)
     {
         PortletWindowRequestNavigationalState state = requestStates.getPortletWindowNavigationalState(window.getId().toString());
         if ( state != null && state.getParametersMap() != null )
@@ -233,6 +235,11 @@
             return null;
     }
     
+    public PortalURL.URLType getURLType()
+    {
+        return requestStates.getURLType();
+    }
+    
     public PortletWindow getPortletWindowOfAction()
     {
         return requestStates.getActionWindow();
@@ -243,7 +250,13 @@
         return requestStates.getResourceWindow();
     }
 
-    public String encode(PortletWindow window, Map parameters, PortletMode mode, WindowState state, boolean action)
+    public String encode(PortletWindow window, Map<String, String[]> parameters, PortletMode mode, WindowState state, boolean action)
+    throws UnsupportedEncodingException
+    {
+        return encode(window, parameters, mode, state, action ? PortalURL.URLType.ACTION : PortalURL.URLType.RENDER);
+    }
+
+    public String encode(PortletWindow window, Map<String, String[]> parameters, PortletMode mode, WindowState state, PortalURL.URLType urlType)
     throws UnsupportedEncodingException
     {
         if ( mode != null || state != null )
@@ -263,7 +276,7 @@
                 state = pa.getMappedWindowState(state);
             }
         }
-        return codec.encode(requestStates, window, parameters, mode, state, action, isNavigationalParameterStateFull(),
+        return codec.encode(requestStates, window, parameters, mode, state, urlType, isNavigationalParameterStateFull(),
                 isRenderParameterStateFull());
     }
 
@@ -288,7 +301,7 @@
             }
         }
         String encodedState = null;
-        Map currentWindowStates = null;
+        Map<String, PortletWindowBaseNavigationalState> currentWindowStates = null;
         PortletWindowExtendedNavigationalState windowNavState = null;
         PortletMode targetMode = mode;
         WindowState targetState = state;
@@ -333,7 +346,7 @@
         return codec.encode(requestStates, isNavigationalParameterStateFull(), isRenderParameterStateFull());
     }
 
-    public Iterator getWindowIdIterator()
+    public Iterator<String> getWindowIdIterator()
     {
         return requestStates.getWindowIdIterator();
     }
@@ -343,7 +356,7 @@
         PortletWindowRequestNavigationalState state = requestStates.getPortletWindowNavigationalState(window.getId().toString());
         if (state != null)
         {
-            Map map = state.getParametersMap();
+            Map<String, String[]> map = state.getParametersMap();
             if (map != null)
             {
                 map.clear();

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/HybridNavigationalState.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/HybridNavigationalState.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/HybridNavigationalState.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/HybridNavigationalState.java Sun Feb 22 06:06:20 2009
@@ -26,6 +26,7 @@
 
 import org.apache.jetspeed.cache.JetspeedContentCache;
 import org.apache.jetspeed.container.PortletWindow;
+import org.apache.jetspeed.container.url.PortalURL;
 
 /**
  * HybridNavigationalState
@@ -45,21 +46,26 @@
         this.prefix = prefix;
     }
     
-    public String encode(PortletWindow window, Map parameters, PortletMode mode, WindowState state, boolean action)
+    public String encode(PortletWindow window, Map<String, String[]> parameters, PortletMode mode, WindowState state, boolean action)
     throws UnsupportedEncodingException
     {
-        Map subset = new HashMap();
-        Iterator params = parameters.keySet().iterator();
+        return encode(window, parameters, mode, state, action ? PortalURL.URLType.ACTION : PortalURL.URLType.RENDER);
+    }
+    public String encode(PortletWindow window, Map<String, String[]> parameters, PortletMode mode, WindowState state, PortalURL.URLType urlType)
+    throws UnsupportedEncodingException
+    {
+        Map<String, String[]> subset = new HashMap<String, String[]>();
+        Iterator<String> params = parameters.keySet().iterator();
         while (params.hasNext())
         {
-            String key = (String)params.next();
+            String key = params.next();
             if (key.startsWith(prefix))
             {
                 // only encode params that start with prefix
                 subset.put(key, parameters.get(key));
             }
         }
-        return super.encode(window, subset, mode, state, action);
+        return super.encode(window, subset, mode, state, urlType);
     }
 
     public boolean isNavigationalParameterStateFull()
@@ -71,6 +77,4 @@
     {
         return false;
     }
-    
-    
 }

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateCodec.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateCodec.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateCodec.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateCodec.java Sun Feb 22 06:06:20 2009
@@ -30,6 +30,7 @@
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.PortalContext;
 import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.container.url.PortalURL;
 import org.apache.jetspeed.container.window.PortletWindowAccessor;
 import org.apache.jetspeed.container.PortletWindow;
 
@@ -53,6 +54,7 @@
     protected static final char PARAM_KEY = 'e';
     protected static final char CLEAR_PARAMS_KEY = 'f';
     protected static final char RESOURCE_WINDOW_ID_KEY = 'g';
+    protected static final char[] URLTYPE_ID_KEYS = { 'b', 'g', 'a' };
     
     protected static final String keytable = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
     protected final PortletMode[] portletModes;
@@ -61,30 +63,29 @@
     
     public JetspeedNavigationalStateCodec(PortalContext portalContext, PortletWindowAccessor windowAccessor)
     {
-        ArrayList list = new ArrayList();
+        ArrayList<PortletMode> modesList = new ArrayList<PortletMode>();
         this.windowAccessor = windowAccessor;
         
         // ensure standard modes will be first in the portletModeNames array
         // this ensures those modes are never lost from a bookmarked url when new modes are added somewhere in the
         // middle
-        list.addAll(JetspeedActions.getStandardPortletModes());
-        list.addAll(JetspeedActions.getExtendedPortletModes());
+        modesList.addAll(JetspeedActions.getStandardPortletModes());
+        modesList.addAll(JetspeedActions.getExtendedPortletModes());
         
-        portletModes = (PortletMode[])list.toArray(new PortletMode[list.size()]);
+        portletModes = modesList.toArray(new PortletMode[modesList.size()]);
         if (portletModes.length > keytable.length())
         {
             throw new UnsupportedOperationException("Too many supported PortletModes found. Can only handle max: "+keytable.length());
         }
         
-        list.clear();
-        
         // ensure standard states will be first in the windowStateNames array
         // this ensures those states are never lost from a bookmarked url when new states are added somewhere in the
         // middle
-        list.addAll(JetspeedActions.getStandardWindowStates());
-        list.addAll(JetspeedActions.getExtendedWindowStates());
+        ArrayList<WindowState> statesList = new ArrayList<WindowState>();
+        statesList.addAll(JetspeedActions.getStandardWindowStates());
+        statesList.addAll(JetspeedActions.getExtendedWindowStates());
         
-        windowStates = (WindowState[])list.toArray(new WindowState[list.size()]);        
+        windowStates = statesList.toArray(new WindowState[statesList.size()]);        
         if (windowStates.length > keytable.length())
         {
             throw new UnsupportedOperationException("Too many supported WindowModes found. Can only handle max: "+keytable.length());
@@ -128,7 +129,7 @@
         PortletWindowRequestNavigationalState currentState;
         buffer.setLength(0);
         String actionWindowId = states.getActionWindow() != null ? states.getActionWindow().getId().toString() : "";
-        Iterator iter = states.getWindowIdIterator();
+        Iterator<String> iter = states.getWindowIdIterator();
         while ( iter.hasNext() )
         {
             if ( buffer.length() == 0 )
@@ -139,7 +140,7 @@
             {
                 buffer.append(",[");
             }
-            currentState = states.getPortletWindowNavigationalState((String)iter.next());
+            currentState = states.getPortletWindowNavigationalState(iter.next());
             buffer.append("window:"+currentState.getWindowId());
             
             if ( currentState.getWindowId().equals(actionWindowId))
@@ -160,7 +161,7 @@
                 {
                     buffer.append(",parameters:[");
                     boolean first = true;
-                    Iterator parIter = currentState.getParametersMap().keySet().iterator();
+                    Iterator<String> parIter = currentState.getParametersMap().keySet().iterator();
                     while ( parIter.hasNext() ) 
                     {
                         if ( first )
@@ -171,9 +172,9 @@
                         {
                             buffer.append(",");
                         }
-                        String name = (String)parIter.next();
+                        String name = parIter.next();
                         buffer.append(name+":[");
-                        String[] values = (String[])currentState.getParametersMap().get(name);
+                        String[] values = currentState.getParametersMap().get(name);
                         for ( int i = 0; i < values.length; i++ )
                         {
                             if ( i > 0 )
@@ -206,21 +207,21 @@
             // retain current request parameters if any
             if ( currentState.getParametersMap() != null )
             {
-                Iterator parametersIter = currentState.getParametersMap().entrySet().iterator();
-                Map.Entry entry;
+                Iterator<Map.Entry<String, String[]>> parametersIter = currentState.getParametersMap().entrySet().iterator();
+                Map.Entry<String, String[]> entry;
                 while ( parametersIter.hasNext())
                 {
-                    entry = (Map.Entry)parametersIter.next();
-                    targetState.setParameters((String)entry.getKey(), (String[])entry.getValue());
+                    entry = parametersIter.next();
+                    targetState.setParameters(entry.getKey(), entry.getValue());
                 }
             }
         }
         // encode as requestURL parameters
-        return encode(states, windowId, targetState, false, false, navParamsStateFull, renderParamsStateFull);
+        return encode(states, windowId, targetState, PortalURL.URLType.RENDER, navParamsStateFull, renderParamsStateFull);
     }
 
-    public String encode(PortletWindowRequestNavigationalStates states, PortletWindow window, Map parameters, 
-            PortletMode portletMode, WindowState windowState, boolean action, boolean navParamsStateFull, 
+    public String encode(PortletWindowRequestNavigationalStates states, PortletWindow window, Map<String, String[]> parameters, 
+            PortletMode portletMode, WindowState windowState, PortalURL.URLType urlType, boolean navParamsStateFull, 
             boolean renderParamsStateFull)
     throws UnsupportedEncodingException
     {
@@ -229,45 +230,23 @@
         PortletWindowRequestNavigationalState targetState = new PortletWindowRequestNavigationalState(windowId);
         targetState.setPortletMode(portletMode != null ? portletMode : currentState != null ? currentState.getPortletMode() : null);
         targetState.setWindowState(windowState != null ? windowState : currentState != null ? currentState.getWindowState() : null);
-        
-        Iterator parametersIter = parameters.entrySet().iterator();
-        
-        boolean resource = false;
-
-        Map.Entry entry;
-        String parameter;
-        // fill in the new parameters
-        while ( parametersIter.hasNext())
-        {
-            entry = (Map.Entry)parametersIter.next();
-            parameter = (String)entry.getKey();
-            if (!resource && !action && PortalReservedParameters.PORTLET_RESOURCE_URL_REQUEST_PARAMETER.equals(parameter))
-            {
-                resource = true;
-                navParamsStateFull = true;
-                renderParamsStateFull = true;
-            }
-            else
-            {
-                targetState.setParameters(parameter, (String[])entry.getValue());
-            }
-        }
-        if ( renderParamsStateFull && targetState.getParametersMap() == null )
+        targetState.setParametersMap(parameters);
+        if ( renderParamsStateFull && parameters == null )
         {
             // Indicate that the saved (in the session) render parameters for this PortletWindow must be cleared
             // and not copied when synchronizing the state (encoded as CLEAR_PARAMS_KEY)
             targetState.setClearParameters(true);
         }
-        return encode(states, windowId, targetState, action, resource, navParamsStateFull, renderParamsStateFull);
+        return encode(states, windowId, targetState, urlType, navParamsStateFull, renderParamsStateFull);
     }
 
     public String encode(PortletWindowRequestNavigationalStates states, boolean navParamsStateFull, boolean renderParamsStateFull)
     throws UnsupportedEncodingException
     {
-        return encode(states, null, null, false, false, navParamsStateFull, renderParamsStateFull);
+        return encode(states, null, null, PortalURL.URLType.RENDER, navParamsStateFull, renderParamsStateFull);
     }
     protected String encode(PortletWindowRequestNavigationalStates states, String targetWindowId, 
-            PortletWindowRequestNavigationalState targetState, boolean action, boolean resource, boolean navParamsStateFull, 
+            PortletWindowRequestNavigationalState targetState, PortalURL.URLType urlType, boolean navParamsStateFull, 
             boolean renderParamsStateFull)
     throws UnsupportedEncodingException
     {
@@ -280,10 +259,10 @@
         {
             PortletWindowRequestNavigationalState pwfns;
             String windowId;
-            Iterator iter = states.getWindowIdIterator();
+            Iterator<String> iter = states.getWindowIdIterator();
             while ( iter.hasNext() )
             {
-                windowId = (String)iter.next();
+                windowId = iter.next();
                 pwfns = states.getPortletWindowNavigationalState(windowId);
                 if ( targetWindowId != null && windowId.equals(targetWindowId))
                 {
@@ -291,7 +270,7 @@
                 }
                 else
                 {
-                    encodedState = encodePortletWindowNavigationalState(windowId, pwfns, false, false, navParamsStateFull, 
+                    encodedState = encodePortletWindowNavigationalState(windowId, pwfns, PortalURL.URLType.RENDER, navParamsStateFull, 
                             renderParamsStateFull);
                     if ( encodedState.length() > 0 )
                     {
@@ -310,7 +289,7 @@
         }
         if (targetWindowId != null)
         {
-            encodedState = encodePortletWindowNavigationalState(targetWindowId, targetState, action, resource, false, false); 
+            encodedState = encodePortletWindowNavigationalState(targetWindowId, targetState, urlType, false, false); 
             if ( encodedState.length() > 0 )
             {
                 if ( !haveState )
@@ -333,14 +312,14 @@
     }
     
     protected String encodePortletWindowNavigationalState(String windowId, PortletWindowRequestNavigationalState state, 
-            boolean action, boolean resource, boolean navParamsStateFull, boolean renderParamsStateFull)
+                                                          PortalURL.URLType urlType, boolean navParamsStateFull, 
+                                                          boolean renderParamsStateFull)
     {
         StringBuffer buffer = new StringBuffer();
-        buffer.append(action ? ACTION_WINDOW_ID_KEY : resource? RESOURCE_WINDOW_ID_KEY: RENDER_WINDOW_ID_KEY);
+        buffer.append(URLTYPE_ID_KEYS[urlType.ordinal()]);
         buffer.append(windowId);
-        boolean encoded = action || resource;
-        
-        if ( action || !navParamsStateFull )
+        boolean encoded = !PortalURL.URLType.RENDER.equals(urlType);
+        if ( PortalURL.URLType.ACTION.equals(urlType) || !navParamsStateFull )
         {
             if (state.getPortletMode() != null)
             {
@@ -359,20 +338,20 @@
             }
         }
 
-        if (state.getParametersMap() != null && (action || !renderParamsStateFull) )
+        if (state.getParametersMap() != null && (PortalURL.URLType.ACTION.equals(urlType) || !renderParamsStateFull) )
         {
-            Map.Entry entry;
+            Map.Entry<String, String[]> entry;
             String   parameterName;
             String[] parameterValues;
 
             StringBuffer paramBuffer = new StringBuffer();
-            Iterator iter = state.getParametersMap().entrySet().iterator();
+            Iterator<Map.Entry<String,String[]>> iter = state.getParametersMap().entrySet().iterator();
             while ( iter.hasNext() )
             {
                 encoded = true;
-                entry = (Map.Entry)iter.next();
-                parameterName = (String)entry.getKey();
-                parameterValues = (String[])entry.getValue();
+                entry = iter.next();
+                parameterName = entry.getKey();
+                parameterValues = entry.getValue();
                
                 buffer.append(PARAMETER_SEPARATOR);
                 buffer.append(PARAM_KEY);
@@ -406,7 +385,15 @@
     protected PortletWindowRequestNavigationalState decodeParameter(PortletWindowAccessor accessor, PortletWindowRequestNavigationalStates states, PortletWindowRequestNavigationalState currentState, String parameter)
     {
         char parameterType = parameter.charAt(0);
-        if (parameterType == RENDER_WINDOW_ID_KEY || parameterType == ACTION_WINDOW_ID_KEY || parameterType == RESOURCE_WINDOW_ID_KEY )
+        PortalURL.URLType urlType = null;
+        
+        switch (parameterType)
+        {
+            case RENDER_WINDOW_ID_KEY: urlType = PortalURL.URLType.RENDER; break;
+            case ACTION_WINDOW_ID_KEY: urlType = PortalURL.URLType.ACTION; break;
+            case RESOURCE_WINDOW_ID_KEY: urlType = PortalURL.URLType.RESOURCE; break;
+        }
+        if (urlType != null)
         {            
             String windowId = parameter.substring(1);
             currentState = states.getPortletWindowNavigationalState(windowId);
@@ -423,10 +410,11 @@
                 {
                     states.setActionWindow(window);
                 }
-                else if (parameterType == RESOURCE_WINDOW_ID_KEY )
+                else if (parameterType != RENDER_WINDOW_ID_KEY )
                 {
                     states.setResourceWindow(window);
                 }
+                states.setURLType(urlType);
             }
         }
         else if ( currentState != null )

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateComponent.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateComponent.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateComponent.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateComponent.java Sun Feb 22 06:06:20 2009
@@ -49,8 +49,8 @@
     
     // maps containing allowed PortletMode and WindowState objects on their lowercase name
     // ensuring only allowed, and always the same objects are returned and allowing comparision by value
-    private final Map supportedPortletModes = Collections.synchronizedMap(new HashMap());
-    private final Map supportedWindowStates = Collections.synchronizedMap(new HashMap());
+    private final Map<String, PortletMode> supportedPortletModes = Collections.synchronizedMap(new HashMap<String, PortletMode>());
+    private final Map<String, WindowState> supportedWindowStates = Collections.synchronizedMap(new HashMap<String, WindowState>());
 
     private BeanFactory beanFactory;
     
@@ -75,18 +75,18 @@
         this.urlBeanName = urlBeanName;
         this.desktopUrlBeanName = desktopUrlBeanName;
 
-        Enumeration portletModesEnum = portalContext.getSupportedPortletModes();
+        Enumeration<PortletMode> portletModesEnum = portalContext.getSupportedPortletModes();
         PortletMode portletMode;
         while ( portletModesEnum.hasMoreElements() )
         {
-            portletMode = (PortletMode)portletModesEnum.nextElement();
+            portletMode = portletModesEnum.nextElement();
             supportedPortletModes.put(portletMode.toString(), portletMode);
         }
-        Enumeration windowStatesEnum = portalContext.getSupportedWindowStates();
+        Enumeration<WindowState> windowStatesEnum = portalContext.getSupportedWindowStates();
         WindowState windowState;
         while ( windowStatesEnum.hasMoreElements() )
         {
-            windowState = (WindowState)windowStatesEnum.nextElement();
+            windowState = windowStatesEnum.nextElement();
             supportedWindowStates.put(windowState.toString(), windowState);
         }
     }

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/NavigationalStateCodec.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/NavigationalStateCodec.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/NavigationalStateCodec.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/NavigationalStateCodec.java Sun Feb 22 06:06:20 2009
@@ -23,6 +23,7 @@
 import javax.portlet.WindowState;
 
 import org.apache.jetspeed.container.PortletWindow;
+import org.apache.jetspeed.container.url.PortalURL;
 
 public interface NavigationalStateCodec
 {
@@ -31,8 +32,8 @@
     String encode(PortletWindowRequestNavigationalStates states, PortletWindow window, PortletMode portletMode,
             WindowState windowState, boolean navParamsStateFull, boolean renderParamsStateFull) throws UnsupportedEncodingException;
 
-    String encode(PortletWindowRequestNavigationalStates states, PortletWindow window, Map parameters,
-            PortletMode portletMode, WindowState windowState, boolean action, boolean navParamsStateFull, 
+    String encode(PortletWindowRequestNavigationalStates states, PortletWindow window, Map<String, String[]> parameters,
+            PortletMode portletMode, WindowState windowState, PortalURL.URLType urlType, boolean navParamsStateFull, 
             boolean renderParamsStateFull) throws UnsupportedEncodingException;
 
     String encode(PortletWindowRequestNavigationalStates states, boolean navParamsStateFull, boolean renderParamsStateFull) 

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowBaseNavigationalState.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowBaseNavigationalState.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowBaseNavigationalState.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowBaseNavigationalState.java Sun Feb 22 06:06:20 2009
@@ -29,6 +29,7 @@
  */
 public class PortletWindowBaseNavigationalState implements Serializable
 {
+    private static final long serialVersionUID = 4188214497281562619L;
     private String modeName;
     private String stateName;
     

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowExtendedNavigationalState.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowExtendedNavigationalState.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowExtendedNavigationalState.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowExtendedNavigationalState.java Sun Feb 22 06:06:20 2009
@@ -31,8 +31,12 @@
  */
 public class PortletWindowExtendedNavigationalState extends PortletWindowBaseNavigationalState
 {
+    private static final long serialVersionUID = -504769105830572875L;
+
     private static final class ModeStateKey implements Serializable
     {
+        private static final long serialVersionUID = 1419744882315564633L;
+        
         private final String mode;
         private final String state;
         private final int hashCode;
@@ -62,7 +66,7 @@
     
     private Map<String, String[]> parametersMap;
     
-    private Map decoratorActionEncodings;
+    private Map<ModeStateKey, String> decoratorActionEncodings;
         
     public Map<String, String[]> getParametersMap()
     {
@@ -95,7 +99,7 @@
     {
         if (decoratorActionEncodings == null)
         {
-            decoratorActionEncodings = new HashMap(4);
+            decoratorActionEncodings = new HashMap<ModeStateKey, String>(4);
         }
         decoratorActionEncodings.put(new ModeStateKey(mode,state), encoding);
     }
@@ -104,7 +108,7 @@
     {
         if (decoratorActionEncodings != null)
         {
-            return (String)decoratorActionEncodings.get(new ModeStateKey(mode,state));
+            return decoratorActionEncodings.get(new ModeStateKey(mode,state));
         }
         return null;
     }

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowRequestNavigationalState.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowRequestNavigationalState.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowRequestNavigationalState.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowRequestNavigationalState.java Sun Feb 22 06:06:20 2009
@@ -24,6 +24,8 @@
  */
 public class PortletWindowRequestNavigationalState extends PortletWindowExtendedNavigationalState
 {
+    private static final long serialVersionUID = 3807035638733358425L;
+
     private String  windowId;
     
     /**

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowRequestNavigationalStates.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowRequestNavigationalStates.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowRequestNavigationalStates.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowRequestNavigationalStates.java Sun Feb 22 06:06:20 2009
@@ -21,11 +21,13 @@
 import java.util.Map;
 
 import org.apache.jetspeed.container.PortletWindow;
+import org.apache.jetspeed.container.url.PortalURL;
 
 public class PortletWindowRequestNavigationalStates
 {
     private String characterEncoding;
-    private Map pwnStates = new HashMap();
+    private Map<String, PortletWindowRequestNavigationalState> pwnStates = new HashMap<String, PortletWindowRequestNavigationalState>();
+    private PortalURL.URLType urlType;
     private PortletWindow maximizedWindow;
     private PortletWindow actionWindow;
     private PortletWindow resourceWindow;
@@ -40,7 +42,7 @@
         return characterEncoding;
     }
     
-    public Iterator getWindowIdIterator()
+    public Iterator<String> getWindowIdIterator()
     {
         return pwnStates.keySet().iterator();
     }
@@ -65,6 +67,16 @@
         }
     }
     
+    public PortalURL.URLType getURLType()
+    {
+        return urlType;
+    }
+    
+    public void setURLType(PortalURL.URLType urlType)
+    {
+        this.urlType = urlType;
+    }
+    
     public PortletWindowRequestNavigationalState getPortletWindowNavigationalState(String windowId)
     {
         return (PortletWindowRequestNavigationalState)pwnStates.get(windowId);

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowSessionNavigationalStates.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowSessionNavigationalStates.java?rev=746641&r1=746640&r2=746641&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowSessionNavigationalStates.java (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/PortletWindowSessionNavigationalStates.java Sun Feb 22 06:06:20 2009
@@ -34,14 +34,18 @@
 
 public class PortletWindowSessionNavigationalStates implements Serializable
 {
+    private static final long serialVersionUID = -2891442112700830546L;
+
     private static final class PageState implements Serializable
     {
-        public Map windowStates = new HashMap();
+        private static final long serialVersionUID = -2730733728229116932L;
+        
+        public Map<String, PortletWindowBaseNavigationalState> windowStates = new HashMap<String, PortletWindowBaseNavigationalState>();
         public String maximizedWindowId;
     }
     
     private final boolean storeParameters;
-    private Map pageStates = new HashMap();
+    private Map<String, PageState> pageStates = new HashMap<String, PageState>();
 
     public PortletWindowSessionNavigationalStates(boolean storeParameters)
     {
@@ -77,7 +81,7 @@
             pageState.maximizedWindowId = null;
         }
 
-        Iterator iter = requestStates.getWindowIdIterator();
+        Iterator<String> iter = requestStates.getWindowIdIterator();
         iter = pageState.windowStates.keySet().iterator();
         String windowId;
         while ( iter.hasNext() )
@@ -193,7 +197,7 @@
             pageState.maximizedWindowId = requestStates.getMaximizedWindow().getId().toString();
         }
         
-        Iterator iter = requestStates.getWindowIdIterator();
+        Iterator<String> iter = requestStates.getWindowIdIterator();
         String actionWindowId = requestStates.getActionWindow() != null ? requestStates.getActionWindow().getId().toString() : null;
         boolean actionRequestState = false;
         // now synchronize requestStates and sessionStates
@@ -357,7 +361,7 @@
                     {
                         changed = true;
                     }
-                    extendedSessionState.setParametersMap(new HashMap(requestState.getParametersMap()));
+                    extendedSessionState.setParametersMap(new HashMap<String, String[]>(requestState.getParametersMap()));
                 }
             }
             else if ( requestState.isClearParameters() )
@@ -368,28 +372,28 @@
             }            
             else if ( extendedSessionState.getParametersMap() != null )
             {
-                requestState.setParametersMap(new HashMap(extendedSessionState.getParametersMap()));
+                requestState.setParametersMap(new HashMap<String, String[]>(extendedSessionState.getParametersMap()));
             }
         }
         return changed;
     }    
 
-    protected boolean changedParameters(Map requestMap, Map sessionMap)
+    protected boolean changedParameters(Map<String, String[]> requestMap, Map<String, String[]> sessionMap)
     {
         if (sessionMap == null || requestMap == null)
             return true;
         if (requestMap.size() != sessionMap.size())
             return true;
-        Iterator ri = requestMap.entrySet().iterator();
-        Iterator si = sessionMap.entrySet().iterator();
+        Iterator<Map.Entry<String, String[]>> ri = requestMap.entrySet().iterator();
+        Iterator<Map.Entry<String, String[]>> si = sessionMap.entrySet().iterator();
         while (ri.hasNext() && si.hasNext())
         {
-            Map.Entry r = (Map.Entry)ri.next();
-            Map.Entry s = (Map.Entry)si.next();
+            Map.Entry<String, String[]> r = ri.next();
+            Map.Entry<String, String[]> s = si.next();
             if (!r.getKey().equals(s.getKey()))
                 return true;
-            String[] rvals = (String[])r.getValue();
-            String[] svals = (String[])s.getValue();            
+            String[] rvals = r.getValue();
+            String[] svals = s.getValue();            
             for (int ix = 0; ix < rvals.length; ix++)
             {
                 if (!rvals[ix].equals(svals[ix]))
@@ -411,7 +415,7 @@
         cache.invalidate(context);
     }
     
-    protected Map getWindowStates(Page page)
+    protected Map<String, PortletWindowBaseNavigationalState> getWindowStates(Page page)
     {
         PageState pageState = (PageState)pageStates.get(page.getId());
         return pageState != null ? pageState.windowStates : null;



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