gatein SVN: r4462 - components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-01 19:51:55 -0400 (Fri, 01 Oct 2010)
New Revision: 4462
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
Log:
- GTNWSRP-85: only checks if a consumer supports exports if it's active.
Modified: components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2010-10-01 14:41:14 UTC (rev 4461)
+++ components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2010-10-01 23:51:55 UTC (rev 4462)
@@ -668,7 +668,7 @@
public boolean isSupportsExport()
{
- return consumer.isSupportsExport();
+ return isActive() && consumer.isSupportsExport();
}
public boolean isAvailableExportInfosEmpty()
14 years, 2 months
gatein SVN: r4461 - in portal/trunk: component/pc/src/main/java/org/exoplatform/portal/pc and 1 other directory.
by do-not-reply@jboss.org
Author: mstruk
Date: 2010-10-01 10:41:14 -0400 (Fri, 01 Oct 2010)
New Revision: 4461
Modified:
portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java
portal/trunk/pom.xml
Log:
Re-apply: GTNPORTAL-1257: Seam session outlives the GateIn session
Modified: portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java
===================================================================
--- portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java 2010-10-01 13:00:56 UTC (rev 4460)
+++ portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java 2010-10-01 14:41:14 UTC (rev 4461)
@@ -36,6 +36,7 @@
import org.gatein.pc.portlet.aspects.ProducerCacheInterceptor;
import org.gatein.pc.portlet.aspects.RequestAttributeConversationInterceptor;
import org.gatein.pc.portlet.aspects.SecureTransportInterceptor;
+import org.gatein.pc.portlet.aspects.SessionInvalidatorInterceptor;
import org.gatein.pc.portlet.aspects.ValveInterceptor;
import org.gatein.pc.portlet.container.ContainerPortletDispatcher;
import org.gatein.pc.portlet.container.ContainerPortletInvoker;
@@ -96,8 +97,10 @@
bridgepInterceptor.setNext(ccppInterceptor);
ProducerCacheInterceptor producerCacheInterceptor = new ProducerCacheInterceptor();
producerCacheInterceptor.setNext(bridgepInterceptor);
+ SessionInvalidatorInterceptor sessionInvalidatorInterceptor = new SessionInvalidatorInterceptor();
+ sessionInvalidatorInterceptor.setNext(producerCacheInterceptor);
ContextDispatcherInterceptor contextDispatcherInterceptor = new ContextDispatcherInterceptor();
- contextDispatcherInterceptor.setNext(producerCacheInterceptor);
+ contextDispatcherInterceptor.setNext(sessionInvalidatorInterceptor);
SecureTransportInterceptor secureTransportInterceptor = new SecureTransportInterceptor();
secureTransportInterceptor.setNext(contextDispatcherInterceptor);
ValveInterceptor valveInterceptor = new ValveInterceptor();
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2010-10-01 13:00:56 UTC (rev 4460)
+++ portal/trunk/pom.xml 2010-10-01 14:41:14 UTC (rev 4461)
@@ -46,7 +46,7 @@
<nl.captcha.simplecaptcha.version>1.1.1-GA-Patch01</nl.captcha.simplecaptcha.version>
<org.gatein.common.version>2.0.3-GA</org.gatein.common.version>
<org.gatein.wci.version>2.0.2-GA</org.gatein.wci.version>
- <org.gatein.pc.version>2.2.0-Beta03</org.gatein.pc.version>
+ <org.gatein.pc.version>2.2.0-Beta04</org.gatein.pc.version>
<org.picketlink.idm>1.1.5.GA</org.picketlink.idm>
<org.gatein.wsrp.version>2.0.0-Alpha03</org.gatein.wsrp.version>
<org.gatein.mop.version>1.0.3-GA</org.gatein.mop.version>
14 years, 2 months
gatein SVN: r4460 - in components/pc/trunk: api and 12 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-01 09:00:56 -0400 (Fri, 01 Oct 2010)
New Revision: 4460
Modified:
components/pc/trunk/api/pom.xml
components/pc/trunk/bridge/pom.xml
components/pc/trunk/controller/pom.xml
components/pc/trunk/docs/pom.xml
components/pc/trunk/docs/user-guide/pom.xml
components/pc/trunk/federation/pom.xml
components/pc/trunk/jsr168api/pom.xml
components/pc/trunk/management/pom.xml
components/pc/trunk/mc/pom.xml
components/pc/trunk/pom.xml
components/pc/trunk/portal/pom.xml
components/pc/trunk/portlet/pom.xml
components/pc/trunk/samples/pom.xml
components/pc/trunk/test/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: components/pc/trunk/api/pom.xml
===================================================================
--- components/pc/trunk/api/pom.xml 2010-10-01 13:00:21 UTC (rev 4459)
+++ components/pc/trunk/api/pom.xml 2010-10-01 13:00:56 UTC (rev 4460)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.gatein.pc</groupId>
Modified: components/pc/trunk/bridge/pom.xml
===================================================================
--- components/pc/trunk/bridge/pom.xml 2010-10-01 13:00:21 UTC (rev 4459)
+++ components/pc/trunk/bridge/pom.xml 2010-10-01 13:00:56 UTC (rev 4460)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-bridge</artifactId>
Modified: components/pc/trunk/controller/pom.xml
===================================================================
--- components/pc/trunk/controller/pom.xml 2010-10-01 13:00:21 UTC (rev 4459)
+++ components/pc/trunk/controller/pom.xml 2010-10-01 13:00:56 UTC (rev 4460)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-controller</artifactId>
Modified: components/pc/trunk/docs/pom.xml
===================================================================
--- components/pc/trunk/docs/pom.xml 2010-10-01 13:00:21 UTC (rev 4459)
+++ components/pc/trunk/docs/pom.xml 2010-10-01 13:00:56 UTC (rev 4460)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<artifactId>docs-aggregator</artifactId>
<packaging>pom</packaging>
Modified: components/pc/trunk/docs/user-guide/pom.xml
===================================================================
--- components/pc/trunk/docs/user-guide/pom.xml 2010-10-01 13:00:21 UTC (rev 4459)
+++ components/pc/trunk/docs/user-guide/pom.xml 2010-10-01 13:00:56 UTC (rev 4460)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<groupId>org.gatein.pc</groupId>
<artifactId>user-guide-${translation}</artifactId>
Modified: components/pc/trunk/federation/pom.xml
===================================================================
--- components/pc/trunk/federation/pom.xml 2010-10-01 13:00:21 UTC (rev 4459)
+++ components/pc/trunk/federation/pom.xml 2010-10-01 13:00:56 UTC (rev 4460)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-federation</artifactId>
Modified: components/pc/trunk/jsr168api/pom.xml
===================================================================
--- components/pc/trunk/jsr168api/pom.xml 2010-10-01 13:00:21 UTC (rev 4459)
+++ components/pc/trunk/jsr168api/pom.xml 2010-10-01 13:00:56 UTC (rev 4460)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-jsr168api</artifactId>
Modified: components/pc/trunk/management/pom.xml
===================================================================
--- components/pc/trunk/management/pom.xml 2010-10-01 13:00:21 UTC (rev 4459)
+++ components/pc/trunk/management/pom.xml 2010-10-01 13:00:56 UTC (rev 4460)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-management</artifactId>
Modified: components/pc/trunk/mc/pom.xml
===================================================================
--- components/pc/trunk/mc/pom.xml 2010-10-01 13:00:21 UTC (rev 4459)
+++ components/pc/trunk/mc/pom.xml 2010-10-01 13:00:56 UTC (rev 4460)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-mc</artifactId>
Modified: components/pc/trunk/pom.xml
===================================================================
--- components/pc/trunk/pom.xml 2010-10-01 13:00:21 UTC (rev 4459)
+++ components/pc/trunk/pom.xml 2010-10-01 13:00:56 UTC (rev 4460)
@@ -29,7 +29,7 @@
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
@@ -39,9 +39,9 @@
</parent>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/pc/tags/2.2.0-Be...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/pc/tags/2.2.0-Beta04</developerConnection>
- <url>http://fisheye.jboss.org/browse/gatein/components/pc/tags/2.2.0-Beta04</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/pc/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/pc/trunk/</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/pc/trunk/</url>
</scm>
<properties>
Modified: components/pc/trunk/portal/pom.xml
===================================================================
--- components/pc/trunk/portal/pom.xml 2010-10-01 13:00:21 UTC (rev 4459)
+++ components/pc/trunk/portal/pom.xml 2010-10-01 13:00:56 UTC (rev 4460)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-portal</artifactId>
Modified: components/pc/trunk/portlet/pom.xml
===================================================================
--- components/pc/trunk/portlet/pom.xml 2010-10-01 13:00:21 UTC (rev 4459)
+++ components/pc/trunk/portlet/pom.xml 2010-10-01 13:00:56 UTC (rev 4460)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-portlet</artifactId>
Modified: components/pc/trunk/samples/pom.xml
===================================================================
--- components/pc/trunk/samples/pom.xml 2010-10-01 13:00:21 UTC (rev 4459)
+++ components/pc/trunk/samples/pom.xml 2010-10-01 13:00:56 UTC (rev 4460)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-samples</artifactId>
Modified: components/pc/trunk/test/pom.xml
===================================================================
--- components/pc/trunk/test/pom.xml 2010-10-01 13:00:21 UTC (rev 4459)
+++ components/pc/trunk/test/pom.xml 2010-10-01 13:00:56 UTC (rev 4460)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04</version>
+ <version>2.2.0-Beta05-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test</artifactId>
14 years, 2 months
gatein SVN: r4459 - components/pc/tags.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-01 09:00:21 -0400 (Fri, 01 Oct 2010)
New Revision: 4459
Added:
components/pc/tags/2.2.0-Beta04/
Log:
[maven-scm] copy for tag 2.2.0-Beta04
Copied: components/pc/tags/2.2.0-Beta04 (from rev 4458, components/pc/trunk)
14 years, 2 months
gatein SVN: r4458 - in components/pc/trunk: api and 12 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-10-01 08:59:55 -0400 (Fri, 01 Oct 2010)
New Revision: 4458
Modified:
components/pc/trunk/api/pom.xml
components/pc/trunk/bridge/pom.xml
components/pc/trunk/controller/pom.xml
components/pc/trunk/docs/pom.xml
components/pc/trunk/docs/user-guide/pom.xml
components/pc/trunk/federation/pom.xml
components/pc/trunk/jsr168api/pom.xml
components/pc/trunk/management/pom.xml
components/pc/trunk/mc/pom.xml
components/pc/trunk/pom.xml
components/pc/trunk/portal/pom.xml
components/pc/trunk/portlet/pom.xml
components/pc/trunk/samples/pom.xml
components/pc/trunk/test/pom.xml
Log:
[maven-release-plugin] prepare release 2.2.0-Beta04
Modified: components/pc/trunk/api/pom.xml
===================================================================
--- components/pc/trunk/api/pom.xml 2010-10-01 12:31:42 UTC (rev 4457)
+++ components/pc/trunk/api/pom.xml 2010-10-01 12:59:55 UTC (rev 4458)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04-SNAPSHOT</version>
+ <version>2.2.0-Beta04</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.gatein.pc</groupId>
Modified: components/pc/trunk/bridge/pom.xml
===================================================================
--- components/pc/trunk/bridge/pom.xml 2010-10-01 12:31:42 UTC (rev 4457)
+++ components/pc/trunk/bridge/pom.xml 2010-10-01 12:59:55 UTC (rev 4458)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04-SNAPSHOT</version>
+ <version>2.2.0-Beta04</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-bridge</artifactId>
Modified: components/pc/trunk/controller/pom.xml
===================================================================
--- components/pc/trunk/controller/pom.xml 2010-10-01 12:31:42 UTC (rev 4457)
+++ components/pc/trunk/controller/pom.xml 2010-10-01 12:59:55 UTC (rev 4458)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04-SNAPSHOT</version>
+ <version>2.2.0-Beta04</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-controller</artifactId>
Modified: components/pc/trunk/docs/pom.xml
===================================================================
--- components/pc/trunk/docs/pom.xml 2010-10-01 12:31:42 UTC (rev 4457)
+++ components/pc/trunk/docs/pom.xml 2010-10-01 12:59:55 UTC (rev 4458)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04-SNAPSHOT</version>
+ <version>2.2.0-Beta04</version>
</parent>
<artifactId>docs-aggregator</artifactId>
<packaging>pom</packaging>
Modified: components/pc/trunk/docs/user-guide/pom.xml
===================================================================
--- components/pc/trunk/docs/user-guide/pom.xml 2010-10-01 12:31:42 UTC (rev 4457)
+++ components/pc/trunk/docs/user-guide/pom.xml 2010-10-01 12:59:55 UTC (rev 4458)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04-SNAPSHOT</version>
+ <version>2.2.0-Beta04</version>
</parent>
<groupId>org.gatein.pc</groupId>
<artifactId>user-guide-${translation}</artifactId>
Modified: components/pc/trunk/federation/pom.xml
===================================================================
--- components/pc/trunk/federation/pom.xml 2010-10-01 12:31:42 UTC (rev 4457)
+++ components/pc/trunk/federation/pom.xml 2010-10-01 12:59:55 UTC (rev 4458)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04-SNAPSHOT</version>
+ <version>2.2.0-Beta04</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-federation</artifactId>
Modified: components/pc/trunk/jsr168api/pom.xml
===================================================================
--- components/pc/trunk/jsr168api/pom.xml 2010-10-01 12:31:42 UTC (rev 4457)
+++ components/pc/trunk/jsr168api/pom.xml 2010-10-01 12:59:55 UTC (rev 4458)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04-SNAPSHOT</version>
+ <version>2.2.0-Beta04</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-jsr168api</artifactId>
Modified: components/pc/trunk/management/pom.xml
===================================================================
--- components/pc/trunk/management/pom.xml 2010-10-01 12:31:42 UTC (rev 4457)
+++ components/pc/trunk/management/pom.xml 2010-10-01 12:59:55 UTC (rev 4458)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04-SNAPSHOT</version>
+ <version>2.2.0-Beta04</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-management</artifactId>
Modified: components/pc/trunk/mc/pom.xml
===================================================================
--- components/pc/trunk/mc/pom.xml 2010-10-01 12:31:42 UTC (rev 4457)
+++ components/pc/trunk/mc/pom.xml 2010-10-01 12:59:55 UTC (rev 4458)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04-SNAPSHOT</version>
+ <version>2.2.0-Beta04</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-mc</artifactId>
Modified: components/pc/trunk/pom.xml
===================================================================
--- components/pc/trunk/pom.xml 2010-10-01 12:31:42 UTC (rev 4457)
+++ components/pc/trunk/pom.xml 2010-10-01 12:59:55 UTC (rev 4458)
@@ -29,7 +29,7 @@
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04-SNAPSHOT</version>
+ <version>2.2.0-Beta04</version>
<packaging>pom</packaging>
<parent>
@@ -39,9 +39,9 @@
</parent>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/pc/trunk/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/pc/trunk/</developerConnection>
- <url>http://fisheye.jboss.org/browse/gatein/components/pc/trunk/</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/pc/tags/2.2.0-Be...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/pc/tags/2.2.0-Beta04</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/pc/tags/2.2.0-Beta04</url>
</scm>
<properties>
Modified: components/pc/trunk/portal/pom.xml
===================================================================
--- components/pc/trunk/portal/pom.xml 2010-10-01 12:31:42 UTC (rev 4457)
+++ components/pc/trunk/portal/pom.xml 2010-10-01 12:59:55 UTC (rev 4458)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04-SNAPSHOT</version>
+ <version>2.2.0-Beta04</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-portal</artifactId>
Modified: components/pc/trunk/portlet/pom.xml
===================================================================
--- components/pc/trunk/portlet/pom.xml 2010-10-01 12:31:42 UTC (rev 4457)
+++ components/pc/trunk/portlet/pom.xml 2010-10-01 12:59:55 UTC (rev 4458)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04-SNAPSHOT</version>
+ <version>2.2.0-Beta04</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-portlet</artifactId>
Modified: components/pc/trunk/samples/pom.xml
===================================================================
--- components/pc/trunk/samples/pom.xml 2010-10-01 12:31:42 UTC (rev 4457)
+++ components/pc/trunk/samples/pom.xml 2010-10-01 12:59:55 UTC (rev 4458)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04-SNAPSHOT</version>
+ <version>2.2.0-Beta04</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-samples</artifactId>
Modified: components/pc/trunk/test/pom.xml
===================================================================
--- components/pc/trunk/test/pom.xml 2010-10-01 12:31:42 UTC (rev 4457)
+++ components/pc/trunk/test/pom.xml 2010-10-01 12:59:55 UTC (rev 4458)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.2.0-Beta04-SNAPSHOT</version>
+ <version>2.2.0-Beta04</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test</artifactId>
14 years, 2 months
gatein SVN: r4457 - in components/wsrp/trunk: consumer/src/main/java/org/gatein/wsrp/consumer/registry and 1 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-01 08:31:42 -0400 (Fri, 01 Oct 2010)
New Revision: 4457
Modified:
components/wsrp/trunk/admin-gui/src/test/java/org/gatein/wsrp/other/ConsumerBeanTestCase.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/InMemoryConsumerRegistry.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java
Log:
- GTNWSRP-83: Minor test improvements.
Modified: components/wsrp/trunk/admin-gui/src/test/java/org/gatein/wsrp/other/ConsumerBeanTestCase.java
===================================================================
--- components/wsrp/trunk/admin-gui/src/test/java/org/gatein/wsrp/other/ConsumerBeanTestCase.java 2010-10-01 09:50:50 UTC (rev 4456)
+++ components/wsrp/trunk/admin-gui/src/test/java/org/gatein/wsrp/other/ConsumerBeanTestCase.java 2010-10-01 12:31:42 UTC (rev 4457)
@@ -30,15 +30,15 @@
import org.gatein.wsrp.admin.ui.ConsumerBean;
import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
import org.gatein.wsrp.consumer.registry.InMemoryConsumerRegistry;
+import org.gatein.wsrp.services.SOAPServiceFactory;
import org.gatein.wsrp.test.protocol.v2.BehaviorBackedServiceFactory;
import org.gatein.wsrp.test.support.MockEndpointConfigurationInfo;
+import javax.faces.model.DataModel;
import java.util.Locale;
import java.util.Map;
/**
- * TODO: re-activate tests once test-support module is updated.
- *
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision: 12612 $
* @since 2.6
@@ -66,7 +66,10 @@
public void testInitialState()
{
assertEquals(CONSUMER_ID, bean.getId());
+ assertEquals(bean.getProducerInfo().getId(), bean.getId());
+
assertEquals(WSDL, bean.getWsdl());
+ assertEquals(SOAPServiceFactory.DEFAULT_TIMEOUT_MS, bean.getTimeout().intValue());
assertFalse(bean.isModified());
assertTrue(bean.isRefreshNeeded());
@@ -79,6 +82,12 @@
assertFalse(bean.isRegistrationLocallyModified());
assertFalse(bean.isRegistrationPropertiesExisting());
+ assertNull(bean.getCurrentExport());
+
+ DataModel existingExports = bean.getExistingExports();
+ assertNotNull(existingExports);
+ assertEquals(0, existingExports.getRowCount());
+
try
{
assertFalse(bean.isRegistrationRequired());
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/InMemoryConsumerRegistry.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/InMemoryConsumerRegistry.java 2010-10-01 09:50:50 UTC (rev 4456)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/InMemoryConsumerRegistry.java 2010-10-01 12:31:42 UTC (rev 4457)
@@ -1,28 +1,30 @@
/*
-* JBoss, a division of Red Hat
-* Copyright 2008, 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.
-*/
+ * JBoss, a division of Red Hat
+ * Copyright 2010, 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.gatein.wsrp.consumer.registry;
import org.gatein.wsrp.consumer.ProducerInfo;
+import org.gatein.wsrp.consumer.migration.InMemoryMigrationService;
import java.util.Iterator;
import java.util.UUID;
@@ -33,6 +35,11 @@
*/
public class InMemoryConsumerRegistry extends AbstractConsumerRegistry
{
+ public InMemoryConsumerRegistry()
+ {
+ setMigrationService(new InMemoryMigrationService());
+ }
+
@Override
protected void save(ProducerInfo info, String messageOnError)
{
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java 2010-10-01 09:50:50 UTC (rev 4456)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java 2010-10-01 12:31:42 UTC (rev 4457)
@@ -67,7 +67,7 @@
private boolean initialized = false;
private String wsdl = DEFAULT_WSDL_URL;
public static final String DEFAULT_WSDL_URL = "http://example.com/producer?wsdl";
- private int timeout;
+ private int timeout = DEFAULT_TIMEOUT_MS;
public BehaviorBackedServiceFactory()
14 years, 2 months
gatein SVN: r4456 - in components/wci/branches/adf: test/core/src/main/java/org/gatein/wci/authentication and 7 other directories.
by do-not-reply@jboss.org
Author: alain_defrance
Date: 2010-10-01 05:50:50 -0400 (Fri, 01 Oct 2010)
New Revision: 4456
Removed:
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationListenerSupport.java
Modified:
components/wci/branches/adf/jetty/src/main/java/org/gatein/wci/jetty/Jetty6ServletContainerContext.java
components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/authentication/AuthenticationTestCase.java
components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/container/ServletContainerContextImpl.java
components/wci/branches/adf/tomcat6/src/main/java/org/gatein/wci/tomcat/TC6ServletContainerContext.java
components/wci/branches/adf/tomcat7/src/main/java/org/gatein/wci/tomcat/TC7ServletContainerContext.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/ServletContainer.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainer.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java
Log:
authentication events refactoring
Modified: components/wci/branches/adf/jetty/src/main/java/org/gatein/wci/jetty/Jetty6ServletContainerContext.java
===================================================================
--- components/wci/branches/adf/jetty/src/main/java/org/gatein/wci/jetty/Jetty6ServletContainerContext.java 2010-10-01 08:44:53 UTC (rev 4455)
+++ components/wci/branches/adf/jetty/src/main/java/org/gatein/wci/jetty/Jetty6ServletContainerContext.java 2010-10-01 09:50:50 UTC (rev 4456)
@@ -10,8 +10,6 @@
import javax.servlet.http.HttpServletResponse;
import org.gatein.wci.RequestDispatchCallback;
-import org.gatein.wci.authentication.AuthenticationEvent;
-import org.gatein.wci.authentication.AuthenticationListenerSupport;
import org.gatein.wci.authentication.AuthenticationResult;
import org.gatein.wci.authentication.GenericAuthentication;
import org.gatein.wci.command.CommandDispatcher;
@@ -33,7 +31,6 @@
private Container container;
private Server server;
private ContextHandlerCollection chc;
- private AuthenticationListenerSupport listenerSupport = new AuthenticationListenerSupport();
/** The monitored contexts. */
private final Set<String> monitoredContexts = new HashSet<String>();
@@ -65,29 +62,15 @@
this.registration = null;
}
- public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password) {
- AuthenticationResult result = GenericAuthentication.getInstance().login(userName, password, request, response);
+ public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password) {
+ return GenericAuthentication.getInstance().login(userName, password, request, response);
+ }
- //
- listenerSupport.fireEvent(
- AuthenticationListenerSupport.EventType.LOGIN,
- new AuthenticationEvent(AuthenticationListenerSupport.EventType.LOGIN, request, response, userName, password
- ));
+ public void logout(HttpServletRequest request, HttpServletResponse response) {
+ GenericAuthentication.getInstance().logout(request, response);
+ }
- return result;
- }
- public void logout(HttpServletRequest request, HttpServletResponse response) {
- GenericAuthentication.getInstance().logout(request, response);
-
- //
- listenerSupport.fireEvent(
- AuthenticationListenerSupport.EventType.LOGOUT,
- new AuthenticationEvent(AuthenticationListenerSupport.EventType.LOGOUT, request, response
- ));
- }
-
-
public void start()
{
DefaultServletContainerFactory.registerContext(this);
Modified: components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/authentication/AuthenticationTestCase.java
===================================================================
--- components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/authentication/AuthenticationTestCase.java 2010-10-01 08:44:53 UTC (rev 4455)
+++ components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/authentication/AuthenticationTestCase.java 2010-10-01 09:50:50 UTC (rev 4456)
@@ -21,6 +21,9 @@
import org.jboss.unit.api.pojo.annotations.Test;
+import static org.jboss.unit.api.Assert.*;
+
+
/**
* @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
* @version $Revision$
@@ -32,6 +35,11 @@
TicketService tService = GenericAuthentication.TICKET_SERVICE;
WCICredentials credentials = new WCICredentials("foo", "bar");
String strTicket = tService.createTicket(credentials);
+ WCICredentials credentialsFromTs = tService.validateToken(strTicket, false);
+ assertEquals(credentials.getUsername(), credentialsFromTs.getUsername());
+ assertEquals(credentials.getPassword(), credentialsFromTs.getPassword());
+ assertNotNull(tService.validateToken(strTicket, true));
+ assertNull(tService.validateToken(strTicket, true));
}
Modified: components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/container/ServletContainerContextImpl.java
===================================================================
--- components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/container/ServletContainerContextImpl.java 2010-10-01 08:44:53 UTC (rev 4455)
+++ components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/container/ServletContainerContextImpl.java 2010-10-01 09:50:50 UTC (rev 4456)
@@ -22,10 +22,7 @@
******************************************************************************/
package org.gatein.wci.container;
-import org.gatein.wci.authentication.AuthenticationEvent;
-import org.gatein.wci.authentication.AuthenticationListenerSupport;
import org.gatein.wci.authentication.AuthenticationResult;
-import org.gatein.wci.authentication.GenericAuthentication;
import org.gatein.wci.spi.ServletContainerContext;
import org.gatein.wci.RequestDispatchCallback;
Modified: components/wci/branches/adf/tomcat6/src/main/java/org/gatein/wci/tomcat/TC6ServletContainerContext.java
===================================================================
--- components/wci/branches/adf/tomcat6/src/main/java/org/gatein/wci/tomcat/TC6ServletContainerContext.java 2010-10-01 08:44:53 UTC (rev 4455)
+++ components/wci/branches/adf/tomcat6/src/main/java/org/gatein/wci/tomcat/TC6ServletContainerContext.java 2010-10-01 09:50:50 UTC (rev 4456)
@@ -34,8 +34,6 @@
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.wci.RequestDispatchCallback;
-import org.gatein.wci.authentication.AuthenticationEvent;
-import org.gatein.wci.authentication.AuthenticationListenerSupport;
import org.gatein.wci.authentication.AuthenticationResult;
import org.gatein.wci.authentication.GenericAuthentication;
import org.gatein.wci.command.CommandDispatcher;
@@ -76,9 +74,6 @@
/** . */
private Registration registration;
- /** . */
- private AuthenticationListenerSupport listenerSupport = new AuthenticationListenerSupport();
-
public TC6ServletContainerContext(Engine engine)
{
this.engine = engine;
@@ -106,26 +101,12 @@
public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password)
{
- AuthenticationResult result = GenericAuthentication.getInstance().login(userName, password, request, response);
-
- //
- listenerSupport.fireEvent(
- AuthenticationListenerSupport.EventType.LOGIN,
- new AuthenticationEvent(AuthenticationListenerSupport.EventType.LOGIN, request, response, userName, password
- ));
-
- return result;
+ return GenericAuthentication.getInstance().login(userName, password, request, response);
}
public void logout(HttpServletRequest request, HttpServletResponse response)
{
GenericAuthentication.getInstance().logout(request, response);
-
- //
- listenerSupport.fireEvent(
- AuthenticationListenerSupport.EventType.LOGOUT,
- new AuthenticationEvent(AuthenticationListenerSupport.EventType.LOGOUT, request, response
- ));
}
public synchronized void containerEvent(ContainerEvent event)
Modified: components/wci/branches/adf/tomcat7/src/main/java/org/gatein/wci/tomcat/TC7ServletContainerContext.java
===================================================================
--- components/wci/branches/adf/tomcat7/src/main/java/org/gatein/wci/tomcat/TC7ServletContainerContext.java 2010-10-01 08:44:53 UTC (rev 4455)
+++ components/wci/branches/adf/tomcat7/src/main/java/org/gatein/wci/tomcat/TC7ServletContainerContext.java 2010-10-01 09:50:50 UTC (rev 4456)
@@ -36,8 +36,6 @@
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.wci.RequestDispatchCallback;
-import org.gatein.wci.authentication.AuthenticationEvent;
-import org.gatein.wci.authentication.AuthenticationListenerSupport;
import org.gatein.wci.authentication.AuthenticationResult;
import org.gatein.wci.authentication.ProgrammaticAuthenticationResult;
import org.gatein.wci.command.CommandDispatcher;
@@ -77,9 +75,6 @@
/** . */
private Registration registration;
- /** . */
- private AuthenticationListenerSupport listenerSupport = new AuthenticationListenerSupport();
-
public TC7ServletContainerContext(Engine engine)
{
this.engine = engine;
@@ -110,12 +105,6 @@
try
{
request.login(userName, password);
-
- //
- listenerSupport.fireEvent(
- AuthenticationListenerSupport.EventType.LOGIN,
- new AuthenticationEvent(AuthenticationListenerSupport.EventType.LOGIN, request, response, userName, password
- ));
}
catch (ServletException e)
{
@@ -129,12 +118,6 @@
try
{
request.logout();
-
- //
- listenerSupport.fireEvent(
- AuthenticationListenerSupport.EventType.LOGOUT,
- new AuthenticationEvent(AuthenticationListenerSupport.EventType.LOGOUT, request, response
- ));
}
catch (ServletException e)
{
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/ServletContainer.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/ServletContainer.java 2010-10-01 08:44:53 UTC (rev 4455)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/ServletContainer.java 2010-10-01 09:50:50 UTC (rev 4456)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.gatein.wci;
+import org.gatein.wci.authentication.AuthenticationListener;
import org.gatein.wci.authentication.AuthenticationResult;
import org.gatein.wci.spi.ServletContainerContext;
@@ -110,4 +111,18 @@
* @param response the response valid in the current servlet context
*/
void logout(HttpServletRequest request, HttpServletResponse response);
+
+ /**
+ * Add the authentication listener.
+ *
+ * @param listener AuthenticationListener to add
+ */
+ void addAuthenticationListener(AuthenticationListener listener);
+
+ /**
+ * Remove the authentication listener.
+ *
+ * @param listener AuthenticationListener to remove
+ */
+ void removeAuthenticationlistener(AuthenticationListener listener);
}
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java 2010-10-01 08:44:53 UTC (rev 4455)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java 2010-10-01 09:50:50 UTC (rev 4456)
@@ -28,17 +28,12 @@
*/
public class AuthenticationEvent
{
- private AuthenticationListenerSupport.EventType eventType;
private HttpServletRequest request;
private HttpServletResponse response;
private String username;
private String password;
- public AuthenticationEvent(AuthenticationListenerSupport.EventType eventType, HttpServletRequest request, HttpServletResponse response) {
-
- if (eventType == null) {
- throw new IllegalArgumentException("eventType is null");
- }
+ public AuthenticationEvent(HttpServletRequest request, HttpServletResponse response) {
if (request == null) {
throw new IllegalArgumentException("request is null");
@@ -48,13 +43,12 @@
throw new IllegalArgumentException("response is null");
}
- this.eventType = eventType;
this.request = request;
this.response = response;
}
- public AuthenticationEvent(AuthenticationListenerSupport.EventType eventType, HttpServletRequest request, HttpServletResponse response, String username, String password) {
- this(eventType, request, response);
+ public AuthenticationEvent(HttpServletRequest request, HttpServletResponse response, String username, String password) {
+ this(request, response);
if (username == null) {
throw new IllegalArgumentException("username is null");
@@ -68,10 +62,6 @@
this.password = password;
}
- public AuthenticationListenerSupport.EventType getEventType() {
- return eventType;
- }
-
public HttpServletRequest getRequest() {
return request;
}
Deleted: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationListenerSupport.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationListenerSupport.java 2010-10-01 08:44:53 UTC (rev 4455)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationListenerSupport.java 2010-10-01 09:50:50 UTC (rev 4456)
@@ -1,68 +0,0 @@
-/*
-* Copyright (C) 2003-2009 eXo Platform SAS.
-*
-* 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.gatein.wci.authentication;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
- * @version $Revision$
- */
-public class AuthenticationListenerSupport
-{
- public enum EventType
- {
- LOGIN, LOGOUT
- }
-
- private List<AuthenticationListener> authenticationListeners = new ArrayList<AuthenticationListener>();
-
- public void addAuthenticationListener(AuthenticationListener listener)
- {
- authenticationListeners.add(listener);
- }
-
- protected List<AuthenticationListener> getAuthenticationListeners()
- {
- return authenticationListeners;
- }
-
- public void fireEvent(EventType type, AuthenticationEvent ae)
- {
- String methodName = String.format(
- "on%1%2",
- type.toString().substring(0, 1).toUpperCase(),
- type.toString().substring(1)
- );
- for (AuthenticationListener currentListener : authenticationListeners)
- {
- try
- {
- currentListener.getClass().getMethod(methodName, AuthenticationEvent.class).invoke(currentListener, ae);
- }
- catch (Exception ignore)
- {
- }
- }
- }
-}
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainer.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainer.java 2010-10-01 08:44:53 UTC (rev 4455)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainer.java 2010-10-01 09:50:50 UTC (rev 4456)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.gatein.wci.impl;
+import org.gatein.wci.authentication.AuthenticationEvent;
+import org.gatein.wci.authentication.AuthenticationListener;
import org.gatein.wci.authentication.AuthenticationResult;
import org.gatein.wci.spi.ServletContainerContext;
import org.gatein.wci.spi.WebAppContext;
@@ -59,9 +61,12 @@
/** . */
private final Object lock = new Object();
- /** The event listeners. */
- private final ArrayList<WebAppListener> listeners = new ArrayList<WebAppListener>();
+ /** The event webapp listeners. */
+ private final ArrayList<WebAppListener> webAppListeners = new ArrayList<WebAppListener>();
+ /** The event authentication Listeners. */
+ private final ArrayList<AuthenticationListener> authenticationListeners = new ArrayList<AuthenticationListener>();
+
/** The web applications. */
private final Map<String, WebAppImpl> webAppMap = new HashMap<String, WebAppImpl>();
@@ -92,14 +97,38 @@
/** . */
public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password)
{
- return registration.context.login(request, response, userName, password);
+ AuthenticationResult result = registration.context.login(request, response, userName, password);
+
+ //
+ fireEvent(EventType.LOGIN, new AuthenticationEvent(request, response, userName, password));
+
+ return result;
}
public void logout(HttpServletRequest request, HttpServletResponse response) {
registration.context.logout(request, response);
+
+ //
+ fireEvent(EventType.LOGOUT, new AuthenticationEvent(request, response));
}
- public WebExecutor getExecutor(HttpServletRequest request, HttpServletResponse response)
+ public void addAuthenticationListener(AuthenticationListener listener) {
+ if (listener == null) {
+ throw new IllegalArgumentException("listener is null");
+ }
+
+ authenticationListeners.add(listener);
+ }
+
+ public void removeAuthenticationlistener(AuthenticationListener listener) {
+ if (listener == null) {
+ throw new IllegalArgumentException("listener is null");
+ }
+
+ authenticationListeners.remove(listener);
+ }
+
+ public WebExecutor getExecutor(HttpServletRequest request, HttpServletResponse response)
{
throw new NotYetImplemented();
}
@@ -112,11 +141,11 @@
{
throw new IllegalArgumentException();
}
- if (listeners.contains(listener))
+ if (webAppListeners.contains(listener))
{
return false;
}
- listeners.add(listener);
+ webAppListeners.add(listener);
for (Object response : webAppMap.values())
{
WebApp webApp = (WebApp)response;
@@ -135,7 +164,7 @@
{
throw new IllegalArgumentException();
}
- if (listeners.remove(listener))
+ if (webAppListeners.remove(listener))
{
for (WebApp webApp : webAppMap.values())
{
@@ -172,12 +201,31 @@
private void fireEvent(WebAppEvent event)
{
- for (WebAppListener listener : listeners)
+ for (WebAppListener listener : webAppListeners)
{
safeFireEvent(listener, event);
}
}
+ public void fireEvent(EventType type, AuthenticationEvent ae)
+ {
+ String methodName = String.format(
+ "on%1%2",
+ type.toString().substring(0, 1).toUpperCase(),
+ type.toString().substring(1)
+ );
+ for (AuthenticationListener currentListener : authenticationListeners)
+ {
+ try
+ {
+ currentListener.getClass().getMethod(methodName, AuthenticationEvent.class).invoke(currentListener, ae);
+ }
+ catch (Exception ignore)
+ {
+ }
+ }
+ }
+
/**
* Generic detyped request dispatch to a servlet context using the include mechanism.
*
@@ -209,6 +257,10 @@
return registration.context.include(targetServletContext, request, response, callback, handback);
}
+ public enum EventType {
+ LOGIN, LOGOUT
+ }
+
private static class RegistrationImpl implements ServletContainerContext.Registration
{
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java 2010-10-01 08:44:53 UTC (rev 4455)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java 2010-10-01 09:50:50 UTC (rev 4456)
@@ -23,8 +23,6 @@
package org.gatein.wci.impl.generic;
import org.gatein.wci.RequestDispatchCallback;
-import org.gatein.wci.authentication.AuthenticationEvent;
-import org.gatein.wci.authentication.AuthenticationListenerSupport;
import org.gatein.wci.authentication.AuthenticationResult;
import org.gatein.wci.authentication.GenericAuthentication;
import org.gatein.wci.impl.DefaultServletContainerFactory;
@@ -56,9 +54,6 @@
private static GenericServletContainerContext instance;
private static HashMap<ServletContext, String> requestDispatchMap = new HashMap<ServletContext, String>();
-
- /** . */
- private AuthenticationListenerSupport listenerSupport = new AuthenticationListenerSupport();
public static GenericServletContainerContext getInstance()
{
@@ -137,26 +132,12 @@
public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password)
{
- AuthenticationResult result = GenericAuthentication.getInstance().login(userName, password, request, response);
-
- //
- listenerSupport.fireEvent(
- AuthenticationListenerSupport.EventType.LOGIN,
- new AuthenticationEvent(AuthenticationListenerSupport.EventType.LOGIN, request, response, userName, password
- ));
-
- return result;
+ return GenericAuthentication.getInstance().login(userName, password, request, response);
}
public void logout(HttpServletRequest request, HttpServletResponse response)
{
GenericAuthentication.getInstance().logout(request, response);
-
- //
- listenerSupport.fireEvent(
- AuthenticationListenerSupport.EventType.LOGOUT,
- new AuthenticationEvent(AuthenticationListenerSupport.EventType.LOGOUT, request, response
- ));
}
//
14 years, 2 months
gatein SVN: r4455 - in components/wci/branches/adf: test/core/src/main/java/org/gatein/wci and 6 other directories.
by do-not-reply@jboss.org
Author: alain_defrance
Date: 2010-10-01 04:44:53 -0400 (Fri, 01 Oct 2010)
New Revision: 4455
Added:
components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/authentication/
components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/authentication/AuthenticationTestCase.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationListenerSupport.java
Removed:
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AbstractAuthentication.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Authentication.java
Modified:
components/wci/branches/adf/jetty/src/main/java/org/gatein/wci/jetty/Jetty6ServletContainerContext.java
components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/container/ServletContainerContextImpl.java
components/wci/branches/adf/tomcat6/src/main/java/org/gatein/wci/tomcat/TC6ServletContainerContext.java
components/wci/branches/adf/tomcat7/src/main/java/org/gatein/wci/tomcat/TC7ServletContainerContext.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationResult.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthentication.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthenticationResult.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/ProgrammaticAuthenticationResult.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Ticket.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java
Log:
event & tests in progress
Modified: components/wci/branches/adf/jetty/src/main/java/org/gatein/wci/jetty/Jetty6ServletContainerContext.java
===================================================================
--- components/wci/branches/adf/jetty/src/main/java/org/gatein/wci/jetty/Jetty6ServletContainerContext.java 2010-10-01 08:42:51 UTC (rev 4454)
+++ components/wci/branches/adf/jetty/src/main/java/org/gatein/wci/jetty/Jetty6ServletContainerContext.java 2010-10-01 08:44:53 UTC (rev 4455)
@@ -10,6 +10,8 @@
import javax.servlet.http.HttpServletResponse;
import org.gatein.wci.RequestDispatchCallback;
+import org.gatein.wci.authentication.AuthenticationEvent;
+import org.gatein.wci.authentication.AuthenticationListenerSupport;
import org.gatein.wci.authentication.AuthenticationResult;
import org.gatein.wci.authentication.GenericAuthentication;
import org.gatein.wci.command.CommandDispatcher;
@@ -31,6 +33,7 @@
private Container container;
private Server server;
private ContextHandlerCollection chc;
+ private AuthenticationListenerSupport listenerSupport = new AuthenticationListenerSupport();
/** The monitored contexts. */
private final Set<String> monitoredContexts = new HashSet<String>();
@@ -63,11 +66,25 @@
}
public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password) {
- return GenericAuthentication.getInstance().login(userName, password.toCharArray());
+ AuthenticationResult result = GenericAuthentication.getInstance().login(userName, password, request, response);
+
+ //
+ listenerSupport.fireEvent(
+ AuthenticationListenerSupport.EventType.LOGIN,
+ new AuthenticationEvent(AuthenticationListenerSupport.EventType.LOGIN, request, response, userName, password
+ ));
+
+ return result;
}
public void logout(HttpServletRequest request, HttpServletResponse response) {
GenericAuthentication.getInstance().logout(request, response);
+
+ //
+ listenerSupport.fireEvent(
+ AuthenticationListenerSupport.EventType.LOGOUT,
+ new AuthenticationEvent(AuthenticationListenerSupport.EventType.LOGOUT, request, response
+ ));
}
Added: components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/authentication/AuthenticationTestCase.java
===================================================================
--- components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/authentication/AuthenticationTestCase.java (rev 0)
+++ components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/authentication/AuthenticationTestCase.java 2010-10-01 08:44:53 UTC (rev 4455)
@@ -0,0 +1,38 @@
+/*
+* Copyright (C) 2003-2009 eXo Platform SAS.
+*
+* 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.gatein.wci.authentication;
+
+import org.jboss.unit.api.pojo.annotations.Test;
+
+/**
+ * @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
+ * @version $Revision$
+ */
+@Test
+public class AuthenticationTestCase {
+ @Test
+ void testTicket() {
+ TicketService tService = GenericAuthentication.TICKET_SERVICE;
+ WCICredentials credentials = new WCICredentials("foo", "bar");
+ String strTicket = tService.createTicket(credentials);
+ }
+
+
+}
Modified: components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/container/ServletContainerContextImpl.java
===================================================================
--- components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/container/ServletContainerContextImpl.java 2010-10-01 08:42:51 UTC (rev 4454)
+++ components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/container/ServletContainerContextImpl.java 2010-10-01 08:44:53 UTC (rev 4455)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.gatein.wci.container;
+import org.gatein.wci.authentication.AuthenticationEvent;
+import org.gatein.wci.authentication.AuthenticationListenerSupport;
import org.gatein.wci.authentication.AuthenticationResult;
import org.gatein.wci.authentication.GenericAuthentication;
import org.gatein.wci.spi.ServletContainerContext;
@@ -64,11 +66,11 @@
public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password)
{
- return GenericAuthentication.getInstance().login(userName, password.toCharArray());
+ throw new UnsupportedOperationException();
}
public void logout(HttpServletRequest request, HttpServletResponse response)
{
- GenericAuthentication.getInstance().logout(request, response);
+ throw new UnsupportedOperationException();
}
}
Modified: components/wci/branches/adf/tomcat6/src/main/java/org/gatein/wci/tomcat/TC6ServletContainerContext.java
===================================================================
--- components/wci/branches/adf/tomcat6/src/main/java/org/gatein/wci/tomcat/TC6ServletContainerContext.java 2010-10-01 08:42:51 UTC (rev 4454)
+++ components/wci/branches/adf/tomcat6/src/main/java/org/gatein/wci/tomcat/TC6ServletContainerContext.java 2010-10-01 08:44:53 UTC (rev 4455)
@@ -34,6 +34,8 @@
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.wci.RequestDispatchCallback;
+import org.gatein.wci.authentication.AuthenticationEvent;
+import org.gatein.wci.authentication.AuthenticationListenerSupport;
import org.gatein.wci.authentication.AuthenticationResult;
import org.gatein.wci.authentication.GenericAuthentication;
import org.gatein.wci.command.CommandDispatcher;
@@ -74,6 +76,9 @@
/** . */
private Registration registration;
+ /** . */
+ private AuthenticationListenerSupport listenerSupport = new AuthenticationListenerSupport();
+
public TC6ServletContainerContext(Engine engine)
{
this.engine = engine;
@@ -101,12 +106,26 @@
public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password)
{
- return GenericAuthentication.getInstance().login(userName, password.toCharArray());
+ AuthenticationResult result = GenericAuthentication.getInstance().login(userName, password, request, response);
+
+ //
+ listenerSupport.fireEvent(
+ AuthenticationListenerSupport.EventType.LOGIN,
+ new AuthenticationEvent(AuthenticationListenerSupport.EventType.LOGIN, request, response, userName, password
+ ));
+
+ return result;
}
public void logout(HttpServletRequest request, HttpServletResponse response)
{
GenericAuthentication.getInstance().logout(request, response);
+
+ //
+ listenerSupport.fireEvent(
+ AuthenticationListenerSupport.EventType.LOGOUT,
+ new AuthenticationEvent(AuthenticationListenerSupport.EventType.LOGOUT, request, response
+ ));
}
public synchronized void containerEvent(ContainerEvent event)
Modified: components/wci/branches/adf/tomcat7/src/main/java/org/gatein/wci/tomcat/TC7ServletContainerContext.java
===================================================================
--- components/wci/branches/adf/tomcat7/src/main/java/org/gatein/wci/tomcat/TC7ServletContainerContext.java 2010-10-01 08:42:51 UTC (rev 4454)
+++ components/wci/branches/adf/tomcat7/src/main/java/org/gatein/wci/tomcat/TC7ServletContainerContext.java 2010-10-01 08:44:53 UTC (rev 4455)
@@ -36,6 +36,8 @@
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.wci.RequestDispatchCallback;
+import org.gatein.wci.authentication.AuthenticationEvent;
+import org.gatein.wci.authentication.AuthenticationListenerSupport;
import org.gatein.wci.authentication.AuthenticationResult;
import org.gatein.wci.authentication.ProgrammaticAuthenticationResult;
import org.gatein.wci.command.CommandDispatcher;
@@ -75,6 +77,9 @@
/** . */
private Registration registration;
+ /** . */
+ private AuthenticationListenerSupport listenerSupport = new AuthenticationListenerSupport();
+
public TC7ServletContainerContext(Engine engine)
{
this.engine = engine;
@@ -105,6 +110,12 @@
try
{
request.login(userName, password);
+
+ //
+ listenerSupport.fireEvent(
+ AuthenticationListenerSupport.EventType.LOGIN,
+ new AuthenticationEvent(AuthenticationListenerSupport.EventType.LOGIN, request, response, userName, password
+ ));
}
catch (ServletException e)
{
@@ -118,6 +129,12 @@
try
{
request.logout();
+
+ //
+ listenerSupport.fireEvent(
+ AuthenticationListenerSupport.EventType.LOGOUT,
+ new AuthenticationEvent(AuthenticationListenerSupport.EventType.LOGOUT, request, response
+ ));
}
catch (ServletException e)
{
Deleted: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AbstractAuthentication.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AbstractAuthentication.java 2010-10-01 08:42:51 UTC (rev 4454)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AbstractAuthentication.java 2010-10-01 08:44:53 UTC (rev 4455)
@@ -1,66 +0,0 @@
-/*
-* Copyright (C) 2003-2009 eXo Platform SAS.
-*
-* 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.gatein.wci.authentication;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
- * @version $Revision$
- */
-public abstract class AbstractAuthentication implements Authentication
-{
- protected enum EventType
- {
- LOGIN, LOGOUT
- }
-
- private List<AuthenticationListener> authenticationListeners = new ArrayList<AuthenticationListener>();
-
- public void addAuthenticationListener(AuthenticationListener listener)
- {
- authenticationListeners.add(listener);
- }
-
- protected List<AuthenticationListener> getAuthenticationListeners()
- {
- return authenticationListeners;
- }
-
- protected void fireEvent(EventType type, AuthenticationEvent ae)
- {
- String methodName = String.format(
- "on%1%2",
- type.toString().substring(0, 1).toUpperCase(),
- type.toString().substring(1)
- );
- for (AuthenticationListener currentListener : authenticationListeners)
- {
- try
- {
- currentListener.getClass().getMethod(methodName, AuthenticationEvent.class).invoke(currentListener, ae);
- }
- catch (Exception ignore)
- {
- }
- }
- }
-}
Deleted: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Authentication.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Authentication.java 2010-10-01 08:42:51 UTC (rev 4454)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Authentication.java 2010-10-01 08:44:53 UTC (rev 4455)
@@ -1,34 +0,0 @@
-/*
-* Copyright (C) 2003-2009 eXo Platform SAS.
-*
-* 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.gatein.wci.authentication;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
- * @version $Revision$
- */
-public interface Authentication
-{
- public AuthenticationResult login(String login, char[] password);
- public void logout(HttpServletRequest request, HttpServletResponse response);
- public void addAuthenticationListener(AuthenticationListener listener);
-}
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java 2010-10-01 08:42:51 UTC (rev 4454)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java 2010-10-01 08:44:53 UTC (rev 4455)
@@ -19,36 +19,72 @@
package org.gatein.wci.authentication;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
/**
* @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
* @version $Revision$
*/
public class AuthenticationEvent
{
+ private AuthenticationListenerSupport.EventType eventType;
+ private HttpServletRequest request;
+ private HttpServletResponse response;
private String username;
- private char[] password;
+ private String password;
- public AuthenticationEvent(String username, char[] password)
- {
- if (username == null)
- {
+ public AuthenticationEvent(AuthenticationListenerSupport.EventType eventType, HttpServletRequest request, HttpServletResponse response) {
+
+ if (eventType == null) {
+ throw new IllegalArgumentException("eventType is null");
+ }
+
+ if (request == null) {
+ throw new IllegalArgumentException("request is null");
+ }
+
+ if (response == null) {
+ throw new IllegalArgumentException("response is null");
+ }
+
+ this.eventType = eventType;
+ this.request = request;
+ this.response = response;
+ }
+
+ public AuthenticationEvent(AuthenticationListenerSupport.EventType eventType, HttpServletRequest request, HttpServletResponse response, String username, String password) {
+ this(eventType, request, response);
+
+ if (username == null) {
throw new IllegalArgumentException("username is null");
}
- if (password == null)
- {
+
+ if (password == null) {
throw new IllegalArgumentException("password is null");
}
+
this.username = username;
this.password = password;
}
- public String getUsername()
- {
- return username;
+ public AuthenticationListenerSupport.EventType getEventType() {
+ return eventType;
}
- public char[] getPassword()
- {
- return password;
+ public HttpServletRequest getRequest() {
+ return request;
}
+
+ public HttpServletResponse getResponse() {
+ return response;
+ }
+
+ public String getUsername() {
+ return (username != null ? username: "");
+ }
+
+ public String getPassword() {
+ return (password != null ? password: "");
+ }
}
Copied: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationListenerSupport.java (from rev 4383, components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AbstractAuthentication.java)
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationListenerSupport.java (rev 0)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationListenerSupport.java 2010-10-01 08:44:53 UTC (rev 4455)
@@ -0,0 +1,68 @@
+/*
+* Copyright (C) 2003-2009 eXo Platform SAS.
+*
+* 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.gatein.wci.authentication;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
+ * @version $Revision$
+ */
+public class AuthenticationListenerSupport
+{
+ public enum EventType
+ {
+ LOGIN, LOGOUT
+ }
+
+ private List<AuthenticationListener> authenticationListeners = new ArrayList<AuthenticationListener>();
+
+ public void addAuthenticationListener(AuthenticationListener listener)
+ {
+ authenticationListeners.add(listener);
+ }
+
+ protected List<AuthenticationListener> getAuthenticationListeners()
+ {
+ return authenticationListeners;
+ }
+
+ public void fireEvent(EventType type, AuthenticationEvent ae)
+ {
+ String methodName = String.format(
+ "on%1%2",
+ type.toString().substring(0, 1).toUpperCase(),
+ type.toString().substring(1)
+ );
+ for (AuthenticationListener currentListener : authenticationListeners)
+ {
+ try
+ {
+ currentListener.getClass().getMethod(methodName, AuthenticationEvent.class).invoke(currentListener, ae);
+ }
+ catch (Exception ignore)
+ {
+ }
+ }
+ }
+}
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationResult.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationResult.java 2010-10-01 08:42:51 UTC (rev 4454)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationResult.java 2010-10-01 08:44:53 UTC (rev 4455)
@@ -23,6 +23,6 @@
* @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
* @version $Revision$
*/
-public interface AuthenticationResult
+public abstract class AuthenticationResult
{
}
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthentication.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthentication.java 2010-10-01 08:42:51 UTC (rev 4454)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthentication.java 2010-10-01 08:44:53 UTC (rev 4455)
@@ -26,25 +26,25 @@
* @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
* @version $Revision$
*/
-public class GenericAuthentication extends AbstractAuthentication
+public class GenericAuthentication //extends AbstractAuthentication
{
public static final TicketService TICKET_SERVICE = new TicketService();
private static final GenericAuthentication GENERIC_AUTHENTICATION = new GenericAuthentication();
private GenericAuthentication() {}
- public AuthenticationResult login(String login, char[] password)
+ public AuthenticationResult login(String login, String password, HttpServletRequest request, HttpServletResponse response)
{
- String ticket = TICKET_SERVICE.createTicket(new WCICredentials(login, new String(password)));
+ String ticket = TICKET_SERVICE.createTicket(new WCICredentials(login, password));
- fireEvent(EventType.LOGIN, new AuthenticationEvent(login, password));
+ //fireEvent(EventType.LOGIN, new AuthenticationEvent(EventType.LOGIN, request, response, login, password));
return new GenericAuthenticationResult(ticket);
}
public void logout(HttpServletRequest request, HttpServletResponse response)
{
request.getSession().invalidate();
- fireEvent(EventType.LOGOUT, new AuthenticationEvent("", new char[1]));
+ //fireEvent(EventType.LOGOUT, new AuthenticationEvent(EventType.LOGIN, request, response));
}
public static GenericAuthentication getInstance() {
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthenticationResult.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthenticationResult.java 2010-10-01 08:42:51 UTC (rev 4454)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthenticationResult.java 2010-10-01 08:44:53 UTC (rev 4455)
@@ -23,7 +23,7 @@
* @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
* @version $Revision$
*/
-public class GenericAuthenticationResult implements AuthenticationResult {
+public class GenericAuthenticationResult extends AuthenticationResult {
private String ticket;
public GenericAuthenticationResult(String ticket) {
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/ProgrammaticAuthenticationResult.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/ProgrammaticAuthenticationResult.java 2010-10-01 08:42:51 UTC (rev 4454)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/ProgrammaticAuthenticationResult.java 2010-10-01 08:44:53 UTC (rev 4455)
@@ -23,5 +23,5 @@
* @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
* @version $Revision$
*/
-public class ProgrammaticAuthenticationResult implements AuthenticationResult {
+public class ProgrammaticAuthenticationResult extends AuthenticationResult {
}
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Ticket.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Ticket.java 2010-10-01 08:42:51 UTC (rev 4454)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Ticket.java 2010-10-01 08:44:53 UTC (rev 4455)
@@ -25,12 +25,6 @@
*/
public class Ticket
{
- //public static String EXPIRE_MILI = "expirationMilis";
-
- //public static String USERNAME = "userName"
-
- //public static String PASSWORD = "password";
-
/** . */
private final long expirationTimeMillis;
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java 2010-10-01 08:42:51 UTC (rev 4454)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java 2010-10-01 08:44:53 UTC (rev 4455)
@@ -23,6 +23,8 @@
package org.gatein.wci.impl.generic;
import org.gatein.wci.RequestDispatchCallback;
+import org.gatein.wci.authentication.AuthenticationEvent;
+import org.gatein.wci.authentication.AuthenticationListenerSupport;
import org.gatein.wci.authentication.AuthenticationResult;
import org.gatein.wci.authentication.GenericAuthentication;
import org.gatein.wci.impl.DefaultServletContainerFactory;
@@ -54,6 +56,9 @@
private static GenericServletContainerContext instance;
private static HashMap<ServletContext, String> requestDispatchMap = new HashMap<ServletContext, String>();
+
+ /** . */
+ private AuthenticationListenerSupport listenerSupport = new AuthenticationListenerSupport();
public static GenericServletContainerContext getInstance()
{
@@ -132,12 +137,26 @@
public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password)
{
- return GenericAuthentication.getInstance().login(userName, password.toCharArray());
+ AuthenticationResult result = GenericAuthentication.getInstance().login(userName, password, request, response);
+
+ //
+ listenerSupport.fireEvent(
+ AuthenticationListenerSupport.EventType.LOGIN,
+ new AuthenticationEvent(AuthenticationListenerSupport.EventType.LOGIN, request, response, userName, password
+ ));
+
+ return result;
}
public void logout(HttpServletRequest request, HttpServletResponse response)
{
GenericAuthentication.getInstance().logout(request, response);
+
+ //
+ listenerSupport.fireEvent(
+ AuthenticationListenerSupport.EventType.LOGOUT,
+ new AuthenticationEvent(AuthenticationListenerSupport.EventType.LOGOUT, request, response
+ ));
}
//
14 years, 2 months
gatein SVN: r4454 - in portal/branches/navcontroller: portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component and 10 other directories.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-10-01 04:42:51 -0400 (Fri, 01 Oct 2010)
New Revision: 4454
Added:
portal/branches/navcontroller/portlet/web/src/main/webapp/groovy/portal/webui/component/UIBreadcumbsPortlet.gtmpl
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/navigation/NavigationResource.java
Modified:
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java
portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarGroupPortlet.java
portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarSitePortlet.java
portal/branches/navcontroller/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarGroupPortlet.gtmpl
portal/branches/navcontroller/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarSitePortlet.gtmpl
portal/branches/navcontroller/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UIBreadcumbsPortlet.java
portal/branches/navcontroller/portlet/web/src/main/webapp/WEB-INF/portlet.xml
portal/branches/navcontroller/portlet/web/src/main/webapp/groovy/portal/webui/component/UIPortalNavigation.gtmpl
portal/branches/navcontroller/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/portal.xml
portal/branches/navcontroller/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/portal.xml
portal/branches/navcontroller/web/portal/src/main/webapp/groovy/webui/core/UISitemapTree.gtmpl
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/navigation/NavigationLocator.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/navigation/NavigationLocatorPlugin.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
Log:
Use controller framework for remaining menu toolbar portlets
Remove generation hardcoding of URL
Fix some bugs to be compatible with new controller framework
Modified: portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java 2010-10-01 06:43:24 UTC (rev 4453)
+++ portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java 2010-10-01 08:42:51 UTC (rev 4454)
@@ -77,12 +77,12 @@
expectedParameters.put(new QualifiedName("gtn", "controller"), "site");
expectedParameters.put(new QualifiedName("gtn", "sitename"), "classic");
expectedParameters.put(new QualifiedName("gtn", "sitetype"), "portal");
- expectedParameters.put(new QualifiedName("gtn", "path"), "");
+ expectedParameters.put(new QualifiedName("gtn", "path"), "/");
expectedParameters.put(new QualifiedName("gtn", "componentid"), "foo");
//
- assertEquals(expectedParameters, router.route("/private/classic", Collections.singletonMap("portal:componentId", new String[]{"foo"})));
- assertEquals("/private/classic", router.render(expectedParameters));
+ assertEquals(expectedParameters, router.route("/private/classic/", Collections.singletonMap("portal:componentId", new String[]{"foo"})));
+ assertEquals("/private/classic/", router.render(expectedParameters));
}
public void testPrivateClassic() throws Exception
Modified: portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarGroupPortlet.java
===================================================================
--- portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarGroupPortlet.java 2010-10-01 06:43:24 UTC (rev 4453)
+++ portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarGroupPortlet.java 2010-10-01 08:42:51 UTC (rev 4454)
@@ -48,7 +48,6 @@
public List<PageNavigation> getGroupNavigations() throws Exception
{
String remoteUser = Util.getPortalRequestContext().getRemoteUser();
- //List<PageNavigation> allNavigations = Util.getUIPortal().getNavigations();
List<PageNavigation> allNavigations = Util.getUIPortalApplication().getNavigations();
List<PageNavigation> navigations = new ArrayList<PageNavigation>();
for (PageNavigation navigation : allNavigations)
@@ -61,6 +60,19 @@
return navigations;
}
+ public PageNavigation getCurrentPortalNavigation() throws Exception
+ {
+ List<PageNavigation> allNavigations = Util.getUIPortalApplication().getNavigations();
+ for (PageNavigation navigation : allNavigations)
+ {
+ if (navigation.getOwnerType().equals(PortalConfig.PORTAL_TYPE))
+ {
+ return navigation;
+ }
+ }
+ return null;
+ }
+
public PageNode getSelectedPageNode() throws Exception
{
return Util.getUIPortal().getSelectedNode();
Modified: portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarSitePortlet.java
===================================================================
--- portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarSitePortlet.java 2010-10-01 06:43:24 UTC (rev 4453)
+++ portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarSitePortlet.java 2010-10-01 08:42:51 UTC (rev 4454)
@@ -19,6 +19,7 @@
package org.exoplatform.toolbar.webui.component;
+import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.PageNavigation;
import org.exoplatform.portal.config.model.PageNode;
@@ -53,31 +54,25 @@
return dataStorage.getAllPortalNames();
}
- public String getCurrentPortal()
+ public PageNavigation getCurrentPortalNavigation(boolean isFiltered) throws Exception
{
- return Util.getPortalRequestContext().getPortalOwner();
- }
-
- public String getPortalURI(String portalName)
- {
- return Util.getPortalRequestContext().getPortalURI().replace(getCurrentPortal(), portalName);
- }
-
- public PageNavigation getCurrentPortalNavigation() throws Exception
- {
- PageNavigation navi = getPageNavigation(PortalConfig.PORTAL_TYPE + "::" + getCurrentPortal());
- String remoteUser = Util.getPortalRequestContext().getRemoteUser();
- return PageNavigationUtils.filter(navi, remoteUser);
- }
-
- private PageNavigation getPageNavigation(String owner) throws Exception
- {
- //List<PageNavigation> allNavigations = Util.getUIPortal().getNavigations();
- List<PageNavigation> allNavigations = Util.getUIPortalApplication().getUserPortalConfig().getNavigations();
+ PortalRequestContext pcontext = Util.getPortalRequestContext();
+ String remoteUser = pcontext.getRemoteUser();
+ List<PageNavigation> allNavigations = Util.getUIPortalApplication().getNavigations();
for (PageNavigation nav : allNavigations)
{
- if (nav.getOwner().equals(owner))
- return nav;
+ if (nav.getOwnerType().equals(PortalConfig.PORTAL_TYPE))
+ {
+ if (isFiltered)
+ {
+ return PageNavigationUtils.filter(nav, remoteUser);
+ }
+ else
+ {
+ return nav;
+ }
+
+ }
}
return null;
}
Modified: portal/branches/navcontroller/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarGroupPortlet.gtmpl
===================================================================
--- portal/branches/navcontroller/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarGroupPortlet.gtmpl 2010-10-01 06:43:24 UTC (rev 4453)
+++ portal/branches/navcontroller/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarGroupPortlet.gtmpl 2010-10-01 08:42:51 UTC (rev 4454)
@@ -7,6 +7,7 @@
import org.gatein.common.text.EntityEncoder;
import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.web.url.ControllerURL;
+ import org.exoplatform.portal.url.navigation.NavigationResource;
def rcontext = _ctx.getRequestContext() ;
JavascriptManager jsmanager = rcontext.getJavascriptManager();
@@ -15,7 +16,6 @@
jsmanager.addCustomizedOnLoadScript('eXo.portal.UIAdminToolbar.onLoad("' + uicomponent.id + '");');
def groupNavigations = uicomponent.getGroupNavigations();
- def portalURI = Util.getPortalRequestContext().getPortalURI();
PortalRequestContext pcontext = Util.getPortalRequestContext();
ControllerURL nodeURL = pcontext.createURL(org.exoplatform.portal.url.navigation.NavigationLocator.TYPE);
@@ -47,7 +47,7 @@
boolean hasChild = (node.getChildren() != null && node.getChildren().size() > 0);
String clazz = "";
if(hasChild) clazz = "ArrowIcon";
- String actionLink = nodeURL.setResource(node).toString();
+ String actionLink = nodeURL.setResource(new NavigationResource(node)).toString();
String icon = node.getIcon();
if(icon == null) icon = "DefaultPageIcon";
boolean toolong = (node.resolvedLabel.length() > 60);
@@ -86,14 +86,17 @@
print """
</div>
""" ;
- }
+ }
+
+ def portalNavigation = uicomponent.getCurrentPortalNavigation();
+ def groupNaviNode = portalNavigation.getNode("groupnavigation");
%>
<div class="UIUserToolBarGroupPortlet" id="$uicomponent.id" >
<div class="UIHorizontalTabs">
<div class="TabsContainer">
<div class="UITab NormalToolbarTab">
<div class="">
- <a class="GroupIcon TBIcon" href="<%= portalURI + "groupnavigation" %>">Group</a>
+ <a class="GroupIcon TBIcon" href="<%=nodeURL.setResource(new NavigationResource(groupNaviNode)).toString() %>">Group</a>
</div>
<% if (!groupNavigations.isEmpty()) { %>
<div style="display:none" class="MenuItemContainer">
Modified: portal/branches/navcontroller/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarSitePortlet.gtmpl
===================================================================
--- portal/branches/navcontroller/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarSitePortlet.gtmpl 2010-10-01 06:43:24 UTC (rev 4453)
+++ portal/branches/navcontroller/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarSitePortlet.gtmpl 2010-10-01 08:42:51 UTC (rev 4454)
@@ -5,6 +5,9 @@
import org.exoplatform.portal.webui.util.Util ;
import org.exoplatform.webui.organization.OrganizationUtils;
import org.gatein.common.text.EntityEncoder;
+ import org.exoplatform.portal.application.PortalRequestContext;
+ import org.exoplatform.web.url.ControllerURL;
+ import org.exoplatform.portal.url.navigation.NavigationResource;
def rcontext = _ctx.getRequestContext() ;
JavascriptManager jsmanager = rcontext.getJavascriptManager();
@@ -12,8 +15,10 @@
jsmanager.importJavascript('eXo.portal.UIAdminToolbar') ;
jsmanager.addCustomizedOnLoadScript('eXo.portal.UIAdminToolbar.onLoad("' + uicomponent.id + '");');
- def portalURI = Util.getPortalRequestContext().getPortalURI();
- void renderPortalNavigations() {
+ PortalRequestContext pcontext = Util.getPortalRequestContext();
+ ControllerURL nodeURL = pcontext.createURL(org.exoplatform.portal.url.navigation.NavigationLocator.TYPE);
+
+ void renderPortalNavigations(ControllerURL nodeURL, PortalRequestContext pcontext) {
print """
<div style="position: absolute; display:none" class="MenuItemContainer">
@@ -24,12 +29,15 @@
String href = "#";
for(int i = 0; i < uicomponent.getAllPortalNames().size(); i++) {
String portal = uicomponent.getAllPortalNames().get(i);
- if(portal.equals(uicomponent.getCurrentPortal())) {
+ if(portal.equals(pcontext.getPortalOwner())) {
isCurrent = true;
} else isCurrent = false;
+
+ nodeURL.setResource(new NavigationResource(portal, null));
+
if(isCurrent) clazz = "class='ArrowIcon'";
else clazz = "";
- href = uicomponent.getPortalURI(portal);
+ href = nodeURL.toString();
EntityEncoder entityEncoder = EntityEncoder.FULL;
portal = entityEncoder.encode(portal);
print """
@@ -39,7 +47,7 @@
</div>
""";
if(isCurrent) {
- renderCurrentPortal();
+ renderCurrentPortal(nodeURL);
}
print """
</div>
@@ -51,15 +59,15 @@
""";
}
- void renderCurrentPortal() {
- navigation = uicomponent.getCurrentPortalNavigation();
+ void renderCurrentPortal(ControllerURL nodeURL) {
+ navigation = uicomponent.getCurrentPortalNavigation(true);
nodes = navigation.getNodes();
print """
<div style="position: absolute; display:none" class="MenuItemContainer">
<div class="SubBlock">
""";
for(int i = 0; i < nodes.size(); i++) {
- renderPageNode(nodes.get(i), i%2 == 0);
+ renderPageNode(nodeURL, nodes.get(i), i%2 == 0);
}
print """
</div>
@@ -67,7 +75,7 @@
""";
}
- void renderPageNode(PageNode node, boolean flag) {
+ void renderPageNode(ControllerURL nodeURL, PageNode node, boolean flag) {
PageNode selectedNode = uicomponent.getSelectedPageNode();
String tabStyleNavigation = "";
if(selectedNode != null && node.getUri() == selectedNode.getUri()) {
@@ -77,7 +85,7 @@
boolean hasChild = (node.getChildren() != null && node.getChildren().size() > 0);
String clazz = "";
if(hasChild) clazz = "ArrowIcon";
- String href = Util.getPortalRequestContext().getPortalURI() + node.getUri();
+ String href = nodeURL.setResource(new NavigationResource(null, node)).toString();
String icon = node.getIcon();
if(icon == null) icon = "DefaultPageIcon";
boolean toolong = (node.resolvedLabel.length() > 60);
@@ -105,7 +113,7 @@
<div class="SubBlock">
""" ;
for(int j = 0; j < node.getChildren().size(); j++) {
- renderPageNode(node.getChildren().get(j), j%2 == 0);
+ renderPageNode(nodeURL, node.getChildren().get(j), j%2 == 0);
}
print """
</div>
@@ -115,20 +123,22 @@
}
print """
</div>
- """ ;
- }
+ """ ;
+ }
+
+ def navigation = uicomponent.getCurrentPortalNavigation(false);
+ def portalNavigationNode = navigation.getNode("portalnavigation");
%>
-
<div class="UIUserToolBarSitePortlet" id="$uicomponent.id" >
<div class="UIHorizontalTabs">
<div class="TabsContainer">
<div class="UITab NormalToolbarTab">
<div class="">
- <a class="SitesIcon TBIcon" href="<%= portalURI + "portalnavigation" %>">
+ <a class="SitesIcon TBIcon" href="<%= nodeURL.setResource(new NavigationResource(portalNavigationNode)).toString() %>">
Site
</a>
</div>
- <% renderPortalNavigations() %>
+ <% renderPortalNavigations(nodeURL, pcontext) %>
</div>
</div>
</div>
Modified: portal/branches/navcontroller/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UIBreadcumbsPortlet.java
===================================================================
--- portal/branches/navcontroller/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UIBreadcumbsPortlet.java 2010-10-01 06:43:24 UTC (rev 4453)
+++ portal/branches/navcontroller/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UIBreadcumbsPortlet.java 2010-10-01 08:42:51 UTC (rev 4454)
@@ -20,21 +20,13 @@
package org.exoplatform.portal.webui.component;
import org.exoplatform.portal.config.model.PageNode;
-import org.exoplatform.portal.webui.portal.PageNodeEvent;
-import org.exoplatform.portal.webui.portal.UIPortal;
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.application.portlet.PortletRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
-import org.exoplatform.webui.config.annotation.EventConfig;
-import org.exoplatform.webui.core.UIBreadcumbs;
import org.exoplatform.webui.core.UIPortletApplication;
-import org.exoplatform.webui.core.UIBreadcumbs.LocalPath;
import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
-import org.exoplatform.webui.event.Event;
-import org.exoplatform.webui.event.EventListener;
-import java.util.ArrayList;
import java.util.List;
import javax.portlet.PortletPreferences;
@@ -46,59 +38,57 @@
* May 30, 2006
* @version:: $Id$
*/
-@ComponentConfig(lifecycle = UIApplicationLifecycle.class, events = @EventConfig(listeners = UIBreadcumbsPortlet.SelectPathActionListener.class))
+@ComponentConfig(
+ lifecycle = UIApplicationLifecycle.class
+)
public class UIBreadcumbsPortlet extends UIPortletApplication
{
+ private final String template;
+
public UIBreadcumbsPortlet() throws Exception
{
PortletRequestContext context = (PortletRequestContext)WebuiRequestContext.getCurrentInstance();
PortletRequest prequest = context.getRequest();
PortletPreferences prefers = prequest.getPreferences();
- String template = prefers.getValue("template", "system:/groovy/webui/core/UIBreadcumbs.gtmpl");
-
- UIBreadcumbs uiBreadCumbs = addChild(UIBreadcumbs.class, null, null);
- uiBreadCumbs.setTemplate(template);
+ template = prefers.getValue("template", "app:/groovy/portal/webui/component/UIBreadcumbsPortlet.gtmpl");
}
-
- public void loadSelectedPath()
+
+ public String getTemplate()
{
- List<PageNode> nodes = Util.getUIPortal().getSelectedPath();
- List<LocalPath> paths = new ArrayList<LocalPath>();
- for (PageNode node : nodes)
- {
- if (node == null)
- continue;
- if (node.getPageReference() == null)
- {
- paths.add(new LocalPath(null, node.getResolvedLabel()));
- }
- else
- {
- paths.add(new LocalPath(node.getUri(), node.getResolvedLabel()));
- }
- }
- UIBreadcumbs uiBreadCumbs = getChild(UIBreadcumbs.class);
- uiBreadCumbs.setPath(paths);
- }
-
- @Override
- public void renderChildren() throws Exception
- {
- loadSelectedPath();
- super.renderChildren();
+ return template != null ? template : super.getTemplate();
}
-
- static public class SelectPathActionListener extends EventListener<UIBreadcumbs>
+
+ public boolean isUseAjax() throws Exception
{
- @Override
- public void execute(Event<UIBreadcumbs> event) throws Exception
- {
- String uri = event.getRequestContext().getRequestParameter(OBJECTID);
- UIPortal uiPortal = Util.getUIPortal();
- PageNodeEvent<UIPortal> pnevent = new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE, uri);
- uiPortal.broadcast(pnevent, Event.Phase.PROCESS);
- }
+ WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
+ PortletRequest prequest = context.getRequest();
+ PortletPreferences prefers = prequest.getPreferences();
+ return Boolean.valueOf(prefers.getValue("useAJAX", "true"));
}
+
+ public List<PageNode> getSelectedPath()
+ {
+ return Util.getUIPortal().getSelectedPath();
+ }
+//
+// @Override
+// public void renderChildren() throws Exception
+// {
+// getSelectedPath();
+// super.renderChildren();
+// }
+//
+// static public class SelectPathActionListener extends EventListener<UIBreadcumbs>
+// {
+// @Override
+// public void execute(Event<UIBreadcumbs> event) throws Exception
+// {
+// String uri = event.getRequestContext().getRequestParameter(OBJECTID);
+// UIPortal uiPortal = Util.getUIPortal();
+// PageNodeEvent<UIPortal> pnevent = new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE, uri);
+// uiPortal.broadcast(pnevent, Event.Phase.PROCESS);
+// }
+// }
}
Modified: portal/branches/navcontroller/portlet/web/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- portal/branches/navcontroller/portlet/web/src/main/webapp/WEB-INF/portlet.xml 2010-10-01 06:43:24 UTC (rev 4453)
+++ portal/branches/navcontroller/portlet/web/src/main/webapp/WEB-INF/portlet.xml 2010-10-01 08:42:51 UTC (rev 4454)
@@ -157,7 +157,7 @@
</preference>
<preference>
<name>template</name>
- <value>system:/groovy/webui/core/UIBreadcumbs.gtmpl</value>
+ <value>app:/groovy/portal/webui/component/UIBreadcumbsPortlet.gtmpl</value>
<read-only>false</read-only>
</preference>
</portlet-preferences>
Added: portal/branches/navcontroller/portlet/web/src/main/webapp/groovy/portal/webui/component/UIBreadcumbsPortlet.gtmpl
===================================================================
--- portal/branches/navcontroller/portlet/web/src/main/webapp/groovy/portal/webui/component/UIBreadcumbsPortlet.gtmpl (rev 0)
+++ portal/branches/navcontroller/portlet/web/src/main/webapp/groovy/portal/webui/component/UIBreadcumbsPortlet.gtmpl 2010-10-01 08:42:51 UTC (rev 4454)
@@ -0,0 +1,43 @@
+<%
+ import java.util.List;
+ import org.exoplatform.portal.webui.util.Util;
+ import org.exoplatform.portal.application.PortalRequestContext;
+ import org.gatein.common.text.EntityEncoder;
+ import org.exoplatform.web.url.ControllerURL;
+ import org.exoplatform.portal.url.navigation.NavigationResource;
+
+ List list = uicomponent.getSelectedPath();
+
+ PortalRequestContext pcontext = Util.getPortalRequestContext();
+ ControllerURL nodeURL = pcontext.createURL(org.exoplatform.portal.url.navigation.NavigationLocator.TYPE);
+ nodeURL.setAjax(uicomponent.isUseAjax());
+%>
+<div class="UIBreadcumbsPortlet" id="$uicomponent.id">
+ <div class="UIBreadcumbs">
+ <div class="LeftBreadcumbsBar">
+ <div class="RightBreadcumbsBar">
+ <div class="BreadcumbsInfoBar">
+ <div class="HomeIcon LeftBlock BCHome16x16Icon"><span></span></div>
+ <%if(list.size() > 0) {
+ String note = "LeftBlock";
+ for(i in 0 .. list.size()-1) {
+ def node = list.get(i);
+ String actionLink = nodeURL.setResource(new NavigationResource(node));
+ if(i == list.size()-1) note = "Selected";
+ %>
+ <a href="<%=(node.getPageReference() == null) ? "#" : actionLink%>" class="$note"><%=node.getResolvedLabel();%></a>
+ <%
+ if(i != list.size()-1) {
+ %>
+ <div class="RightBlackGridArrowIcon LeftBlock RightBlackGridArrow16x16Icon"><span></span></div>
+ <%
+ }
+ }
+ }
+ %>
+ <div class="ClearLeft"><span></span></div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
\ No newline at end of file
Modified: portal/branches/navcontroller/portlet/web/src/main/webapp/groovy/portal/webui/component/UIPortalNavigation.gtmpl
===================================================================
--- portal/branches/navcontroller/portlet/web/src/main/webapp/groovy/portal/webui/component/UIPortalNavigation.gtmpl 2010-10-01 06:43:24 UTC (rev 4453)
+++ portal/branches/navcontroller/portlet/web/src/main/webapp/groovy/portal/webui/component/UIPortalNavigation.gtmpl 2010-10-01 08:42:51 UTC (rev 4454)
@@ -6,7 +6,7 @@
import org.gatein.common.text.EntityEncoder;
import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.web.url.ControllerURL;
- import org.exoplatform.web.application.Parameter;
+ import org.exoplatform.portal.url.navigation.NavigationResource;
def rcontext = _ctx.getRequestContext();
@@ -78,11 +78,10 @@
EntityEncoder entityEncoder = EntityEncoder.FULL;
label = entityEncoder.encode(label);
- nodeURL.setResource(node);
+ nodeURL.setResource(new NavigationResource(node));
String nonAjaxURL = nodeURL.setAjax(false).toString();
String ajaxURL = nodeURL.setAjax(true).toString();
- String pageURI = Util.getPortalRequestContext().getPortalURI() + node.getUri();
if(node.pageReference != null) {
print """
@@ -157,13 +156,12 @@
%>
<div class="$arrowIcon">
<%
- String pageURI = Util.getPortalRequestContext().getPortalURI() + node.getUri();
String label = node.resolvedLabel;
if(label.length() > 30) label = label.substring(0,29) + "...";
EntityEncoder entityEncoder = EntityEncoder.FULL;
label=entityEncoder.encode(label);
if(node.pageReference != null) {
- nodeURL.setResource(node);
+ nodeURL.setResource(new NavigationResource(node));
String nonAjaxURL = nodeURL.setAjax(false).toString();
String ajaxURL = nodeURL.setAjax(true).toString();
Modified: portal/branches/navcontroller/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/portal.xml
===================================================================
--- portal/branches/navcontroller/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/portal.xml 2010-10-01 06:43:24 UTC (rev 4453)
+++ portal/branches/navcontroller/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/portal.xml 2010-10-01 08:42:51 UTC (rev 4454)
@@ -69,6 +69,13 @@
<portlet>
<application-ref>web</application-ref>
<portlet-ref>BreadcumbsPortlet</portlet-ref>
+ <preferences>
+ <preference>
+ <name>useAJAX</name>
+ <value>false</value>
+ <read-only>false</read-only>
+ </preference>
+ </preferences>
</portlet>
<access-permissions>Everyone</access-permissions>
<show-info-bar>false</show-info-bar>
Modified: portal/branches/navcontroller/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/portal.xml
===================================================================
--- portal/branches/navcontroller/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/portal.xml 2010-10-01 06:43:24 UTC (rev 4453)
+++ portal/branches/navcontroller/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/portal.xml 2010-10-01 08:42:51 UTC (rev 4454)
@@ -62,6 +62,13 @@
<portlet>
<application-ref>web</application-ref>
<portlet-ref>BreadcumbsPortlet</portlet-ref>
+ <preferences>
+ <preference>
+ <name>useAJAX</name>
+ <value>false</value>
+ <read-only>false</read-only>
+ </preference>
+ </preferences>
</portlet>
<access-permissions>Everyone</access-permissions>
<show-info-bar>false</show-info-bar>
Modified: portal/branches/navcontroller/web/portal/src/main/webapp/groovy/webui/core/UISitemapTree.gtmpl
===================================================================
--- portal/branches/navcontroller/web/portal/src/main/webapp/groovy/webui/core/UISitemapTree.gtmpl 2010-10-01 06:43:24 UTC (rev 4453)
+++ portal/branches/navcontroller/web/portal/src/main/webapp/groovy/webui/core/UISitemapTree.gtmpl 2010-10-01 08:42:51 UTC (rev 4454)
@@ -5,7 +5,7 @@
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.portal.webui.navigation.TreeNode;
import org.exoplatform.web.url.ControllerURL;
- import org.exoplatform.web.application.Parameter;
+ import org.exoplatform.portal.url.navigation.NavigationResource;
%>
<%
def navigations = uicomponent.getNavigations();
@@ -37,7 +37,7 @@
actionExpand = uicomponent.event("ExpandNode", nav.getId() + "::" + node.getUri());
def actionCollapse = "ajaxAsyncGetRequest('" + uicomponent.url("CollapseNode",nav.getId() + "::" + node.getUri()) + "', true)";
- String actionLink = nodeURL.setController(node).toString();
+ String actionLink = nodeURL.setResource(new NavigationResource(node)).toString();
lastNode = '';
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/navigation/NavigationLocator.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/navigation/NavigationLocator.java 2010-10-01 06:43:24 UTC (rev 4453)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/navigation/NavigationLocator.java 2010-10-01 08:42:51 UTC (rev 4454)
@@ -19,12 +19,11 @@
package org.exoplatform.portal.url.navigation;
-import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.web.controller.QualifiedName;
import org.exoplatform.web.url.ResourceLocator;
import org.exoplatform.web.url.ResourceType;
-import java.util.Collections;
+import java.util.HashSet;
import java.util.Set;
/**
@@ -33,31 +32,30 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
-public class NavigationLocator implements ResourceLocator<PageNode>
+public class NavigationLocator implements ResourceLocator<NavigationResource>
{
/** . */
public static final QualifiedName PATH = new QualifiedName("gtn", "path");
-
+
/** . */
- public static final ResourceType<PageNode, NavigationLocator> TYPE = new ResourceType<PageNode, NavigationLocator>(){};
+ public static final QualifiedName REQUEST_SITE_NAME = new QualifiedName("gtn", "sitename");
/** . */
- private static final Set<QualifiedName> PARAMETER_NAMES = Collections.singleton(PATH);
+ public static final ResourceType<NavigationResource, NavigationLocator> TYPE = new ResourceType<NavigationResource, NavigationLocator>(){};
/** . */
- private PageNode resource;
-
- public PageNode getResource()
+ private static final Set<QualifiedName> PARAMETER_NAMES = new HashSet<QualifiedName>();
+
+ static
{
- return resource;
+ PARAMETER_NAMES.add(PATH);
+ PARAMETER_NAMES.add(REQUEST_SITE_NAME);
}
- public void setResource(PageNode resource)
- {
- this.resource = resource;
- }
-
+ /** . */
+ private NavigationResource resource;
+
public Set<QualifiedName> getParameterNames()
{
return PARAMETER_NAMES;
@@ -67,8 +65,31 @@
{
if (PATH.equals(parameterName))
{
- return "/" + resource.getUri();
+ if (resource.getPageNode() == null)
+ {
+ return "";
+ }
+ else
+ {
+ return "/" + resource.getPageNode().getUri();
+ }
}
+ else if (REQUEST_SITE_NAME.equals(parameterName))
+ {
+ return resource.getSiteName();
+ }
return null;
}
+
+ @Override
+ public NavigationResource getResource()
+ {
+ return resource;
+ }
+
+ @Override
+ public void setResource(NavigationResource resource)
+ {
+ this.resource = resource;
+ }
}
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/navigation/NavigationLocatorPlugin.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/navigation/NavigationLocatorPlugin.java 2010-10-01 06:43:24 UTC (rev 4453)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/navigation/NavigationLocatorPlugin.java 2010-10-01 08:42:51 UTC (rev 4454)
@@ -19,7 +19,6 @@
package org.exoplatform.portal.url.navigation;
-import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.url.ResourceLocatorPlugin;
import org.exoplatform.web.url.ResourceType;
@@ -27,11 +26,11 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
-public class NavigationLocatorPlugin extends ResourceLocatorPlugin<PageNode, NavigationLocator>
+public class NavigationLocatorPlugin extends ResourceLocatorPlugin<NavigationResource, NavigationLocator>
{
@Override
- protected ResourceType<PageNode, NavigationLocator> getResourceType()
+ protected ResourceType<NavigationResource, NavigationLocator> getResourceType()
{
return NavigationLocator.TYPE;
}
Added: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/navigation/NavigationResource.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/navigation/NavigationResource.java (rev 0)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/navigation/NavigationResource.java 2010-10-01 08:42:51 UTC (rev 4454)
@@ -0,0 +1,63 @@
+/**
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.portal.url.navigation;
+
+import org.exoplatform.portal.config.model.PageNode;
+
+/**
+ * A class that contains combination of a portal name and a page node
+ * to determine the target URL
+ *
+ * @author <a href="trongtt(a)gmail.com">Trong Tran</a>
+ * @version $Revision$
+ */
+public class NavigationResource
+{
+ /** . */
+ private final String siteName;
+
+ /** . */
+ private final PageNode pageNode;
+
+ public NavigationResource(String portalName)
+ {
+ this(portalName, null);
+ }
+
+ public NavigationResource(PageNode node)
+ {
+ this(null, node);
+ }
+
+ public NavigationResource(String portalName, PageNode node)
+ {
+ siteName = portalName;
+ pageNode = node;
+ }
+
+ public String getSiteName()
+ {
+ return siteName;
+ }
+
+ public PageNode getPageNode()
+ {
+ return pageNode;
+ }
+}
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java 2010-10-01 06:43:24 UTC (rev 4453)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java 2010-10-01 08:42:51 UTC (rev 4454)
@@ -26,6 +26,8 @@
import org.exoplatform.portal.config.model.PageNavigation;
import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.config.model.PortalConfig;
+import org.exoplatform.portal.url.navigation.NavigationLocator;
+import org.exoplatform.portal.url.navigation.NavigationResource;
import org.exoplatform.portal.webui.navigation.UIPageNodeSelector;
import org.exoplatform.portal.webui.portal.PageNodeEvent;
import org.exoplatform.portal.webui.portal.UIPortal;
@@ -36,6 +38,7 @@
import org.exoplatform.portal.webui.workspace.UIPortalToolPanel;
import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace;
import org.exoplatform.web.application.ApplicationMessage;
+import org.exoplatform.web.url.ControllerURL;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.ComponentConfigs;
@@ -391,8 +394,10 @@
PageNode selectedNode = uiNodeSelector.getSelectedPageNode();
PortalRequestContext pcontext = Util.getPortalRequestContext();
- String uri = pcontext.getPortalURI() + selectedNode.getUri();
- pcontext.getResponse().sendRedirect(uri);
+ ControllerURL<NavigationResource, NavigationLocator> nodeURL =
+ pcontext.createURL(org.exoplatform.portal.url.navigation.NavigationLocator.TYPE);
+ nodeURL.setResource(new NavigationResource(null, selectedNode));
+ pcontext.sendRedirect(nodeURL.toString());
}
}
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java 2010-10-01 06:43:24 UTC (rev 4453)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java 2010-10-01 08:42:51 UTC (rev 4454)
@@ -31,6 +31,7 @@
import org.exoplatform.portal.resource.SkinService;
import org.exoplatform.portal.resource.SkinURL;
import org.exoplatform.portal.url.navigation.NavigationLocator;
+import org.exoplatform.portal.url.navigation.NavigationResource;
import org.exoplatform.portal.webui.application.UIPortlet;
import org.exoplatform.portal.webui.navigation.PageNavigationUtils;
import org.exoplatform.portal.webui.page.UIPageActionListener.ChangeNodeActionListener;
@@ -544,9 +545,9 @@
isAjaxInLastRequest = false;
if (nodePath.equals(lastNonAjaxUri) && !nodePath.equals(lastNodePath))
{
- ControllerURL<PageNode, NavigationLocator> nodeURL =
+ ControllerURL<NavigationResource, NavigationLocator> nodeURL =
pcontext.createURL(org.exoplatform.portal.url.navigation.NavigationLocator.TYPE);
- nodeURL.setResource(getShowedUIPortal().getSelectedNode());
+ nodeURL.setResource(new NavigationResource(null, getShowedUIPortal().getSelectedNode()));
pcontext.sendRedirect(nodeURL.toString());
return;
}
14 years, 2 months
gatein SVN: r4453 - portal/trunk/testsuite/testdefinitions.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-10-01 02:43:24 -0400 (Fri, 01 Oct 2010)
New Revision: 4453
Modified:
portal/trunk/testsuite/testdefinitions/GateIn_v3.1.0_SmokeTests_TestDefinition.ods
Log:
TESTVN-1646 - Smoke tests in TCM format for GateIn product
Modified: portal/trunk/testsuite/testdefinitions/GateIn_v3.1.0_SmokeTests_TestDefinition.ods
===================================================================
(Binary files differ)
14 years, 2 months