gatein SVN: r6247 - in components/pc/trunk: api and 15 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-04-16 11:07:11 -0400 (Sat, 16 Apr 2011)
New Revision: 6247
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/core/pom.xml
components/pc/trunk/test/pom.xml
components/pc/trunk/test/servers/pom.xml
components/pc/trunk/test/servers/tomcat7/pom.xml
Log:
[maven-release-plugin] prepare release 2.3.0-Beta02
Modified: components/pc/trunk/api/pom.xml
===================================================================
--- components/pc/trunk/api/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/api/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</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 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/bridge/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-bridge</artifactId>
Modified: components/pc/trunk/controller/pom.xml
===================================================================
--- components/pc/trunk/controller/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/controller/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-controller</artifactId>
Modified: components/pc/trunk/docs/pom.xml
===================================================================
--- components/pc/trunk/docs/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/docs/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</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 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/docs/user-guide/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>docs-aggregator</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</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 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/federation/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-federation</artifactId>
Modified: components/pc/trunk/jsr168api/pom.xml
===================================================================
--- components/pc/trunk/jsr168api/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/jsr168api/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-jsr168api</artifactId>
Modified: components/pc/trunk/management/pom.xml
===================================================================
--- components/pc/trunk/management/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/management/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-management</artifactId>
Modified: components/pc/trunk/mc/pom.xml
===================================================================
--- components/pc/trunk/mc/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/mc/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-mc</artifactId>
Modified: components/pc/trunk/pom.xml
===================================================================
--- components/pc/trunk/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -29,7 +29,7 @@
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
<packaging>pom</packaging>
<parent>
Modified: components/pc/trunk/portal/pom.xml
===================================================================
--- components/pc/trunk/portal/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/portal/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-portal</artifactId>
Modified: components/pc/trunk/portlet/pom.xml
===================================================================
--- components/pc/trunk/portlet/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/portlet/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-portlet</artifactId>
Modified: components/pc/trunk/samples/pom.xml
===================================================================
--- components/pc/trunk/samples/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/samples/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-samples</artifactId>
Modified: components/pc/trunk/test/core/pom.xml
===================================================================
--- components/pc/trunk/test/core/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/test/core/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test-core</artifactId>
Modified: components/pc/trunk/test/pom.xml
===================================================================
--- components/pc/trunk/test/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/test/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test</artifactId>
Modified: components/pc/trunk/test/servers/pom.xml
===================================================================
--- components/pc/trunk/test/servers/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/test/servers/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test-servers</artifactId>
Modified: components/pc/trunk/test/servers/tomcat7/pom.xml
===================================================================
--- components/pc/trunk/test/servers/tomcat7/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
+++ components/pc/trunk/test/servers/tomcat7/pom.xml 2011-04-16 15:07:11 UTC (rev 6247)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test-servers</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test-tomcat7</artifactId>
@@ -166,7 +166,7 @@
<dependency>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test-core</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
13 years, 8 months
gatein SVN: r6246 - in components/pc/trunk: api and 15 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-04-16 10:43:42 -0400 (Sat, 16 Apr 2011)
New Revision: 6246
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/core/pom.xml
components/pc/trunk/test/pom.xml
components/pc/trunk/test/servers/jboss42/pom.xml
components/pc/trunk/test/servers/pom.xml
Log:
- Reverting failed release. This build sucks! >_<
Modified: components/pc/trunk/api/pom.xml
===================================================================
--- components/pc/trunk/api/pom.xml 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/api/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02</version>
+ <version>2.3.0-Beta02-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 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/bridge/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02</version>
+ <version>2.3.0-Beta02-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 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/controller/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02</version>
+ <version>2.3.0-Beta02-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 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/docs/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02</version>
+ <version>2.3.0-Beta02-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 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/docs/user-guide/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>docs-aggregator</artifactId>
- <version>2.3.0-Beta02</version>
+ <version>2.3.0-Beta02-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 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/federation/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02</version>
+ <version>2.3.0-Beta02-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 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/jsr168api/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02</version>
+ <version>2.3.0-Beta02-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 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/management/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02</version>
+ <version>2.3.0-Beta02-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 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/mc/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02</version>
+ <version>2.3.0-Beta02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-mc</artifactId>
Modified: components/pc/trunk/pom.xml
===================================================================
--- components/pc/trunk/pom.xml 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -29,7 +29,7 @@
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02</version>
+ <version>2.3.0-Beta02-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
Modified: components/pc/trunk/portal/pom.xml
===================================================================
--- components/pc/trunk/portal/pom.xml 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/portal/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02</version>
+ <version>2.3.0-Beta02-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 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/portlet/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02</version>
+ <version>2.3.0-Beta02-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 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/samples/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02</version>
+ <version>2.3.0-Beta02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-samples</artifactId>
Modified: components/pc/trunk/test/core/pom.xml
===================================================================
--- components/pc/trunk/test/core/pom.xml 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/test/core/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test</artifactId>
- <version>2.3.0-Beta02</version>
+ <version>2.3.0-Beta02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test-core</artifactId>
Modified: components/pc/trunk/test/pom.xml
===================================================================
--- components/pc/trunk/test/pom.xml 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/test/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02</version>
+ <version>2.3.0-Beta02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test</artifactId>
Modified: components/pc/trunk/test/servers/jboss42/pom.xml
===================================================================
--- components/pc/trunk/test/servers/jboss42/pom.xml 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/test/servers/jboss42/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test-servers</artifactId>
- <version>2.3.0-Alpha02-SNAPSHOT</version>
+ <version>2.3.0-Beta02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test-jboss42</artifactId>
Modified: components/pc/trunk/test/servers/pom.xml
===================================================================
--- components/pc/trunk/test/servers/pom.xml 2011-04-15 22:45:42 UTC (rev 6245)
+++ components/pc/trunk/test/servers/pom.xml 2011-04-16 14:43:42 UTC (rev 6246)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test</artifactId>
- <version>2.3.0-Beta02</version>
+ <version>2.3.0-Beta02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test-servers</artifactId>
13 years, 8 months
gatein SVN: r6245 - components/pc/tags.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-04-15 18:45:42 -0400 (Fri, 15 Apr 2011)
New Revision: 6245
Added:
components/pc/tags/2.3.0-Beta02/
Log:
[maven-scm] copy for tag 2.3.0-Beta02
13 years, 8 months
gatein SVN: r6244 - in components/pc/trunk: api and 14 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-04-15 18:45:14 -0400 (Fri, 15 Apr 2011)
New Revision: 6244
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/core/pom.xml
components/pc/trunk/test/pom.xml
components/pc/trunk/test/servers/pom.xml
Log:
[maven-release-plugin] prepare release 2.3.0-Beta02
Modified: components/pc/trunk/api/pom.xml
===================================================================
--- components/pc/trunk/api/pom.xml 2011-04-15 16:39:08 UTC (rev 6243)
+++ components/pc/trunk/api/pom.xml 2011-04-15 22:45:14 UTC (rev 6244)
@@ -21,12 +21,11 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</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 2011-04-15 16:39:08 UTC (rev 6243)
+++ components/pc/trunk/bridge/pom.xml 2011-04-15 22:45:14 UTC (rev 6244)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-bridge</artifactId>
Modified: components/pc/trunk/controller/pom.xml
===================================================================
--- components/pc/trunk/controller/pom.xml 2011-04-15 16:39:08 UTC (rev 6243)
+++ components/pc/trunk/controller/pom.xml 2011-04-15 22:45:14 UTC (rev 6244)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-controller</artifactId>
Modified: components/pc/trunk/docs/pom.xml
===================================================================
--- components/pc/trunk/docs/pom.xml 2011-04-15 16:39:08 UTC (rev 6243)
+++ components/pc/trunk/docs/pom.xml 2011-04-15 22:45:14 UTC (rev 6244)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</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 2011-04-15 16:39:08 UTC (rev 6243)
+++ components/pc/trunk/docs/user-guide/pom.xml 2011-04-15 22:45:14 UTC (rev 6244)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>docs-aggregator</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</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 2011-04-15 16:39:08 UTC (rev 6243)
+++ components/pc/trunk/federation/pom.xml 2011-04-15 22:45:14 UTC (rev 6244)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-federation</artifactId>
Modified: components/pc/trunk/jsr168api/pom.xml
===================================================================
--- components/pc/trunk/jsr168api/pom.xml 2011-04-15 16:39:08 UTC (rev 6243)
+++ components/pc/trunk/jsr168api/pom.xml 2011-04-15 22:45:14 UTC (rev 6244)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-jsr168api</artifactId>
Modified: components/pc/trunk/management/pom.xml
===================================================================
--- components/pc/trunk/management/pom.xml 2011-04-15 16:39:08 UTC (rev 6243)
+++ components/pc/trunk/management/pom.xml 2011-04-15 22:45:14 UTC (rev 6244)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-management</artifactId>
Modified: components/pc/trunk/mc/pom.xml
===================================================================
--- components/pc/trunk/mc/pom.xml 2011-04-15 16:39:08 UTC (rev 6243)
+++ components/pc/trunk/mc/pom.xml 2011-04-15 22:45:14 UTC (rev 6244)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-mc</artifactId>
Modified: components/pc/trunk/pom.xml
===================================================================
--- components/pc/trunk/pom.xml 2011-04-15 16:39:08 UTC (rev 6243)
+++ components/pc/trunk/pom.xml 2011-04-15 22:45:14 UTC (rev 6244)
@@ -21,8 +21,7 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -30,7 +29,7 @@
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
<packaging>pom</packaging>
<parent>
@@ -40,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.3.0-Be...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/pc/tags/2.3.0-Beta02</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/pc/tags/2.3.0-Beta02</url>
</scm>
<properties>
Modified: components/pc/trunk/portal/pom.xml
===================================================================
--- components/pc/trunk/portal/pom.xml 2011-04-15 16:39:08 UTC (rev 6243)
+++ components/pc/trunk/portal/pom.xml 2011-04-15 22:45:14 UTC (rev 6244)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-portal</artifactId>
Modified: components/pc/trunk/portlet/pom.xml
===================================================================
--- components/pc/trunk/portlet/pom.xml 2011-04-15 16:39:08 UTC (rev 6243)
+++ components/pc/trunk/portlet/pom.xml 2011-04-15 22:45:14 UTC (rev 6244)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-portlet</artifactId>
Modified: components/pc/trunk/samples/pom.xml
===================================================================
--- components/pc/trunk/samples/pom.xml 2011-04-15 16:39:08 UTC (rev 6243)
+++ components/pc/trunk/samples/pom.xml 2011-04-15 22:45:14 UTC (rev 6244)
@@ -21,12 +21,11 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-samples</artifactId>
Modified: components/pc/trunk/test/core/pom.xml
===================================================================
--- components/pc/trunk/test/core/pom.xml 2011-04-15 16:39:08 UTC (rev 6243)
+++ components/pc/trunk/test/core/pom.xml 2011-04-15 22:45:14 UTC (rev 6244)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test-core</artifactId>
Modified: components/pc/trunk/test/pom.xml
===================================================================
--- components/pc/trunk/test/pom.xml 2011-04-15 16:39:08 UTC (rev 6243)
+++ components/pc/trunk/test/pom.xml 2011-04-15 22:45:14 UTC (rev 6244)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-parent</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test</artifactId>
Modified: components/pc/trunk/test/servers/pom.xml
===================================================================
--- components/pc/trunk/test/servers/pom.xml 2011-04-15 16:39:08 UTC (rev 6243)
+++ components/pc/trunk/test/servers/pom.xml 2011-04-15 22:45:14 UTC (rev 6244)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test</artifactId>
- <version>2.3.0-Beta02-SNAPSHOT</version>
+ <version>2.3.0-Beta02</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test-servers</artifactId>
13 years, 8 months
gatein SVN: r6243 - in portal/branches/decoupled-webos: component/application-registry/src/main/java/org/exoplatform/application and 8 other directories.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2011-04-15 12:39:08 -0400 (Fri, 15 Apr 2011)
New Revision: 6243
Removed:
portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/AppFormatter.java
Modified:
portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/GadgetDefinition.java
portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/GadgetRegistry.java
portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/LocalGadgetData.java
portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/RemoteGadgetData.java
portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/CategoryDefinition.java
portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ContentDefinition.java
portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ContentRegistry.java
portal/branches/decoupled-webos/component/common/src/main/java/org/exoplatform/commons/chromattic/ChromatticLifeCycle.java
portal/branches/decoupled-webos/component/common/src/test/java/org/exoplatform/commons/chromattic/FooEntity.java
portal/branches/decoupled-webos/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSession.java
portal/branches/decoupled-webos/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/SearchTask.java
portal/branches/decoupled-webos/component/portal/src/main/java/org/exoplatform/portal/pom/spi/portlet/PortletState.java
portal/branches/decoupled-webos/component/portal/src/test/java/org/exoplatform/portal/config/SampleMixin.java
portal/branches/decoupled-webos/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java
portal/branches/decoupled-webos/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java
portal/branches/decoupled-webos/pom.xml
Log:
update to Chromattic 1.1.0-beta2 and MOP 1.1.0-Beta01 (squash 215445a)
Deleted: portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/AppFormatter.java
===================================================================
--- portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/AppFormatter.java 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/AppFormatter.java 2011-04-15 16:39:08 UTC (rev 6243)
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 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.exoplatform.application;
-
-import org.chromattic.ext.format.AbstractEncodingObjectFormatter;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
- * @version $Revision$
- */
-public class AppFormatter extends AbstractEncodingObjectFormatter
-{
-
- public String getPrefix()
- {
- return "app:";
- }
-}
Modified: portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/GadgetDefinition.java
===================================================================
--- portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/GadgetDefinition.java 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/GadgetDefinition.java 2011-04-15 16:39:08 UTC (rev 6243)
@@ -20,15 +20,16 @@
import org.chromattic.api.annotations.*;
import org.chromattic.api.annotations.PrimaryType;
+import org.chromattic.ext.format.BaseEncodingObjectFormatter;
import org.chromattic.ext.ntdef.NTFolder;
-import org.exoplatform.application.AppFormatter;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
@PrimaryType(name = "app:gadgetdefinition")
-(a)FormattedBy(AppFormatter.class)
+(a)FormattedBy(BaseEncodingObjectFormatter.class)
+@NamingPrefix("app")
public abstract class GadgetDefinition
{
Modified: portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/GadgetRegistry.java
===================================================================
--- portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/GadgetRegistry.java 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/GadgetRegistry.java 2011-04-15 16:39:08 UTC (rev 6243)
@@ -20,9 +20,10 @@
import org.chromattic.api.annotations.Create;
import org.chromattic.api.annotations.FormattedBy;
+import org.chromattic.api.annotations.NamingPrefix;
import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.OneToMany;
-import org.exoplatform.application.AppFormatter;
+import org.chromattic.ext.format.BaseEncodingObjectFormatter;
import java.util.Collection;
import java.util.Map;
@@ -32,7 +33,8 @@
* @version $Revision$
*/
@PrimaryType(name = "app:gadgetregistry")
-(a)FormattedBy(AppFormatter.class)
+(a)FormattedBy(BaseEncodingObjectFormatter.class)
+@NamingPrefix("app")
public abstract class GadgetRegistry
{
Modified: portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/LocalGadgetData.java
===================================================================
--- portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/LocalGadgetData.java 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/LocalGadgetData.java 2011-04-15 16:39:08 UTC (rev 6243)
@@ -23,10 +23,10 @@
import org.apache.shindig.gadgets.spec.ModulePrefs;
import org.chromattic.api.annotations.*;
import org.chromattic.api.annotations.PrimaryType;
+import org.chromattic.ext.format.BaseEncodingObjectFormatter;
import org.chromattic.ext.ntdef.NTFile;
import org.chromattic.ext.ntdef.Resource;
import org.chromattic.ext.ntdef.NTFolder;
-import org.exoplatform.application.AppFormatter;
import org.exoplatform.application.gadget.EncodingDetector;
@@ -39,7 +39,8 @@
* @version $Revision$
*/
@PrimaryType(name = "app:localgadgetdata")
-(a)FormattedBy(AppFormatter.class)
+(a)FormattedBy(BaseEncodingObjectFormatter.class)
+@NamingPrefix("app")
public abstract class LocalGadgetData extends GadgetData
{
Modified: portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/RemoteGadgetData.java
===================================================================
--- portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/RemoteGadgetData.java 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/RemoteGadgetData.java 2011-04-15 16:39:08 UTC (rev 6243)
@@ -19,16 +19,18 @@
package org.exoplatform.application.gadget.impl;
import org.chromattic.api.annotations.FormattedBy;
+import org.chromattic.api.annotations.NamingPrefix;
import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.Property;
-import org.exoplatform.application.AppFormatter;
+import org.chromattic.ext.format.BaseEncodingObjectFormatter;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
@PrimaryType(name = "app:remotegadgetdata")
-(a)FormattedBy(AppFormatter.class)
+(a)FormattedBy(BaseEncodingObjectFormatter.class)
+@NamingPrefix("app")
public abstract class RemoteGadgetData extends GadgetData
{
Modified: portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/CategoryDefinition.java
===================================================================
--- portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/CategoryDefinition.java 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/CategoryDefinition.java 2011-04-15 16:39:08 UTC (rev 6243)
@@ -21,10 +21,11 @@
import org.chromattic.api.annotations.Create;
import org.chromattic.api.annotations.FormattedBy;
import org.chromattic.api.annotations.Name;
+import org.chromattic.api.annotations.NamingPrefix;
import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.OneToMany;
import org.chromattic.api.annotations.Property;
-import org.exoplatform.application.AppFormatter;
+import org.chromattic.ext.format.BaseEncodingObjectFormatter;
import org.exoplatform.portal.pom.config.POMSession;
import org.gatein.mop.api.content.ContentType;
import org.gatein.mop.api.content.Customization;
@@ -39,7 +40,8 @@
* @version $Revision$
*/
@PrimaryType(name = "app:category")
-(a)FormattedBy(AppFormatter.class)
+(a)FormattedBy(BaseEncodingObjectFormatter.class)
+@NamingPrefix("app")
public abstract class CategoryDefinition
{
Modified: portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ContentDefinition.java
===================================================================
--- portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ContentDefinition.java 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ContentDefinition.java 2011-04-15 16:39:08 UTC (rev 6243)
@@ -19,7 +19,7 @@
package org.exoplatform.application.registry.impl;
import org.chromattic.api.annotations.*;
-import org.exoplatform.application.AppFormatter;
+import org.chromattic.ext.format.BaseEncodingObjectFormatter;
import org.exoplatform.portal.pom.config.POMSession;
import org.gatein.mop.api.content.Customization;
import org.gatein.mop.api.workspace.Workspace;
@@ -32,7 +32,8 @@
* @version $Revision$
*/
@PrimaryType(name = "app:application")
-(a)FormattedBy(AppFormatter.class)
+(a)FormattedBy(BaseEncodingObjectFormatter.class)
+@NamingPrefix("app")
public abstract class ContentDefinition
{
Modified: portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ContentRegistry.java
===================================================================
--- portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ContentRegistry.java 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ContentRegistry.java 2011-04-15 16:39:08 UTC (rev 6243)
@@ -20,9 +20,10 @@
import org.chromattic.api.annotations.Create;
import org.chromattic.api.annotations.FormattedBy;
+import org.chromattic.api.annotations.NamingPrefix;
+import org.chromattic.api.annotations.OneToMany;
import org.chromattic.api.annotations.PrimaryType;
-import org.chromattic.api.annotations.OneToMany;
-import org.exoplatform.application.AppFormatter;
+import org.chromattic.ext.format.BaseEncodingObjectFormatter;
import java.util.List;
import java.util.Map;
@@ -32,7 +33,8 @@
* @version $Revision$
*/
@PrimaryType(name = "app:applicationregistry")
-(a)FormattedBy(AppFormatter.class)
+(a)FormattedBy(BaseEncodingObjectFormatter.class)
+@NamingPrefix("app")
public abstract class ContentRegistry
{
@@ -47,7 +49,8 @@
public CategoryDefinition getCategory(String categoryName)
{
- return getCategoryMap().get(categoryName);
+ Map<String, CategoryDefinition> categories = getCategoryMap();
+ return categories.get(categoryName);
}
public CategoryDefinition createCategory(String categoryName)
Modified: portal/branches/decoupled-webos/component/common/src/main/java/org/exoplatform/commons/chromattic/ChromatticLifeCycle.java
===================================================================
--- portal/branches/decoupled-webos/component/common/src/main/java/org/exoplatform/commons/chromattic/ChromatticLifeCycle.java 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/component/common/src/main/java/org/exoplatform/commons/chromattic/ChromatticLifeCycle.java 2011-04-15 16:39:08 UTC (rev 6243)
@@ -355,7 +355,7 @@
if (option != null)
{
log.debug("Setting Chromattic option " + optionEntry);
- builder.setOptionStringValue(option, optionEntry.getValue());
+ setOption(builder, option, optionEntry.getValue());
}
}
@@ -377,6 +377,12 @@
}
}
+ private <D> void setOption(ChromatticBuilder builder, ChromatticBuilder.Option<D> option, String value)
+ {
+ log.debug("Setting Chromattic option " + option.getDisplayName());
+ builder.setOptionValue(option, option.getInstance(value).getValue());
+ }
+
public final void stop()
{
// Nothing to do for now
Modified: portal/branches/decoupled-webos/component/common/src/test/java/org/exoplatform/commons/chromattic/FooEntity.java
===================================================================
--- portal/branches/decoupled-webos/component/common/src/test/java/org/exoplatform/commons/chromattic/FooEntity.java 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/component/common/src/test/java/org/exoplatform/commons/chromattic/FooEntity.java 2011-04-15 16:39:08 UTC (rev 6243)
@@ -25,7 +25,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
-@PrimaryType(name = "nt:base")
+@PrimaryType(name = "nt:unstructured")
public abstract class FooEntity
{
Modified: portal/branches/decoupled-webos/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSession.java
===================================================================
--- portal/branches/decoupled-webos/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSession.java 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSession.java 2011-04-15 16:39:08 UTC (rev 6243)
@@ -21,6 +21,7 @@
import org.chromattic.api.ChromatticSession;
import org.chromattic.api.UndeclaredRepositoryException;
+import org.chromattic.ext.format.BaseEncodingObjectFormatter;
import org.exoplatform.commons.chromattic.SessionContext;
import org.exoplatform.commons.chromattic.SynchronizationListener;
import org.exoplatform.commons.chromattic.SynchronizationStatus;
@@ -35,7 +36,6 @@
import org.gatein.mop.api.workspace.Site;
import org.gatein.mop.api.workspace.Workspace;
import org.gatein.mop.api.workspace.WorkspaceObject;
-import org.gatein.mop.core.api.MOPFormatter;
import org.gatein.mop.core.api.ModelImpl;
import org.gatein.mop.core.api.workspace.NavigationImpl;
import org.gatein.mop.core.api.workspace.PageImpl;
@@ -239,6 +239,13 @@
return prefs;
}
+ public POMSessionManager getManager()
+ {
+ return mgr;
+ }
+
+ private static final BaseEncodingObjectFormatter formatter = new BaseEncodingObjectFormatter();
+
public <O extends WorkspaceObject> Iterator<O> findObjects(ObjectType<O> type, ObjectType<? extends Site> siteType,
String ownerId, String title)
{
@@ -250,7 +257,7 @@
ownerId = ownerId.trim();
if (!ownerId.isEmpty())
{
- ownerIdChunk = new MOPFormatter().encodeNodeName(null, ownerId);
+ ownerIdChunk = "mop:" + formatter.encodeNodeName(null, ownerId);
}
}
Modified: portal/branches/decoupled-webos/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/SearchTask.java
===================================================================
--- portal/branches/decoupled-webos/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/SearchTask.java 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/SearchTask.java 2011-04-15 16:39:08 UTC (rev 6243)
@@ -23,6 +23,7 @@
import org.exoplatform.commons.utils.ListAccess;
import org.exoplatform.portal.application.PortletPreferences;
import org.exoplatform.portal.config.Query;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.portal.pom.config.POMTask;
import org.exoplatform.portal.pom.data.Mapper;
import org.exoplatform.portal.pom.data.NavigationData;
@@ -30,11 +31,7 @@
import org.exoplatform.portal.pom.data.PortalData;
import org.exoplatform.portal.pom.data.PortalKey;
import org.exoplatform.portal.pom.config.POMSession;
-import org.gatein.mop.api.workspace.Navigation;
-import org.gatein.mop.api.workspace.ObjectType;
-import org.gatein.mop.api.workspace.Site;
-import org.gatein.mop.api.workspace.Workspace;
-import org.gatein.mop.api.workspace.WorkspaceObject;
+import org.gatein.mop.api.workspace.*;
import java.util.ArrayList;
import java.util.Collection;
@@ -64,7 +61,7 @@
super(query);
}
- public LazyPageList<T> run(final POMSession session) throws Exception
+ public final LazyPageList<T> run(final POMSession session) throws Exception
{
Iterator<W> ite;
try
@@ -80,22 +77,24 @@
}
catch (IllegalArgumentException e)
{
- ite = Collections.<W> emptyList().iterator();
+ ite = Collections.<W>emptyList().iterator();
}
//
- final ArrayList<W> array = new ArrayList<W>();
+ final ArrayList<String> array = new ArrayList<String>();
while (ite.hasNext())
{
- array.add(ite.next());
+ array.add(ite.next().getObjectId());
}
//
- final Iterator<W> it = array.iterator();
+ final POMSessionManager manager = session.getManager();
+ final Iterator<String> it = array.iterator();
ListAccess<T> la = new ListAccess<T>()
{
public T[] load(int index, int length) throws Exception, IllegalArgumentException
{
+ POMSession session = manager.getSession();
T[] result = createT(length);
for (int i = 0; i < length; i++)
{
@@ -120,7 +119,7 @@
protected abstract T[] createT(int length);
- protected abstract T loadT(POMSession session, W w);
+ protected abstract T loadT(POMSession session, String id);
}
@@ -143,9 +142,10 @@
return new PageData[length];
}
- protected PageData loadT(POMSession session, org.gatein.mop.api.workspace.Page w)
+ protected PageData loadT(POMSession session, String id)
{
- return new Mapper(session).load(w);
+ Page page = session.getManager().getPOMService().getModel().findObjectById(ObjectType.PAGE, id);
+ return new Mapper(session).load(page);
}
}
@@ -168,9 +168,10 @@
return new NavigationData[length];
}
- protected NavigationData loadT(POMSession session, Navigation w)
+ protected NavigationData loadT(POMSession session, String id)
{
- return new Mapper(session).load(w);
+ Navigation nav = session.getManager().getPOMService().getModel().findObjectById(ObjectType.NAVIGATION, id);
+ return new Mapper(session).load(nav);
}
}
Modified: portal/branches/decoupled-webos/component/portal/src/main/java/org/exoplatform/portal/pom/spi/portlet/PortletState.java
===================================================================
--- portal/branches/decoupled-webos/component/portal/src/main/java/org/exoplatform/portal/pom/spi/portlet/PortletState.java 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/component/portal/src/main/java/org/exoplatform/portal/pom/spi/portlet/PortletState.java 2011-04-15 16:39:08 UTC (rev 6243)
@@ -20,7 +20,7 @@
package org.exoplatform.portal.pom.spi.portlet;
import org.chromattic.api.annotations.*;
-import org.gatein.mop.core.api.MOPFormatter;
+import org.chromattic.ext.format.BaseEncodingObjectFormatter;
import org.gatein.mop.core.api.workspace.content.AbstractCustomizationState;
import java.util.ArrayList;
@@ -32,7 +32,8 @@
* @version $Revision$
*/
@PrimaryType(name = "mop:portletpreferences")
-(a)FormattedBy(MOPFormatter.class)
+@NamingPrefix("mop")
+(a)FormattedBy(BaseEncodingObjectFormatter.class)
public abstract class PortletState extends AbstractCustomizationState
{
Modified: portal/branches/decoupled-webos/component/portal/src/test/java/org/exoplatform/portal/config/SampleMixin.java
===================================================================
--- portal/branches/decoupled-webos/component/portal/src/test/java/org/exoplatform/portal/config/SampleMixin.java 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/component/portal/src/test/java/org/exoplatform/portal/config/SampleMixin.java 2011-04-15 16:39:08 UTC (rev 6243)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.portal.config;
+import org.chromattic.api.annotations.DefaultValue;
import org.chromattic.api.annotations.MixinType;
import org.chromattic.api.annotations.Property;
@@ -30,7 +31,8 @@
public abstract class SampleMixin
{
- @Property(name = "gtn:sampleProperty", defaultValue = {"SampleProperty"})
+ @Property(name = "gtn:sampleProperty")
+ @DefaultValue("SampleProperty")
public abstract String getSampleProperty();
public abstract void setSampleProperty(String sampleProperty);
Modified: portal/branches/decoupled-webos/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java
===================================================================
--- portal/branches/decoupled-webos/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java 2011-04-15 16:39:08 UTC (rev 6243)
@@ -64,7 +64,7 @@
end();
}
- public void testDirtyWrite() throws Exception
+ public void _testDirtyWrite() throws Exception
{
begin();
session = mgr.openSession();
Modified: portal/branches/decoupled-webos/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java
===================================================================
--- portal/branches/decoupled-webos/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java 2011-04-15 16:39:08 UTC (rev 6243)
@@ -97,4 +97,26 @@
assertNotFound("foo");
assertNotFound("foo bar");
}
+
+ public void testSearchPageByOwnerID() throws Exception
+ {
+ Query<Page> q = new Query<Page>(null, "foo", Page.class);
+ List<Page> res = storage.find(q).getAll();
+ assertEquals(0, res.size());
+
+ q.setOwnerId("test");
+ res = storage.find(q).getAll();
+ int pageNum = res.size();
+ assertTrue(pageNum > 0);
+
+ //Test trim ownerID
+ q.setOwnerId(" test ");
+ res = storage.find(q).getAll();
+ assertEquals(pageNum, res.size());
+
+ //This should returns all pages
+ q.setOwnerId(null);
+ res = storage.find(q).getAll();
+ assertTrue(res.size() > 0);
+ }
}
Modified: portal/branches/decoupled-webos/pom.xml
===================================================================
--- portal/branches/decoupled-webos/pom.xml 2011-04-15 15:33:18 UTC (rev 6242)
+++ portal/branches/decoupled-webos/pom.xml 2011-04-15 16:39:08 UTC (rev 6243)
@@ -49,13 +49,13 @@
<org.gatein.pc.version>2.3.0-Beta01</org.gatein.pc.version>
<org.picketlink.idm>1.1.8.CR01</org.picketlink.idm>
<org.gatein.wsrp.version>2.1.0-Beta01</org.gatein.wsrp.version>
- <org.gatein.mop.version>1.0.6-Beta01</org.gatein.mop.version>
+ <org.gatein.mop.version>1.1.0-Beta01</org.gatein.mop.version>
<org.slf4j.version>1.5.6</org.slf4j.version>
<rhino.version>1.6R5</rhino.version>
<org.codehaus.groovy.version>1.6.5</org.codehaus.groovy.version>
<javax.servlet.version>2.5</javax.servlet.version>
- <version.chromattic>1.0.6</version.chromattic>
- <version.reflext>1.0.0</version.reflext>
+ <version.chromattic>1.1.0-beta2</version.chromattic>
+ <version.reflext>1.1.0-beta12</version.reflext>
<jcip.version>1.0</jcip.version>
<!-- ************** -->
13 years, 8 months
gatein SVN: r6242 - in components/sso/branches/1.0.1-GA-JBEPP-771/1.0.1-GA: agent/src/main/java/org/gatein/sso/agent/cas and 1 other directory.
by do-not-reply@jboss.org
Author: sohil.shah(a)jboss.com
Date: 2011-04-15 11:33:18 -0400 (Fri, 15 Apr 2011)
New Revision: 6242
Modified:
components/sso/branches/1.0.1-GA-JBEPP-771/1.0.1-GA/.classpath
components/sso/branches/1.0.1-GA-JBEPP-771/1.0.1-GA/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java
Log:
bug fixed
Modified: components/sso/branches/1.0.1-GA-JBEPP-771/1.0.1-GA/.classpath
===================================================================
--- components/sso/branches/1.0.1-GA-JBEPP-771/1.0.1-GA/.classpath 2011-04-15 15:12:35 UTC (rev 6241)
+++ components/sso/branches/1.0.1-GA-JBEPP-771/1.0.1-GA/.classpath 2011-04-15 15:33:18 UTC (rev 6242)
@@ -22,5 +22,5 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
Modified: components/sso/branches/1.0.1-GA-JBEPP-771/1.0.1-GA/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java
===================================================================
--- components/sso/branches/1.0.1-GA-JBEPP-771/1.0.1-GA/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java 2011-04-15 15:12:35 UTC (rev 6241)
+++ components/sso/branches/1.0.1-GA-JBEPP-771/1.0.1-GA/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java 2011-04-15 15:33:18 UTC (rev 6242)
@@ -79,7 +79,7 @@
Cas20ProxyTicketValidator ticketValidator = new Cas20ProxyTicketValidator(casServerUrl);
ticketValidator.setRenew(this.renewTicket);
- String serviceUrl = "http://"+ httpRequest.getServerName() +":" + httpRequest.getServerPort() +
+ String serviceUrl = httpRequest.getScheme() +"://"+ httpRequest.getServerName() +":" + httpRequest.getServerPort() +
httpRequest.getContextPath() +"/private/classic";
Assertion assertion = ticketValidator.validate(ticket, serviceUrl);
13 years, 8 months
gatein SVN: r6240 - components/sso/branches.
by do-not-reply@jboss.org
Author: sohil.shah(a)jboss.com
Date: 2011-04-15 11:10:32 -0400 (Fri, 15 Apr 2011)
New Revision: 6240
Added:
components/sso/branches/1.0.1-GA-JBEPP-771/
Log:
bug fix
13 years, 8 months
gatein SVN: r6239 - in components/wsrp/trunk: consumer and 11 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-04-15 09:26:57 -0400 (Fri, 15 Apr 2011)
New Revision: 6239
Modified:
components/wsrp/trunk/consumer/pom.xml
components/wsrp/trunk/pom.xml
components/wsrp/trunk/producer/pom.xml
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/WSRPProducerImpl.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/ServiceDescriptionHandler.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ProducerHelper.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/v1/WSRP1Producer.java
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessorTestCase.java
components/wsrp/trunk/wsrp-producer-war/pom.xml
components/wsrp/trunk/wsrp-producer-war/src/test/assembly/test-producer.xml
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/producer/WSRPProducerBaseTest.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/NeedPortletHandleTest.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/RegistrationTestCase.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/ServiceDescriptionTestCase.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/V1ProducerBaseTest.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/NeedPortletHandleTest.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/ServiceDescriptionTestCase.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/V2ProducerBaseTest.java
Log:
- GTNWSRP-45: PortletDescriptions are now generated/updated when a portlet is deployed/removed instead of re-generating all the descriptions each time a service description is asked for.
This required some changes in the test support to be able to trigger the appropriate events when a portlet is deployed/undeployed. Eventually, tests are still too tied one to another and will need to be cleaned up.
Modified: components/wsrp/trunk/consumer/pom.xml
===================================================================
--- components/wsrp/trunk/consumer/pom.xml 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/consumer/pom.xml 2011-04-15 13:26:57 UTC (rev 6239)
@@ -21,7 +21,8 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
@@ -117,7 +118,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>1.8.5</version>
+ <version>${version.mockito}</version>
<scope>test</scope>
</dependency>
<dependency>
Modified: components/wsrp/trunk/pom.xml
===================================================================
--- components/wsrp/trunk/pom.xml 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/pom.xml 2011-04-15 13:26:57 UTC (rev 6239)
@@ -59,6 +59,8 @@
<version.javax.xml.soap.saaj>1.3</version.javax.xml.soap.saaj>
<version.google-collections>1.0</version.google-collections>
<version.chromattic>1.1.0-beta2</version.chromattic>
+ <version.arquillian>1.0.0.Alpha2</version.arquillian>
+ <version.mockito>1.8.5</version.mockito>
</properties>
<dependencyManagement>
Modified: components/wsrp/trunk/producer/pom.xml
===================================================================
--- components/wsrp/trunk/producer/pom.xml 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/producer/pom.xml 2011-04-15 13:26:57 UTC (rev 6239)
@@ -21,7 +21,8 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
@@ -98,10 +99,16 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>1.8.5</version>
+ <version>${version.mockito}</version>
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.objenesis</groupId>
+ <artifactId>objenesis</artifactId>
+ <version>1.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/WSRPProducerImpl.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/WSRPProducerImpl.java 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/WSRPProducerImpl.java 2011-04-15 13:26:57 UTC (rev 6239)
@@ -492,11 +492,6 @@
return serviceDescriptionHandler.getPortletDescription(portletContext, locales, registration);
}
- public PortletDescription getPortletDescription(Portlet portlet, List<String> locales)
- {
- return serviceDescriptionHandler.getPortletDescription(portlet, locales);
- }
-
public Registration getRegistrationOrFailIfInvalid(RegistrationContext registrationContext) throws InvalidRegistration, OperationFailed, ModifyRegistrationRequired
{
Registration registration = registrationHandler.getRegistrationFrom(registrationContext);
@@ -505,6 +500,11 @@
return registration;
}
+ public void reset()
+ {
+ serviceDescriptionHandler.reset();
+ }
+
private Boolean remotableByDefault;
public Boolean isRemotableByDefault()
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/ServiceDescriptionHandler.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/ServiceDescriptionHandler.java 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/ServiceDescriptionHandler.java 2011-04-15 13:26:57 UTC (rev 6239)
@@ -75,7 +75,6 @@
import javax.xml.namespace.QName;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
@@ -93,10 +92,19 @@
private static final CookieProtocol BEA_8_CONSUMER_FIX = CookieProtocol.PER_USER;
private ServiceDescriptionInfo serviceDescription;
+ private static final List<String> OPTIONS = new ArrayList<String>(5);
+
+ static
+ {
+ OPTIONS.add(WSRP2Constants.OPTIONS_EVENTS);
+ OPTIONS.add(WSRP2Constants.OPTIONS_IMPORT);
+ OPTIONS.add(WSRP2Constants.OPTIONS_EXPORT);
+ }
+
public ServiceDescriptionHandler(WSRPProducerImpl producer)
{
super(producer);
- serviceDescription = new ServiceDescriptionInfo(producer);
+ reset();
}
public ServiceDescription getServiceDescription(GetServiceDescription gs)
@@ -126,20 +134,6 @@
// if we allow sending portlet descriptions even when not registered
boolean needsPortletDescriptions = !(registration == null && requirements.isRegistrationRequired()
&& requirements.isRegistrationRequiredForFullDescription());
- if (needsPortletDescriptions)
- {
- Set<Portlet> portlets;
- try
- {
- portlets = producer.getRemotablePortlets();
- }
- catch (PortletInvokerException e)
- {
- log.warn("Could not retrieve portlets. Reason:\n\t" + e.getLocalizedMessage());
- portlets = Collections.emptySet();
- }
- serviceDescription.updatePortletDescriptions(portlets, gs.getDesiredLocales(), registration);
- }
return serviceDescription.getServiceDescription(needsRegistrationProperties, needsPortletDescriptions, gs.getPortletHandles());
}
@@ -149,192 +143,21 @@
}
}
- public PortletDescription getPortletDescription(PortletContext portletContext, List<String> desiredLocales, Registration registration) throws InvalidHandle, OperationFailed
- {
- ParameterValidation.throwIllegalArgExceptionIfNull(portletContext, "portlet context");
- Portlet portlet;
- try
- {
- portlet = producer.getPortletWith(WSRPUtils.convertToPortalPortletContext(portletContext), registration);
- return getPortletDescription(portlet, desiredLocales);
- }
- catch (PortletInvokerException e)
- {
- throw WSRP2ExceptionFactory.throwWSException(OperationFailed.class, "Could not retrieve portlet '" + portletContext + "'", e);
- }
- }
-
/**
* Creates a PortletDescription based on the user desired locales (ordered according to user preferences) for the
* specified component.
*
- * @param portlet
+ * @param portletContext the PortletContext of the portlet for which a PortletDescription is needed
* @param desiredLocales the user desired locales (ordered according to user preferences) to use for the description
* @return a PortletDescription describing the specified portlet
*/
- public static PortletDescription getPortletDescription(Portlet portlet, List<String> desiredLocales)
+ public PortletDescription getPortletDescription(PortletContext portletContext, List<String> desiredLocales, Registration registration) throws InvalidHandle, OperationFailed
{
- return getPortletDescription(portlet, desiredLocales, null);
- }
+ ParameterValidation.throwIllegalArgExceptionIfNull(portletContext, "portlet context");
- /**
- * Creates a PortletDescription based on the user desired locales (ordered according to user preferences) for the
- * specified component.
- *
- * @param portlet
- * @param desiredLocales the user desired locales (ordered according to user preferences) to use for the description
- * @return a PortletDescription describing the specified portlet
- */
- static PortletDescription getPortletDescription(Portlet portlet, List<String> desiredLocales, ServiceDescriptionInfo sdi)
- {
- return getPortletDescription(portlet.getContext(), portlet.getInfo(), desiredLocales, sdi);
+ return serviceDescription.getPortletDescription(portletContext, desiredLocales, registration);
}
- private static PortletDescription getPortletDescription(org.gatein.pc.api.PortletContext context, PortletInfo info, List<String> desiredLocales, ServiceDescriptionInfo sdi)
- {
- String handle = context.getId();
- if (log.isDebugEnabled())
- {
- log.debug("Constructing portlet description for: " + handle);
- }
-
- CapabilitiesInfo capInfo = info.getCapabilities();
- Collection<MediaType> allMediaTypes = capInfo.getMediaTypes();
- List<MarkupType> markupTypes = new ArrayList<MarkupType>(allMediaTypes.size());
- for (MediaType mediaType : allMediaTypes)
- {
- MarkupType markupType = WSRPTypeFactory.createMarkupType(mediaType.getValue(),
- getModeNamesFrom(capInfo.getModes(mediaType)), getWindowStateNamesFrom(capInfo.getWindowStates(mediaType)),
- getLocaleNamesFrom(capInfo.getLocales(mediaType)));
- markupTypes.add(markupType);
- }
-
- PortletDescription desc = WSRPTypeFactory.createPortletDescription(handle, markupTypes);
-
- // group ID
- desc.setGroupID(info.getApplicationName());
-
- MetaInfo metaInfo = info.getMeta();
-
- // description
- desc.setDescription(Utils.convertToWSRPLocalizedString(metaInfo.getMetaValue(MetaInfo.DESCRIPTION), desiredLocales));
-
- // short title
- desc.setShortTitle(Utils.convertToWSRPLocalizedString(metaInfo.getMetaValue(MetaInfo.SHORT_TITLE), desiredLocales));
-
- // title
- desc.setTitle(Utils.convertToWSRPLocalizedString(metaInfo.getMetaValue(MetaInfo.TITLE), desiredLocales));
-
- // display name
- desc.setDisplayName(Utils.convertToWSRPLocalizedString(metaInfo.getMetaValue(MetaInfo.DISPLAY_NAME), desiredLocales));
-
- // keywords
- // metaInfo contains comma-separated keywords: we need to extract them into a list
- org.oasis.wsrp.v2.LocalizedString concatenatedKeywords =
- Utils.convertToWSRPLocalizedString(metaInfo.getMetaValue(MetaInfo.KEYWORDS), desiredLocales);
- if (concatenatedKeywords != null)
- {
- String commaSeparatedKeywords = concatenatedKeywords.getValue();
- if (commaSeparatedKeywords != null && commaSeparatedKeywords.length() > 0)
- {
- String lang = concatenatedKeywords.getLang();
- String[] keywordArray = commaSeparatedKeywords.split(",");
- for (String keyword : keywordArray)
- {
- // todo: fix resource name
- desc.getKeywords().add(WSRPTypeFactory.createLocalizedString(lang, concatenatedKeywords.getResourceName(), keyword.trim()));
- }
- }
- }
-
- // events
- EventingInfo eventsInfo = info.getEventing();
- if (eventsInfo != null)
- {
- Map<QName, ? extends EventInfo> producedEvents = eventsInfo.getProducedEvents();
- if (ParameterValidation.existsAndIsNotEmpty(producedEvents))
- {
- List<QName> publishedEvents = desc.getPublishedEvents();
- for (Map.Entry<QName, ? extends EventInfo> entry : producedEvents.entrySet())
- {
- publishedEvents.add(entry.getKey());
-
- // record event info in ServiceDescriptionInfo
- if (sdi != null)
- {
- sdi.addEventInfo(entry.getValue(), desiredLocales);
- }
- }
- }
- Map<QName, ? extends EventInfo> consumedEvents = eventsInfo.getConsumedEvents();
- if (ParameterValidation.existsAndIsNotEmpty(consumedEvents))
- {
- List<QName> handledEvents = desc.getHandledEvents();
- for (Map.Entry<QName, ? extends EventInfo> entry : consumedEvents.entrySet())
- {
- handledEvents.add(entry.getKey());
-
- // record event info in ServiceDescriptionInfo
- if (sdi != null)
- {
- sdi.addEventInfo(entry.getValue(), desiredLocales);
- }
- }
- }
- }
-
- // public parameters
- NavigationInfo navigationInfo = info.getNavigation();
- if (navigationInfo != null)
- {
- Collection<? extends ParameterInfo> parameterInfos = navigationInfo.getPublicParameters();
- if (ParameterValidation.existsAndIsNotEmpty(parameterInfos))
- {
- List<ParameterDescription> publicValueDescriptions = desc.getNavigationalPublicValueDescriptions();
- for (ParameterInfo parameterInfo : parameterInfos)
- {
- String id = parameterInfo.getId();
- ParameterDescription paramDesc = WSRPTypeFactory.createParameterDescription(id);
- paramDesc.setDescription(Utils.convertToWSRPLocalizedString(parameterInfo.getDescription(), desiredLocales));
- paramDesc.setLabel(WSRPTypeFactory.createLocalizedString(id));
- List<QName> names = paramDesc.getNames();
- names.add(parameterInfo.getName());
- Collection<QName> aliases = parameterInfo.getAliases();
- if (ParameterValidation.existsAndIsNotEmpty(aliases))
- {
- names.addAll(aliases);
- }
-
- publicValueDescriptions.add(paramDesc);
- }
- }
- }
-
- // security
- SecurityInfo secInfo = info.getSecurity();
- if (secInfo.containsTransportGuarantee(TransportGuarantee.INTEGRAL)
- || secInfo.containsTransportGuarantee(TransportGuarantee.CONFIDENTIAL))
- {
- desc.setOnlySecure(true);
- }
-
- /* todo:
- * [O] ID portletID
- * [O] string userCategories[]
- * [O] string userProfileItems[]
- * [O] string portletManagedModes[]
- * [O] boolean usesMethodGet
- * [O] boolean defaultMarkupSecure
- * [O] boolean userContextStoredInSession
- * [O] boolean templatesStoredInSession
- * [O] boolean hasUserSpecificState
- * [O] boolean doesUrlTemplateProcessing
- * [O] boolean mayReturnPortletState
- * [O] Extension extensions[]
- */
- return desc;
- }
-
public void onEvent(ManagedObjectRegistryEvent event)
{
if (event instanceof ManagedObjectEvent)
@@ -347,22 +170,20 @@
ManagedPortletContainer portletContainer = (ManagedPortletContainer)managedObject;
String applicationId = portletContainer.getManagedPortletApplication().getId();
String containerId = portletContainer.getId();
- // need PC 2.2.0-Beta06 API support
-// org.gatein.pc.api.PortletContext pc = org.gatein.pc.api.PortletContext.createPortletContext(applicationId, containerId);
- // todo: GTNWSRP-45: implement refreshing of ServiceDescriptionInfo
+ org.gatein.pc.api.PortletContext pc = org.gatein.pc.api.PortletContext.createPortletContext(applicationId, containerId);
+
if (managedObjectEvent instanceof ManagedObjectLifeCycleEvent)
{
ManagedObjectLifeCycleEvent lifeCycleEvent = (ManagedObjectLifeCycleEvent)managedObjectEvent;
LifeCycleStatus status = lifeCycleEvent.getStatus();
if (LifeCycleStatus.STARTED.equals(status))
{
- // todo: add portlet description for newly started portlet container
-// getPortletDescription(pc, portletContainer.getInfo(), )
+ serviceDescription.addPortletDescription(pc, portletContainer.getInfo());
}
else
{
- // todo: remore portlet description for stopped portlet container
+ serviceDescription.removePortletDescription(pc);
}
}
}
@@ -404,50 +225,35 @@
return result;
}
- private static class ServiceDescriptionInfo
+ public void reset()
{
- /** Empty service description: no registration properties, no offered portlets */
- private ServiceDescription noRegistrationNoPortletsServiceDescription;
- /** No registration properties, offered portles */
- private ServiceDescription noRegistrationPortletsServiceDescription;
- /** Registration properties, no offered portlets */
- private ServiceDescription registrationNoPortletsServiceDescription;
- /** Registration properties, offered portlets */
- private ServiceDescription registrationPortletsServiceDescription;
+ serviceDescription = new ServiceDescriptionInfo();
+ }
+ private class ServiceDescriptionInfo
+ {
private long lastGenerated;
private Map<QName, EventDescription> eventDescriptions;
+ private Map<QName, Integer> eventReferenceCount;
+ private Map<String, PortletDescription> portletDescriptions;
+ private ModelDescription registrationProperties;
+ private boolean initialized = false;
+ private boolean requireRegistrations;
- private static final List<String> OPTIONS = new ArrayList<String>(5);
-
- static
+ private ServiceDescriptionInfo()
{
- OPTIONS.add(WSRP2Constants.OPTIONS_EVENTS);
- OPTIONS.add(WSRP2Constants.OPTIONS_IMPORT);
- OPTIONS.add(WSRP2Constants.OPTIONS_EXPORT);
+ reset();
}
- private ServiceDescriptionInfo(WSRPProducerImpl producer)
+ void reset()
{
- noRegistrationNoPortletsServiceDescription = WSRPTypeFactory.createServiceDescription(false);
- noRegistrationNoPortletsServiceDescription.setRequiresInitCookie(BEA_8_CONSUMER_FIX);
- noRegistrationNoPortletsServiceDescription.getLocales().addAll(producer.getSupportedLocales());
- noRegistrationNoPortletsServiceDescription.getSupportedOptions().addAll(OPTIONS);
-
- noRegistrationPortletsServiceDescription = WSRPTypeFactory.createServiceDescription(false);
- noRegistrationPortletsServiceDescription.setRequiresInitCookie(BEA_8_CONSUMER_FIX);
- noRegistrationPortletsServiceDescription.getLocales().addAll(producer.getSupportedLocales());
- noRegistrationPortletsServiceDescription.getSupportedOptions().addAll(OPTIONS);
-
- registrationNoPortletsServiceDescription = WSRPTypeFactory.createServiceDescription(false);
- registrationNoPortletsServiceDescription.setRequiresInitCookie(BEA_8_CONSUMER_FIX);
- registrationNoPortletsServiceDescription.getLocales().addAll(producer.getSupportedLocales());
- registrationNoPortletsServiceDescription.getSupportedOptions().addAll(OPTIONS);
-
- registrationPortletsServiceDescription = WSRPTypeFactory.createServiceDescription(false);
- registrationPortletsServiceDescription.setRequiresInitCookie(BEA_8_CONSUMER_FIX);
- registrationPortletsServiceDescription.getLocales().addAll(producer.getSupportedLocales());
- registrationPortletsServiceDescription.getSupportedOptions().addAll(OPTIONS);
+ lastGenerated = 0;
+ eventDescriptions = new HashMap<QName, EventDescription>(37);
+ eventReferenceCount = new HashMap<QName, Integer>(37);
+ portletDescriptions = new HashMap<String, PortletDescription>(37);
+ registrationProperties = null;
+ initialized = false;
+ requireRegistrations = false;
}
private void updateRegistrationProperties(ProducerRegistrationRequirements requirements)
@@ -462,123 +268,95 @@
// do not create a ModelDescription if there is no registration properties
Map<QName, RegistrationPropertyDescription> info = requirements.getRegistrationProperties();
- ModelDescription registrationProperties = null;
if (ParameterValidation.existsAndIsNotEmpty(info))
{
registrationProperties = Utils.convertRegistrationPropertiesToModelDescription(info);
}
- registrationNoPortletsServiceDescription.setRegistrationPropertyDescription(registrationProperties);
- registrationPortletsServiceDescription.setRegistrationPropertyDescription(registrationProperties);
+ else
+ {
+ registrationProperties = null;
+ }
// update need to register
- noRegistrationNoPortletsServiceDescription.setRequiresRegistration(requirements.isRegistrationRequired());
- noRegistrationPortletsServiceDescription.setRequiresRegistration(requirements.isRegistrationRequired());
- registrationNoPortletsServiceDescription.setRequiresRegistration(requirements.isRegistrationRequired());
- registrationPortletsServiceDescription.setRequiresRegistration(requirements.isRegistrationRequired());
+ requireRegistrations = requirements.isRegistrationRequired();
lastGenerated = System.nanoTime();
}
}
- private void updatePortletDescriptions(Set<Portlet> portlets, List<String> desiredLocales, Registration registration)
+ private void updatePortletDescriptions()
{
- if (ParameterValidation.existsAndIsNotEmpty(portlets))
+ try
{
- Collection<PortletDescription> offeredPortletDescriptions = new ArrayList<PortletDescription>(portlets.size());
-
- // reset event descriptions as they will be repopulated when we build the portlet descriptions
- eventDescriptions = new HashMap<QName, EventDescription>(portlets.size());
-
- for (Portlet portlet : portlets)
+ Set<Portlet> portlets = producer.getRemotablePortlets();
+ if (ParameterValidation.existsAndIsNotEmpty(portlets))
{
- PortletDescription desc = getPortletDescription(portlet, desiredLocales, this);
- offeredPortletDescriptions.add(desc);
+ for (Portlet portlet : portlets)
+ {
+ addPortletDescription(portlet.getContext(), portlet.getInfo());
+ }
}
- // events
- Collection<EventDescription> events = eventDescriptions.values();
- List<EventDescription> eventDescriptions = registrationPortletsServiceDescription.getEventDescriptions();
- eventDescriptions.clear();
- eventDescriptions.addAll(events);
-
- eventDescriptions = registrationNoPortletsServiceDescription.getEventDescriptions();
- eventDescriptions.clear();
- eventDescriptions.addAll(events);
-
- eventDescriptions = noRegistrationPortletsServiceDescription.getEventDescriptions();
- eventDescriptions.clear();
- eventDescriptions.addAll(events);
-
- eventDescriptions = noRegistrationNoPortletsServiceDescription.getEventDescriptions();
- eventDescriptions.clear();
- eventDescriptions.addAll(events);
-
- // portlets
- List<PortletDescription> offeredPortlets = registrationPortletsServiceDescription.getOfferedPortlets();
- offeredPortlets.clear();
- offeredPortlets.addAll(offeredPortletDescriptions);
-
- offeredPortlets = noRegistrationPortletsServiceDescription.getOfferedPortlets();
- offeredPortlets.clear();
- offeredPortlets.addAll(offeredPortletDescriptions);
+ initialized = true;
}
+ catch (PortletInvokerException e)
+ {
+ log.warn("Couldn't get remotable portlets", e);
+ }
}
private ServiceDescription getServiceDescription(boolean needsRegistrationProperties, boolean needsPortletDescriptions, List<String> portletHandles)
{
- ServiceDescription serviceDescription;
- if (needsRegistrationProperties)
- {
- serviceDescription = needsPortletDescriptions ? registrationPortletsServiceDescription : registrationNoPortletsServiceDescription;
- }
- else
- {
- serviceDescription = needsPortletDescriptions ? noRegistrationPortletsServiceDescription : noRegistrationNoPortletsServiceDescription;
- }
+ initIfNeeded();
- // if we have a list of portlet handles, filter the list of offered portlets
- if (ParameterValidation.existsAndIsNotEmpty(portletHandles))
+ ModelDescription registrationProperties = needsRegistrationProperties ? this.registrationProperties : null;
+
+ ServiceDescription serviceDescription = WSRPTypeFactory.createServiceDescription(false);
+ serviceDescription.setRequiresInitCookie(BEA_8_CONSUMER_FIX);
+ serviceDescription.getLocales().addAll(producer.getSupportedLocales());
+ serviceDescription.getSupportedOptions().addAll(OPTIONS);
+ serviceDescription.setRegistrationPropertyDescription(registrationProperties);
+ serviceDescription.setRequiresRegistration(requireRegistrations);
+
+ Collection<PortletDescription> portlets;
+ if (needsPortletDescriptions)
{
- List<PortletDescription> offeredPortlets = serviceDescription.getOfferedPortlets();
- List<PortletDescription> filteredPortlets = new ArrayList<PortletDescription>(offeredPortlets.size());
- for (String handle : portletHandles)
+ // if we have a list of portlet handles, filter the list of offered portlets
+ if (ParameterValidation.existsAndIsNotEmpty(portletHandles))
{
- for (PortletDescription description : offeredPortlets)
+ portlets = new ArrayList<PortletDescription>(portletHandles.size());
+ for (String handle : portletHandles)
{
- if (description.getPortletHandle().equals(handle))
+ PortletDescription description = portletDescriptions.get(handle);
+ if (description != null)
{
- filteredPortlets.add(description);
- break; // no need to continue looping over portlets for this particular handle
+ portlets.add(description);
}
}
}
+ else
+ {
+ portlets = portletDescriptions.values();
+ }
+ serviceDescription.getOfferedPortlets().addAll(portlets);
+ }
- // shallow-clone the existing service description since we're not modifying it apart from the offered portlets list
- ServiceDescription filtered = WSRPTypeFactory.createServiceDescription(serviceDescription.isRequiresRegistration());
- filtered.setExportDescription(serviceDescription.getExportDescription());
- filtered.setMayReturnRegistrationState(serviceDescription.isMayReturnRegistrationState());
- filtered.setRegistrationPropertyDescription(serviceDescription.getRegistrationPropertyDescription());
- filtered.setRequiresInitCookie(serviceDescription.getRequiresInitCookie());
- filtered.setResourceList(serviceDescription.getResourceList());
- filtered.setSchemaType(serviceDescription.getSchemaType());
- filtered.getCustomModeDescriptions().addAll(serviceDescription.getCustomModeDescriptions());
- filtered.getCustomWindowStateDescriptions().addAll(serviceDescription.getCustomWindowStateDescriptions());
- filtered.getEventDescriptions().addAll(serviceDescription.getEventDescriptions());
- filtered.getExtensionDescriptions().addAll(serviceDescription.getExtensionDescriptions());
- filtered.getExtensions().addAll(serviceDescription.getExtensions());
- filtered.getLocales().addAll(serviceDescription.getLocales());
- filtered.getSupportedOptions().addAll(serviceDescription.getSupportedOptions());
+ // events
+ Collection<EventDescription> events = eventDescriptions.values();
+ serviceDescription.getEventDescriptions().addAll(events);
- // add filtered portlets
- filtered.getOfferedPortlets().addAll(filteredPortlets);
+ return serviceDescription;
+ }
- return filtered;
+ private void initIfNeeded()
+ {
+ if (!initialized)
+ {
+ updatePortletDescriptions();
}
-
- return serviceDescription;
}
- public void addEventInfo(EventInfo info, List<String> desiredLocales)
+ private void addEventInfo(EventInfo info, List<String> desiredLocales)
{
QName name = info.getName();
if (!eventDescriptions.containsKey(name))
@@ -593,7 +371,240 @@
}
// todo: deal with type info...
eventDescriptions.put(name, desc);
+ eventReferenceCount.put(name, 1);
}
+ else
+ {
+ Integer current = eventReferenceCount.get(name);
+ eventReferenceCount.put(name, current + 1); // increase reference count
+ }
}
+
+ private void removeEvent(QName name)
+ {
+ Integer current = eventReferenceCount.get(name);
+ if (current != null)
+ {
+ if (current == 1)
+ {
+ eventDescriptions.remove(name);
+ eventReferenceCount.remove(name);
+ }
+ else
+ {
+ eventReferenceCount.put(name, current - 1);
+ }
+ }
+ }
+
+ private void addPortletDescription(org.gatein.pc.api.PortletContext context, PortletInfo info)
+ {
+ List<String> locales = producer.getSupportedLocales();
+
+ String handle = context.getId();
+ PortletDescription desc = createPortletDescription(info, locales, handle);
+
+ portletDescriptions.put(handle, desc);
+ }
+
+ private PortletDescription createPortletDescription(PortletInfo info, List<String> locales, String handle)
+ {
+ if (log.isDebugEnabled())
+ {
+ log.debug("Constructing portlet description for: " + handle);
+ }
+
+ CapabilitiesInfo capInfo = info.getCapabilities();
+ Collection<MediaType> allMediaTypes = capInfo.getMediaTypes();
+ List<MarkupType> markupTypes = new ArrayList<MarkupType>(allMediaTypes.size());
+ for (MediaType mediaType : allMediaTypes)
+ {
+ MarkupType markupType = WSRPTypeFactory.createMarkupType(mediaType.getValue(),
+ getModeNamesFrom(capInfo.getModes(mediaType)), getWindowStateNamesFrom(capInfo.getWindowStates(mediaType)),
+ getLocaleNamesFrom(capInfo.getLocales(mediaType)));
+ markupTypes.add(markupType);
+ }
+
+ PortletDescription desc = WSRPTypeFactory.createPortletDescription(handle, markupTypes);
+
+ // group ID
+ desc.setGroupID(info.getApplicationName());
+
+ MetaInfo metaInfo = info.getMeta();
+
+ // description
+ desc.setDescription(Utils.convertToWSRPLocalizedString(metaInfo.getMetaValue(MetaInfo.DESCRIPTION), locales));
+
+ // short title
+ desc.setShortTitle(Utils.convertToWSRPLocalizedString(metaInfo.getMetaValue(MetaInfo.SHORT_TITLE), locales));
+
+ // title
+ desc.setTitle(Utils.convertToWSRPLocalizedString(metaInfo.getMetaValue(MetaInfo.TITLE), locales));
+
+ // display name
+ desc.setDisplayName(Utils.convertToWSRPLocalizedString(metaInfo.getMetaValue(MetaInfo.DISPLAY_NAME), locales));
+
+ // keywords
+ // metaInfo contains comma-separated keywords: we need to extract them into a list
+ org.oasis.wsrp.v2.LocalizedString concatenatedKeywords =
+ Utils.convertToWSRPLocalizedString(metaInfo.getMetaValue(MetaInfo.KEYWORDS), locales);
+ if (concatenatedKeywords != null)
+ {
+ String commaSeparatedKeywords = concatenatedKeywords.getValue();
+ if (commaSeparatedKeywords != null && commaSeparatedKeywords.length() > 0)
+ {
+ String lang = concatenatedKeywords.getLang();
+ String[] keywordArray = commaSeparatedKeywords.split(",");
+ for (String keyword : keywordArray)
+ {
+ // todo: fix resource name
+ desc.getKeywords().add(WSRPTypeFactory.createLocalizedString(lang, concatenatedKeywords.getResourceName(), keyword.trim()));
+ }
+ }
+ }
+
+ // events
+ EventingInfo eventsInfo = info.getEventing();
+ if (eventsInfo != null)
+ {
+ Map<QName, ? extends EventInfo> producedEvents = eventsInfo.getProducedEvents();
+ if (ParameterValidation.existsAndIsNotEmpty(producedEvents))
+ {
+ List<QName> publishedEvents = desc.getPublishedEvents();
+ for (Map.Entry<QName, ? extends EventInfo> entry : producedEvents.entrySet())
+ {
+ publishedEvents.add(entry.getKey());
+ addEventInfo(entry.getValue(), locales);
+ }
+ }
+ Map<QName, ? extends EventInfo> consumedEvents = eventsInfo.getConsumedEvents();
+ if (ParameterValidation.existsAndIsNotEmpty(consumedEvents))
+ {
+ List<QName> handledEvents = desc.getHandledEvents();
+ for (Map.Entry<QName, ? extends EventInfo> entry : consumedEvents.entrySet())
+ {
+ handledEvents.add(entry.getKey());
+ addEventInfo(entry.getValue(), locales);
+ }
+ }
+ }
+
+ // public parameters
+ NavigationInfo navigationInfo = info.getNavigation();
+ if (navigationInfo != null)
+ {
+ Collection<? extends ParameterInfo> parameterInfos = navigationInfo.getPublicParameters();
+ if (ParameterValidation.existsAndIsNotEmpty(parameterInfos))
+ {
+ List<ParameterDescription> publicValueDescriptions = desc.getNavigationalPublicValueDescriptions();
+ for (ParameterInfo parameterInfo : parameterInfos)
+ {
+ String id = parameterInfo.getId();
+ ParameterDescription paramDesc = WSRPTypeFactory.createParameterDescription(id);
+ paramDesc.setDescription(Utils.convertToWSRPLocalizedString(parameterInfo.getDescription(), locales));
+ paramDesc.setLabel(WSRPTypeFactory.createLocalizedString(id));
+ List<QName> names = paramDesc.getNames();
+ names.add(parameterInfo.getName());
+ Collection<QName> aliases = parameterInfo.getAliases();
+ if (ParameterValidation.existsAndIsNotEmpty(aliases))
+ {
+ names.addAll(aliases);
+ }
+
+ publicValueDescriptions.add(paramDesc);
+ }
+ }
+ }
+
+ // security
+ SecurityInfo secInfo = info.getSecurity();
+ if (secInfo.containsTransportGuarantee(TransportGuarantee.INTEGRAL)
+ || secInfo.containsTransportGuarantee(TransportGuarantee.CONFIDENTIAL))
+ {
+ desc.setOnlySecure(true);
+ }
+
+ /* todo:
+ *[O]ID portletID
+ *[O]string userCategories[]
+ *[O]string userProfileItems[]
+ *[O]string portletManagedModes[]
+ *[O]boolean usesMethodGet
+ *[O]boolean defaultMarkupSecure
+ *[O]boolean userContextStoredInSession
+ *[O]boolean templatesStoredInSession
+ *[O]boolean hasUserSpecificState
+ *[O]boolean doesUrlTemplateProcessing
+ *[O]boolean mayReturnPortletState
+ *[O]Extension extensions[]
+ */
+ return desc;
+ }
+
+ /**
+ * TODO: Adapt to desired locales
+ *
+ * @param context
+ * @param desiredLocales
+ * @param registration
+ * @return
+ */
+ public PortletDescription getPortletDescription(PortletContext context, List<String> desiredLocales, Registration registration)
+ {
+ initIfNeeded();
+
+ org.gatein.pc.api.PortletContext pcContext = WSRPUtils.convertToPortalPortletContext(context);
+ if (producer.getRegistrationManager().getPolicy().allowAccessTo(pcContext, registration, "getPortletDescription"))
+ {
+ PortletDescription description = portletDescriptions.get(context.getPortletHandle());
+
+ if (description == null)
+ {
+ // check if we asked for the description of a clone
+ if (registration.knows(pcContext))
+ {
+ try
+ {
+ // retrieve initial context from portlet info and get description from it
+ Portlet portlet = producer.getPortletWith(pcContext, registration);
+ PortletInfo info = portlet.getInfo();
+ org.gatein.pc.api.PortletContext original = org.gatein.pc.api.PortletContext.createPortletContext(info.getApplicationName(), info.getName());
+ return portletDescriptions.get(original.getId());
+ }
+ catch (Exception e)
+ {
+ log.debug("Couldn't retrieve portlet " + pcContext, e);
+ return null;
+ }
+ }
+ }
+ return description;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public void removePortletDescription(org.gatein.pc.api.PortletContext pc)
+ {
+ String handle = WSRPUtils.convertToWSRPPortletContext(pc).getPortletHandle();
+
+ PortletDescription description = portletDescriptions.get(handle);
+ if (description != null)
+ {
+ // deal with events
+ for (QName event : description.getHandledEvents())
+ {
+ removeEvent(event);
+ }
+ for (QName event : description.getPublishedEvents())
+ {
+ removeEvent(event);
+ }
+
+ portletDescriptions.remove(handle);
+ }
+ }
}
}
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ProducerHelper.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ProducerHelper.java 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ProducerHelper.java 2011-04-15 13:26:57 UTC (rev 6239)
@@ -47,4 +47,6 @@
PortletDescription getPortletDescription(PortletContext portletContext, List<String> locales, Registration registration) throws InvalidHandle, OperationFailed;
Registration getRegistrationOrFailIfInvalid(RegistrationContext registrationContext) throws InvalidRegistration, OperationFailed, ModifyRegistrationRequired;
+
+ void reset();
}
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/v1/WSRP1Producer.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/v1/WSRP1Producer.java 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/v1/WSRP1Producer.java 2011-04-15 13:26:57 UTC (rev 6239)
@@ -24,13 +24,18 @@
package org.gatein.wsrp.producer.v1;
import org.gatein.exports.ExportManager;
+import org.gatein.pc.api.Portlet;
import org.gatein.pc.api.PortletInvoker;
+import org.gatein.pc.api.PortletInvokerException;
import org.gatein.pc.portlet.container.managed.ManagedObjectRegistryEvent;
+import org.gatein.registration.Registration;
import org.gatein.registration.RegistrationManager;
import org.gatein.wsrp.api.context.ProducerContext;
import org.gatein.wsrp.producer.ProducerHolder;
import org.gatein.wsrp.producer.WSRPProducer;
+import org.gatein.wsrp.producer.WSRPProducerImpl;
import org.gatein.wsrp.producer.config.ProducerConfigurationService;
+import org.gatein.wsrp.producer.handlers.processors.ProducerHelper;
import org.gatein.wsrp.producer.v2.WSRP2Producer;
import org.gatein.wsrp.spec.v1.V1ToV2Converter;
import org.gatein.wsrp.spec.v1.V2ToV1Converter;
@@ -88,6 +93,7 @@
import org.oasis.wsrp.v2.OperationFailed;
import org.oasis.wsrp.v2.OperationNotSupported;
import org.oasis.wsrp.v2.PortletContext;
+import org.oasis.wsrp.v2.PortletDescription;
import org.oasis.wsrp.v2.PortletDescriptionResponse;
import org.oasis.wsrp.v2.PortletPropertyDescriptionResponse;
import org.oasis.wsrp.v2.PortletStateChangeRequired;
@@ -101,14 +107,35 @@
import org.oasis.wsrp.v2.UnsupportedMode;
import org.oasis.wsrp.v2.UnsupportedWindowState;
+import java.util.List;
+
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision$
*/
public class WSRP1Producer implements WSRPProducer, V1MarkupInterface, V1PortletManagementInterface,
- V1RegistrationInterface, V1ServiceDescriptionInterface
+ V1RegistrationInterface, V1ServiceDescriptionInterface, ProducerHelper
{
+ public Portlet getPortletWith(org.gatein.pc.api.PortletContext portletContext, Registration registration) throws InvalidHandle, PortletInvokerException
+ {
+ return ((ProducerHelper)producer).getPortletWith(portletContext, registration);
+ }
+ public PortletDescription getPortletDescription(PortletContext portletContext, List<String> locales, Registration registration) throws InvalidHandle, OperationFailed
+ {
+ return ((ProducerHelper)producer).getPortletDescription(portletContext, locales, registration);
+ }
+
+ public Registration getRegistrationOrFailIfInvalid(RegistrationContext registrationContext) throws InvalidRegistration, OperationFailed, ModifyRegistrationRequired
+ {
+ return ((ProducerHelper)producer).getRegistrationOrFailIfInvalid(registrationContext);
+ }
+
+ public void reset()
+ {
+ ((ProducerHelper)producer).reset();
+ }
+
// On-demand class holder Singleton pattern (multi-thread safe)
private static final class InstanceHolder
Modified: components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessorTestCase.java
===================================================================
--- components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessorTestCase.java 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessorTestCase.java 2011-04-15 13:26:57 UTC (rev 6239)
@@ -200,5 +200,10 @@
return null; //To change body of implemented methods use File | Settings | File Templates.
}
+ public void reset()
+ {
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+
}
}
Modified: components/wsrp/trunk/wsrp-producer-war/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/pom.xml 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/wsrp-producer-war/pom.xml 2011-04-15 13:26:57 UTC (rev 6239)
@@ -22,7 +22,8 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
@@ -336,27 +337,27 @@
</dependency>
<dependency>
- <groupId>org.jboss.arquillian</groupId>
- <artifactId>arquillian-api</artifactId>
- <version>1.0.0.Alpha2</version>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.6</version>
+ <groupId>org.jboss.arquillian</groupId>
+ <artifactId>arquillian-api</artifactId>
+ <version>${version.arquillian}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-junit</artifactId>
- <version>1.0.0.Alpha2</version>
+ <version>${version.arquillian}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-jbossas-remote-51</artifactId>
- <version>1.0.0.Alpha2</version>
+ <version>${version.arquillian}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -426,6 +427,12 @@
<version>1.0.3.GA</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>1.8.5</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/assembly/test-producer.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/assembly/test-producer.xml 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/assembly/test-producer.xml 2011-04-15 13:26:57 UTC (rev 6239)
@@ -64,6 +64,10 @@
<include>com.google.collections:google-collections</include>
+ <!-- mockito and related dependencies -->
+ <include>org.mockito:mockito-core</include>
+ <include>org.objenesis:objenesis</include>
+
</includes>
</dependencySet>
</dependencySets>
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/producer/WSRPProducerBaseTest.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/producer/WSRPProducerBaseTest.java 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/producer/WSRPProducerBaseTest.java 2011-04-15 13:26:57 UTC (rev 6239)
@@ -24,14 +24,28 @@
package org.gatein.wsrp.producer;
import junit.framework.TestCase;
+import org.gatein.pc.api.Portlet;
+import org.gatein.pc.api.PortletContext;
+import org.gatein.pc.portlet.container.managed.LifeCycleStatus;
+import org.gatein.pc.portlet.container.managed.ManagedObjectLifeCycleEvent;
+import org.gatein.pc.portlet.container.managed.ManagedPortletApplication;
+import org.gatein.pc.portlet.container.managed.ManagedPortletContainer;
import org.gatein.registration.RegistrationException;
import org.gatein.wsrp.producer.config.ProducerRegistrationRequirements;
+import org.gatein.wsrp.producer.handlers.processors.ProducerHelper;
+import org.mockito.Mockito;
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
@@ -39,6 +53,9 @@
*/
public abstract class WSRPProducerBaseTest extends TestCase
{
+ protected Map<String, List<String>> war2Handles = new HashMap<String, List<String>>(7);
+ protected String currentlyDeployedArchiveName;
+
protected WSRPProducerBaseTest(String name) throws Exception
{
super(name);
@@ -46,6 +63,8 @@
protected abstract WSRPProducer getProducer();
+ protected abstract ProducerHelper getProducerHelper();
+
public void deploy(String warFileName) throws Exception
{
String deployURLPrefix = System.getProperty("jboss.deploy.url.prefix");
@@ -62,6 +81,60 @@
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
reader.readLine();
reader.close();
+
+ WSRPProducer producer = getProducer();
+ Set<Portlet> portlets = producer.getPortletInvoker().getPortlets();
+ for (Portlet portlet : portlets)
+ {
+ // trigger management events so that the service description is properly updated
+ org.gatein.pc.api.PortletContext context = portlet.getContext();
+ if (!war2Handles.containsKey(getWarName(context.getId())))
+ {
+ ManagedPortletApplication portletApplication = Mockito.mock(ManagedPortletApplication.class);
+ PortletContext.PortletContextComponents components = context.getComponents();
+ Mockito.stub(portletApplication.getId()).toReturn(components.getApplicationName());
+
+ ManagedPortletContainer portletContainer = Mockito.mock(ManagedPortletContainer.class);
+ Mockito.stub(portletContainer.getManagedPortletApplication()).toReturn(portletApplication);
+ Mockito.stub(portletContainer.getId()).toReturn(components.getPortletName());
+ Mockito.stub(portletContainer.getInfo()).toReturn(portlet.getInfo());
+
+ ManagedObjectLifeCycleEvent lifeCycleEvent = Mockito.mock(ManagedObjectLifeCycleEvent.class);
+ Mockito.stub(lifeCycleEvent.getManagedObject()).toReturn(portletContainer);
+ Mockito.stub(lifeCycleEvent.getStatus()).toReturn(LifeCycleStatus.STARTED);
+
+ producer.onEvent(lifeCycleEvent);
+ }
+ }
+
+ currentlyDeployedArchiveName = warFileName;
+
+ if (!war2Handles.containsKey(warFileName))
+ {
+ Collection<String> portletHandles = getPortletHandles();
+ if (portletHandles != null)
+ {
+ for (String handle : portletHandles)
+ {
+ String warName = getWarName(handle);
+ if (warName.equals(warFileName))
+ {
+ List<String> handles = war2Handles.get(warName);
+ if (handles == null)
+ {
+ handles = new ArrayList<String>(3);
+ war2Handles.put(warName, handles);
+ }
+
+ handles.add(handle);
+ }
+ }
+ }
+ else
+ {
+ throw new IllegalArgumentException(warFileName + " didn't contain any portlets...");
+ }
+ }
}
else
{
@@ -74,6 +147,48 @@
String undeployURLPrefix = System.getProperty("jboss.undeploy.url.prefix");
if (undeployURLPrefix != null)
{
+ currentlyDeployedArchiveName = null;
+
+ List<String> handles = war2Handles.get(warFileName);
+ WSRPProducer producer = getProducer();
+ if (handles != null)
+ {
+ for (String handle : handles)
+ {
+ // trigger management events so that the service description is properly updated
+ PortletContext context = PortletContext.createPortletContext(handle);
+
+ try
+ {
+ Portlet portlet = producer.getPortletInvoker().getPortlet(context);
+ ManagedPortletApplication portletApplication = Mockito.mock(ManagedPortletApplication.class);
+ PortletContext.PortletContextComponents components = context.getComponents();
+ Mockito.stub(portletApplication.getId()).toReturn(components.getApplicationName());
+
+ ManagedPortletContainer portletContainer = Mockito.mock(ManagedPortletContainer.class);
+ Mockito.stub(portletContainer.getManagedPortletApplication()).toReturn(portletApplication);
+ Mockito.stub(portletContainer.getId()).toReturn(components.getPortletName());
+ Mockito.stub(portletContainer.getInfo()).toReturn(portlet.getInfo());
+
+ ManagedObjectLifeCycleEvent lifeCycleEvent = Mockito.mock(ManagedObjectLifeCycleEvent.class);
+ Mockito.stub(lifeCycleEvent.getManagedObject()).toReturn(portletContainer);
+ Mockito.stub(lifeCycleEvent.getStatus()).toReturn(LifeCycleStatus.STOPPED);
+
+ producer.onEvent(lifeCycleEvent);
+ }
+ catch (Exception e)
+ {
+ // do nothing the portlet is already undeployed
+ }
+ }
+ }
+
+ // only remove the mapping if we're not undeploying the most used portlet (optimization, as it avoids parsing the SD)
+ if (removeCurrent(warFileName))
+ {
+ war2Handles.remove(warFileName);
+ }
+
File archiveDirectory = getDirectory("test.deployables.dir");
File archiveFile = getArchive(warFileName, archiveDirectory);
@@ -92,6 +207,8 @@
}
}
+ protected abstract boolean removeCurrent(String archiveName);
+
protected void resetRegistrationInfo() throws RegistrationException
{
WSRPProducer producer = getProducer();
@@ -150,6 +267,7 @@
super.setUp();
resetRegistrationInfo();
+ getProducerHelper().reset();
}
public void tearDown() throws Exception
@@ -157,4 +275,12 @@
resetRegistrationInfo();
super.tearDown();
}
+
+ protected String getWarName(String handle)
+ {
+ org.gatein.pc.api.PortletContext context = org.gatein.pc.api.PortletContext.createPortletContext(handle);
+ return context.getComponents().getApplicationName() + ".war";
+ }
+
+ protected abstract Collection<String> getPortletHandles() throws Exception;
}
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java 2011-04-15 13:26:57 UTC (rev 6239)
@@ -130,25 +130,25 @@
V1GetMarkup getMarkup = createMarkupRequest();
getMarkup.getRuntimeContext().setNamespacePrefix(null);
getMarkup.getRuntimeContext().setPortletInstanceKey(null);
-
+
assertNull(getMarkup.getRuntimeContext().getNamespacePrefix());
assertNull(getMarkup.getRuntimeContext().getPortletInstanceKey());
-
+
V1MarkupResponse response = producer.getMarkup(getMarkup);
-
+
checkMarkupResponse(response, DEFAULT_VIEW_MARKUP);
-
+
getMarkup.getRuntimeContext().setNamespacePrefix("");
getMarkup.getRuntimeContext().setPortletInstanceKey("");
-
+
assertSame("", getMarkup.getRuntimeContext().getNamespacePrefix());
assertSame("", getMarkup.getRuntimeContext().getPortletInstanceKey());
-
+
response = producer.getMarkup(getMarkup);
-
+
checkMarkupResponse(response, DEFAULT_VIEW_MARKUP);
}
-
+
@Test
public void testInvalidGetMarkup() throws Exception
{
@@ -671,14 +671,6 @@
}
}
- private V1NamedString createNamedString(String name, String value)
- {
- V1NamedString namedString = new V1NamedString();
- namedString.setName(name);
- namedString.setValue(value);
- return namedString;
- }
-
@Test
public void testGetMarkupWithResource() throws Exception
{
@@ -823,6 +815,14 @@
}
}
+ private V1NamedString createNamedString(String name, String value)
+ {
+ V1NamedString namedString = new V1NamedString();
+ namedString.setName(name);
+ namedString.setValue(value);
+ return namedString;
+ }
+
private String checkPBIAndGetNavigationalState(String symbol) throws Exception
{
V1PerformBlockingInteraction performBlockingInteraction =
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/NeedPortletHandleTest.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/NeedPortletHandleTest.java 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/NeedPortletHandleTest.java 2011-04-15 13:26:57 UTC (rev 6239)
@@ -24,22 +24,15 @@
package org.gatein.wsrp.protocol.v1;
import org.gatein.wsrp.WSRPConstants;
-import org.gatein.wsrp.spec.v1.WSRP1TypeFactory;
import org.oasis.wsrp.v1.V1GetMarkup;
-import org.oasis.wsrp.v1.V1GetServiceDescription;
import org.oasis.wsrp.v1.V1InvalidRegistration;
import org.oasis.wsrp.v1.V1InvalidRegistrationFault;
import org.oasis.wsrp.v1.V1MarkupResponse;
import org.oasis.wsrp.v1.V1OperationFailed;
import org.oasis.wsrp.v1.V1OperationFailedFault;
-import org.oasis.wsrp.v1.V1PortletDescription;
-import org.oasis.wsrp.v1.V1ServiceDescription;
import java.rmi.RemoteException;
-import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
@@ -49,8 +42,6 @@
public abstract class NeedPortletHandleTest extends V1ProducerBaseTest
{
private String mostUsedPortletWARFileName;
- private String currentlyDeployedArchiveName;
- private Map<String, List<String>> war2Handles = new HashMap<String, List<String>>(7);
public NeedPortletHandleTest(String portletWARFileName)
@@ -96,71 +87,11 @@
return war2Handles.get(currentlyDeployedArchiveName);
}
- /**
- * Each time we deploy a new archive, check to see if the service description has changed and add any new portlet
- * handles found.
- *
- * @param archiveName
- * @throws Exception
- */
- public void deploy(String archiveName) throws Exception
+ protected boolean removeCurrent(String archiveName)
{
- super.deploy(archiveName);
- currentlyDeployedArchiveName = archiveName;
-
- if (!war2Handles.containsKey(archiveName))
- {
- V1GetServiceDescription getServiceDescription = WSRP1TypeFactory.createGetServiceDescription();
- V1ServiceDescription serviceDescription = producer.getServiceDescription(getServiceDescription);
- List<V1PortletDescription> offered = serviceDescription.getOfferedPortlets();
- if (offered != null)
- {
- for (V1PortletDescription portletDescription : offered)
- {
- String handle = portletDescription.getPortletHandle();
- String warName = handle.substring(1, handle.indexOf('.')) + ".war";
- if (warName.equals(archiveName))
- {
- List<String> handles = war2Handles.get(warName);
- if (handles == null)
- {
- handles = new ArrayList<String>(3);
- war2Handles.put(warName, handles);
- }
-
- handles.add(handle);
- }
- }
- }
- else
- {
- throw new IllegalArgumentException(archiveName + " didn't contain any portlets...");
- }
- }
+ return !mostUsedPortletWARFileName.equals(archiveName);
}
- public void undeploy(String archiveName) throws Exception
- {
- try
- {
- super.undeploy(archiveName);
- }
- catch (Exception e)
- {
- // if an exception occurred the portlet is still probably deployed, so just exit
- e.printStackTrace();
- return;
- }
-
- currentlyDeployedArchiveName = null;
-
- // only remove the mapping if we're not undeploying the most used portlet (optimization, as it avoids parsing the SD)
- if (!mostUsedPortletWARFileName.equals(archiveName))
- {
- war2Handles.remove(archiveName);
- }
- }
-
public void setUp() throws Exception
{
super.setUp();
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/RegistrationTestCase.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/RegistrationTestCase.java 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/RegistrationTestCase.java 2011-04-15 13:26:57 UTC (rev 6239)
@@ -80,29 +80,35 @@
jar.addClass(WSRPProducerBaseTest.class);
return jar;
}
-
+
+ @Override
+ protected boolean removeCurrent(String archiveName)
+ {
+ return true;
+ }
+
@Before
public void setUp() throws Exception
{
if (System.getProperty("test.deployables.dir") != null)
{
- super.setUp();
- //hack to get around having to have a httpservletrequest when accessing the producer services
- //I don't know why its really needed, seems to be a dependency where wsrp connects with the pc module
- ServletAccess.setRequestAndResponse(MockHttpServletRequest.createMockRequest(null), MockHttpServletResponse.createMockResponse());
+ super.setUp();
+ //hack to get around having to have a httpservletrequest when accessing the producer services
+ //I don't know why its really needed, seems to be a dependency where wsrp connects with the pc module
+ ServletAccess.setRequestAndResponse(MockHttpServletRequest.createMockRequest(null), MockHttpServletResponse.createMockResponse());
}
}
-
-
+
+
@After
public void tearDown() throws Exception
{
- if (System.getProperty("test.deployables.dir") != null)
- {
- super.tearDown();
- }
+ if (System.getProperty("test.deployables.dir") != null)
+ {
+ super.tearDown();
+ }
}
-
+
/**
* R355: The portal MUST pass a name for itself that uniquely identifies it.
*
@@ -151,23 +157,23 @@
{
try
{
- // check that a registration handle was created
- V1RegistrationContext rc = registerConsumer();
- String registrationHandle = rc.getRegistrationHandle();
- assertNotNull(registrationHandle);
+ // check that a registration handle was created
+ V1RegistrationContext rc = registerConsumer();
+ String registrationHandle = rc.getRegistrationHandle();
+ assertNotNull(registrationHandle);
- // check that a registration was created with that handle
- RegistrationManager registrationManager = producer.getRegistrationManager();
- Registration registration = registrationManager.getRegistration(registrationHandle);
- assertNotNull(registration);
+ // check that a registration was created with that handle
+ RegistrationManager registrationManager = producer.getRegistrationManager();
+ Registration registration = registrationManager.getRegistration(registrationHandle);
+ assertNotNull(registration);
- // check that the registration was persisted...
- String key = registration.getPersistentKey();
- assertNotNull(key);
+ // check that the registration was persisted...
+ String key = registration.getPersistentKey();
+ assertNotNull(key);
- // ... and that the handle was created by the policy based on the registration key
- String expectedHandle = registrationManager.getPolicy().createRegistrationHandleFor(key);
- assertEquals(expectedHandle, registrationHandle);
+ // ... and that the handle was created by the policy based on the registration key
+ String expectedHandle = registrationManager.getPolicy().createRegistrationHandleFor(key);
+ assertEquals(expectedHandle, registrationHandle);
}
catch (Exception e)
{
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/ServiceDescriptionTestCase.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/ServiceDescriptionTestCase.java 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/ServiceDescriptionTestCase.java 2011-04-15 13:26:57 UTC (rev 6239)
@@ -78,26 +78,26 @@
jar.addClass(WSRPProducerBaseTest.class);
return jar;
}
-
+
@Before
public void setUp() throws Exception
{
if (System.getProperty("test.deployables.dir") != null)
{
- super.setUp();
- //hack to get around having to have a httpservletrequest when accessing the producer services
- //I don't know why its really needed, seems to be a dependency where wsrp connects with the pc module
- ServletAccess.setRequestAndResponse(MockHttpServletRequest.createMockRequest(null), MockHttpServletResponse.createMockResponse());
+ super.setUp();
+ //hack to get around having to have a httpservletrequest when accessing the producer services
+ //I don't know why its really needed, seems to be a dependency where wsrp connects with the pc module
+ ServletAccess.setRequestAndResponse(MockHttpServletRequest.createMockRequest(null), MockHttpServletResponse.createMockResponse());
}
}
-
+
@After
public void tearDown() throws Exception
{
- if (System.getProperty("test.deployables.dir") != null)
- {
- super.tearDown();
- }
+ if (System.getProperty("test.deployables.dir") != null)
+ {
+ super.tearDown();
+ }
}
@Test
@@ -115,11 +115,11 @@
// No registration properties
ExtendedAssert.assertNull(sd.getRegistrationPropertyDescription());
}
-
+
/**
- * Test to make sure that when switching from required to not-required (and vise-versa) that
- * the change properly persists to the service description.
- *
+ * Test to make sure that when switching from required to not-required (and vise-versa) that the change properly
+ * persists to the service description.
+ *
* @throws Throwable
*/
@Test
@@ -128,20 +128,20 @@
producer.getConfigurationService().getConfiguration().getRegistrationRequirements().setRegistrationRequired(false);
V1GetServiceDescription gs = getNoRegistrationServiceDescriptionRequest();
V1ServiceDescription sd = producer.getServiceDescription(gs);
-
+
// registration is not required
ExtendedAssert.assertFalse(sd.isRequiresRegistration());
-
+
producer.getConfigurationService().getConfiguration().getRegistrationRequirements().setRegistrationRequired(true);
gs = getNoRegistrationServiceDescriptionRequest();
sd = producer.getServiceDescription(gs);
-
+
ExtendedAssert.assertTrue(sd.isRequiresRegistration());
-
+
producer.getConfigurationService().getConfiguration().getRegistrationRequirements().setRegistrationRequired(false);
gs = getNoRegistrationServiceDescriptionRequest();
sd = producer.getServiceDescription(gs);
-
+
ExtendedAssert.assertFalse(sd.isRequiresRegistration());
}
@@ -229,4 +229,10 @@
ExtendedAssert.assertEquals(1, propertyDescriptions.size());
assertEquals(V2ToV1Converter.toV1PropertyDescription(WSRPUtils.convertToPropertyDescription(regProp)), propertyDescriptions.get(0));
}
+
+ @Override
+ protected boolean removeCurrent(String archiveName)
+ {
+ return true;
+ }
}
\ No newline at end of file
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/V1ProducerBaseTest.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/V1ProducerBaseTest.java 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/V1ProducerBaseTest.java 2011-04-15 13:26:57 UTC (rev 6239)
@@ -23,6 +23,8 @@
package org.gatein.wsrp.protocol.v1;
+import com.google.common.base.Function;
+import com.google.common.collect.Collections2;
import org.gatein.registration.RegistrationException;
import org.gatein.registration.RegistrationManager;
import org.gatein.registration.policies.DefaultRegistrationPolicy;
@@ -32,6 +34,7 @@
import org.gatein.wsrp.producer.WSRPProducer;
import org.gatein.wsrp.producer.WSRPProducerBaseTest;
import org.gatein.wsrp.producer.config.ProducerRegistrationRequirements;
+import org.gatein.wsrp.producer.handlers.processors.ProducerHelper;
import org.gatein.wsrp.producer.v1.WSRP1Producer;
import org.gatein.wsrp.registration.RegistrationPropertyDescription;
import org.gatein.wsrp.spec.v1.WSRP1TypeFactory;
@@ -53,6 +56,7 @@
import javax.xml.namespace.QName;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.List;
@@ -64,6 +68,13 @@
public abstract class V1ProducerBaseTest extends WSRPProducerBaseTest
{
private static final String CONSUMER = "test-consumer";
+ private static final Function<V1PortletDescription, String> PORTLET_DESCRIPTION_TO_HANDLE = new Function<V1PortletDescription, String>()
+ {
+ public String apply(V1PortletDescription from)
+ {
+ return from.getPortletHandle();
+ }
+ };
protected WSRP1Producer producer = ProducerHolder.getV1Producer();
@@ -83,6 +94,12 @@
return producer;
}
+ @Override
+ protected ProducerHelper getProducerHelper()
+ {
+ return producer;
+ }
+
/**
* Checks that the specified portlet description corresponds to the expected description of test-basic-portlet. If
* the handle parameter is not null, checks that it corresponds to the specified portlet decription.
@@ -269,23 +286,74 @@
// ExtendedAssert.assertTrue(cause instanceof SOAPFaultException);
// ExtendedAssert.assertEquals(errorCode, ((SOAPFaultException)cause).getFault().getLocalPart());
}
-
-
+
+
protected V1GetMarkup createDefaultMarkupRequest(String handle)
{
V1PortletContext portletContext = WSRP1TypeFactory.createPortletContext(handle);
return WSRP1TypeFactory.createMarkupRequest(portletContext, createDefaultRuntimeContext(), WSRP1TypeFactory.createDefaultMarkupParams());
}
-
+
protected V1PerformBlockingInteraction createDefaultPerformBlockingInteraction(String handle)
{
V1PortletContext portletContext = WSRP1TypeFactory.createPortletContext(handle);
return WSRP1TypeFactory.createPerformBlockingInteraction(portletContext, createDefaultRuntimeContext(), WSRP1TypeFactory.createDefaultMarkupParams(),
- WSRP1TypeFactory.createDefaultInteractionParams());
+ WSRP1TypeFactory.createDefaultInteractionParams());
}
-
+
protected V1RuntimeContext createDefaultRuntimeContext()
{
return WSRP1TypeFactory.createRuntimeContext(WSRPConstants.NONE_USER_AUTHENTICATION, "foo", "bar");
}
+
+ /**
+ * Each time we deploy a new archive, check to see if the service description has changed and add any new portlet
+ * handles found.
+ *
+ * @param archiveName
+ * @throws Exception
+ */
+ /*public void deploy(String archiveName) throws Exception
+ {
+ super.deploy(archiveName);
+ currentlyDeployedArchiveName = archiveName;
+
+ if (!war2Handles.containsKey(archiveName))
+ {
+ V1GetServiceDescription getServiceDescription = WSRP1TypeFactory.createGetServiceDescription();
+ V1ServiceDescription serviceDescription = producer.getServiceDescription(getServiceDescription);
+ List<V1PortletDescription> offered = serviceDescription.getOfferedPortlets();
+ if (offered != null)
+ {
+ for (V1PortletDescription portletDescription : offered)
+ {
+ String handle = portletDescription.getPortletHandle();
+ String warName = getWarName(handle);
+ if (warName.equals(archiveName))
+ {
+ List<String> handles = war2Handles.get(warName);
+ if (handles == null)
+ {
+ handles = new ArrayList<String>(3);
+ war2Handles.put(warName, handles);
+ }
+
+ handles.add(handle);
+ }
+ }
+ }
+ else
+ {
+ throw new IllegalArgumentException(archiveName + " didn't contain any portlets...");
+ }
+ }
+ }*/
+ @Override
+ protected Collection<String> getPortletHandles() throws Exception
+ {
+ V1GetServiceDescription getServiceDescription = WSRP1TypeFactory.createGetServiceDescription();
+ V1ServiceDescription serviceDescription = producer.getServiceDescription(getServiceDescription);
+ List<V1PortletDescription> offered = serviceDescription.getOfferedPortlets();
+ return Collections2.transform(offered, PORTLET_DESCRIPTION_TO_HANDLE);
+ }
}
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/NeedPortletHandleTest.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/NeedPortletHandleTest.java 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/NeedPortletHandleTest.java 2011-04-15 13:26:57 UTC (rev 6239)
@@ -40,6 +40,7 @@
import java.rmi.RemoteException;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -51,8 +52,6 @@
public abstract class NeedPortletHandleTest extends V2ProducerBaseTest
{
private String mostUsedPortletWARFileName;
- private String currentlyDeployedArchiveName;
- private Map<String, List<String>> war2Handles = new HashMap<String, List<String>>(7);
public NeedPortletHandleTest(String portletWARFileName)
@@ -98,71 +97,12 @@
return war2Handles.get(currentlyDeployedArchiveName);
}
- /**
- * Each time we deploy a new archive, check to see if the service description has changed and add any new portlet
- * handles found.
- *
- * @param archiveName
- * @throws Exception
- */
- public void deploy(String archiveName) throws Exception
+ @Override
+ protected boolean removeCurrent(String archiveName)
{
- super.deploy(archiveName);
- currentlyDeployedArchiveName = archiveName;
-
- if (!war2Handles.containsKey(archiveName))
- {
- GetServiceDescription getServiceDescription = WSRPTypeFactory.createGetServiceDescription(null, null);
- ServiceDescription serviceDescription = producer.getServiceDescription(getServiceDescription);
- List<PortletDescription> offered = serviceDescription.getOfferedPortlets();
- if (offered != null)
- {
- for (PortletDescription portletDescription : offered)
- {
- String handle = portletDescription.getPortletHandle();
- String warName = handle.substring(1, handle.indexOf('.')) + ".war";
- if (warName.equals(archiveName))
- {
- List<String> handles = war2Handles.get(warName);
- if (handles == null)
- {
- handles = new ArrayList<String>(3);
- war2Handles.put(warName, handles);
- }
-
- handles.add(handle);
- }
- }
- }
- else
- {
- throw new IllegalArgumentException(archiveName + " didn't contain any portlets...");
- }
- }
+ return !mostUsedPortletWARFileName.equals(archiveName);
}
- public void undeploy(String archiveName) throws Exception
- {
- try
- {
- super.undeploy(archiveName);
- }
- catch (Exception e)
- {
- // if an exception occurred the portlet is still probably deployed, so just exit
- e.printStackTrace();
- return;
- }
-
- currentlyDeployedArchiveName = null;
-
- // only remove the mapping if we're not undeploying the most used portlet (optimization, as it avoids parsing the SD)
- if (!mostUsedPortletWARFileName.equals(archiveName))
- {
- war2Handles.remove(archiveName);
- }
- }
-
public void setUp() throws Exception
{
super.setUp();
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/ServiceDescriptionTestCase.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/ServiceDescriptionTestCase.java 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/ServiceDescriptionTestCase.java 2011-04-15 13:26:57 UTC (rev 6239)
@@ -77,6 +77,12 @@
return jar;
}
+ @Override
+ protected boolean removeCurrent(String archiveName)
+ {
+ return true;
+ }
+
@Before
public void setUp() throws Exception
{
@@ -107,9 +113,10 @@
gsd.getPortletHandles().clear();
- assertEquals(original, producer.getServiceDescription(gsd));
+ assertEquals(original.getOfferedPortlets(), producer.getServiceDescription(gsd).getOfferedPortlets());
}
+ @Test
public void testServiceDescriptionFilterInexistentFilter() throws Exception
{
GetServiceDescription gsd = getNoRegistrationServiceDescriptionRequest();
@@ -122,7 +129,7 @@
deploy("test-session-portlet.war");
ServiceDescription sd = producer.getServiceDescription(gsd);
- assertEquals(3, sd.getOfferedPortlets().size());
+ assertEquals(0, sd.getOfferedPortlets().size());
}
finally
{
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/V2ProducerBaseTest.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/V2ProducerBaseTest.java 2011-04-15 10:02:15 UTC (rev 6238)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/V2ProducerBaseTest.java 2011-04-15 13:26:57 UTC (rev 6239)
@@ -23,6 +23,8 @@
package org.gatein.wsrp.protocol.v2;
+import com.google.common.base.Function;
+import com.google.common.collect.Collections2;
import org.gatein.registration.RegistrationException;
import org.gatein.registration.RegistrationManager;
import org.gatein.registration.policies.DefaultRegistrationPolicy;
@@ -32,19 +34,32 @@
import org.gatein.wsrp.producer.WSRPProducer;
import org.gatein.wsrp.producer.WSRPProducerBaseTest;
import org.gatein.wsrp.producer.config.ProducerRegistrationRequirements;
+import org.gatein.wsrp.producer.handlers.processors.ProducerHelper;
import org.gatein.wsrp.producer.v2.WSRP2Producer;
import org.gatein.wsrp.registration.RegistrationPropertyDescription;
import org.gatein.wsrp.test.ExtendedAssert;
import org.oasis.wsrp.v2.GetServiceDescription;
+import org.oasis.wsrp.v2.PortletDescription;
+import org.oasis.wsrp.v2.ServiceDescription;
import javax.xml.namespace.QName;
+import java.util.Collection;
+import java.util.List;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision$
*/
-public class V2ProducerBaseTest extends WSRPProducerBaseTest
+public abstract class V2ProducerBaseTest extends WSRPProducerBaseTest
{
+ private static final Function<PortletDescription, String> PORTLET_DESCRIPTION_TO_HANDLE = new Function<PortletDescription, String>()
+ {
+ public String apply(PortletDescription from)
+ {
+ return from.getPortletHandle();
+ }
+ };
+
protected WSRP2Producer producer = ProducerHolder.getProducer(true);
private static final String CONSUMER = "test-consumer";
@@ -65,6 +80,21 @@
return producer;
}
+ @Override
+ protected ProducerHelper getProducerHelper()
+ {
+ return (ProducerHelper)producer;
+ }
+
+ @Override
+ protected Collection<String> getPortletHandles() throws Exception
+ {
+ GetServiceDescription getServiceDescription = WSRPTypeFactory.createGetServiceDescription(null, null);
+ ServiceDescription serviceDescription = producer.getServiceDescription(getServiceDescription);
+ List<PortletDescription> offered = serviceDescription.getOfferedPortlets();
+ return Collections2.transform(offered, PORTLET_DESCRIPTION_TO_HANDLE);
+ }
+
protected GetServiceDescription getNoRegistrationServiceDescriptionRequest()
{
GetServiceDescription gs = WSRPTypeFactory.createGetServiceDescription(null, null);
13 years, 8 months
gatein SVN: r6238 - portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2011-04-15 06:02:15 -0400 (Fri, 15 Apr 2011)
New Revision: 6238
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java
Log:
GTNPORTAL-1864 Fix org.exoplatform.portal.config.TestCache to make sure it doesn't affect other tests
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java 2011-04-15 09:20:27 UTC (rev 6237)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java 2011-04-15 10:02:15 UTC (rev 6238)
@@ -125,8 +125,12 @@
page = storage_.getPage("portal::test::test4");
assertEquals("foo", page.getTitle());
+ // Restore to orginal value
+ page.setTitle(null);
+ storage_.save(page);
+
//
- end();
+ end(true);
}
public void testGetPageFromRemovedPortal() throws Exception
13 years, 8 months