Author: julien(a)jboss.com
Date: 2007-09-10 19:40:53 -0400 (Mon, 10 Sep 2007)
New Revision: 8210
Added:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-identity/
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-identity/core-identity.iml
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/ActionContextImpl.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/PortletInvokerSupport.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/PortletSupport.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/ValueMapAssert.java
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/JBossApplicationMetaDataFactory.java
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/PortletApplicationMetaDataFactory.java
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/ValueTrimmingFilter.java
Removed:
branches/JBoss_Portal_Branch_2_6/api/src/main/javax/
branches/JBoss_Portal_Branch_2_6/portlet-federation/
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/tck/TCKPortletController.java
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/test/PortletController.java
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/test/TestSecurityInterceptor.java
branches/JBoss_Portal_Branch_2_6/portlet/
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/servlet/CommandServlet.java
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/servlet/ServletCommand.java
Modified:
branches/JBoss_Portal_Branch_2_6/bridge/build.xml
branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml
branches/JBoss_Portal_Branch_2_6/build/build.xml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/bridge/bridge.iml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/cms/cms.iml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-admin/core-admin.iml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-cms/core-cms.iml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-management/core-management.iml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-samples/core-samples.iml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core/core.iml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/faces/faces.iml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/portlet-server/portlet-server.iml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/theme/theme.iml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/widget/widget.iml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/wsrp/wsrp.iml
branches/JBoss_Portal_Branch_2_6/cms/build.xml
branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/clustering/FileDeleteTest.java
branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/clustering/FileUpdateTest.java
branches/JBoss_Portal_Branch_2_6/core-admin/build.xml
branches/JBoss_Portal_Branch_2_6/core-cms/build.xml
branches/JBoss_Portal_Branch_2_6/core-identity/build.xml
branches/JBoss_Portal_Branch_2_6/core-management/build.xml
branches/JBoss_Portal_Branch_2_6/core-samples/build.xml
branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml
branches/JBoss_Portal_Branch_2_6/core/build.xml
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/Controller.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/ControllerContext.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/deployment/JBossApplicationMetaDataFactory.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeploymentFactory.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/instance/PortletInstanceResponseHandler.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/InstanceContainerTestCase.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/persistent-jboss-beans.xml
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/transient-jboss-beans.xml
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/state/jboss-beans.xml
branches/JBoss_Portal_Branch_2_6/faces/build.xml
branches/JBoss_Portal_Branch_2_6/portlet-server/build.xml
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeployment.java
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeploymentFactory.java
branches/JBoss_Portal_Branch_2_6/portlet-server/src/resources/test-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_6/search/build.xml
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/Server.java
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/aspects/server/SessionInvalidatorInterceptor.java
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/deployment/PortalWebTomcat4App.java
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/deployment/PortalWebTomcat5App.java
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/deployment/PortalWebTomcat6App.java
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/impl/ServerImpl.java
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/test/server/response/EncodeResponseTest.java
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/web/jboss/JBossWebContext.java
branches/JBoss_Portal_Branch_2_6/server/src/resources/portal-server-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_6/server/src/resources/test/test-charset-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_6/server/src/resources/test/test-parameters-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_6/server/src/resources/test/test-response-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_6/server/src/resources/test/test-servlet-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_6/testsuite/build.xml
branches/JBoss_Portal_Branch_2_6/theme/build.xml
branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/test/theme/DynaTestContext.java
branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/test/theme/TestInfoServlet.java
branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/LayoutDispatcher.java
branches/JBoss_Portal_Branch_2_6/theme/src/resources/test/theme-test-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_6/tools/etc/buildfragments/modules.ent
branches/JBoss_Portal_Branch_2_6/widget/build.xml
branches/JBoss_Portal_Branch_2_6/wsrp/build.xml
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/WSRPBaseTest.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-producer-sar/META-INF/jboss-service.xml
Log:
update 2.6 to latest snapshot + portlet container detached module
Modified: branches/JBoss_Portal_Branch_2_6/bridge/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/bridge/build.xml 2007-09-10 23:11:14 UTC (rev 8209)
+++ branches/JBoss_Portal_Branch_2_6/bridge/build.xml 2007-09-10 23:40:53 UTC (rev 8210)
@@ -86,6 +86,7 @@
&libraries;
<path id="library.classpath">
<path refid="jboss.portal/modules/common.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
<path refid="jbossas/core.libs.classpath"/>
<path refid="apache.log4j.classpath"/>
<path refid="sun.servlet.classpath"/>
@@ -99,10 +100,8 @@
<!-- Configure modules -->
<call target="configure-modules"/>
<path id="dependentmodule.classpath">
- <path refid="jboss.portlet-api.classpath"/>
<path refid="jboss.portal-jems.classpath"/>
<path refid="jboss.portal-server.classpath"/>
- <path refid="jboss.portal-portlet.classpath"/>
</path>
<!--+=======================================+-->
Modified: branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-09-10 23:11:14 UTC
(rev 8209)
+++ branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-09-10 23:40:53 UTC
(rev 8210)
@@ -50,6 +50,7 @@
<componentref name="jboss-portal/modules/common"
version="1.0.0-SNAPSHOT"/>
<componentref name="jboss-portal/modules/web"
version="1.0.0-SNAPSHOT"/>
<componentref name="jboss-portal/modules/test"
version="1.0.0-SNAPSHOT"/>
+ <componentref name="jboss-portal/modules/portlet"
version="1.0.0-SNAPSHOT"/>
<componentref name="jboss-portal/modules/identity"
version="1.0.0-SNAPSHOT"/>
<componentref name="antlr" version="2.7.6.ga"/>
<componentref name="apache-ant" version="1.6.5"/>
Modified: branches/JBoss_Portal_Branch_2_6/build/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/build/build.xml 2007-09-10 23:11:14 UTC (rev 8209)
+++ branches/JBoss_Portal_Branch_2_6/build/build.xml 2007-09-10 23:40:53 UTC (rev 8210)
@@ -116,9 +116,7 @@
<module name="faces"/>
<module name="api"/>
<module name="server"/>
- <module name="portlet"/>
<module name="portlet-server"/>
- <module name="portlet-federation"/>
<module name="theme"/>
<module name="bridge"/>
<module name="cms"/>
@@ -141,7 +139,7 @@
<group name="portal">
<include
- modules="api, jems, server, security, search, format, portlet,
portlet-server, bridge, faces, portlet-federation, theme, workflow, cms, registration,
core, wsrp, core-admin, core-cms, core-management, core-identity, core-samples,
widget"/>
+ modules="api, jems, server, security, search, format, portlet-server,
bridge, faces, theme, workflow, cms, registration, core, wsrp, core-admin, core-cms,
core-management, core-identity, core-samples, widget"/>
</group>
<group name="cms">
@@ -346,9 +344,6 @@
<packageset dir="../api/src/main">
<exclude name="org/jboss/portal/test/**"/>
</packageset>
- <packageset dir="../portlet/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
<packageset dir="../portlet-server/src/main">
<exclude name="org/jboss/portal/test/**"/>
</packageset>
@@ -361,9 +356,6 @@
<packageset dir="../faces/src/main">
<exclude name="org/jboss/portal/test/**"/>
</packageset>
- <packageset dir="../portlet-federation/src/main">
- <exclude name="org/jboss/portal/test/**"/>
- </packageset>
<packageset dir="../format/src/main">
<exclude name="org/jboss/portal/test/**"/>
</packageset>
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/bridge/bridge.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/bridge/bridge.iml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/bridge/bridge.iml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -20,7 +20,6 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module" module-name="portlet" />
<orderEntry type="module-library">
<library>
<CLASSES>
Modified: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/cms/cms.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/cms/cms.iml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/cms/cms.iml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -120,7 +120,6 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module" module-name="portlet" />
<orderEntry type="module-library">
<library>
<CLASSES>
@@ -157,7 +156,6 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module" module-name="identity" />
<orderEntry type="module" module-name="workflow" />
<orderEntry type="module-library">
<library>
@@ -197,6 +195,15 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core/core.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core/core.iml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core/core.iml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -12,7 +12,6 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="theme" />
<orderEntry type="module" module-name="server" />
- <orderEntry type="module" module-name="portlet" />
<orderEntry type="module" module-name="format" />
<orderEntry type="module-library">
<library>
@@ -62,7 +61,6 @@
</library>
</orderEntry>
<orderEntry type="module" module-name="cms" />
- <orderEntry type="module" module-name="identity" />
<orderEntry type="module-library">
<library>
<CLASSES>
@@ -255,7 +253,6 @@
</orderEntry>
<orderEntry type="module" module-name="registration" />
<orderEntry type="module" module-name="workflow" />
- <orderEntry type="module" module-name="portlet-federation"
/>
<orderEntry type="module" module-name="portlet-server" />
<orderEntry type="module-library">
<library>
@@ -321,6 +318,60 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-federation-lib.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/test/lib/portal-test-lib.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/web/lib/portal-web-lib.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-admin/core-admin.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-admin/core-admin.iml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-admin/core-admin.iml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -66,7 +66,6 @@
<orderEntry type="module" module-name="faces" />
<orderEntry type="module" module-name="core" />
<orderEntry type="module" module-name="identity" />
- <orderEntry type="module" module-name="portlet" />
<orderEntry type="module" module-name="theme" />
<orderEntry type="module" module-name="api" />
<orderEntry type="module" module-name="security" />
@@ -80,7 +79,6 @@
</library>
</orderEntry>
<orderEntry type="module" module-name="format" />
- <orderEntry type="module" module-name="portlet-federation"
/>
<orderEntry type="module" module-name="jems" />
<orderEntry type="module-library">
<library>
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-cms/core-cms.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-cms/core-cms.iml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-cms/core-cms.iml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -50,7 +50,6 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module" module-name="portlet" />
<orderEntry type="module" module-name="identity" />
<orderEntry type="module" module-name="theme" />
<orderEntry type="module" module-name="core-admin" />
Added:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-identity/core-identity.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-identity/core-identity.iml
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-identity/core-identity.iml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true"
type="JAVA_MODULE">
+ <component name="ModuleRootManager" />
+ <component name="NewModuleRootManager"
inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$/../../../../../../core-identity">
+ <sourceFolder
url="file://$MODULE_DIR$/../../../../../../core-identity/src/main"
isTestSource="false" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntryProperties />
+ </component>
+</module>
+
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-management/core-management.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-management/core-management.iml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-management/core-management.iml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -10,7 +10,6 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="core" />
- <orderEntry type="module" module-name="portlet" />
<orderEntry type="module" module-name="jems" />
<orderEntry type="module-library">
<library>
@@ -39,7 +38,6 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module" module-name="portlet-federation"
/>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-samples/core-samples.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-samples/core-samples.iml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core-samples/core-samples.iml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -11,7 +11,6 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="format" />
<orderEntry type="module" module-name="core" />
- <orderEntry type="module" module-name="portlet" />
<orderEntry type="module" module-name="api" />
<orderEntry type="module" module-name="identity" />
<orderEntry type="module-library">
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/faces/faces.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/faces/faces.iml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/faces/faces.iml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -74,7 +74,6 @@
</library>
</orderEntry>
<orderEntry type="module" module-name="api" />
- <orderEntry type="module" module-name="portlet" />
<orderEntry type="module" module-name="server" />
<orderEntry type="module" module-name="bridge" />
<orderEntry type="module-library">
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/portlet-server/portlet-server.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/portlet-server/portlet-server.iml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/portlet-server/portlet-server.iml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -9,7 +9,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="portlet" />
<orderEntry type="module" module-name="server" />
<orderEntry type="module-library">
<library>
@@ -112,6 +111,15 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/theme/theme.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/theme/theme.iml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/theme/theme.iml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -29,7 +29,6 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module" module-name="portlet" />
<orderEntry type="module-library">
<library>
<CLASSES>
@@ -113,6 +112,24 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/test/lib/portal-test-lib.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/web/lib/portal-web-lib.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/widget/widget.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/widget/widget.iml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/widget/widget.iml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -9,7 +9,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="portlet" />
<orderEntry type="module" module-name="jems" />
<orderEntry type="module-library">
<library>
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/wsrp/wsrp.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/wsrp/wsrp.iml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/wsrp/wsrp.iml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -13,7 +13,6 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="server" />
- <orderEntry type="module" module-name="portlet" />
<orderEntry type="module-library">
<library>
<CLASSES>
@@ -154,7 +153,6 @@
</orderEntry>
<orderEntry type="module" module-name="jems" />
<orderEntry type="module" module-name="registration" />
- <orderEntry type="module" module-name="portlet-federation"
/>
<orderEntry type="module-library">
<library>
<CLASSES>
Modified: branches/JBoss_Portal_Branch_2_6/cms/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/cms/build.xml 2007-09-10 23:11:14 UTC (rev 8209)
+++ branches/JBoss_Portal_Branch_2_6/cms/build.xml 2007-09-10 23:40:53 UTC (rev 8210)
@@ -90,11 +90,13 @@
<path id="library.classpath">
<path refid="jboss.portal/modules/common.classpath"/>
<path refid="jboss.portal/modules/test.classpath"/>
- <path refid="apache.logging.classpath"/>
- <path refid="apache.xerces.classpath"/>
- <path refid="apache.log4j.classpath"/>
- <path refid="apache.collections.classpath"/>
- <path refid="apache.lucene.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
+ <path refid="jboss.portal/modules/identity.classpath"/>
+ <path refid="apache.logging.classpath"/>
+ <path refid="apache.xerces.classpath"/>
+ <path refid="apache.log4j.classpath"/>
+ <path refid="apache.collections.classpath"/>
+ <path refid="apache.lucene.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
<path refid="jboss.cache.classpath"/>
<path refid="oswego.concurrent.classpath"/>
@@ -111,13 +113,11 @@
<path refid="jcr.jcr.classpath"/>
<!-- cms optimization integration -->
<path refid="jgroups.jgroups.classpath"/>
- <path refid="sun.servlet.classpath"/>
- <!-- jbpm integration -->
- <path refid="jbpm.jaronly.classpath"/>
+ <path refid="sun.servlet.classpath"/>
+ <!-- jbpm integration -->
+ <path refid="jbpm.jaronly.classpath"/>
</path>
-
-
<path id="javac.classpath">
<pathelement location="${build.classes}"/>
</path>
@@ -131,13 +131,11 @@
<path refid="jboss.portal-jems.classpath"/>
<path refid="jboss.portal-search.classpath"/>
<!-- fine grained security integration -->
- <path refid="jboss.portal/modules/identity.classpath"/>
- <path refid="jboss.portal-security.classpath"/>
+ <path refid="jboss.portal-security.classpath"/>
<!-- clustered testcases related -->
- <path refid="jboss.portal-portlet.classpath"/>
- <path refid="jboss.portlet-api.classpath"/>
- <!-- workflow integration -->
- <path refid="jboss.portal-workflow.classpath"/>
+ <path refid="jboss.portal-api.classpath"/>
+ <!-- workflow integration -->
+ <path refid="jboss.portal-workflow.classpath"/>
</path>
@@ -254,7 +252,6 @@
<fileset dir="${jboss.portal/modules/identity.lib}"
includes="portal-identity-lib.jar"/>
<fileset dir="${jboss.portal/modules/identity.lib}"
includes="portal-identity-sso-lib.jar"/>
<fileset dir="${jboss.portal-workflow.lib}"
includes="portal-workflow-lib.jar"/>
- <fileset dir="${jboss.portal-portlet.lib}"
includes="portal-portlet-testframework-lib.jar"/>
</jar>
<jar jarfile="${build.lib}/test-cms-cluster.war">
<fileset
dir="${build.resources}/test/cms/clustering/test-cms-clustering-war"/>
Modified:
branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/clustering/FileDeleteTest.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/clustering/FileDeleteTest.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/clustering/FileDeleteTest.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -23,7 +23,6 @@
package org.jboss.portal.test.cms.clustering;
import org.jboss.portal.test.framework.server.driver.AbstractTest;
-import org.jboss.portal.test.framework.driver.http.HTTPTestContext;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.test.framework.driver.remote.TestContext;
import org.jboss.portal.test.framework.server.NodeId;
@@ -80,7 +79,7 @@
{
try
{
- if (HTTPTestContext.isCurrentRequestCount(0) &&
NodeId.PORTS_01.equals(NodeId.locate()))
+ if (testContext.isRequestCount(0) &&
NodeId.PORTS_01.equals(NodeId.locate()))
{
System.out.println("-------------------------------------------------------");
System.out.println("Performing SetUp on..." + NodeId.PORTS_01 +
"(createTestFileDelete)");
@@ -108,10 +107,10 @@
AbstractServerURL url = new AbstractServerURL();
url.setPortalRequestPath("/index.html");
String s = invocation.getResponse().renderURL(url);
- s = HTTPTestContext.getCurrentContext().rewriteURLForNode(s,
NodeId.PORTS_02);
+ s = testContext.rewriteURLForNode(s, NodeId.PORTS_02);
return new InvokeGetResponse(s);
}
- else if (HTTPTestContext.isCurrentRequestCount(1) &&
NodeId.PORTS_02.equals(NodeId.locate()))
+ else if (testContext.isRequestCount(1) &&
NodeId.PORTS_02.equals(NodeId.locate()))
{
System.out.println("-------------------------------------------------------");
System.out.println("Performing SetUp on node..." + NodeId.PORTS_02
+ "(createTestFileDelete)");
@@ -134,10 +133,10 @@
AbstractServerURL url = new AbstractServerURL();
url.setPortalRequestPath("/index.html");
String s = invocation.getResponse().renderURL(url);
- s = HTTPTestContext.getCurrentContext().rewriteURLForNode(s,
NodeId.PORTS_01);
+ s = testContext.rewriteURLForNode(s, NodeId.PORTS_01);
return new InvokeGetResponse(s);
}
- else if (HTTPTestContext.isCurrentRequestCount(2) &&
NodeId.PORTS_01.equals(NodeId.locate()))
+ else if (testContext.isRequestCount(2) &&
NodeId.PORTS_01.equals(NodeId.locate()))
{
System.out.println("-------------------------------------------------------");
System.out.println("Performing FileDelete on..." + NodeId.PORTS_01
+ "(createTestFileDelete)");
@@ -174,10 +173,10 @@
AbstractServerURL url = new AbstractServerURL();
url.setPortalRequestPath("/index.html");
String s = invocation.getResponse().renderURL(url);
- s = HTTPTestContext.getCurrentContext().rewriteURLForNode(s,
NodeId.PORTS_02);
+ s = testContext.rewriteURLForNode(s, NodeId.PORTS_02);
return new InvokeGetResponse(s);
}
- else if (HTTPTestContext.isCurrentRequestCount(3) &&
NodeId.PORTS_02.equals(NodeId.locate()))
+ else if (testContext.isRequestCount(3) &&
NodeId.PORTS_02.equals(NodeId.locate()))
{
System.out.println("-------------------------------------------------------");
System.out.println("Checking FileDelete on node..." +
NodeId.PORTS_02 + "(createTestFileDelete)");
Modified:
branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/clustering/FileUpdateTest.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/clustering/FileUpdateTest.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/clustering/FileUpdateTest.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -34,7 +34,6 @@
import org.jboss.portal.test.framework.driver.DriverResponse;
import org.jboss.portal.common.junit.ExtendedAssert;
import org.jboss.portal.test.framework.server.driver.AbstractTest;
-import org.jboss.portal.test.framework.driver.http.HTTPTestContext;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.test.framework.driver.remote.TestContext;
import org.jboss.portal.test.framework.server.NodeId;
@@ -80,7 +79,7 @@
{
try
{
- if (HTTPTestContext.isCurrentRequestCount(0) &&
NodeId.PORTS_01.equals(NodeId.locate()))
+ if (testContext.isRequestCount(0) &&
NodeId.PORTS_01.equals(NodeId.locate()))
{
System.out.println("-------------------------------------------------------");
System.out.println("Performing SetUp on..." + NodeId.PORTS_01 +
"(createTestFileUpdate)");
@@ -116,10 +115,10 @@
AbstractServerURL url = new AbstractServerURL();
url.setPortalRequestPath("/index.html");
String s = invocation.getResponse().renderURL(url);
- s = HTTPTestContext.getCurrentContext().rewriteURLForNode(s,
NodeId.PORTS_02);
+ s = testContext.rewriteURLForNode(s, NodeId.PORTS_02);
return new InvokeGetResponse(s);
}
- else if (HTTPTestContext.isCurrentRequestCount(1) &&
NodeId.PORTS_02.equals(NodeId.locate()))
+ else if (testContext.isRequestCount(1) &&
NodeId.PORTS_02.equals(NodeId.locate()))
{
System.out.println("-------------------------------------------------------");
System.out.println("Performing SetUp on node..." + NodeId.PORTS_02
+ "(createTestFileUpdate)");
@@ -155,10 +154,10 @@
AbstractServerURL url = new AbstractServerURL();
url.setPortalRequestPath("/index.html");
String s = invocation.getResponse().renderURL(url);
- s = HTTPTestContext.getCurrentContext().rewriteURLForNode(s,
NodeId.PORTS_01);
+ s = testContext.rewriteURLForNode(s, NodeId.PORTS_01);
return new InvokeGetResponse(s);
}
- else if (HTTPTestContext.isCurrentRequestCount(2) &&
NodeId.PORTS_01.equals(NodeId.locate()))
+ else if (testContext.isRequestCount(2) &&
NodeId.PORTS_01.equals(NodeId.locate()))
{
System.out.println("-------------------------------------------------------");
System.out.println("Performing FileUpdate on..." + NodeId.PORTS_01
+ "(createTestFileUpdate)");
@@ -208,10 +207,10 @@
AbstractServerURL url = new AbstractServerURL();
url.setPortalRequestPath("/index.html");
String s = invocation.getResponse().renderURL(url);
- s = HTTPTestContext.getCurrentContext().rewriteURLForNode(s,
NodeId.PORTS_02);
+ s = testContext.rewriteURLForNode(s, NodeId.PORTS_02);
return new InvokeGetResponse(s);
}
- else if (HTTPTestContext.isCurrentRequestCount(3) &&
NodeId.PORTS_02.equals(NodeId.locate()))
+ else if (testContext.isRequestCount(3) &&
NodeId.PORTS_02.equals(NodeId.locate()))
{
System.out.println("-------------------------------------------------------");
System.out.println("Checking FileUpdate on node..." +
NodeId.PORTS_02 + "(createTestFileUpdate)");
Modified: branches/JBoss_Portal_Branch_2_6/core/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/build.xml 2007-09-10 23:11:14 UTC (rev 8209)
+++ branches/JBoss_Portal_Branch_2_6/core/build.xml 2007-09-10 23:40:53 UTC (rev 8210)
@@ -89,6 +89,8 @@
<path id="library.classpath">
<path refid="jboss.portal/modules/common.classpath"/>
<path refid="jboss.portal/modules/web.classpath"/>
+ <path refid="jboss.portal/modules/identity.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
<path refid="jboss.portal/modules/test.classpath"/>
<path refid="jboss/backport.concurrent.classpath"/>
<path refid="jboss.microcontainer.classpath"/>
@@ -128,13 +130,10 @@
<path refid="jboss.portal-format.classpath"/>
<path refid="jboss.portal-server.classpath"/>
<path refid="jboss.portal-registration.classpath"/>
- <path refid="jboss.portal-portlet.classpath"/>
<path refid="jboss.portal-portlet-server.classpath"/>
<path refid="jboss.portal-jems.classpath"/>
- <path refid="jboss.portal-portlet-federation.classpath"/>
- <path refid="jboss.portal/modules/identity.classpath"/>
<path refid="jboss.portal-jems.classpath"/>
- <path refid="jboss.portlet-api.classpath"/>
+ <path refid="jboss.portal-api.classpath"/>
<path refid="jboss.portal-theme.classpath"/>
<path refid="jboss.portal-security.classpath"/>
</path>
@@ -233,12 +232,11 @@
<path refid="beanshell.beanshell.classpath"/>
<path refid="hibernate.classpath"/>
<path refid="jboss.portal/modules/common.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
+ <path refid="jboss.portal/modules/identity.classpath"/>
<path refid="jboss.portal-server.classpath"/>
- <path refid="jboss.portal-portlet.classpath"/>
<path refid="jboss.portal-portlet-server.classpath"/>
- <path refid="jboss.portal/modules/identity.classpath"/>
<path refid="jboss.portal-security.classpath"/>
- <path refid="jboss.portlet-api.classpath"/>
<path refid="jboss.portal-jems.classpath"/>
<pathelement path="${build.classes}"/>
</path>
@@ -283,10 +281,6 @@
<exclude name="org/jboss/portal/test/**"/>
<exclude name="org/jboss/portlet/**"/>
</fileset>
- <fileset dir="../portlet/output/classes">
- <include
name="org/jboss/portal/test/portlet/TestPortletPreferencesPortlet.class"/>
- <include
name="org/jboss/portal/test/core/theme/UserThemeTestCase.class"/>
- </fileset>
</jar>
<!-- jboss-portlet-api-lib.jar -->
@@ -324,20 +318,18 @@
<fileset dir="${jboss.portal-format.root}/lib"
includes="portal-format-lib.jar"/>
<fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-lib.jar,portal-common-portal-lib.jar"/>
<fileset dir="${jboss.portal/modules/web.lib}"
includes="portal-web-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/portlet.lib}"
includes="portal-portlet-lib.jar,portal-portlet-federation-lib.jar,portal-portlet-jsr168api-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/identity.root}/lib"
includes="portal-identity-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/identity.root}/lib"
includes="portal-identity-sso-lib.jar"/>
<fileset dir="${jboss.portal-bridge.root}/lib"
includes="portal-bridge-lib.jar"/>
<fileset dir="${jboss.portal-server.root}/lib"
includes="portal-server-lib.jar"/>
- <fileset dir="${jboss.portal-portlet.root}/lib"
includes="portal-portlet-lib.jar"/>
<fileset dir="${jboss.portal-portlet-server.root}/lib"
includes="portal-portlet-server-lib.jar"/>
<fileset dir="${jboss.portal-jems.root}/lib"
includes="portal-jems-lib.jar"/>
- <fileset dir="${jboss.portal-portlet-federation.root}/lib"
includes="portal-portlet-federation-lib.jar"/>
- <fileset dir="${jboss.portlet-api.root}/lib"
includes="portlet-api-lib.jar"/>
- <fileset dir="${jboss.portlet-api.root}/lib"
includes="portal-api-lib.jar"/>
+ <fileset dir="${jboss.portal-api.root}/lib"
includes="portal-api-lib.jar"/>
<fileset dir="${jboss.portal-theme.root}/lib"
includes="portal-theme-lib.jar"/>
<fileset dir="${jboss.portal-security.root}/lib"
includes="portal-security-lib.jar"/>
<fileset dir="${jboss.portal-search.root}/lib"
includes="portal-search-lib.jar"/>
<fileset dir="${jboss.portal-workflow.root}/lib"
includes="portal-workflow-lib.jar"/>
- <fileset dir="${jboss.portal/modules/identity.root}/lib"
includes="portal-identity-lib.jar"/>
- <fileset dir="${jboss.portal/modules/identity.root}/lib"
includes="portal-identity-sso-lib.jar"/>
<fileset dir="${jboss.portal-registration.root}/lib"
includes="portal-registration-lib.jar"/>
<fileset dir="${ehcache.ehcache.lib}"
includes="ehcache.jar"/>
<fileset dir="${apache.collections.lib}"
includes="commons-collections.jar"/>
@@ -346,10 +338,8 @@
<fileset dir="${jakarta.io.lib}"
includes="commons-io.jar"/>
<fileset dir="${freemarker.freemarker.lib}"
includes="freemarker.jar"/>
<fileset dir="${portals.bridges.lib}"
includes="portals-bridges-common.jar"/>
- <fileset dir="${jboss/backport.concurrent.lib}"
includes="jboss-backport-concurrent.jar"/>
- <fileset dir="${jbpm.jaronly.lib}"
includes="jbpm.jar"/>
- <fileset dir="${jbpm.jaronly.lib}"
includes="jbpm-identity.jar"/>
-
+ <fileset dir="${jboss/backport.concurrent.lib}"
includes="jboss-backport-concurrent.jar"/>
+ <fileset dir="${jbpm.jaronly.lib}"
includes="jbpm.jar,jbpm-identity.jar"/>
</copy>
<!--dtd-->
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/Controller.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/Controller.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/Controller.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -88,9 +88,6 @@
protected ResponseHandler responseHandler;
/** . */
- protected ServletContainerContext servletContainerContext;
-
- /** . */
protected PageControlPolicy pageControlPolicy;
public ContentRendererRegistry getContentRendererRegistry()
@@ -193,11 +190,6 @@
this.responseHandler = responseHandler;
}
- public ServletContainerContext getServletContainerContext()
- {
- return servletContainerContext;
- }
-
public PageControlPolicy getPageControlPolicy()
{
return pageControlPolicy;
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/ControllerContext.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/ControllerContext.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/ControllerContext.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -35,6 +35,7 @@
import org.jboss.portal.identity.User;
import org.jboss.portal.core.aspects.server.UserInterceptor;
import org.jboss.portal.core.model.portal.navstate.PortalObjectNavigationalStateContext;
+import org.jboss.portal.web.ServletContainer;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.ServletContext;
@@ -103,6 +104,11 @@
addResolver(ControllerCommand.PRINCIPAL_SCOPE, serverInvocation.getContext());
}
+ public ServletContainer getServletContainer()
+ {
+ return serverInvocation.getRequest().getServer().getServletContainer();
+ }
+
public ControllerResponse execute(ControllerCommand command) throws
ControllerException, InvocationException
{
if (command == null)
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -315,7 +315,10 @@
StringWriter buffer = new StringWriter();
// Get a dispatcher
- ServletContextDispatcher dispatcher = new
ServletContextDispatcher(invocation.getServerContext().getClientRequest(),
invocation.getServerContext().getClientResponse(),
controllerContext.getController().getServletContainerContext());
+ ServletContextDispatcher dispatcher = new
ServletContextDispatcher(
+ invocation.getServerContext().getClientRequest(),
+ invocation.getServerContext().getClientResponse(),
+ controllerContext.getServletContainer());
// Not really used for now in that context, so we can pass null
(need to change that of course)
ThemeContext themeContext = new ThemeContext(null, null);
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/classic/OtherResponseHandler.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -79,7 +79,7 @@
{
public void sendResponse(ServerInvocationContext ctx) throws IOException,
ServletException
{
- ServletContextDispatcher dispatcher = new
ServletContextDispatcher(invocation.getServerContext().getClientRequest(),
invocation.getServerContext().getClientResponse(),
invocation.getRequest().getServer().getServletContainerContext());
+ ServletContextDispatcher dispatcher = new
ServletContextDispatcher(invocation.getServerContext().getClientRequest(),
invocation.getServerContext().getClientResponse(),
invocation.getRequest().getServer().getServletContainer());
MarkupInfo markupInfo =
(MarkupInfo)invocation.getResponse().getContentInfo();
rendition.render(markupInfo, dispatcher);
}
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/deployment/JBossApplicationMetaDataFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/deployment/JBossApplicationMetaDataFactory.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/deployment/JBossApplicationMetaDataFactory.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -35,7 +35,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public class JBossApplicationMetaDataFactory extends
org.jboss.portal.portlet.deployment.JBossApplicationMetaDataFactory
+public class JBossApplicationMetaDataFactory extends
org.jboss.portal.portlet.deployment.jboss.JBossApplicationMetaDataFactory
{
public Object newRoot(Object root, UnmarshallingContext nav, String nsURI, String
localName, Attributes attrs)
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeploymentFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeploymentFactory.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeploymentFactory.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -87,7 +87,7 @@
}
/** Return a subclass that does more. */
- public org.jboss.portal.portlet.deployment.JBossApplicationMetaDataFactory
createJBossApplicationMetaDataFactory()
+ public org.jboss.portal.portlet.deployment.jboss.JBossApplicationMetaDataFactory
createJBossApplicationMetaDataFactory()
{
return new JBossApplicationMetaDataFactory();
}
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/instance/PortletInstanceResponseHandler.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/instance/PortletInstanceResponseHandler.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/instance/PortletInstanceResponseHandler.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -61,7 +61,7 @@
{
public void sendResponse(ServerInvocationContext ctx) throws IOException,
ServletException
{
- ServletContextDispatcher dispatcher = new
ServletContextDispatcher(invocation.getServerContext().getClientRequest(),
invocation.getServerContext().getClientResponse(),
invocation.getRequest().getServer().getServletContainerContext());
+ ServletContextDispatcher dispatcher = new
ServletContextDispatcher(invocation.getServerContext().getClientRequest(),
invocation.getServerContext().getClientResponse(),
invocation.getRequest().getServer().getServletContainer());
MarkupInfo markupInfo =
(MarkupInfo)invocation.getResponse().getContentInfo();
rendition.render(markupInfo, dispatcher);
}
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -82,7 +82,7 @@
{
public void sendResponse(ServerInvocationContext ctx) throws
IOException, ServletException
{
- ServletContextDispatcher dispatcher = new
ServletContextDispatcher(invocation.getServerContext().getClientRequest(),
invocation.getServerContext().getClientResponse(),
invocation.getRequest().getServer().getServletContainerContext());
+ ServletContextDispatcher dispatcher = new
ServletContextDispatcher(invocation.getServerContext().getClientRequest(),
invocation.getServerContext().getClientResponse(),
invocation.getRequest().getServer().getServletContainer());
MarkupInfo markupInfo =
(MarkupInfo)invocation.getResponse().getContentInfo();
rendition.render(markupInfo, dispatcher);
}
Added:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/ActionContextImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/ActionContextImpl.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/ActionContextImpl.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.test.core.model.instance;
+
+import org.jboss.portal.portlet.support.spi.ActionContextSupport;
+import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.Mode;
+import org.jboss.portal.common.invocation.resolver.MapAttributeResolver;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ActionContextImpl extends ActionContextSupport
+{
+
+ /** . */
+ private final Mode mode;
+
+ public ActionContextImpl(Mode mode)
+ {
+ this.mode = mode;
+
+ //
+ addResolver(PortletInvocation.REQUEST_SCOPE, new MapAttributeResolver());
+ addResolver(PortletInvocation.INVOCATION_SCOPE, new MapAttributeResolver());
+ }
+
+ public ActionContextImpl()
+ {
+ this(Mode.EDIT);
+ }
+
+ public Mode getMode()
+ {
+ return mode;
+ }
+}
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/InstanceContainerTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/InstanceContainerTestCase.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/InstanceContainerTestCase.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -51,6 +51,7 @@
import org.jboss.portal.portlet.PortletContext;
import org.jboss.portal.portlet.PortletInvoker;
import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.impl.spi.AbstractUserContext;
import org.jboss.portal.portlet.info.MetaInfo;
import org.jboss.portal.portlet.invocation.ActionInvocation;
import org.jboss.portal.portlet.invocation.PortletInvocation;
@@ -61,11 +62,6 @@
import org.jboss.portal.portlet.state.PropertyMap;
import org.jboss.portal.portlet.state.SimplePropertyMap;
import org.jboss.portal.portlet.state.producer.ProducerPortletInvoker;
-import org.jboss.portal.portlet.test.ActionContextImpl;
-import org.jboss.portal.portlet.test.UserContextImpl;
-import org.jboss.portal.portlet.test.ValueMapAssert;
-import org.jboss.portal.portlet.test.support.PortletInvokerSupport;
-import org.jboss.portal.portlet.test.support.PortletSupport;
import org.jboss.portal.security.RoleSecurityBinding;
import org.jboss.portal.security.spi.provider.DomainConfigurator;
import org.jboss.portal.test.framework.AbstractPortalTestCase;
@@ -449,7 +445,7 @@
instance = instanceDef.getCustomization(identity);
}
PortletInvocation action = new ActionInvocation(new
ActionContextImpl(Mode.VIEW));
- action.setUserContext(identity == null ? new UserContextImpl() : new
UserContextImpl(identity));
+ action.setUserContext(identity == null ? new AbstractUserContext() : new
AbstractUserContext(identity));
try
{
instance.invoke(action);
@@ -715,7 +711,7 @@
TransactionAssert.beginTransaction();
Instance instance =
instanceContainer.getDefinition("MyInstance").getCustomization("julien");
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
- action.setUserContext(new UserContextImpl("julien"));
+ action.setUserContext(new AbstractUserContext("julien"));
instance.invoke(action);
TransactionAssert.commitTransaction();
Added:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/PortletInvokerSupport.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/PortletInvokerSupport.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/PortletInvokerSupport.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -0,0 +1,259 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.test.core.model.instance;
+
+import org.jboss.portal.portlet.PortletInvoker;
+import org.jboss.portal.portlet.Portlet;
+import org.jboss.portal.portlet.PortletContext;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.NoSuchPortletException;
+import org.jboss.portal.portlet.InvalidPortletIdException;
+import org.jboss.portal.portlet.state.PropertyMap;
+import org.jboss.portal.portlet.state.SimplePropertyMap;
+import org.jboss.portal.portlet.state.PropertyChange;
+import org.jboss.portal.portlet.info.PortletInfo;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.support.info.PortletInfoSupport;
+import org.jboss.portal.common.value.Value;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 6712 $
+ */
+public class PortletInvokerSupport implements PortletInvoker
+{
+
+ /** . */
+ private Map portlets;
+
+ public PortletInvokerSupport()
+ {
+ this.portlets = new HashMap();
+ }
+
+ public void setValid(String portletId, boolean valid)
+ {
+ getInternalPortlet(portletId).valid = valid;
+ }
+
+ public InternalPortlet addInternalPortlet(String portletId, PortletInfoSupport info)
+ {
+ return addInternalPortlet(portletId, new PortletSupport(info));
+ }
+
+ public InternalPortlet addInternalPortlet(String portletId, PortletSupport support)
+ {
+ if (portletId == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (support == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ InternalPortlet portlet = new InternalPortlet(portletId, support);
+ if (portlets.put(portletId, portlet) != null)
+ {
+ throw new IllegalStateException();
+ }
+ return portlet;
+ }
+
+ public PortletInvokerSupport removeInternalPortlet(String portletId)
+ {
+ if (portlets.remove(portletId) == null)
+ {
+ throw new IllegalStateException();
+ }
+ return this;
+ }
+
+ public InternalPortlet getInternalPortlet(String portletId)
+ {
+ if (portletId == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ InternalPortlet portlet = (InternalPortlet)portlets.get(portletId);
+ if (portlet == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ return portlet;
+ }
+
+ public Set getPortlets()
+ {
+ return new HashSet(portlets.values());
+ }
+
+ public Portlet getPortlet(PortletContext portletContext) throws
IllegalArgumentException, PortletInvokerException
+ {
+ return internalGetPortlet(portletContext);
+ }
+
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws
PortletInvokerException
+ {
+ PortletContext portletContext = invocation.getTarget();
+ InternalPortlet portlet = internalGetPortlet(portletContext);
+ return portlet.support.invoke(invocation);
+ }
+
+ private InternalPortlet internalGetPortlet(PortletContext portletContext) throws
IllegalArgumentException, PortletInvokerException
+ {
+ if (portletContext == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ String portletId = portletContext.getId();
+ InternalPortlet portlet = (InternalPortlet)portlets.get(portletId);
+ if (portlet == null)
+ {
+ throw new NoSuchPortletException(portletId);
+ }
+ if (portlet.isValid() == false)
+ {
+ throw new InvalidPortletIdException(portletId);
+ }
+ return portlet;
+ }
+
+ public static class InternalPortlet implements Portlet
+ {
+
+ /** . */
+ private final PortletContext portletContext;
+
+ /** . */
+ private final PortletSupport support;
+
+ /** . */
+ private boolean valid;
+
+ /** . */
+ private Map state;
+
+ public InternalPortlet(String portletId, PortletSupport support)
+ {
+ if (portletId == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (support == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ this.portletContext = PortletContext.createPortletContext(portletId);
+ this.support = support;
+ this.valid = true;
+ this.state = new HashMap();
+ }
+
+ public void addPreference(String key, Value value)
+ {
+ support.getInfoSupport().getPreferencesSupport().addPreference(key);
+ state.put(key, value);
+ }
+
+ public void addPreference(String key, Value value, Boolean readOnly)
+ {
+ support.getInfoSupport().getPreferencesSupport().addPreference(key, readOnly);
+ state.put(key, value);
+ }
+
+ public PortletContext getContext()
+ {
+ return portletContext;
+ }
+
+ public PortletInfo getInfo()
+ {
+ return support.getInfoSupport();
+ }
+
+ public boolean isRemote()
+ {
+ return false;
+ }
+
+ public boolean isValid()
+ {
+ return valid;
+ }
+ }
+
+ public PropertyMap getProperties(PortletContext portletContext, Set keys) throws
IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ {
+ InternalPortlet internalPortlet = internalGetPortlet(portletContext);
+ PropertyMap props = new SimplePropertyMap();
+ for (Iterator i = keys.iterator();i.hasNext();)
+ {
+ String key = (String)i.next();
+ Value value = (Value)internalPortlet.state.get(key);
+ if (value != null)
+ {
+ props.put(key, value.clone());
+ }
+ }
+ return props;
+ }
+
+ public PropertyMap getProperties(PortletContext portletContext) throws
IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ {
+ InternalPortlet internalPortlet = internalGetPortlet(portletContext);
+ PropertyMap props = new SimplePropertyMap();
+ for (Iterator i = internalPortlet.state.keySet().iterator();i.hasNext();)
+ {
+ String key = (String)i.next();
+ Value value = (Value)internalPortlet.state.get(key);
+ if (value != null)
+ {
+ props.put(key, value.clone());
+ }
+ }
+ return props;
+ }
+
+ public PortletContext createClone(PortletContext portletContext) throws
IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public List destroyClones(List portletContexts) throws IllegalArgumentException,
PortletInvokerException, UnsupportedOperationException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public PortletContext setProperties(PortletContext portletContext, PropertyChange[]
changes) throws IllegalArgumentException, PortletInvokerException,
UnsupportedOperationException
+ {
+ throw new UnsupportedOperationException();
+ }
+}
Added:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/PortletSupport.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/PortletSupport.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/PortletSupport.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -0,0 +1,67 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.test.core.model.instance;
+
+import org.jboss.portal.portlet.support.info.PortletInfoSupport;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.PortletInvokerException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 6116 $
+ */
+public class PortletSupport
+{
+
+ /** . */
+ protected final PortletInfoSupport info;
+
+ /** . */
+ protected boolean valid;
+
+ public PortletSupport(PortletInfoSupport info)
+ {
+ if (info == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ this.info = info;
+ this.valid = true;
+ }
+
+ public PortletSupport()
+ {
+ this(new PortletInfoSupport());
+ }
+
+ public PortletInfoSupport getInfoSupport()
+ {
+ return info;
+ }
+
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws
PortletInvokerException
+ {
+ throw new PortletInvokerException("No implementations");
+ }
+}
Added:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/ValueMapAssert.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/ValueMapAssert.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/instance/ValueMapAssert.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -0,0 +1,65 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.test.core.model.instance;
+
+import junit.framework.Assert;
+import org.jboss.portal.portlet.state.PropertyMap;
+import org.jboss.portal.common.value.Value;
+
+import java.util.HashSet;
+import java.util.Iterator;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ValueMapAssert extends Assert
+{
+ public static void assertEquals(PropertyMap vm1, PropertyMap vm2)
+ {
+ if (vm1 == null)
+ {
+ if (vm2 != null)
+ {
+ fail("Value map should be null");
+ }
+ }
+ else
+ {
+ if (vm2 == null)
+ {
+ fail("Value map should not be null");
+ }
+ assertEquals("Value maps don't have the same keys", new
HashSet(vm1.keySet()), new HashSet(vm2.keySet()));
+ for (Iterator i = vm1.keySet().iterator(); i.hasNext();)
+ {
+ String key = (String)i.next();
+ Value v1 = vm1.getProperty(key);
+ Value v2 = vm2.getProperty(key);
+ assertEquals("Values for key " + key + " are not equals",
v1, v2);
+ }
+ }
+ }
+
+
+}
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/state/ProducerTestCase.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -42,6 +42,8 @@
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletContext;
import org.jboss.portal.portlet.PortletInvoker;
+import org.jboss.portal.portlet.impl.spi.AbstractUserContext;
+import org.jboss.portal.portlet.impl.spi.AbstractInstanceContext;
import org.jboss.portal.portlet.info.MetaInfo;
import org.jboss.portal.portlet.invocation.ActionInvocation;
import org.jboss.portal.portlet.invocation.PortletInvocation;
@@ -55,12 +57,6 @@
import org.jboss.portal.portlet.state.PropertyContext;
import org.jboss.portal.portlet.state.producer.PortletState;
import org.jboss.portal.portlet.state.producer.PortletStateContext;
-import org.jboss.portal.portlet.test.ActionContextImpl;
-import org.jboss.portal.portlet.test.InstanceContextImpl;
-import org.jboss.portal.portlet.test.UserContextImpl;
-import org.jboss.portal.portlet.test.ValueMapAssert;
-import org.jboss.portal.portlet.test.support.PortletInvokerSupport;
-import org.jboss.portal.portlet.test.support.PortletSupport;
import org.jboss.portal.registration.RegistrationLocal;
import org.jboss.portal.registration.ConsumerGroup;
import org.jboss.portal.registration.Consumer;
@@ -69,6 +65,10 @@
import org.jboss.portal.test.framework.embedded.DataSourceSupport;
import org.jboss.portal.test.framework.embedded.HibernateSupport;
import org.jboss.portal.test.framework.TestParametrization;
+import org.jboss.portal.test.core.model.instance.PortletInvokerSupport;
+import org.jboss.portal.test.core.model.instance.PortletSupport;
+import org.jboss.portal.test.core.model.instance.ActionContextImpl;
+import org.jboss.portal.test.core.model.instance.ValueMapAssert;
import javax.xml.namespace.QName;
import java.net.URL;
@@ -498,8 +498,8 @@
beginRegistrationScopedTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setTarget(PortletContext.createPortletContext("CloningPortlet"));
- action.setUserContext(new UserContextImpl("julien"));
- InstanceContextImpl instanceContext = new InstanceContextImpl("whatever",
AccessMode.CLONE_BEFORE_WRITE);
+ action.setUserContext(new AbstractUserContext("julien"));
+ AbstractInstanceContext instanceContext = new
AbstractInstanceContext("whatever", AccessMode.CLONE_BEFORE_WRITE);
action.setInstanceContext(instanceContext);
consumer.invoke(action);
commitTX();
@@ -530,8 +530,8 @@
beginRegistrationScopedTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setTarget(PortletContext.createPortletContext("CloneFailedCloningPortlet"));
- action.setUserContext(new UserContextImpl("julien"));
- InstanceContextImpl instanceContext = new InstanceContextImpl("whatever",
AccessMode.READ_WRITE);
+ action.setUserContext(new AbstractUserContext("julien"));
+ AbstractInstanceContext instanceContext = new
AbstractInstanceContext("whatever", AccessMode.READ_WRITE);
action.setInstanceContext(instanceContext);
consumer.invoke(action);
commitTX();
@@ -548,8 +548,8 @@
beginRegistrationScopedTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setTarget(PortletContext.createPortletContext("CloneFailedCloningPortlet"));
- action.setUserContext(new UserContextImpl("julien"));
- InstanceContextImpl instanceContext = new InstanceContextImpl("whatever",
AccessMode.READ_ONLY);
+ action.setUserContext(new AbstractUserContext("julien"));
+ AbstractInstanceContext instanceContext = new
AbstractInstanceContext("whatever", AccessMode.READ_ONLY);
action.setInstanceContext(instanceContext);
consumer.invoke(action);
commitTX();
@@ -579,8 +579,8 @@
beginRegistrationScopedTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setTarget(cloningPortletId);
- action.setUserContext(new UserContextImpl("julien"));
- InstanceContextImpl instanceContext = new InstanceContextImpl("whatever",
AccessMode.CLONE_BEFORE_WRITE);
+ action.setUserContext(new AbstractUserContext("julien"));
+ AbstractInstanceContext instanceContext = new
AbstractInstanceContext("whatever", AccessMode.CLONE_BEFORE_WRITE);
action.setInstanceContext(instanceContext);
consumer.invoke(action);
commitTX();
@@ -616,8 +616,8 @@
beginRegistrationScopedTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setTarget(cloningPortletId);
- action.setUserContext(new UserContextImpl("julien"));
- InstanceContextImpl instanceContext = new InstanceContextImpl("whatever",
AccessMode.READ_WRITE);
+ action.setUserContext(new AbstractUserContext("julien"));
+ AbstractInstanceContext instanceContext = new
AbstractInstanceContext("whatever", AccessMode.READ_WRITE);
action.setInstanceContext(instanceContext);
consumer.invoke(action);
commitTX();
@@ -646,8 +646,8 @@
beginRegistrationScopedTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setTarget(cloneFailedCloningPortletId);
- action.setUserContext(new UserContextImpl("julien"));
- InstanceContextImpl instanceContext = new InstanceContextImpl("whatever",
AccessMode.READ_ONLY);
+ action.setUserContext(new AbstractUserContext("julien"));
+ AbstractInstanceContext instanceContext = new
AbstractInstanceContext("whatever", AccessMode.READ_ONLY);
action.setInstanceContext(instanceContext);
consumer.invoke(action);
commitTX();
@@ -663,8 +663,8 @@
beginRegistrationScopedTX();
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setTarget(PortletContext.createPortletContext("CloningPortletThrowingRuntimeException"));
- action.setUserContext(new UserContextImpl("julien"));
- InstanceContextImpl instanceContext = new InstanceContextImpl("whatever",
AccessMode.CLONE_BEFORE_WRITE);
+ action.setUserContext(new AbstractUserContext("julien"));
+ AbstractInstanceContext instanceContext = new
AbstractInstanceContext("whatever", AccessMode.CLONE_BEFORE_WRITE);
action.setInstanceContext(instanceContext);
try
{
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -54,7 +54,7 @@
<!-- Runtime context for running portlet container -->
<mbean
code="org.jboss.portal.web.jboss.JBossWebContext"
- name="portal:service=ServletContainerContext"
+ name="portal:service=ServletContainerFactory"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
@@ -120,6 +120,9 @@
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
+ <depends
+ optional-attribute-name="ServletContainerFactory"
+
proxy-type="attribute">portal:service=ServletContainerFactory</depends>
</mbean>
<mbean
code="org.jboss.portal.core.aspects.server.UserInterceptor"
@@ -325,8 +328,8 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<depends
- optional-attribute-name="ServletContainerContext"
-
proxy-type="attribute">portal:service=ServletContainerContext</depends>
+ optional-attribute-name="ServletContainerFactory"
+
proxy-type="attribute">portal:service=ServletContainerFactory</depends>
</mbean>
<mbean
code="org.jboss.portal.portlet.aspects.portlet.PortletSessionSynchronizationInterceptor"
@@ -1183,8 +1186,8 @@
optional-attribute-name="Config"
proxy-type="attribute">portal:service=ServerConfig</depends>
<depends
- optional-attribute-name="ServletContainerContext"
-
proxy-type="attribute">portal:service=ServletContainerContext</depends>
+ optional-attribute-name="ServletContainerFactory"
+
proxy-type="attribute">portal:service=ServletContainerFactory</depends>
</mbean>
<!-- -->
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/persistent-jboss-beans.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/persistent-jboss-beans.xml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/persistent-jboss-beans.xml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -91,7 +91,7 @@
<bean name="PersistenceManager"
class="org.jboss.portal.core.impl.portlet.state.PersistentPortletStatePersistenceManager">
<property
name="sessionFactoryJNDIName">java:/PortletSessionFactory</property>
</bean>
- <bean name="PortletContainer"
class="org.jboss.portal.portlet.test.support.PortletInvokerSupport">
+ <bean name="PortletContainer"
class="org.jboss.portal.test.core.model.instance.PortletInvokerSupport">
</bean>
<bean name="Producer"
class="org.jboss.portal.portlet.state.producer.ProducerPortletInvoker">
<property name="persistenceManager"><inject
bean="PersistenceManager"/></property>
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/transient-jboss-beans.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/transient-jboss-beans.xml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/transient-jboss-beans.xml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -91,7 +91,7 @@
<bean name="PersistenceManager"
class="org.jboss.portal.core.impl.portlet.state.PersistentPortletStatePersistenceManager">
<property
name="sessionFactoryJNDIName">java:/PortletSessionFactory</property>
</bean>
- <bean name="PortletContainer"
class="org.jboss.portal.portlet.test.support.PortletInvokerSupport">
+ <bean name="PortletContainer"
class="org.jboss.portal.test.core.model.instance.PortletInvokerSupport">
</bean>
<bean name="Producer"
class="org.jboss.portal.portlet.state.producer.ProducerPortletInvoker">
<property name="persistenceManager"><inject
bean="PersistenceManager"/></property>
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/state/jboss-beans.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/state/jboss-beans.xml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/state/jboss-beans.xml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -77,7 +77,7 @@
<property
name="sessionFactoryJNDIName">java:/SessionFactory</property>
</bean>
- <bean name="PortletContainer"
class="org.jboss.portal.portlet.test.support.PortletInvokerSupport">
+ <bean name="PortletContainer"
class="org.jboss.portal.test.core.model.instance.PortletInvokerSupport">
</bean>
<bean name="Producer"
class="org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker">
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/build.xml 2007-09-10 23:11:14 UTC (rev
8209)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/build.xml 2007-09-10 23:40:53 UTC (rev
8210)
@@ -89,6 +89,8 @@
<path id="library.classpath">
<path refid="jboss.portal/modules/common.classpath"/>
<path refid="jboss.portal/modules/test.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
+ <path refid="jboss.portal/modules/identity.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
<path refid="jboss.cache.classpath"/>
<path refid="jbossas/core.libs.classpath"/>
@@ -109,11 +111,8 @@
<path refid="jboss.portal-bridge.classpath"/>
<path refid="jboss.portal-server.classpath"/>
<path refid="jboss.portal-registration.classpath"/>
- <path refid="jboss.portal-portlet.classpath"/>
<path refid="jboss.portal-jems.classpath"/>
- <path refid="jboss.portal-portlet-federation.classpath"/>
- <path refid="jboss.portal/modules/identity.classpath"/>
- <path refid="jboss.portlet-api.classpath"/>
+ <path refid="jboss.portal-api.classpath"/>
<path refid="jboss.portal-theme.classpath"/>
<path refid="jboss.portal-security.classpath"/>
<path refid="jboss.portal-core.classpath"/>
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/build.xml 2007-09-10 23:11:14 UTC (rev
8209)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/build.xml 2007-09-10 23:40:53 UTC (rev
8210)
@@ -89,6 +89,8 @@
<path id="library.classpath">
<path refid="jboss.portal/modules/common.classpath"/>
<path refid="jboss.portal/modules/test.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
+ <path refid="jboss.portal/modules/identity.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
<path refid="jboss.cache.classpath"/>
<path refid="jbossas/core.libs.classpath"/>
@@ -125,10 +127,8 @@
<path refid="jboss.portal-cms.classpath"/>
<path refid="jboss.portal-server.classpath"/>
<path refid="jboss.portal-search.classpath"/>
- <path refid="jboss.portal-portlet.classpath"/>
<path refid="jboss.portal-jems.classpath"/>
- <path refid="jboss.portal/modules/identity.classpath"/>
- <path refid="jboss.portlet-api.classpath"/>
+ <path refid="jboss.portal-api.classpath"/>
<path refid="jboss.portal-security.classpath"/>
<path refid="jboss.portal-theme.classpath"/>
<path refid="jboss.portal-core.classpath"/>
Modified: branches/JBoss_Portal_Branch_2_6/core-identity/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-identity/build.xml 2007-09-10 23:11:14 UTC (rev
8209)
+++ branches/JBoss_Portal_Branch_2_6/core-identity/build.xml 2007-09-10 23:40:53 UTC (rev
8210)
@@ -90,6 +90,7 @@
<path id="library.classpath">
<path refid="jboss.portal/modules/common.classpath"/>
<path refid="jboss.portal/modules/test.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
<path refid="jboss.portal/modules/identity.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
<path refid="apache.xerces.classpath"/>
@@ -101,10 +102,10 @@
<path refid="apache.log4j.classpath"/>
<path refid="sun.servlet.classpath"/>
<path refid="facelets.facelets.classpath"/>
- <path refid="jcaptcha.jcaptcha.classpath"/>
+ <path refid="jcaptcha.jcaptcha.classpath"/>
<path refid="el.el.classpath"/>
- <path refid="jakarta.cactus.classpath"/>
- <path refid="junit.junit.classpath"/>
+ <path refid="jakarta.cactus.classpath"/>
+ <path refid="junit.junit.classpath"/>
<pathelement location="${source.etc}/sun-jsf/jsf-example.jar"/>
<path refid="jbpm.jaronly.classpath"/>
</path>
@@ -117,14 +118,12 @@
<path refid="jboss.portal-bridge.classpath"/>
<path refid="jboss.portal-server.classpath"/>
<path refid="jboss.portal-registration.classpath"/>
- <path refid="jboss.portal-portlet.classpath"/>
<path refid="jboss.portal-jems.classpath"/>
- <path refid="jboss.portal-portlet-federation.classpath"/>
- <path refid="jboss.portlet-api.classpath"/>
+ <path refid="jboss.portal-api.classpath"/>
<path refid="jboss.portal-theme.classpath"/>
<path refid="jboss.portal-security.classpath"/>
<path refid="jboss.portal-core.classpath"/>
- <path refid="jboss.portal-workflow.classpath"/>
+ <path refid="jboss.portal-workflow.classpath"/>
</path>
<!--+=======================================+-->
Modified: branches/JBoss_Portal_Branch_2_6/core-management/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-management/build.xml 2007-09-10 23:11:14 UTC
(rev 8209)
+++ branches/JBoss_Portal_Branch_2_6/core-management/build.xml 2007-09-10 23:40:53 UTC
(rev 8210)
@@ -89,6 +89,8 @@
<path id="library.classpath">
<path refid="jboss.portal/modules/common.classpath"/>
<path refid="jboss.portal/modules/test.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
+ <path refid="jboss.portal/modules/identity.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
<path refid="jboss.cache.classpath"/>
<path refid="jbossas/core.libs.classpath"/>
@@ -122,10 +124,7 @@
<call target="configure-modules"/>
<path id="dependentmodule.classpath">
<path refid="jboss.portal-server.classpath"/>
- <path refid="jboss.portal-portlet.classpath"/>
<path refid="jboss.portal-jems.classpath"/>
- <path refid="jboss.portal-portlet-federation.classpath"/>
- <path refid="jboss.portal/modules/identity.classpath"/>
<path refid="jboss.portal-security.classpath"/>
<path refid="jboss.portal-core.classpath"/>
</path>
Modified: branches/JBoss_Portal_Branch_2_6/core-samples/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-samples/build.xml 2007-09-10 23:11:14 UTC (rev
8209)
+++ branches/JBoss_Portal_Branch_2_6/core-samples/build.xml 2007-09-10 23:40:53 UTC (rev
8210)
@@ -88,6 +88,8 @@
<path id="library.classpath">
<path refid="jboss.portal/modules/common.classpath"/>
+ <path refid="jboss.portal/modules/identity.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
<path refid="jboss.cache.classpath"/>
<path refid="jbossas/core.libs.classpath"/>
@@ -121,9 +123,7 @@
<path refid="jboss.portal-theme.classpath"/>
<path refid="jboss.portal-core.classpath"/>
<path refid="jboss.portal-format.classpath"/>
- <path refid="jboss.portal/modules/identity.classpath"/>
- <path refid="jboss.portal-portlet.classpath"/>
- <path refid="jboss.portlet-api.classpath"/>
+ <path refid="jboss.portal-api.classpath"/>
</path>
<!--+=======================================+-->
Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml 2007-09-10 23:11:14 UTC (rev
8209)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml 2007-09-10 23:40:53 UTC (rev
8210)
@@ -89,6 +89,8 @@
<path id="library.classpath">
<path refid="jboss.portal/modules/common.classpath"/>
<path refid="jboss.portal/modules/test.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
+ <path refid="jboss.portal/modules/identity.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
<path refid="jboss.cache.classpath"/>
<path refid="jbossas/core.libs.classpath"/>
@@ -110,11 +112,8 @@
<path refid="jboss.portal-bridge.classpath"/>
<path refid="jboss.portal-server.classpath"/>
<path refid="jboss.portal-registration.classpath"/>
- <path refid="jboss.portal-portlet.classpath"/>
<path refid="jboss.portal-jems.classpath"/>
- <path refid="jboss.portal-portlet-federation.classpath"/>
- <path refid="jboss.portal/modules/identity.classpath"/>
- <path refid="jboss.portlet-api.classpath"/>
+ <path refid="jboss.portal-api.classpath"/>
<path refid="jboss.portal-theme.classpath"/>
<path refid="jboss.portal-security.classpath"/>
<path refid="jboss.portal-core.classpath"/>
Modified: branches/JBoss_Portal_Branch_2_6/faces/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/faces/build.xml 2007-09-10 23:11:14 UTC (rev 8209)
+++ branches/JBoss_Portal_Branch_2_6/faces/build.xml 2007-09-10 23:40:53 UTC (rev 8210)
@@ -89,6 +89,7 @@
&libraries;
<path id="library.classpath">
<path refid="jboss.portal/modules/common.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
<path refid="sun.servlet.classpath"/>
<path refid="apache.myfaces.classpath"/>
<path refid="facelets.facelets.classpath"/>
@@ -101,8 +102,6 @@
<!-- Configure modules -->
<call target="configure-modules"/>
<path id="dependentmodule.classpath">
- <path refid="jboss.portlet-api.classpath"/>
- <path refid="jboss.portal-portlet.classpath"/>
<path refid="jboss.portal-server.classpath"/>
<path refid="jboss.portal-bridge.classpath"/>
</path>
Modified: branches/JBoss_Portal_Branch_2_6/portlet-server/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/portlet-server/build.xml 2007-09-10 23:11:14 UTC (rev
8209)
+++ branches/JBoss_Portal_Branch_2_6/portlet-server/build.xml 2007-09-10 23:40:53 UTC (rev
8210)
@@ -90,6 +90,7 @@
<path id="library.classpath">
<path refid="jboss.portal/modules/common.classpath"/>
<path refid="jboss.portal/modules/web.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
<path refid="jboss.portal/modules/test.classpath"/>
<path refid="dom4j.dom4j.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
@@ -113,8 +114,6 @@
<path refid="jboss.portal-jems.classpath"/>
<path refid="jboss.portal-security.classpath"/>
<path refid="jboss.portal-server.classpath"/>
- <path refid="jboss.portal-portlet.classpath"/>
- <path refid="jboss.portlet-api.classpath"/>
</path>
<!--+=======================================+-->
@@ -291,255 +290,6 @@
<antcall target="test-info"/>
</target>
- <target name="test-jsr168" depends="init">
- <execute-tests>
- <x-sysproperty>
- <sysproperty key="test.root"
value="${jboss.portal-portlet.root}/lib"/>
- <sysproperty key="test.uri"
value="/test/redirect/"/>
-<!--
- <jvmarg value="-Xdebug"/>
- <jvmarg
value="-Xrunjdwp:transport=dt_socket,address=7878,server=y,suspend=y"/>
--->
- </x-sysproperty>
- <x-test>
-
- <!--Spec TCK Assertions tests-->
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.tck.DispatcherTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.tck.DispatcherTestCase">
- <parameter name="archive"
value="test-jsr168-dispatcher.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.tck.PortletConfigTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.tck.PortletConfigTestCase">
- <parameter name="archive"
value="test-jsr168-portletconfig.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.tck.PortletContextTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.tck.PortletContextTestCase">
- <parameter name="archive"
value="test-jsr168-portletcontext.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.tck.PortletInterfaceTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.tck.PortletInterfaceTestCase">
- <parameter name="archive"
value="test-jsr168-portletinterface.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.tck.PortletModeTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.tck.PortletModeTestCase">
- <parameter name="archive"
value="test-jsr168-portletmode.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.tck.PortletRequestsTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.tck.PortletRequestsTestCase">
- <parameter name="archive"
value="test-jsr168-portletrequests.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.tck.PortletResponsesTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.tck.PortletResponsesTestCase">
- <parameter name="archive"
value="test-jsr168-portletresponses.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.tck.PortletSessionTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.tck.PortletSessionTestCase">
- <parameter name="archive"
value="test-jsr168-portletsession.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.tck.PortletURLTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.tck.PortletURLTestCase">
- <parameter name="archive"
value="test-jsr168-portleturl.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.tck.PreferencesTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.tck.PreferencesTestCase">
- <parameter name="archive"
value="test-jsr168-preferences.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.tck.WindowStatesTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.tck.WindowStatesTestCase">
- <parameter name="archive"
value="test-jsr168-windowstates.war"/>
- </zest>
-
-
- <!--API Tests-->
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.api.ActionRequestTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.api.ActionRequestTestCase">
- <parameter name="archive"
value="test-jsr168-api-actionrequest.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.api.ActionResponseTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.api.ActionResponseTestCase">
- <parameter name="archive"
value="test-jsr168-api-actionresponse.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.api.PortalContextTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.api.PortalContextTestCase">
- <parameter name="archive"
value="test-jsr168-api-portalcontext.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.api.PortletConfigTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.api.PortletConfigTestCase">
- <parameter name="archive"
value="test-jsr168-api-portletconfig.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.api.PortletContextTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.api.PortletContextTestCase">
- <parameter name="archive"
value="test-jsr168-api-portletcontext.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.api.PortletModeTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.api.PortletModeTestCase">
- <parameter name="archive"
value="test-jsr168-api-portletmode.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.api.PortletPreferencesTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.api.PortletPreferencesTestCase">
- <parameter name="archive"
value="test-jsr168-api-portletpreferences.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.api.PortletSessionTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.api.PortletSessionTestCase">
- <parameter name="archive"
value="test-jsr168-api-portletsession.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.api.PortletSessionUtilTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.api.PortletSessionUtilTestCase">
- <parameter name="archive"
value="test-jsr168-api-portletsessionutil.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.api.PortletURLTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.api.PortletURLTestCase">
- <parameter name="archive"
value="test-jsr168-api-portleturl.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.api.RenderRequestTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.api.RenderRequestTestCase">
- <parameter name="archive"
value="test-jsr168-api-renderrequest.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.api.RenderResponseTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.api.RenderResponseTestCase">
- <parameter name="archive"
value="test-jsr168-api-renderresponse.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.api.WindowStateTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.api.WindowStateTestCase">
- <parameter name="archive"
value="test-jsr168-api-windowstate.war"/>
- </zest>
-
- <!--Ext Tests-->
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.ext.DispatcherTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.ext.DispatcherTestCase">
- <parameter name="archive"
value="test-jsr168-ext-dispatcher.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.ext.PortletConfigTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.ext.PortletConfigTestCase">
- <parameter name="archive"
value="test-jsr168-ext-portletconfig.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.ext.PortletModeTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.ext.PortletModeTestCase">
- <parameter name="archive"
value="test-jsr168-ext-portletmode.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.ext.PortletRequestsTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.ext.PortletRequestsTestCase">
- <parameter name="archive"
value="test-jsr168-ext-portletrequests.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.ext.PortletResponsesTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.ext.PortletResponsesTestCase">
- <parameter name="archive"
value="test-jsr168-ext-portletresponses.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.ext.PreferencesTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.ext.PreferencesTestCase">
- <parameter name="archive"
value="test-jsr168-ext-preferences.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.ext.SessionTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.ext.SessionTestCase">
- <parameter name="archive"
value="test-jsr168-ext-session.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.ext.ExpiringCacheTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.ext.ExpiringCacheTestCase">
- <parameter name="archive"
value="test-jsr168-ext-expiringcache.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.ext.NeverExpiringCacheTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.ext.NeverExpiringCacheTestCase">
- <parameter name="archive"
value="test-jsr168-ext-neverexpiringcache.war"/>
- </zest>
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.ext.NoCacheTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.ext.NoCacheTestCase">
- <parameter name="archive"
value="test-jsr168-ext-nocache.war"/>
- </zest>
-
- <!--Misc Tests-->
- <zest todir="${test.reports}"
- name="org.jboss.portal.test.framework.runner.HTTPTestRunner"
-
outfile="TEST-org.jboss.portal.test.portlet.jsr168.misc.Log4jTestCase"
-
id="org.jboss.portal.test.portlet.jsr168.misc.Log4jTestCase">
- <parameter name="archive"
value="test-jsr168-misc-log4j.war"/>
- </zest>
-
- </x-test>
- <x-classpath>
- <path refid="oswego.concurrent.classpath"/>
- <path refid="jboss.remoting.classpath"/>
- <path refid="jboss.microcontainer.classpath"/>
- <path refid="jboss.jbossxb.classpath"/>
- <path refid="apache.xerces.classpath"/>
- <pathelement location="${source.java}"/>
- <pathelement location="${build.classes}"/>
- <pathelement location="${build.resources}"/>
- <pathelement
location="${jboss.portal-portlet.root}/classes"/>
- <pathelement
location="${jboss.portal/modules/test.lib}/portal-test-jboss-lib.jar"/>
- <path refid="library.classpath"/>
- <path refid="dependentmodule.classpath"/>
- </x-classpath>
- </execute-tests>
- </target>
-
<target name="test-info" depends="init">
<execute-tests>
<x-test>
@@ -602,54 +352,4 @@
</x-classpath>
</execute-tests>
</target>
-
- <target name="test2" depends="init">
- <execute-tests>
- <x-sysproperty>
-<!--
- <jvmarg value="-Xdebug"/>
- <jvmarg
value="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"/>
--->
- <sysproperty key="test.root"
value="${build.lib}"/>
- <sysproperty key="test.uri"
value="/test/redirect/"/>
- </x-sysproperty>
- <x-test>
-
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.portlet.ha.session.SessionTestSuite"/>-->
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.portlet.info.InfoTestSuite"/>-->
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.portlet.session.SessionSynchronizationTestCase"/>-->
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.portlet.PortletRequestDecoderTestCase"/>-->
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.portlet.jsr168.ext.preferences.PreferencesTestSuite"/>
- <test todir="${test.reports}"
name="org.jboss.portal.test.portlet.jsr168.tck.preferences.PreferencesTestSuite"/>-->
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.portlet.jsr168.ext.portletrequests.PortletRequestTestSuite"/>-->
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.portlet.jsr168.ext.dispatcher.DispatcherTestSuite"/>-->
-
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.portlet.info.InfoTestSuite"/>-->
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.portlet.deployment.UnmarshallerTestCase"/>-->
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.portlet.PortletRequestDecoderTestCase"/>-->
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.portlet.state.StatefulPortletInvokerTestCase"/>-->
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.portlet.jsr168.ext.portletrequests.PortletRequestTestSuite"/>-->
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.portlet.jsr168.ext.dispatcher.DispatcherTestSuite"/>-->
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.portlet.jsr168.ext.portletrequests.PortletRequestTestSuite"/>-->
-
- <!--test todir="${test.reports}"
name="org.jboss.portal.test.portlet.ParametersTestCase"/-->
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.portlet.state.StateConverterV0TestCase"/>-->
-
- </x-test>
- <x-classpath>
- <path refid="oswego.concurrent.classpath"/>
- <path refid="jboss.remoting.classpath"/>
- <path refid="jboss.microcontainer.classpath"/>
- <path refid="jboss.jbossxb.classpath"/>
- <path refid="apache.xerces.classpath"/>
- <path refid="jbossas/core.libs.classpath"/>
- <pathelement location="${source.java}"/>
- <pathelement location="${build.classes}"/>
- <pathelement location="${build.resources}"/>
- <path refid="library.classpath"/>
- <path refid="dependentmodule.classpath"/>
- </x-classpath>
- </execute-tests>
- </target>
-
</project>
Added:
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/JBossApplicationMetaDataFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/JBossApplicationMetaDataFactory.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/JBossApplicationMetaDataFactory.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -0,0 +1,263 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.deployment.jboss;
+
+import org.jboss.portal.common.transaction.Transactions;
+import org.jboss.portal.portlet.impl.jsr168.info.ContainerCacheInfo;
+import org.jboss.portal.portlet.metadata.JBossApplicationMetaData;
+import org.jboss.portal.portlet.metadata.JBossPortletMetaData;
+import org.jboss.portal.portlet.metadata.PolicyPermissionMetaData;
+import org.jboss.xb.binding.GenericObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 6720 $
+ */
+public class JBossApplicationMetaDataFactory implements GenericObjectModelFactory
+{
+
+ public Object newRoot(Object root,
+ UnmarshallingContext nav,
+ String nsURI,
+ String localName,
+ Attributes attrs)
+ {
+ if (root == null)
+ {
+ root = new JBossApplicationMetaData();
+ }
+ return root;
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext nav, String uri, String
name)
+ {
+ return root;
+ }
+
+ public Object newChild(Object object, UnmarshallingContext nav, String nsURI, String
localName, Attributes attrs)
+ {
+ if (object instanceof JBossApplicationMetaData)
+ {
+ if ("portlet".equals(localName))
+ {
+ return createJBossPortlet();
+ }
+ }
+// else if (object instanceof JBossPortletMetaData)
+// {
+// if ("security-constraint".equals(localName))
+// {
+// return new SecurityConstraintMetaData();
+// }
+// }
+// else if (object instanceof SecurityConstraintMetaData)
+// {
+// if ("policy-permission".equals(localName))
+// {
+// return new PolicyPermissionMetaData();
+// }
+// }
+ else if (object instanceof PolicyPermissionMetaData)
+ {
+ if ("unchecked".equals(localName))
+ {
+ return "unchecked";
+ }
+ }
+ return null;
+ }
+
+ public void addChild(Object parent, Object child, UnmarshallingContext nav, String
nsURI, String localName)
+ {
+ if (parent instanceof JBossApplicationMetaData)
+ {
+ JBossApplicationMetaData app = (JBossApplicationMetaData)parent;
+ if (child instanceof JBossPortletMetaData)
+ {
+ JBossPortletMetaData portlet = (JBossPortletMetaData)child;
+ app.getPortlets().put(portlet.getName(), portlet);
+ portlet.merge(app);
+ }
+ }
+// else if (parent instanceof JBossPortletMetaData)
+// {
+// JBossPortletMetaData portlet = (JBossPortletMetaData)parent;
+// if (child instanceof SecurityConstraintMetaData)
+// {
+// portlet.setSecurityConstraint((SecurityConstraintMetaData)child);
+// }
+// }
+// else if (parent instanceof SecurityConstraintMetaData)
+// {
+// SecurityConstraintMetaData securityConstraint =
(SecurityConstraintMetaData)parent;
+// if (child instanceof PolicyPermissionMetaData)
+// {
+// PolicyPermissionMetaData policyPermission =
(PolicyPermissionMetaData)child;
+// PolicyPermissionMetaData other =
(PolicyPermissionMetaData)securityConstraint.getPolicyPermissions().get(policyPermission.getRoleName());
+// if (other != null)
+// {
+// other.getActions().addAll(policyPermission.getActions());
+// }
+// else
+// {
+//
securityConstraint.getPolicyPermissions().put(policyPermission.getRoleName(),
policyPermission);
+// }
+// }
+// }
+// else if (parent instanceof PolicyPermissionMetaData)
+// {
+// PolicyPermissionMetaData policyPermission = (PolicyPermissionMetaData)parent;
+// if ("unchecked".equals(child))
+// {
+// policyPermission.setRoleName(SecurityConstants.UNCHECKED_ROLE_NAME);
+// }
+// }
+ }
+
+ public void setValue(Object object, UnmarshallingContext nav, String nsURI, String
localName, String value)
+ {
+ if (object instanceof JBossApplicationMetaData)
+ {
+ JBossApplicationMetaData app = (JBossApplicationMetaData)object;
+ if ("remotable".equals(localName))
+ {
+ if ("true".equalsIgnoreCase(value))
+ {
+ app.setRemotable(Boolean.TRUE);
+ }
+ else if ("false".equalsIgnoreCase(value))
+ {
+ app.setRemotable(Boolean.FALSE);
+ }
+ else
+ {
+ throw new RuntimeException();
+ }
+ }
+ }
+ else if (object instanceof JBossPortletMetaData)
+ {
+ JBossPortletMetaData portlet = (JBossPortletMetaData)object;
+ if ("portlet-name".equals(localName))
+ {
+ portlet.setName(value);
+ }
+ else if ("remotable".equals(localName))
+ {
+ if ("true".equalsIgnoreCase(value))
+ {
+ portlet.setRemotable(Boolean.TRUE);
+ }
+ else if ("false".equalsIgnoreCase(value))
+ {
+ portlet.setRemotable(Boolean.FALSE);
+ }
+ else
+ {
+ throw new RuntimeException();
+ }
+ }
+ else if ("distributed".equals(localName))
+ {
+ if ("true".equalsIgnoreCase(value))
+ {
+ portlet.setDistributed(Boolean.TRUE);
+ }
+ else if ("false".equalsIgnoreCase(value))
+ {
+ portlet.setDistributed(Boolean.FALSE);
+ }
+ else
+ {
+ throw new RuntimeException();
+ }
+ }
+ else if ("ref-type".equals(localName))
+ {
+ if ("strong".equals(localName))
+ {
+ portlet.setCacheRefType(new Integer(ContainerCacheInfo.REF_STRONG));
+ }
+ else if ("soft".equals(localName))
+ {
+ portlet.setCacheRefType(new Integer(ContainerCacheInfo.REF_SOFT));
+ }
+ else
+ {
+ // log.warn("Unrecognized reference type " + refType);
+ }
+ }
+ else if ("trans-attribute".equals(localName))
+ {
+ if ("Required".equalsIgnoreCase(value))
+ {
+ portlet.setTxType(Transactions.TYPE_REQUIRED);
+ }
+ else if ("Mandatory".equals(value))
+ {
+ portlet.setTxType(Transactions.TYPE_MANDATORY);
+ }
+ else if ("Never".equals(value))
+ {
+ portlet.setTxType(Transactions.TYPE_NEVER);
+ }
+ else if ("Supports".equals(value))
+ {
+ portlet.setTxType(Transactions.TYPE_SUPPORTS);
+ }
+ else if ("NotSupported".equals(value))
+ {
+ portlet.setTxType(Transactions.TYPE_NOT_SUPPORTED);
+ }
+ else if ("RequiresNew".equals(value))
+ {
+ portlet.setTxType(Transactions.TYPE_REQUIRES_NEW);
+ }
+ else
+ {
+ throw new RuntimeException();
+ }
+ }
+ }
+ else if (object instanceof PolicyPermissionMetaData)
+ {
+ PolicyPermissionMetaData policyPermission = (PolicyPermissionMetaData)object;
+ if ("role-name".equals(localName))
+ {
+ policyPermission.setRoleName(value);
+ }
+ else if ("action-name".equals(localName))
+ {
+ policyPermission.getActions().add(value);
+ }
+ }
+ }
+
+ /** Can be subclasses to allow sub class. */
+ protected JBossPortletMetaData createJBossPortlet()
+ {
+ return new JBossPortletMetaData();
+ }
+}
Modified:
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeployment.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeployment.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeployment.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -25,9 +25,6 @@
import org.jboss.deployment.DeploymentException;
import org.jboss.portal.common.io.IOTools;
import org.jboss.portal.common.xml.NullEntityResolver;
-import org.jboss.portal.portlet.deployment.JBossApplicationMetaDataFactory;
-import org.jboss.portal.portlet.deployment.PortletApplicationMetaDataFactory;
-import org.jboss.portal.portlet.deployment.ValueTrimmingFilter;
import org.jboss.portal.portlet.impl.container.PortletApplicationContextImpl;
import org.jboss.portal.portlet.impl.jsr168.metadata.PortletApplicationMetaData;
import org.jboss.portal.portlet.impl.jsr168.metadata.PortletMetaData;
Modified:
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeploymentFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeploymentFactory.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeploymentFactory.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -25,8 +25,6 @@
import org.jboss.deployment.DeploymentException;
import org.jboss.portal.common.io.IOTools;
import org.jboss.portal.portlet.container.PortletApplicationRegistry;
-import org.jboss.portal.portlet.deployment.JBossApplicationMetaDataFactory;
-import org.jboss.portal.portlet.deployment.ValueTrimmingFilter;
import org.jboss.portal.portlet.impl.jsr168.spi.PortletAPIFactory;
import org.jboss.portal.portlet.impl.jsr168.spi.PortletInfoFactory;
import org.jboss.portal.portlet.impl.jsr168.PortletAPIFactoryImpl;
Added:
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/PortletApplicationMetaDataFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/PortletApplicationMetaDataFactory.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/PortletApplicationMetaDataFactory.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -0,0 +1,405 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.deployment.jboss;
+
+import org.jboss.portal.Mode;
+import org.jboss.portal.common.i18n.LocaleFormat;
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.common.util.ConversionException;
+import org.jboss.portal.portlet.TransportGuarantee;
+import org.jboss.portal.portlet.impl.jsr168.metadata.CacheConfigMetaData;
+import org.jboss.portal.portlet.impl.jsr168.metadata.ContentTypeMetaData;
+import org.jboss.portal.portlet.impl.jsr168.metadata.DescribableObjectMetaData;
+import org.jboss.portal.portlet.impl.jsr168.metadata.DescriptionMetaData;
+import org.jboss.portal.portlet.impl.jsr168.metadata.DisplayNameMetaData;
+import org.jboss.portal.portlet.impl.jsr168.metadata.LanguagesMetaData;
+import org.jboss.portal.portlet.impl.jsr168.metadata.LocalizedValueMetaData;
+import org.jboss.portal.portlet.impl.jsr168.metadata.ParameterMetaData;
+import org.jboss.portal.portlet.impl.jsr168.metadata.PortletApplicationMetaData;
+import org.jboss.portal.portlet.impl.jsr168.metadata.PortletMetaData;
+import org.jboss.portal.portlet.impl.jsr168.metadata.PreferenceMetaData;
+import org.jboss.portal.portlet.impl.jsr168.metadata.SecurityConstraintMetaData;
+import org.jboss.portal.portlet.impl.jsr168.metadata.SecurityRoleRefMetaData;
+import org.jboss.portal.portlet.impl.jsr168.metadata.TransportGuaranteesMetaData;
+import org.jboss.portal.portlet.impl.jsr168.metadata.UserAttributeMetaData;
+import org.jboss.xb.binding.GenericObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+import org.apache.log4j.Logger;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 7200 $
+ */
+public class PortletApplicationMetaDataFactory implements GenericObjectModelFactory
+{
+
+ /** . */
+ private static final Logger log =
Logger.getLogger(PortletApplicationMetaDataFactory.class);
+
+ public Object newRoot(Object root, UnmarshallingContext nav, String nsURI, String
localName, Attributes attrs)
+ {
+ return new PortletApplicationMetaData();
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext ctx, String nsURI, String
name)
+ {
+ return root;
+ }
+
+ public Object newChild(Object object, UnmarshallingContext nav, String nsURI, String
localName, Attributes attrs)
+ {
+ if (object instanceof DescribableObjectMetaData)
+ {
+ if ("description".equals(localName))
+ {
+ String lang = attrs.getValue("xml:lang");
+ DescriptionMetaData value = new DescriptionMetaData();
+ if (lang != null)
+ {
+ try
+ {
+ Locale locale = LocaleFormat.DEFAULT.getLocale(lang);
+ value.setLocale(locale);
+ }
+ catch (ConversionException e)
+ {
+ log.error("Cannot obtain language value", e);
+ return null;
+ }
+ }
+ return value;
+ }
+ }
+ if (object instanceof PortletApplicationMetaData)
+ {
+ if ("portlet".equals(localName))
+ {
+ return new PortletMetaData();
+ }
+ else if ("user-attribute".equals(localName))
+ {
+ return new UserAttributeMetaData();
+ }
+ else if ("security-constraint".equals(localName))
+ {
+ return new SecurityConstraintMetaData();
+ }
+ }
+ if (object instanceof PortletMetaData)
+ {
+ if ("init-param".equals(localName))
+ {
+ return new ParameterMetaData();
+ }
+ else if ("supports".equals(localName))
+ {
+ return new ContentTypeMetaData();
+ }
+ else if ("portlet-info".equals(localName))
+ {
+ return new LanguagesMetaData.InfoMetaData();
+ }
+ else if ("security-role-ref".equals(localName))
+ {
+ return new SecurityRoleRefMetaData();
+ }
+ else if ("preference".equals(localName))
+ {
+ return new PreferenceMetaData();
+ }
+ else if ("display-name".equals(localName))
+ {
+ String lang = attrs.getValue("xml:lang");
+ DisplayNameMetaData value = new DisplayNameMetaData();
+ if (lang != null)
+ {
+ try
+ {
+ Locale locale = LocaleFormat.DEFAULT.getLocale(lang);
+ value.setLocale(locale);
+ }
+ catch (ConversionException e)
+ {
+ log.error("Cannot obtain language value", e);
+ return null;
+ }
+ }
+ return value;
+ }
+ }
+ return null;
+ }
+
+ public void addChild(Object parent, Object child, UnmarshallingContext nav, String
nsURI, String localName)
+ {
+ if (parent instanceof DescribableObjectMetaData)
+ {
+ DescribableObjectMetaData describable = (DescribableObjectMetaData)parent;
+ if (child instanceof DescriptionMetaData)
+ {
+ describable.getDescription().getValues().add(child);
+ }
+ }
+ if (parent instanceof PortletApplicationMetaData)
+ {
+ PortletApplicationMetaData pa = (PortletApplicationMetaData)parent;
+ if (child instanceof PortletMetaData)
+ {
+ pa.addPortlet((PortletMetaData)child);
+ }
+ else if (child instanceof UserAttributeMetaData)
+ {
+ UserAttributeMetaData userAttribute = (UserAttributeMetaData)child;
+ pa.getUserAttributes().put(userAttribute.getName(), userAttribute);
+ }
+ else if (child instanceof SecurityConstraintMetaData)
+ {
+ SecurityConstraintMetaData security = (SecurityConstraintMetaData)child;
+ for (Iterator i = security.getPortlets().iterator(); i.hasNext();)
+ {
+ String portletName = (String)i.next();
+ PortletMetaData portlet = pa.getPortlet(portletName);
+ if (portlet.getTransportGuarantees() == null)
+ {
+ portlet.setTransportGuarantees(new TransportGuaranteesMetaData());
+ }
+ portlet.getTransportGuarantees().add(security.getTransportGuarantee());
+ }
+
+ }
+ }
+ if (parent instanceof PortletMetaData)
+ {
+ PortletMetaData portlet = (PortletMetaData)parent;
+ if (child instanceof ParameterMetaData)
+ {
+ ParameterMetaData parameter = (ParameterMetaData)child;
+ portlet.getParameters().put(parameter.getName(), parameter);
+ }
+ else if (child instanceof ContentTypeMetaData)
+ {
+ portlet.getContentTypes().addContentType((ContentTypeMetaData)child);
+ }
+ else if (child instanceof LanguagesMetaData.InfoMetaData)
+ {
+
+ LanguagesMetaData.InfoMetaData info = (LanguagesMetaData.InfoMetaData)child;
+ if (info.getTitle() == null)
+ {
+ // JBossXB won't populate <title></title>
+ info.setTitle("");
+ }
+ portlet.getLanguages().setInfo(info);
+ }
+ else if (child instanceof SecurityRoleRefMetaData)
+ {
+ portlet.getSecurityRoleRefs().add(child);
+ }
+ else if (child instanceof DisplayNameMetaData)
+ {
+ portlet.getDisplayName().getValues().add(child);
+ }
+ }
+ if (parent instanceof PortletMetaData)
+ {
+ PortletMetaData preferences = (PortletMetaData)parent;
+ if (child instanceof PreferenceMetaData)
+ {
+ preferences.getPreferences().addPreference((PreferenceMetaData)child);
+ }
+ }
+ }
+
+ public void setValue(Object object, UnmarshallingContext nav, String nsURI, String
localName, String value)
+ {
+ if (object instanceof PortletApplicationMetaData)
+ {
+ PortletApplicationMetaData app = (PortletApplicationMetaData)object;
+ if ("version".equals(localName))
+ {
+ app.setVersion(value);
+ }
+ }
+ if (object instanceof LocalizedValueMetaData)
+ {
+ LocalizedValueMetaData localizedValue = (LocalizedValueMetaData)object;
+ if ("description".equals(localName))
+ {
+ localizedValue.setValue(value);
+ }
+ else if ("display-name".equals(localName))
+ {
+ localizedValue.setValue(value);
+ }
+ }
+ if (object instanceof PortletMetaData)
+ {
+ PortletMetaData portlet = (PortletMetaData)object;
+ if ("portlet-name".equals(localName))
+ {
+ portlet.setName(value);
+ }
+ else if ("portlet-class".equals(localName))
+ {
+ portlet.setClassName(value);
+ }
+ else if ("expiration-cache".equals(localName))
+ {
+ CacheConfigMetaData cacheConfig = portlet.getCacheConfig();
+ if (cacheConfig == null)
+ {
+ cacheConfig = new CacheConfigMetaData();
+ portlet.setCacheConfig(cacheConfig);
+ }
+ int timeMillis = Integer.parseInt(value);
+ cacheConfig.setExpirationTime(timeMillis);
+ }
+ else if ("resource-bundle".equals(localName))
+ {
+ portlet.getLanguages().setResourceBundle(value);
+ }
+ else if ("supported-locale".equals(localName))
+ {
+ try
+ {
+ Locale locale = LocaleFormat.DEFAULT.getLocale(value);
+ portlet.getLanguages().getSupportedLocales().add(locale);
+ }
+ catch (ConversionException e)
+ {
+ log.error("Cannot obtain language value", e);
+ }
+ }
+ else if ("preferences-validator".equals(localName))
+ {
+ portlet.getPreferences().setValidator(value);
+ }
+ }
+ if (object instanceof ParameterMetaData)
+ {
+ ParameterMetaData parameter = (ParameterMetaData)object;
+ if ("name".equals(localName))
+ {
+ parameter.setName(value);
+ }
+ else if ("value".equals(localName))
+ {
+ parameter.setValue(value);
+ }
+ }
+ if (object instanceof ContentTypeMetaData)
+ {
+ ContentTypeMetaData contentType = (ContentTypeMetaData)object;
+ if ("mime-type".equals(localName))
+ {
+ contentType.setContentType(value);
+ }
+ else if ("portlet-mode".equals(localName))
+ {
+ contentType.getModes().add(Mode.create(value));
+ }
+ }
+ if (object instanceof LanguagesMetaData.InfoMetaData)
+ {
+ LanguagesMetaData.InfoMetaData info = (LanguagesMetaData.InfoMetaData)object;
+ if ("title".equals(localName))
+ {
+ info.setTitle(value);
+ }
+ else if ("short-title".equals(localName))
+ {
+ info.setShortTitle(value);
+ }
+ else if ("keywords".equals(localName))
+ {
+ info.setKeywords(value);
+ }
+ }
+ if (object instanceof PreferenceMetaData)
+ {
+ PreferenceMetaData preference = (PreferenceMetaData)object;
+ if ("name".equals(localName))
+ {
+ preference.setName(value);
+ }
+ else if ("value".equals(localName))
+ {
+ List tmp = Tools.toList(preference.getValues());
+ tmp.add(value);
+ preference.setValues((String[])tmp.toArray(new String[tmp.size()]));
+ }
+ else if ("read-only".equals(localName))
+ {
+ if ("true".equalsIgnoreCase(value))
+ {
+ preference.setReadOnly(true);
+ }
+ else if ("false".equalsIgnoreCase(value))
+ {
+ preference.setReadOnly(false);
+ }
+ else
+ {
+ throw new RuntimeException("Unrecognized read only value" +
value);
+ }
+ }
+ }
+ if (object instanceof SecurityRoleRefMetaData)
+ {
+ SecurityRoleRefMetaData srr = (SecurityRoleRefMetaData)object;
+ if ("role-name".equals(localName))
+ {
+ srr.setRoleName(value);
+ }
+ else if ("role-link".equals(localName))
+ {
+ srr.setRoleLink(value);
+ }
+ }
+ if (object instanceof UserAttributeMetaData)
+ {
+ UserAttributeMetaData userAttribute = (UserAttributeMetaData)object;
+ if ("name".equals(localName))
+ {
+ userAttribute.setName(value);
+ }
+ }
+ else if (object instanceof SecurityConstraintMetaData)
+ {
+ SecurityConstraintMetaData security = (SecurityConstraintMetaData)object;
+ if ("portlet-name".equals(localName))
+ {
+ security.addPortlet(value);
+ }
+ if ("transport-guarantee".equals(localName))
+ {
+ security.setTransportGuarantee(TransportGuarantee.decode(value));
+ }
+ }
+ }
+}
Added:
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/ValueTrimmingFilter.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/ValueTrimmingFilter.java
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/ValueTrimmingFilter.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -0,0 +1,75 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.deployment.jboss;
+
+import org.jboss.xb.binding.GenericObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * Filter <code>setValue</code> method by doing a trimming before calling the
next model.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 6713 $
+ */
+public class ValueTrimmingFilter implements GenericObjectModelFactory
+{
+
+ private final GenericObjectModelFactory next;
+
+ public ValueTrimmingFilter(GenericObjectModelFactory next) throws
IllegalArgumentException
+ {
+ if (next == null)
+ {
+ throw new IllegalArgumentException("Cannot be null");
+ }
+ this.next = next;
+ }
+
+ public Object newChild(Object object, UnmarshallingContext nav, String nsURI, String
localName, Attributes attrs)
+ {
+ return next.newChild(object, nav, nsURI, localName, attrs);
+ }
+
+ public void addChild(Object parent, Object child, UnmarshallingContext nav, String
nsURI, String localName)
+ {
+ next.addChild(parent, child, nav, nsURI, localName);
+ }
+
+ public void setValue(Object object, UnmarshallingContext nav, String nsURI, String
localName, String value)
+ {
+ value = value.trim();
+ next.setValue(object, nav, nsURI, localName, value);
+ }
+
+ public Object newRoot(Object root, UnmarshallingContext nav, String nsURI, String
localName, Attributes attrs)
+ {
+ return next.newRoot(root, nav, nsURI, localName, attrs);
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext nav, String nsURI, String
localName)
+ {
+ return next.completeRoot(root, nav, nsURI, localName);
+ }
+
+}
Deleted:
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/tck/TCKPortletController.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/tck/TCKPortletController.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/tck/TCKPortletController.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -1,73 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.portlet.tck;
-
-import org.jboss.portal.portlet.Portlet;
-import org.jboss.portal.portlet.PortletContext;
-import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.test.PortletController;
-import org.jboss.portal.server.ServerInvocation;
-
-import javax.servlet.http.HttpSession;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 5776 $
- */
-public class TCKPortletController extends PortletController
-{
- protected Collection getRenderList(ServerInvocation invocation) throws
PortletInvokerException
- {
- HttpSession session =
invocation.getServerContext().getClientRequest().getSession();
- List portletIds = null;
- String[] values =
(String[])invocation.getServerContext().getQueryParameterMap().get("portletName");
- if (values == null)
- {
- portletIds = (List)session.getAttribute("portlets");
- }
- else
- {
- portletIds = new ArrayList();
- for (int i = 0; i < values.length; i++)
- {
- String value = values[i];
- String portletId = '/' + value.replace('/', '.');
- portletIds.add(portletId);
- }
- session.setAttribute("portlets", portletIds);
- }
- List portlets = new ArrayList();
- for (Iterator i = portletIds.iterator(); i.hasNext();)
- {
- String portletId = (String)i.next();
- Portlet portlet =
portletInvoker.getPortlet(PortletContext.createPortletContext(portletId));
- portlets.add(portlet);
-
- }
- return portlets;
- }
-}
Deleted:
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/test/PortletController.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/test/PortletController.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/test/PortletController.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -1,709 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.portlet.test;
-
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.test.framework.portlet.PortletTestDriver;
-import org.jboss.portal.test.framework.portlet.PortletTestParameters;
-import org.jboss.portal.common.NotYetImplemented;
-import org.jboss.portal.common.invocation.EmptyAttributeResolver;
-import org.jboss.portal.common.invocation.Scope;
-import org.jboss.portal.common.invocation.resolver.MapAttributeResolver;
-import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.common.net.URLTools;
-import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.portlet.ActionURL;
-import org.jboss.portal.portlet.PortletParameters;
-import org.jboss.portal.portlet.PortletParametersStateString;
-import org.jboss.portal.portlet.Portlet;
-import org.jboss.portal.portlet.PortletContext;
-import org.jboss.portal.portlet.PortletInvoker;
-import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletURL;
-import org.jboss.portal.portlet.RenderURL;
-import org.jboss.portal.portlet.StateEvent;
-import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.portlet.impl.PortletRequestDecoder;
-import org.jboss.portal.portlet.impl.spi.AbstractPortletInvocationContext;
-import org.jboss.portal.portlet.impl.spi.AbstractRequestContext;
-import org.jboss.portal.portlet.impl.spi.AbstractSecurityContext;
-import org.jboss.portal.portlet.invocation.ActionInvocation;
-import org.jboss.portal.portlet.invocation.PortletInvocation;
-import org.jboss.portal.portlet.invocation.RenderInvocation;
-import org.jboss.portal.portlet.invocation.response.ErrorResponse;
-import org.jboss.portal.portlet.invocation.response.FragmentResponse;
-import org.jboss.portal.portlet.invocation.response.HTTPRedirectionResponse;
-import org.jboss.portal.portlet.invocation.response.InsufficientPrivilegesResponse;
-import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.RenderResponse;
-import org.jboss.portal.portlet.spi.ActionContext;
-import org.jboss.portal.portlet.spi.InstanceContext;
-import org.jboss.portal.portlet.spi.PortalContext;
-import org.jboss.portal.portlet.spi.PortletInvocationContext;
-import org.jboss.portal.portlet.spi.RenderContext;
-import org.jboss.portal.portlet.spi.RequestContext;
-import org.jboss.portal.portlet.spi.SecurityContext;
-import org.jboss.portal.portlet.spi.UserContext;
-import org.jboss.portal.portlet.spi.WindowContext;
-import org.jboss.portal.portlet.state.AccessMode;
-import org.jboss.portal.server.AbstractServerURL;
-import org.jboss.portal.server.RequestController;
-import org.jboss.portal.server.ServerException;
-import org.jboss.portal.server.ServerInvocation;
-import org.jboss.portal.server.request.URLFormat;
-import org.jboss.logging.Logger;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public class PortletController implements RequestController
-{
-
- /** . */
- private static final Scope NAVIGATIONAL_STATE_SCOPE = ServerInvocation.SESSION_SCOPE;
-
- /** . */
- protected boolean redirectAfterAction;
-
- /** . */
- protected PortletInvoker portletInvoker;
-
- /** . */
- protected Logger log = Logger.getLogger(getClass());
-
- public PortletInvoker getPortletInvoker()
- {
- return portletInvoker;
- }
-
- public void setPortletInvoker(PortletInvoker portletInvoker)
- {
- this.portletInvoker = portletInvoker;
- }
-
- public boolean getRedirectAfterAction()
- {
- return redirectAfterAction;
- }
-
- public void setRedirectAfterAction(boolean redirectAfterAction)
- {
- this.redirectAfterAction = redirectAfterAction;
- }
-
- public void handle(ServerInvocation invocation) throws ServerException
- {
- try
- {
- String requestPath = invocation.getServerContext().getPortalRequestPath();
-
- if (requestPath != null &&
requestPath.startsWith("/portlet/"))
- {
- // Get the portlet
- String portletId = requestPath.substring("/portlet/".length());
- Portlet portlet =
portletInvoker.getPortlet(PortletContext.createPortletContext(portletId));
-
- PortletRequestDecoder decoder = new PortletRequestDecoder();
- decoder.decode(invocation.getServerContext().getQueryParameterMap(),
invocation.getServerContext().getBodyParameterMap());
-
- if (decoder.getType() == PortletRequestDecoder.ACTION_TYPE)
- {
- // Get the navigational state if it exist
- PortletParametersStateString navigationalState =
(PortletParametersStateString)invocation.getAttribute(NAVIGATIONAL_STATE_SCOPE,
portlet.getContext().getId());
-
- //
- ActionContextImpl actionContext = new ActionContextImpl(
- portlet, invocation, navigationalState,
- decoder.getWindowState() != null ? decoder.getWindowState() :
WindowState.NORMAL,
- decoder.getMode() != null ? decoder.getMode() : Mode.VIEW,
- decoder.getInteractionState(),
- decoder.getForm());
-
- ActionInvocation action = createAction(invocation, actionContext);
-
action.setTarget(((InstanceContextImpl)action.getInstanceContext()).getPortletContext());
- PortletInvocationResponse response = portletInvoker.invoke(action);
- if (response instanceof RenderResponse)
- {
- RenderResponse renderResult = (RenderResponse)response;
-
- // Perform the redirection or chain rendering as part of the same http
request
- if (redirectAfterAction)
- {
- try
- {
- final StateString _portletNavState =
renderResult.getNavigationalState();
- final Mode _mode = renderResult.getMode();
- final WindowState _windowState = renderResult.getWindowState();
- PortletURL portletURL = new RenderURL()
- {
- public StateString getNavigationalState()
- {
- return _portletNavState;
- }
-
- public Mode getMode()
- {
- return _mode;
- }
-
- public WindowState getWindowState()
- {
- return _windowState;
- }
- };
- String url = actionContext.renderURL(portletURL, null, null,
false);
-
invocation.getServerContext().getClientResponse().sendRedirect(url);
- return;
- }
- catch (IOException e)
- {
- throw new ServerException(e);
- }
- }
- else
- {
- invocation.setAttribute(NAVIGATIONAL_STATE_SCOPE,
portlet.getContext().getId(), renderResult.getNavigationalState());
- }
- }
- if (response instanceof HTTPRedirectionResponse)
- {
- try
- {
- HTTPRedirectionResponse redirection =
(HTTPRedirectionResponse)response;
-
invocation.getServerContext().getClientResponse().sendRedirect(redirection.getLocation());
- return;
- }
- catch (IOException e)
- {
- throw new ServerException(e);
- }
- }
- else if (response instanceof ErrorResponse)
- {
- ErrorResponse error = (ErrorResponse)response;
- error.logErrorTo(log, "An error occured during portlet
invocation");
- try
- {
-
invocation.getServerContext().getClientResponse().sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- return;
- }
- catch (IOException e)
- {
- throw new ServerException(e);
- }
- }
- }
- else
- {
- //
- invocation.setAttribute(NAVIGATIONAL_STATE_SCOPE,
portlet.getContext().getId(), decoder.getNavigationalState());
-
- //
- Mode mode = decoder.getMode();
- if (mode == null)
- {
- mode = Mode.VIEW;
- }
- invocation.setAttribute(NAVIGATIONAL_STATE_SCOPE, portlet.getContext() +
"_mode", mode);
-
- //
- WindowState windowState = decoder.getWindowState();
- if (windowState == null)
- {
- windowState = WindowState.NORMAL;
- }
- invocation.setAttribute(NAVIGATIONAL_STATE_SCOPE, portlet.getContext() +
"_windowstate", windowState);
- }
-
- }
-
- // Render everything
- startRender(invocation);
-
- //
- for (Iterator i = getRenderList(invocation).iterator(); i.hasNext();)
- {
- Portlet portlet = (Portlet)i.next();
-
- // Get the navigational state
- StateString ns =
(StateString)invocation.getAttribute(NAVIGATIONAL_STATE_SCOPE,
portlet.getContext().getId());
-
- // Get the mode
- Mode mode = (Mode)invocation.getAttribute(NAVIGATIONAL_STATE_SCOPE,
portlet.getContext() + "_mode");
- if (mode == null)
- {
- mode = Mode.VIEW;
- }
-
- // Get the window state
- WindowState windowState =
(WindowState)invocation.getAttribute(NAVIGATIONAL_STATE_SCOPE, portlet.getContext() +
"_windowstate");
- if (windowState == null)
- {
- windowState = WindowState.NORMAL;
- }
-
- //
- RenderContextImpl renderContext = new RenderContextImpl(portlet, invocation,
ns, windowState, mode);
-
- //
- PrintWriter writer =
invocation.getServerContext().getClientResponse().getWriter();
-
- //
-
invocation.getServerContext().getClientRequest().getSession().getAttribute("CLONE_ON");
-
- //
- writer.write("<div>");
- RenderInvocation render = createRender(invocation, renderContext);
-
render.setTarget(((InstanceContextImpl)render.getInstanceContext()).getPortletContext());
- PortletInvocationResponse response = portletInvoker.invoke(render);
-
- //
- if (response instanceof FragmentResponse)
- {
- FragmentResponse fragment = (FragmentResponse)response;
- String s = "";
- switch (fragment.getType())
- {
- case FragmentResponse.TYPE_EMPTY:
- // Keep the empty string
- break;
- case FragmentResponse.TYPE_CHARS:
- s = ((FragmentResponse)response).getChars().toString();
- break;
- case FragmentResponse.TYPE_BYTES:
- s = ((FragmentResponse)response).getBytes().toString();
- break;
- }
- writer.write(s);
- }
- else if (response instanceof ErrorResponse)
- {
- writer.write("<div style=\"color: red;\">");
- writer.write(((ErrorResponse)response).toHTML());
- writer.write("</div>");
- }
- else if (response instanceof InsufficientPrivilegesResponse)
- {
- throw new NotYetImplemented();
-// // Redirect to authed servlet
-//
-// // Compute the new url context
-// URLContext uctx = invocation.getServerContext().getURLContext();
-// uctx = URLContext.newInstance(uctx.getSecure(), true);
-//
-// //
-// AbstractServerURL url = new AbstractServerURL();
-// url.setPortalRequestPath("/index.html");
-//
-// //
-// for (Iterator j =
invocation.getServerContext().getParameterMap().values().iterator(); j.hasNext();)
-// {
-// RequestParameter param = (RequestParameter)j.next();
-// url.setParameterValues(param.getName(), param.getValues());
-// }
-//
-// //
-// String s = invocation.getResponse().encodeURL(url, uctx);
-//
-// //
-// HttpServletResponse resp =
invocation.getServerContext().getClientResponse();
-// resp.sendRedirect(s);
-// return;
- }
- else
- {
- writer.write("");
- }
- writer.write("</div>");
- }
-
- //
- endRender(invocation);
- }
- catch (PortletInvokerException e)
- {
- throw new ServerException(e);
- }
- catch (ServletException e)
- {
- throw new ServerException(e);
- }
- catch (IOException e)
- {
- throw new ServerException(e);
- }
- }
-
- protected Collection getRenderList(ServerInvocation invocation) throws
PortletInvokerException
- {
- return portletInvoker.getPortlets();
- }
-
- protected void startRender(ServerInvocation invocation) throws ServletException,
IOException
- {
-
- HttpServletResponse cresp = invocation.getServerContext().getClientResponse();
- cresp.setContentType("text/html;charset=UTF-8");
- cresp.setCharacterEncoding("UTF-8");
- PrintWriter writer =
invocation.getServerContext().getClientResponse().getWriter();
- writer.print("<html><body>");
- }
-
- protected void endRender(ServerInvocation invocation) throws ServletException,
IOException
- {
- PrintWriter writer =
invocation.getServerContext().getClientResponse().getWriter();
- writer.print("</body></html>");
- writer.close();
- }
-
- /**
- * An instance context implementation that stores the cloned context in the HTTP
session of the user.
- */
- protected class InstanceContextImpl implements InstanceContext
- {
-
- /** . */
- private static final String CLONE_OF = "clone_of_";
-
- /** . */
- private boolean anonymous;
-
- /** . */
- private HttpServletRequest req;
-
- /** . */
- private AccessMode accessMode;
-
- /** . */
- private PortletContext portletContext;
-
- /** . */
- private PortletContext cloneContext;
-
- public InstanceContextImpl(Portlet portlet, HttpServletRequest req, boolean
anonymous)
- {
- this.portletContext = portlet.getContext();
- this.req = req;
- this.anonymous = anonymous;
-
- //
- if (anonymous)
- {
- this.accessMode = AccessMode.READ_ONLY;
- this.cloneContext = null;
- }
- else
- {
- this.accessMode = cloneContext == null ? AccessMode.CLONE_BEFORE_WRITE :
AccessMode.READ_WRITE;
- this.cloneContext = (PortletContext)req.getSession().getAttribute(CLONE_OF +
portlet.getContext().getId());
- }
- }
-
- public String getId()
- {
- return portletContext.getId();
- }
-
- public void onStateEvent(StateEvent event)
- {
- if (anonymous)
- {
- throw new IllegalStateException("The portal should not receive event
callbacks in anonymous mode");
- }
- req.getSession().setAttribute(CLONE_OF + this.portletContext.getId(),
event.getPortletContext());
- }
-
- public AccessMode getAccessMode()
- {
- return accessMode;
- }
-
- public PortletContext getPortletContext()
- {
- return cloneContext != null ? cloneContext : portletContext;
- }
- }
-
- protected class RenderContextImpl extends PortletInvocationContextImpl implements
RenderContext
- {
- public RenderContextImpl(
- Portlet portlet,
- ServerInvocation invocation,
- StateString navigationalState,
- WindowState windowState,
- Mode mode)
- {
- super(portlet, invocation, navigationalState, windowState, mode);
- }
- }
-
- protected class ActionContextImpl extends PortletInvocationContextImpl implements
ActionContext
- {
-
- private HttpServletRequest req;
- private StateString interactionState;
- private PortletParameters form;
-
- public ActionContextImpl(
- Portlet portlet,
- ServerInvocation invocation,
- StateString navigationalState,
- WindowState windowState,
- Mode mode,
- StateString interactionState,
- PortletParameters form)
- {
- super(portlet, invocation, navigationalState, windowState, mode);
- req = invocation.getServerContext().getClientRequest();
- this.interactionState = interactionState;
- this.form = form;
- }
-
- public String getCharacterEncoding()
- {
- return req.getCharacterEncoding();
- }
-
- public BufferedReader getReader() throws IOException
- {
- return req.getReader();
- }
-
- public InputStream getInputStream() throws IOException
- {
- return req.getInputStream();
- }
-
- public int getContentLength()
- {
- return req.getContentLength();
- }
-
- public String getContentType()
- {
- return req.getContentType();
- }
-
- public StateString getInteractionState()
- {
- return interactionState;
- }
-
- public PortletParameters getForm()
- {
- return form;
- }
- }
-
- public ActionInvocation createAction(ServerInvocation serverInvocation, ActionContext
actionContext)
- {
- ActionInvocation invocation = new ActionInvocation(actionContext);
- update(serverInvocation, invocation);
- return invocation;
- }
-
- public RenderInvocation createRender(ServerInvocation serverInvocation, RenderContext
renderContext)
- {
- RenderInvocation invocation = new RenderInvocation(renderContext);
- update(serverInvocation, invocation);
- return invocation;
- }
-
- public void update(final ServerInvocation serverInvocation, PortletInvocation
invocation)
- {
- String ppsm =
PortletTestDriver.getPortletTestContext().getParameter(PortletTestParameters.PORTAL_PORTLET_STATE_MANAGEMENT);
- boolean anonymous = "immutable".equals(ppsm);
- final PortletInvocationContextImpl invocationContext =
(PortletInvocationContextImpl)invocation.getPortletContext();
- PortalContext portalContext = new TestPortalContext();
- SecurityContext securityContext = new
AbstractSecurityContext(invocationContext.getClientRequest());
- RequestContext requestContext = new
AbstractRequestContext(invocationContext.getClientRequest(),
invocationContext.getClientResponse());
- InstanceContext instanceContext = new
InstanceContextImpl(invocationContext.portlet, invocationContext.getClientRequest(),
anonymous);
-
- //
- WindowContext windowContext = new WindowContext()
- {
- public String getId()
- {
- return invocationContext.portlet.getContext().getId();
- }
-
- };
- UserContext userContext = new UserContext()
- {
- public String getId()
- {
- return null;
- }
-
- public Map getInformations()
- {
- return new HashMap();
- }
-
- public Locale getLocale()
- {
- return serverInvocation.getRequest().getLocale();
- }
-
- public List getLocales()
- {
- return Tools.toList(serverInvocation.getRequest().getLocales());
- }
- };
-
- //
- invocation.setPortalContext(portalContext);
- invocation.setSecurityContext(securityContext);
- invocation.setRequestContext(requestContext);
- invocation.setInstanceContext(instanceContext);
- invocation.setWindowContext(windowContext);
- invocation.setUserContext(userContext);
- }
-
- protected class PortletInvocationContextImpl extends AbstractPortletInvocationContext
implements PortletInvocationContext
- {
-
- protected Portlet portlet;
- protected ServerInvocation invocation;
-
- public PortletInvocationContextImpl(
- Portlet portlet,
- ServerInvocation invocation,
- StateString navigationalState,
- WindowState windowState,
- Mode mode)
- {
- super(mode, windowState, navigationalState,
(MarkupInfo)invocation.getResponse().getContentInfo());
-
- //
- this.portlet = portlet;
- this.invocation = invocation;
-
- //
- addResolver(PortletInvocation.INVOCATION_SCOPE, new MapAttributeResolver());
- addResolver(ServerInvocation.REQUEST_SCOPE, invocation.getContext());
- addResolver(ServerInvocation.PRINCIPAL_SCOPE, invocation.getContext());
- addResolver(PortletInvocation.REQUEST_PROPERTIES_SCOPE,
EmptyAttributeResolver.getInstance());
- addResolver(PortletInvocation.RESPONSE_PROPERTIES_SCOPE, new
MapAttributeResolver());
- }
-
- public HttpServletResponse getClientResponse()
- {
- return invocation.getServerContext().getClientResponse();
- }
-
- public HttpServletRequest getClientRequest()
- {
- return invocation.getServerContext().getClientRequest();
- }
-
- public String encodeResourceURL(String url)
- {
- URLTools.enforceAbsoluteURL(url);
- return invocation.getServerContext().getClientResponse().encodeURL(url);
- }
-
- public String renderURL(PortletURL portletURL, Boolean wantSecure, Boolean
wantAuthenticated, boolean relative)
- {
- AbstractServerURL serverURL = new AbstractServerURL();
-
- //
- String id = portlet.getContext().getId();
- serverURL.setPortalRequestPath("/portlet/" + id);
-
- //
- int meta = PortletRequestDecoder.RENDER_MASK;
- if (portletURL instanceof ActionURL)
- {
- meta = PortletRequestDecoder.ACTION_MASK;
- }
-
- //
- if (portletURL.getMode() != null)
- {
- meta |= PortletRequestDecoder.MODE_MASK;
- serverURL.setParameterValue(PortletRequestDecoder.MODE_PARAMETER,
portletURL.getMode().toString());
- }
-
- //
- if (portletURL.getWindowState() != null)
- {
- meta |= PortletRequestDecoder.WINDOW_STATE_MASK;
- serverURL.setParameterValue(PortletRequestDecoder.WINDOW_STATE_PARAMETER,
portletURL.getWindowState().toString());
- }
-
- //
- serverURL.setParameterValue(PortletRequestDecoder.META_PARAMETER,
Integer.toHexString(meta));
-
- // Unwrap in a specific jboss portlet navigational state
- PortletParameters parameters = null;
- if (portletURL instanceof ActionURL)
- {
- PortletParametersStateString interactionState =
(PortletParametersStateString)((ActionURL)portletURL).getInteractionState();
- if (interactionState != null)
- {
- parameters = interactionState.getParameters();
- }
- }
- else
- {
- PortletParametersStateString navState =
(PortletParametersStateString)((RenderURL)portletURL).getNavigationalState();
- if (navState != null)
- {
- parameters = navState.getParameters();
- }
- }
-
- //
- if (parameters != null)
- {
- for (Iterator i = parameters.entrySet().iterator(); i.hasNext();)
- {
- Map.Entry entry = (Map.Entry)i.next();
- String name = (String)entry.getKey();
- String[] values = (String[])entry.getValue();
- serverURL.setParameterValues(name, values);
- }
- }
-
- //
- return invocation.getResponse().renderURL(serverURL,
URLFormat.newInstance(relative, true));
- }
- }
-}
Deleted:
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/test/TestSecurityInterceptor.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/test/TestSecurityInterceptor.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/portal/portlet/test/TestSecurityInterceptor.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -1,79 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.portlet.test;
-
-import org.jboss.portal.common.invocation.InvocationException;
-import org.jboss.portal.portlet.PortletContext;
-import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.invocation.PortletInterceptor;
-import org.jboss.portal.portlet.invocation.PortletInvocation;
-import org.jboss.portal.portlet.invocation.response.InsufficientPrivilegesResponse;
-import org.jboss.portal.portlet.security.PortletPermission;
-import org.jboss.portal.security.PortalSecurityException;
-import org.jboss.portal.security.spi.auth.PortalAuthorizationManager;
-import org.jboss.portal.security.spi.auth.PortalAuthorizationManagerFactory;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 6691 $
- */
-public class TestSecurityInterceptor extends PortletInterceptor
-{
-
- /** The auth manager factory. */
- private PortalAuthorizationManagerFactory pamf;
-
- public PortalAuthorizationManagerFactory getPortalAuthorizationManagerFactory()
- {
- return pamf;
- }
-
- public void setPortalAuthorizationManagerFactory(PortalAuthorizationManagerFactory
portalAuthorizationManagerFactory)
- {
- this.pamf = portalAuthorizationManagerFactory;
- }
-
- protected Object invoke(PortletInvocation invocation) throws Exception,
InvocationException
- {
- try
- {
- PortalAuthorizationManager authMgr = pamf.getManager();
- PortletContext portletContext = invocation.getTarget();
- String portletId = portletContext.getId();
- PortletPermission perm = new PortletPermission(portletId,
PortletPermission.VIEW_MASK);
- boolean authorized = authMgr.checkPermission(perm);
- if (authorized == false)
- {
- return new InsufficientPrivilegesResponse();
- }
- else
- {
- return invocation.invokeNext();
- }
- }
- catch (PortalSecurityException e)
- {
- throw new PortletInvokerException(e);
- }
- }
-}
Modified:
branches/JBoss_Portal_Branch_2_6/portlet-server/src/resources/test-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/portlet-server/src/resources/test-sar/META-INF/jboss-service.xml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/portlet-server/src/resources/test-sar/META-INF/jboss-service.xml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -121,8 +121,8 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<depends
- optional-attribute-name="ServletContainerContext"
-
proxy-type="attribute">portal:service=ServletContainerContext</depends>
+ optional-attribute-name="ServletContainerFactory"
+
proxy-type="attribute">portal:service=ServletContainerFactory</depends>
</mbean>
<mbean
code="org.jboss.portal.portlet.aspects.portlet.PortletSessionSynchronizationInterceptor"
@@ -325,7 +325,7 @@
<!-- Runtime context for running portlet container -->
<mbean
code="org.jboss.portal.web.jboss.JBossWebContext"
- name="portal:service=ServletContainerContext"
+ name="portal:service=ServletContainerFactory"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
@@ -339,7 +339,7 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<depends optional-attribute-name="Config"
proxy-type="attribute">portal:service=ServerConfig</depends>
- <depends optional-attribute-name="ServletContainerContext"
proxy-type="attribute">portal:service=ServletContainerContext</depends>
+ <depends optional-attribute-name="ServletContainerFactory"
proxy-type="attribute">portal:service=ServletContainerFactory</depends>
</mbean>
<!-- Server deployer -->
Modified: branches/JBoss_Portal_Branch_2_6/search/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/search/build.xml 2007-09-10 23:11:14 UTC (rev 8209)
+++ branches/JBoss_Portal_Branch_2_6/search/build.xml 2007-09-10 23:40:53 UTC (rev 8210)
@@ -66,6 +66,8 @@
&libraries;
<path id="library.classpath">
<path refid="jboss.portal/modules/common.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
+ <path refid="jboss.portal/modules/identity.classpath"/>
<path refid="jbossas/core.libs.classpath"/>
<path refid="apache.lucene.classpath"/>
<path refid="junit.junit.classpath"/>
@@ -76,8 +78,7 @@
<call target="configure-modules"/>
<path id="dependentmodule.classpath">
<path refid="jboss.portal-jems.classpath"/>
- <path refid="jboss.portal/modules/identity.classpath"/>
- <path refid="jboss.portlet-api.classpath"/>
+ <path refid="jboss.portal-api.classpath"/>
</path>
<!--+=======================================+-->
Modified:
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/Server.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/Server.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/Server.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -24,7 +24,7 @@
import org.jboss.portal.common.util.Version;
import org.jboss.portal.server.config.ServerConfig;
-import org.jboss.portal.web.spi.ServletContainerContext;
+import org.jboss.portal.web.ServletContainer;
/**
* The portal server.
@@ -53,5 +53,5 @@
*
* @return the servlet container context
*/
- ServletContainerContext getServletContainerContext();
+ ServletContainer getServletContainer();
}
Modified:
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/aspects/server/SessionInvalidatorInterceptor.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/aspects/server/SessionInvalidatorInterceptor.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/aspects/server/SessionInvalidatorInterceptor.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -27,8 +27,9 @@
import org.jboss.portal.server.ServerInterceptor;
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.server.ServerInvocationContext;
-import org.jboss.portal.server.servlet.CommandServlet;
-import org.jboss.portal.server.servlet.ServletCommand;
+import org.jboss.portal.web.RequestDispatchCallback;
+import org.jboss.portal.web.ServletContainerFactory;
+import org.jboss.portal.web.ServletContainer;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
@@ -52,7 +53,7 @@
{
/** . */
- private static final InvalidationCommand invalidator = new InvalidationCommand();
+ private static final Invalidation invalidator = new Invalidation();
/** . */
private static final Logger log =
Logger.getLogger(SessionInvalidatorInterceptor.class);
@@ -74,6 +75,19 @@
return (Set)localContexts.get();
}
+ /** . */
+ private ServletContainerFactory servletContainerFactory;
+
+ public ServletContainerFactory getServletContainerFactory()
+ {
+ return servletContainerFactory;
+ }
+
+ public void setServletContainerFactory(ServletContainerFactory
servletContainerFactory)
+ {
+ this.servletContainerFactory = servletContainerFactory;
+ }
+
protected void invoke(ServerInvocation invocation) throws Exception,
InvocationException
{
try
@@ -128,8 +142,10 @@
{
try
{
+ ServletContainer servletContainer =
servletContainerFactory.getServletContainer();
+
// Execute the command that invalidates the session
- CommandServlet.include(req, resp, invalidator, dispatchContext);
+ servletContainer.include(dispatchContext, req, resp, invalidator,
null);
}
catch (Exception e)
{
@@ -161,15 +177,20 @@
}
}
- public static class InvalidationCommand implements ServletCommand
+ public static class Invalidation implements RequestDispatchCallback
{
- public void execute(HttpServletRequest req, HttpServletResponse resp) throws
ServletException, IOException
+ public Object doCallback(ServletContext servletContext, HttpServletRequest req,
HttpServletResponse resp, Object handback) throws ServletException, IOException
{
HttpSession session = req.getSession(false);
+
+ //
if (session != null)
{
session.invalidate();
}
+
+ //
+ return null;
}
}
}
Modified:
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/deployment/PortalWebTomcat4App.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/deployment/PortalWebTomcat4App.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/deployment/PortalWebTomcat4App.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.server.deployment;
-import org.jboss.portal.server.servlet.CommandServlet;
import org.jboss.web.WebApplication;
+import org.jboss.portal.web.command.CommandServlet;
import org.xml.sax.EntityResolver;
import javax.servlet.ServletContext;
Modified:
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/deployment/PortalWebTomcat5App.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/deployment/PortalWebTomcat5App.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/deployment/PortalWebTomcat5App.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.server.deployment;
-import org.jboss.portal.server.servlet.CommandServlet;
import org.jboss.web.WebApplication;
+import org.jboss.portal.web.command.CommandServlet;
import org.xml.sax.EntityResolver;
import javax.management.MBeanServer;
Modified:
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/deployment/PortalWebTomcat6App.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/deployment/PortalWebTomcat6App.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/deployment/PortalWebTomcat6App.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -23,7 +23,7 @@
package org.jboss.portal.server.deployment;
import org.jboss.web.WebApplication;
-import org.jboss.portal.server.servlet.CommandServlet;
+import org.jboss.portal.web.command.CommandServlet;
import org.xml.sax.EntityResolver;
import javax.management.MBeanServer;
Modified:
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/impl/ServerImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/impl/ServerImpl.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/impl/ServerImpl.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -27,6 +27,8 @@
import org.jboss.portal.server.Server;
import org.jboss.portal.server.config.ServerConfig;
import org.jboss.portal.web.spi.ServletContainerContext;
+import org.jboss.portal.web.ServletContainer;
+import org.jboss.portal.web.ServletContainerFactory;
/**
* Should bootstrap the microcontainer in the (near) future.
@@ -41,7 +43,7 @@
private ServerConfig config;
/** . */
- private ServletContainerContext servletContainerContext;
+ private ServletContainerFactory servletContainerFactory;
public ServerConfig getConfig()
{
@@ -58,13 +60,18 @@
return PortalConstants.VERSION;
}
- public ServletContainerContext getServletContainerContext()
+ public ServletContainerFactory getServletContainerFactory()
{
- return servletContainerContext;
+ return servletContainerFactory;
}
- public void setServletContainerContext(ServletContainerContext
servletContainerContext)
+ public void setServletContainerFactory(ServletContainerFactory
servletContainerFactory)
{
- this.servletContainerContext = servletContainerContext;
+ this.servletContainerFactory = servletContainerFactory;
}
+
+ public ServletContainer getServletContainer()
+ {
+ return servletContainerFactory.getServletContainer();
+ }
}
Deleted:
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/servlet/CommandServlet.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/servlet/CommandServlet.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/servlet/CommandServlet.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -1,158 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.server.servlet;
-
-import org.apache.log4j.Logger;
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-/**
- * This servlet is used to execute command coming from another context through a
dispatching request.
- * <p/>
- * The command invocation is detyped to allow it working on redeploy and avoid class cast
exception.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public class CommandServlet extends HttpServlet
-{
-
- /** The serialVersionUID */
- private static final long serialVersionUID = 8963747886048494977L;
-
- private static final Logger log = Logger.getLogger(CommandServlet.class);
-
- private static final ThreadLocal localCmd = new ThreadLocal();
-
- /** Provide an spi for dispatching to a request dispatcher. */
- public interface Dispatcher
- {
- void include(RequestDispatcher rd) throws IOException, ServletException;
- }
-
- /**
- * Execute a command after having performed a request dispatch in the target servlet
context.
- *
- * @param cmd the command to execute after the inclusion is done
- * @param ctx the target servlet context
- * @throws IOException
- * @throws ServletException
- */
- public static void include(
- HttpServletRequest req,
- HttpServletResponse resp,
- ServletCommand cmd,
- ServletContext ctx) throws IOException, ServletException
- {
- try
- {
- localCmd.set(cmd);
- RequestDispatcher switcher =
ctx.getRequestDispatcher("/jbossportlet");
- switcher.include(req, resp);
- }
- finally
- {
- localCmd.set(null);
- }
- }
-
- protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws
ServletException, IOException
- {
- Object cmd = localCmd.get();
- if (cmd != null)
- {
- try
- {
- Method methods = cmd.getClass().getMethod(
- "execute",
- new Class[]{
- HttpServletRequest.class,
- HttpServletResponse.class});
- methods.invoke(cmd, new Object[]{req, resp});
- }
- catch (NoSuchMethodException e)
- {
- throw new ServletException("No execute method found on the
command", e);
- }
- catch (InvocationTargetException e)
- {
- // Log the wrappee
- Throwable wrappee = e.getTargetException();
- log.error("Exception in command invocation", wrappee);
-
- // Rethrow the checked ServletException
- if (wrappee instanceof ServletException)
- {
- ServletException se = (ServletException)wrappee;
- if (se.getCause() == null && se.getRootCause() != null)
- {
- se.initCause(se.getRootCause());
- }
- throw(ServletException)wrappee;
- }
- // Rethrow the checked IOException
- if (wrappee instanceof IOException)
- {
- throw(IOException)wrappee;
- }
- // Rethrow RuntimeException
- if (wrappee instanceof RuntimeException)
- {
- throw(RuntimeException)wrappee;
- }
- // Rethrow Error
- if (wrappee instanceof Error)
- {
- throw(Error)wrappee;
- }
- // Here we wrap it and rethrow
- ServletException se = new ServletException("The invoked command threw an
exception", wrappee);
- se.initCause(wrappee);
- throw se;
- }
- catch (IllegalAccessException e)
- {
- ServletException se = new ServletException("Unexpected
IllegalAccessException during command invocation", e);
- se.initCause(e);
- throw se;
- }
- }
- else
- {
- throw new ServletException("No command found");
- }
- }
-
- protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws
ServletException, IOException
- {
- doGet(req, resp);
- }
-}
Deleted:
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/servlet/ServletCommand.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/servlet/ServletCommand.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/server/servlet/ServletCommand.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -1,39 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.server.servlet;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-/**
- * Command to be executed in the command servlet.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public interface ServletCommand
-{
- void execute(HttpServletRequest req, HttpServletResponse resp) throws
ServletException, IOException;
-}
Modified:
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/test/server/response/EncodeResponseTest.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/test/server/response/EncodeResponseTest.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/test/server/response/EncodeResponseTest.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -23,15 +23,12 @@
package org.jboss.portal.test.server.response;
import org.jboss.portal.test.framework.server.driver.AbstractTest;
-import org.jboss.portal.test.framework.driver.http.command.SendResponseCommand;
-import org.jboss.portal.test.framework.driver.http.response.SendResponseResponse;
import org.jboss.portal.test.framework.driver.remote.TestContext;
import org.jboss.portal.test.server.Utils;
import org.jboss.portal.test.framework.driver.DriverResponse;
import org.jboss.portal.test.framework.driver.DriverCommand;
import org.jboss.portal.test.framework.driver.response.EndTestResponse;
import org.jboss.portal.test.framework.driver.response.ErrorResponse;
-import org.jboss.portal.common.junit.ExtendedAssert;
import org.jboss.portal.server.ServerInvocation;
import javax.servlet.http.HttpServletResponse;
@@ -39,6 +36,8 @@
import java.io.IOException;
/**
+ * To rewrite.
+ *
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 5570 $
*/
@@ -63,7 +62,8 @@
PrintWriter pw = resp.getWriter();
pw.print(content);
pw.close();
- return new SendResponseResponse();
+ return new EndTestResponse();
+// return new SendResponseResponse();
}
else
{
@@ -75,11 +75,11 @@
{
if (testContext.isRequestCount(1))
{
- SendResponseCommand src = (SendResponseCommand)driverCommand;
- byte[] bytes = src.getBytes();
- String s = new String(bytes, "utf-8");
- String result = Utils.compareString(content, s);
- ExtendedAssert.assertEquals(null, result);
+// SendResponseCommand src = (SendResponseCommand)driverCommand;
+// byte[] bytes = src.getBytes();
+// String s = new String(bytes, "utf-8");
+// String result = Utils.compareString(content, s);
+// ExtendedAssert.assertEquals(null, result);
return new EndTestResponse();
}
else
Modified:
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/web/jboss/JBossWebContext.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/web/jboss/JBossWebContext.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/server/src/main/org/jboss/portal/web/jboss/JBossWebContext.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -22,11 +22,11 @@
******************************************************************************/
package org.jboss.portal.web.jboss;
-import org.jboss.portal.server.servlet.CommandServlet;
-import org.jboss.portal.server.servlet.ServletCommand;
import org.jboss.portal.web.spi.ServletContainerContext;
import org.jboss.portal.web.RequestDispatchCallback;
-import org.jboss.portal.web.WebAppListener;
+import org.jboss.portal.web.ServletContainerFactory;
+import org.jboss.portal.web.ServletContainer;
+import org.jboss.portal.web.command.CommandDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
@@ -40,116 +40,43 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class JBossWebContext implements ServletContainerContext
+public class JBossWebContext implements ServletContainerContext, ServletContainerFactory
{
/** . */
- private static final ThreadLocal localResponse = new ThreadLocal();
+ private final CommandDispatcher dispatcher = new CommandDispatcher();
+ /** . */
+ private final ServletContainer servletContainer = new ServletContainer();
+
+
+ public JBossWebContext()
+ {
+ servletContainer.register(this);
+ }
+
public Object include(
ServletContext targetServletContext,
HttpServletRequest req,
HttpServletResponse resp,
RequestDispatchCallback callback,
- Object handback) throws Exception
+ Object handback) throws ServletException, IOException
{
- try
- {
- //
- ServletCommand cmd = new InvokeNextCommand(targetServletContext, callback,
handback);
-
- //
- CommandServlet.include(req, resp, cmd, targetServletContext);
-
- // Rethrow any InvocationException
- Object response = localResponse.get();
-
- //
- if (response instanceof Exception)
- {
- throw (Exception)response;
- }
- else
- {
- return response;
- }
- }
- catch (IOException e)
- {
- throw e;
- }
- catch (ServletException e)
- {
- // Unwrap underlying exception if any
- Throwable t = e.getRootCause();
-
- //
- if (t instanceof Error)
- {
- // Rethrow any error
- throw(Error)t;
- }
- else if (t instanceof RuntimeException)
- {
- throw (RuntimeException)t;
- }
- else if (t instanceof Exception)
- {
- throw (Exception)t;
- }
- else
- {
- throw e;
- }
- }
- finally
- {
- localResponse.set(null);
- }
+ return dispatcher.include(targetServletContext, req, resp, callback, handback);
}
- public static class InvokeNextCommand implements ServletCommand
+ public void setCallback(Registration registration)
{
-
- /** . */
- private final ServletContext servletContext;
-
- /** . */
- private final RequestDispatchCallback invocation;
-
- /** . */
- private final Object handback;
-
- public InvokeNextCommand(ServletContext servletContext, RequestDispatchCallback
invocation, Object handback)
- {
- this.servletContext = servletContext;
- this.invocation = invocation;
- this.handback = handback;
- }
-
- public void execute(HttpServletRequest req, HttpServletResponse resp) throws
ServletException, IOException
- {
- try
- {
- Object response = invocation.doCallback(servletContext, req, resp,
handback);
-
- //
- localResponse.set(response);
- }
- catch (Exception e)
- {
- localResponse.set(e);
- }
- }
}
- public boolean addWebAppListener(WebAppListener webAppListener) throws
IllegalArgumentException
+ public void unsetCallback(Registration registration)
{
- throw new UnsupportedOperationException("Not implemented in 2.6");
}
- public boolean removeWebAppListener(WebAppListener webAppListener) throws
IllegalArgumentException
+ // ServletContainerFactory implementation
***************************************************************************
+
+ public ServletContainer getServletContainer()
{
- throw new UnsupportedOperationException("Not implemented in 2.6");
+ return servletContainer;
}
}
Modified:
branches/JBoss_Portal_Branch_2_6/server/src/resources/portal-server-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/server/src/resources/portal-server-sar/META-INF/jboss-service.xml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/server/src/resources/portal-server-sar/META-INF/jboss-service.xml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -36,7 +36,7 @@
<!-- Runtime context for running portlet container -->
<mbean
code="org.jboss.portal.web.jboss.JBossWebContext"
- name="portal:service=ServletContainerContext"
+ name="portal:service=ServletContainerFactory"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
@@ -50,7 +50,7 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<depends optional-attribute-name="Config"
proxy-type="attribute">portal:service=ServerConfig</depends>
- <depends optional-attribute-name="ServletContainerContext"
proxy-type="attribute">portal:service=ServletContainerContext</depends>
+ <depends optional-attribute-name="ServletContainerFactory"
proxy-type="attribute">portal:service=ServletContainerFactory</depends>
</mbean>
<!-- Server deployer -->
Modified:
branches/JBoss_Portal_Branch_2_6/server/src/resources/test/test-charset-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/server/src/resources/test/test-charset-sar/META-INF/jboss-service.xml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/server/src/resources/test/test-charset-sar/META-INF/jboss-service.xml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -36,7 +36,7 @@
<!-- Runtime context for running portlet container -->
<mbean
code="org.jboss.portal.web.jboss.JBossWebContext"
- name="portal:service=ServletContainerContext"
+ name="portal:service=ServletContainerFactory"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
@@ -50,7 +50,7 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<depends optional-attribute-name="Config"
proxy-type="attribute">portal:service=ServerConfig</depends>
- <depends optional-attribute-name="ServletContainerContext"
proxy-type="attribute">portal:service=ServletContainerContext</depends>
+ <depends optional-attribute-name="ServletContainerFactory"
proxy-type="attribute">portal:service=ServletContainerFactory</depends>
</mbean>
<!-- Server stack -->
Modified:
branches/JBoss_Portal_Branch_2_6/server/src/resources/test/test-parameters-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/server/src/resources/test/test-parameters-sar/META-INF/jboss-service.xml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/server/src/resources/test/test-parameters-sar/META-INF/jboss-service.xml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -36,7 +36,7 @@
<!-- Runtime context for running portlet container -->
<mbean
code="org.jboss.portal.web.jboss.JBossWebContext"
- name="portal:service=ServletContainerContext"
+ name="portal:service=ServletContainerFactory"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
@@ -50,7 +50,7 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<depends optional-attribute-name="Config"
proxy-type="attribute">portal:service=ServerConfig</depends>
- <depends optional-attribute-name="ServletContainerContext"
proxy-type="attribute">portal:service=ServletContainerContext</depends>
+ <depends optional-attribute-name="ServletContainerFactory"
proxy-type="attribute">portal:service=ServletContainerFactory</depends>
</mbean>
<!-- Server stack -->
Modified:
branches/JBoss_Portal_Branch_2_6/server/src/resources/test/test-response-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/server/src/resources/test/test-response-sar/META-INF/jboss-service.xml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/server/src/resources/test/test-response-sar/META-INF/jboss-service.xml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -36,7 +36,7 @@
<!-- Runtime context for running portlet container -->
<mbean
code="org.jboss.portal.web.jboss.JBossWebContext"
- name="portal:service=ServletContainerContext"
+ name="portal:service=ServletContainerFactory"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
@@ -50,7 +50,7 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<depends optional-attribute-name="Config"
proxy-type="attribute">portal:service=ServerConfig</depends>
- <depends optional-attribute-name="ServletContainerContext"
proxy-type="attribute">portal:service=ServletContainerContext</depends>
+ <depends optional-attribute-name="ServletContainerFactory"
proxy-type="attribute">portal:service=ServletContainerFactory</depends>
</mbean>
<!-- Server stack -->
Modified:
branches/JBoss_Portal_Branch_2_6/server/src/resources/test/test-servlet-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/server/src/resources/test/test-servlet-sar/META-INF/jboss-service.xml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/server/src/resources/test/test-servlet-sar/META-INF/jboss-service.xml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -36,7 +36,7 @@
<!-- Runtime context for running portlet container -->
<mbean
code="org.jboss.portal.web.jboss.JBossWebContext"
- name="portal:service=ServletContainerContext"
+ name="portal:service=ServletContainerFactory"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
@@ -50,7 +50,7 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<depends optional-attribute-name="Config"
proxy-type="attribute">portal:service=ServerConfig</depends>
- <depends optional-attribute-name="ServletContainerContext"
proxy-type="attribute">portal:service=ServletContainerContext</depends>
+ <depends optional-attribute-name="ServletContainerFactory"
proxy-type="attribute">portal:service=ServletContainerFactory</depends>
</mbean>
<!-- Server stack -->
Modified: branches/JBoss_Portal_Branch_2_6/testsuite/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/testsuite/build.xml 2007-09-10 23:11:14 UTC (rev
8209)
+++ branches/JBoss_Portal_Branch_2_6/testsuite/build.xml 2007-09-10 23:40:53 UTC (rev
8210)
@@ -130,24 +130,15 @@
<antcall target="internal-test-module">
<param name="module" value="security"/>
</antcall>
-<!--
<antcall target="internal-test-module">
- <param name="module" value="identity"/>
- </antcall>
--->
- <antcall target="internal-test-module">
<param name="module" value="server"/>
</antcall>
+<!--
<antcall target="internal-test-module">
- <param name="module" value="portlet"/>
- </antcall>
- <antcall target="internal-test-module">
<param name="module" value="portlet-server"/>
</antcall>
+-->
<antcall target="internal-test-module">
- <param name="module" value="portlet-federation"/>
- </antcall>
- <antcall target="internal-test-module">
<param name="module" value="wsrp"/>
</antcall>
<!--
@@ -190,10 +181,6 @@
<fileset dir="../faces"
includes="output/tests/TEST-*.xml,output/tests/TEST-*.txt"/>
<fileset dir="../server" includes="*.log"/>
<fileset dir="../server"
includes="output/tests/TEST-*.xml,output/tests/TEST-*.txt"/>
- <fileset dir="../portlet" includes="*.log"/>
- <fileset dir="../portlet"
includes="output/tests/TEST-*.xml,output/tests/TEST-*.txt"/>
- <fileset dir="../portlet-federation"
includes="*.log"/>
- <fileset dir="../portlet-federation"
includes="output/tests/TEST-*.xml,output/tests/TEST-*.txt"/>
<fileset dir="../portlet-server" includes="*.log"/>
<fileset dir="../portlet-server"
includes="output/tests/TEST-*.xml,output/tests/TEST-*.txt"/>
<fileset dir="../security" includes="*.log"/>
Modified: branches/JBoss_Portal_Branch_2_6/theme/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/theme/build.xml 2007-09-10 23:11:14 UTC (rev 8209)
+++ branches/JBoss_Portal_Branch_2_6/theme/build.xml 2007-09-10 23:40:53 UTC (rev 8210)
@@ -92,6 +92,7 @@
<path id="library.classpath">
<path refid="jboss.portal/modules/common.classpath"/>
<path refid="jboss.portal/modules/web.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
<path refid="jboss.portal/modules/test.classpath"/>
<path refid="oswego.concurrent.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
@@ -110,10 +111,8 @@
<!-- Configure modules -->
<call target="configure-modules"/>
<path id="dependentmodule.classpath">
- <path refid="jboss.portlet-api.classpath"/>
<path refid="jboss.portal-jems.classpath"/>
<path refid="jboss.portal-server.classpath"/>
- <path refid="jboss.portal-portlet.classpath"/>
</path>
<!--+=======================================+-->
Modified:
branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/test/theme/DynaTestContext.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/test/theme/DynaTestContext.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/test/theme/DynaTestContext.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -58,6 +58,8 @@
import org.jboss.portal.test.framework.driver.command.StartTestCommand;
import org.jboss.portal.test.framework.junit.ThrowableDecoder;
import org.jboss.portal.web.ServletContextDispatcher;
+import org.jboss.portal.web.ServletContainer;
+import org.jboss.portal.web.ServletContainerFactory;
import org.jboss.portal.web.spi.ServletContainerContext;
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.mx.util.MBeanProxy;
@@ -108,7 +110,7 @@
private final TestServlet servlet;
/** . */
- ServletContainerContext servletContainerContext;
+ ServletContainerFactory servletContainerFactory;
/** . */
LayoutService layoutService;
@@ -146,7 +148,7 @@
try
{
MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
- servletContainerContext =
(ServletContainerContext)MBeanProxy.get(ServletContainerContext.class, new
ObjectName("portal:service=ServletContainerContext"), mbeanServer);
+ servletContainerFactory =
(ServletContainerFactory)MBeanProxy.get(ServletContainerContext.class, new
ObjectName("portal:service=ServletContainerFactory"), mbeanServer);
layoutService = (LayoutService)MBeanProxy.get(LayoutService.class, new
ObjectName("portal:service=LayoutService"), mbeanServer);
themeService = (ThemeService)MBeanProxy.get(ThemeService.class, new
ObjectName("portal:service=ThemeService"), mbeanServer);
renderSet = layoutService.getRenderSet("testRenderer",
MediaType.HTML);
@@ -249,7 +251,7 @@
private void handleAsync(RequestContext requestContext) throws RenderException,
IOException
{
MarkupInfo markupInfo = new MarkupInfo(MediaType.HTML, "UTF-8");
- ServletContextDispatcher dispatcher = new
ServletContextDispatcher(requestContext.request, requestContext.response,
servletContainerContext);
+ ServletContextDispatcher dispatcher = new
ServletContextDispatcher(requestContext.request, requestContext.response,
servletContainerFactory.getServletContainer());
ThemeContext themeContext = new ThemeContext(theme, themeService);
//
@@ -292,7 +294,7 @@
requestContext.response.setContentType("text/html");
MarkupInfo markupInfo = new MarkupInfo(MediaType.HTML, "UTF-8");
- ServletContextDispatcher dispatcher = new
ServletContextDispatcher(requestContext.request, requestContext.response,
servletContainerContext);
+ ServletContextDispatcher dispatcher = new
ServletContextDispatcher(requestContext.request, requestContext.response,
servletContainerFactory.getServletContainer());
ThemeContext themeContext = new ThemeContext(theme, themeService);
// Build a page structure
Modified:
branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/test/theme/TestInfoServlet.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/test/theme/TestInfoServlet.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/test/theme/TestInfoServlet.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -37,6 +37,7 @@
import javax.management.MBeanServer;
import javax.management.ObjectName;
import java.io.IOException;
+import java.util.HashMap;
/** @author <a href="mailto:roy@jboss.org">Roy Russo</a> */
@@ -66,7 +67,7 @@
//
RemoteTestDriver driver =
(RemoteTestDriver)testServer.getDriver(pathInfo.substring(1));
driver.invoke("", new StartTestCommand(new TestParametrization()));
- driver.pushContext("", new TestContext(0, null, new
TestParametrization()));
+ driver.pushContext("", new TestContext(0, null, new
TestParametrization(), new HashMap()));
//
// //
Modified:
branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/LayoutDispatcher.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/LayoutDispatcher.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/LayoutDispatcher.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -97,7 +97,7 @@
}
}
- public Object doCallback(ServletContext dispatchedServletContext, HttpServletRequest
dispatchedRequest, HttpServletResponse dispatchedResponse, Object handback) throws
Exception
+ public Object doCallback(ServletContext dispatchedServletContext, HttpServletRequest
dispatchedRequest, HttpServletResponse dispatchedResponse, Object handback) throws
ServletException, IOException
{
try
{
Modified:
branches/JBoss_Portal_Branch_2_6/theme/src/resources/test/theme-test-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/theme/src/resources/test/theme-test-sar/META-INF/jboss-service.xml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/theme/src/resources/test/theme-test-sar/META-INF/jboss-service.xml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -85,7 +85,7 @@
<!-- Runtime context for running portlet container -->
<mbean
code="org.jboss.portal.web.jboss.JBossWebContext"
- name="portal:service=ServletContainerContext"
+ name="portal:service=ServletContainerFactory"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
@@ -99,7 +99,7 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<depends optional-attribute-name="Config"
proxy-type="attribute">portal:service=ServerConfig</depends>
- <depends optional-attribute-name="ServletContainerContext"
proxy-type="attribute">portal:service=ServletContainerContext</depends>
+ <depends optional-attribute-name="ServletContainerFactory"
proxy-type="attribute">portal:service=ServletContainerFactory</depends>
</mbean>
<!-- Server deployer -->
Modified: branches/JBoss_Portal_Branch_2_6/tools/etc/buildfragments/modules.ent
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/buildfragments/modules.ent 2007-09-10
23:11:14 UTC (rev 8209)
+++ branches/JBoss_Portal_Branch_2_6/tools/etc/buildfragments/modules.ent 2007-09-10
23:40:53 UTC (rev 8210)
@@ -25,11 +25,10 @@
</path>
<!-- api -->
- <property name="jboss.portlet-api.root"
value="${project.root}/api/output"/>
- <property name="jboss.portlet-api.lib"
value="${jboss.portlet-api.root}/lib"/>
- <path id="jboss.portlet-api.classpath">
- <pathelement path="${jboss.portlet-api.lib}/portlet-api-lib.jar"/>
- <pathelement path="${jboss.portlet-api.lib}/portal-api-lib.jar"/>
+ <property name="jboss.portal-api.root"
value="${project.root}/api/output"/>
+ <property name="jboss.portal-api.lib"
value="${jboss.portal-api.root}/lib"/>
+ <path id="jboss.portal-api.classpath">
+ <pathelement path="${jboss.portal-api.lib}/portal-api-lib.jar"/>
</path>
<!-- faces -->
@@ -46,15 +45,6 @@
<pathelement path="${jboss.portal-jems.lib}/portal-jems-lib.jar"/>
</path>
- <!-- portlet -->
- <property name="jboss.portal-portlet.root"
value="${project.root}/portlet/output"/>
- <property name="jboss.portal-portlet.lib"
value="${jboss.portal-portlet.root}/lib"/>
- <path id="jboss.portal-portlet.classpath">
- <pathelement
path="${jboss.portal-portlet.lib}/portal-portlet-lib.jar"/>
- <pathelement
path="${jboss.portal-portlet.lib}/portal-portlet-test-lib.jar"/>
- <pathelement
path="${jboss.portal-portlet.lib}/portal-portlet-test-framework-lib.jar"/>
- </path>
-
<!-- portlet-server -->
<property name="jboss.portal-portlet-server.root"
value="${project.root}/portlet-server/output"/>
<property name="jboss.portal-portlet-server.lib"
value="${jboss.portal-portlet-server.root}/lib"/>
@@ -62,13 +52,6 @@
<pathelement
path="${jboss.portal-portlet-server.lib}/portal-portlet-server-lib.jar"/>
</path>
- <!-- portlet-federation -->
- <property name="jboss.portal-portlet-federation.root"
value="${project.root}/portlet-federation/output"/>
- <property name="jboss.portal-portlet-federation.lib"
value="${jboss.portal-portlet-federation.root}/lib"/>
- <path id="jboss.portal-portlet-federation.classpath">
- <pathelement
path="${jboss.portal-portlet-federation.lib}/portal-portlet-federation-lib.jar"/>
- </path>
-
<!-- bridge -->
<property name="jboss.portal-bridge.root"
value="${project.root}/bridge/output"/>
<property name="jboss.portal-bridge.lib"
value="${jboss.portal-bridge.root}/lib"/>
Modified: branches/JBoss_Portal_Branch_2_6/widget/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/build.xml 2007-09-10 23:11:14 UTC (rev 8209)
+++ branches/JBoss_Portal_Branch_2_6/widget/build.xml 2007-09-10 23:40:53 UTC (rev 8210)
@@ -89,6 +89,7 @@
&libraries;
<path id="library.classpath">
<path refid="jboss.portal/modules/common.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
<path refid="jbossas/core.libs.classpath"/>
<path refid="jboss/backport.concurrent.classpath"/>
<path refid="apache.log4j.classpath"/>
@@ -98,10 +99,9 @@
<!-- Configure modules -->
<call target="configure-modules"/>
<path id="dependentmodule.classpath">
- <path refid="jboss.portlet-api.classpath"/>
+ <path refid="jboss.portal-api.classpath"/>
<path refid="jboss.portal-jems.classpath"/>
<path refid="jboss.portal-server.classpath"/>
- <path refid="jboss.portal-portlet.classpath"/>
</path>
<!--+=======================================+-->
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-09-10 23:11:14 UTC (rev 8209)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-09-10 23:40:53 UTC (rev 8210)
@@ -107,6 +107,7 @@
&libraries;
<path id="library.classpath">
<path refid="jboss.portal/modules/common.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
<path refid="jboss.portal/modules/test.classpath"/>
<path refid="oswego.concurrent.classpath"/>
<path refid="apache.log4j.classpath"/>
@@ -140,9 +141,7 @@
<path refid="jboss.portal-server.classpath"/>
<path refid="jboss.portal-core.classpath"/>
<path refid="jboss.portal-registration.classpath"/>
- <path refid="jboss.portlet-api.classpath"/>
- <path refid="jboss.portal-portlet.classpath"/>
- <path refid="jboss.portal-portlet-federation.classpath"/>
+ <path refid="jboss.portal-api.classpath"/>
<path refid="jboss.portal-faces.classpath"/>
</path>
@@ -253,6 +252,7 @@
<path refid="dependentmodule.classpath"/>
<pathelement path="${build.classes}"/>
<path refid="hibernate.hibernate.classpath"/>
+ <path refid="jboss.portal/modules/portlet.classpath"/>
</path>
<aopc compilerclasspathref="aop.classpath"
verbose="true">
@@ -481,17 +481,13 @@
<fileset dir="${build.lib.test}"
includes="test-wsrp-consumer-client.jar"/>
<fileset dir="${jboss.portal-security.root}/lib"
includes="portal-security-lib.jar"/>
<fileset dir="${build.lib.test}"
includes="test-wsrp-consumer-lib.jar"/>
- <fileset dir="${jboss.portlet-api.root}/lib"
includes="portlet-api-lib.jar"/>
<fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-portal-lib.jar"/>
- <fileset dir="${jboss.portlet-api.root}/lib"
includes="portal-api-lib.jar"/>
- <fileset dir="${jboss.portal-portlet.root}/lib"
- includes="portal-portlet-lib.jar,
portal-portlet-test-lib.jar"/>
- <fileset dir="${jboss.portal-portlet-server.root}/lib"
- includes="portal-portlet-server-lib.jar"/>
+ <fileset dir="${jboss.portal-api.root}/lib"
includes="portal-api-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/portlet.lib}"
includes="portal-portlet-lib.jar,portal-portlet-federation-lib.jar,portal-portlet-jsr168api-lib.jar"/>
<!-- , portal-portlet-test-lib.jar -->
+ <fileset dir="${jboss.portal/modules/test.lib}"
includes="portal-test-lib.jar"/>
<fileset dir="${jboss.portal/modules/web.lib}"
includes="portal-web-lib.jar"/>
- <fileset dir="${jboss.portal-portlet-federation.root}/lib"
includes="portal-portlet-federation-lib.jar"/>
+ <fileset dir="${jboss.portal-portlet-server.root}/lib"
includes="portal-portlet-server-lib.jar"/>
<fileset dir="${jboss.portal-registration.root}/lib"
includes="portal-registration-lib.jar"/>
- <fileset dir="${jboss.portal/modules/test.lib}"
includes="portal-test-lib.jar"/>
<fileset dir="${jboss.portal-server.lib}"
includes="portal-server-test-framework-lib.jar"/>
</copy>
@@ -546,14 +542,12 @@
<fileset dir="${build.lib}"
includes="portal-wsrp-lib.jar"/>
<fileset dir="${build.lib.test}"
includes="test-wsrp-producer-lib.jar"/>
<fileset dir="${jboss.portal/modules/common.lib}"
includes="portal-common-portal-lib.jar"/>
- <fileset dir="${jboss.portlet-api.root}/lib"
includes="portlet-api-lib.jar"/>
- <fileset dir="${jboss.portlet-api.root}/lib"
includes="portal-api-lib.jar"/>
- <fileset dir="${jboss.portal-portlet.root}/lib"
includes="portal-portlet-lib.jar"/>
- <fileset dir="${jboss.portal-portlet-server.root}/lib"
includes="portal-portlet-server-lib.jar"/>
+ <fileset dir="${jboss.portal-api.root}/lib"
includes="portal-api-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/portlet.lib}"
includes="portal-portlet-lib.jar,portal-portlet-federation-lib.jar,portal-portlet-jsr168api-lib.jar"/>
<fileset dir="${jboss.portal/modules/web.lib}"
includes="portal-web-lib.jar"/>
- <fileset dir="${jboss.portal-portlet-federation.root}/lib"
includes="portal-portlet-federation-lib.jar"/>
- <fileset dir="${jboss.portal-registration.root}/lib"
includes="portal-registration-lib.jar"/>
<fileset dir="${jboss.portal/modules/test.lib}"
includes="portal-test-lib.jar"/>
+ <fileset dir="${jboss.portal-portlet-server.root}/lib"
includes="portal-portlet-server-lib.jar"/>
+ <fileset dir="${jboss.portal-registration.root}/lib"
includes="portal-registration-lib.jar"/>
<fileset dir="${junit.junit.lib}"
includes="junit.jar"/>
<fileset dir="${build.lib.test}"
includes="test-wsrp-producer.jar"/>
<fileset dir="${build.lib.test}"
includes="test-wsrp-producer-client.jar"/>
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/WSRPBaseTest.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/WSRPBaseTest.java 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/WSRPBaseTest.java 2007-09-10
23:40:53 UTC (rev 8210)
@@ -37,8 +37,8 @@
import org.jboss.portal.test.framework.info.TestItemInfo;
import org.jboss.portal.test.framework.junit.POJOJUnitTest;
import org.jboss.portal.jems.as.system.AbstractJBossService;
-import org.jboss.portal.test.framework.driver.http.HTTPTestDriver;
import org.jboss.portal.test.framework.driver.remote.TestContext;
+import org.jboss.portal.test.framework.driver.remote.RemoteTestDriver;
/**
* Base Class for all WSRP Test Cases
@@ -48,7 +48,7 @@
* @author <a href="mailto:Boleslaw.Dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @since 2.4 (Feb 20, 2006)
*/
-public abstract class WSRPBaseTest extends AbstractJBossService implements
HTTPTestDriver
+public abstract class WSRPBaseTest extends AbstractJBossService implements
RemoteTestDriver
{
Logger log = Logger.getLogger(WSRPBaseTest.class);
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-producer-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-producer-sar/META-INF/jboss-service.xml 2007-09-10
23:11:14 UTC (rev 8209)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-producer-sar/META-INF/jboss-service.xml 2007-09-10
23:40:53 UTC (rev 8210)
@@ -71,8 +71,8 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<depends
- optional-attribute-name="ServletContainerContext"
-
proxy-type="attribute">portal:service=ServletContainerContext</depends>
+ optional-attribute-name="ServletContainerFactory"
+
proxy-type="attribute">portal:service=ServletContainerFactory</depends>
</mbean>
<mbean
code="org.jboss.portal.portlet.aspects.portlet.WindowStatesInterceptor"