JBoss Portal SVN: r13507 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state.
by portal-commits@lists.jboss.org
Author: mputz
Date: 2009-06-29 09:41:59 -0400 (Mon, 29 Jun 2009)
New Revision: 13507
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStatePersistenceManager.java
Log:
Add session.flush() to fix JBPORTAL-2389
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStatePersistenceManager.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStatePersistenceManager.java 2009-06-29 12:56:27 UTC (rev 13506)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStatePersistenceManager.java 2009-06-29 13:41:59 UTC (rev 13507)
@@ -195,6 +195,7 @@
//
context.entries.clear();
+ session.flush();
for (Iterator i = propertyMap.keySet().iterator(); i.hasNext();)
{
String key = (String)i.next();
14 years, 10 months
JBoss Portal SVN: r13506 - branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-60_JBEPP-95/core/src/main/org/jboss/portal/core/impl/portlet/state.
by portal-commits@lists.jboss.org
Author: mputz
Date: 2009-06-29 08:56:27 -0400 (Mon, 29 Jun 2009)
New Revision: 13506
Modified:
branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-60_JBEPP-95/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStatePersistenceManager.java
Log:
Add session.flush() to fix JBEPP-95
Modified: branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-60_JBEPP-95/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStatePersistenceManager.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-60_JBEPP-95/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStatePersistenceManager.java 2009-06-29 10:03:03 UTC (rev 13505)
+++ branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-60_JBEPP-95/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStatePersistenceManager.java 2009-06-29 12:56:27 UTC (rev 13506)
@@ -195,6 +195,8 @@
//
context.entries.clear();
+ // fix for JBPORTAL-2389
+ session.flush();
for (Iterator i = propertyMap.keySet().iterator(); i.hasNext();)
{
String key = (String)i.next();
14 years, 10 months
JBoss Portal SVN: r13505 - branches.
by portal-commits@lists.jboss.org
Author: mputz
Date: 2009-06-29 06:03:03 -0400 (Mon, 29 Jun 2009)
New Revision: 13505
Added:
branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-60_JBEPP-95/
Log:
Create patch branch for JBEPP-95
Copied: branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-60_JBEPP-95 (from rev 13504, branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-60)
14 years, 10 months
JBoss Portal SVN: r13504 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-06-29 05:10:35 -0400 (Mon, 29 Jun 2009)
New Revision: 13504
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java
Log:
[selenium] - minor fix in login
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2009-06-26 13:31:03 UTC (rev 13503)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2009-06-29 09:10:35 UTC (rev 13504)
@@ -395,6 +395,7 @@
selenium.type(INPUT_USERNAME, username);
selenium.type(INPUT_PASSWORD, password);
selenium.fireEvent(INPUT_PASSWORD, "keydown");
+ waitFor(AJAX_LOAD);
Assert.assertTrue(selenium.isElementPresent(SUBMIT_LOGIN),"login submit button not found");
selenium.click(SUBMIT_LOGIN);
selenium.waitForPageToLoad(PAGE_LOAD);
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java 2009-06-26 13:31:03 UTC (rev 13503)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java 2009-06-29 09:10:35 UTC (rev 13504)
@@ -69,6 +69,7 @@
selenium.type(INP_PASSWORD, loginPass);
selenium.fireEvent(INP_PASSWORD, "keydown");
+ waitFor(AJAX_LOAD);
selenium.click(SUB_LOGIN);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -111,6 +112,7 @@
Assert.assertTrue(selenium.isElementPresent(INP_PASSWORD), "Expected input DOM element for password doesn't exist.");
selenium.type(INP_PASSWORD, loginPass);
selenium.fireEvent(INP_PASSWORD, "keydown");
+ waitFor(AJAX_LOAD);
selenium.click(SUB_LOGIN);
// waitFor(AJAX_LOAD);
@@ -154,7 +156,8 @@
selenium.type(INP_USERNAME, loginName);
Assert.assertTrue(selenium.isElementPresent(INP_PASSWORD), "Expected input DOM element for password doesn't exist.");
selenium.type(INP_PASSWORD, loginPass);
-
+ selenium.fireEvent(INP_PASSWORD, "keydown");
+ waitFor(AJAX_LOAD);
selenium.click(SUB_CANCEL);
selenium.selectFrame(FRM_MAIN);
@@ -191,6 +194,7 @@
Assert.assertTrue(selenium.isElementPresent(INP_PASSWORD), "Expected input DOM element for password doesn't exist.");
selenium.type(INP_PASSWORD, loginPass);
selenium.fireEvent(INP_PASSWORD, "keydown");
+ waitFor(AJAX_LOAD);
selenium.click(SUB_LOGIN);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -225,6 +229,7 @@
Assert.assertTrue(selenium.isElementPresent(INP_PASSWORD), "Expected input DOM element for password doesn't exist.");
selenium.type(INP_PASSWORD, loginPass);
selenium.fireEvent(INP_PASSWORD, "keydown");
+ waitFor(AJAX_LOAD);
selenium.click(SUB_LOGIN);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -257,6 +262,7 @@
selenium.type(INP_USERNAME, loginName);
selenium.type(INP_PASSWORD, XSS_STR1);
selenium.fireEvent(INP_PASSWORD, "keydown");
+ waitFor(AJAX_LOAD);
selenium.click(SUB_LOGIN);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent(MSG_LOGIN_WRONGPASS),"validation message missing or other than expected");
14 years, 10 months
JBoss Portal SVN: r13503 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-06-26 09:31:03 -0400 (Fri, 26 Jun 2009)
New Revision: 13503
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
Log:
[selenium] dashboards testcase fix
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2009-06-26 13:28:52 UTC (rev 13502)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2009-06-26 13:31:03 UTC (rev 13503)
@@ -605,7 +605,7 @@
Assert.assertFalse(selenium.getValue(INP_WINDOW_NAME).equals(XSS_STR1),
"XSS string found on the page in window name input.");
Assert.assertTrue(selenium.isTextPresent(MSG_NO_PORTLET),"Message about no portlet selected missing or other then expected");
-
+ /*
selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -621,6 +621,7 @@
Assert.assertFalse(selenium.getValue(INP_WINDOW_NAME).equals(XSS_STR1),
"XSS string found on the page in window name input after pressing enter on it.");
Assert.assertTrue(selenium.isTextPresent(MSG_NO_PORTLET),"Message about no portlet selected missing or other then expected");
+ */
}
// http://www.jboss.com/index.html?module=bb&op=viewtopic&t=143023
14 years, 10 months
JBoss Portal SVN: r13502 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-06-26 09:28:52 -0400 (Fri, 26 Jun 2009)
New Revision: 13502
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
Log:
[selenium] - portal admin e2e test fix
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2009-06-25 16:30:42 UTC (rev 13501)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2009-06-26 13:28:52 UTC (rev 13502)
@@ -108,16 +108,16 @@
final String page1ManName = "firstManPage";
- final String PORTLET1 = "Cart Portlet";
- final String por1str = "Cart Portlet";
- final String PORTLET2 = "Band Culinaria";
- final String por2str = "Band Culinaria";
- final String PORTLET3 = "Web Assurance";
- final String por3str = "web-assurance.net";
- final String PORTLET4 = "dir1/foo.txt";
- final String por4str = "File Portlet";
- final String PORTLET5 = "default/project.html";
- final String por5str = "Our wiki knowledge base";
+ final String PORTLET1 = getMess(casePfx+"port1","Cart Portlet");
+ final String por1str = getMess(casePfx+"port1.str","Cart Portlet");
+ final String PORTLET2 = getMess(casePfx+"port2","Calendar and Calculators");
+ final String por2str = getMess(casePfx+"port2.str","Calendar and Calculators");
+ final String PORTLET3 = getMess(casePfx+"port3","Web Assurance");
+ final String por3str = getMess(casePfx+"port3.str","web-assurance.net");
+ final String PORTLET4 = getMess(casePfx+"port4","dir1/foo.txt");
+ final String por4str = getMess(casePfx+"port4.str","File Portlet");
+ final String PORTLET5 = getMess(casePfx+"port5","default/project.html");
+ final String por5str = getMess(casePfx+"port5.str","Our wiki knowledge base");
/**
* Usecase for creating small portal with content. Portal named
@@ -311,7 +311,7 @@
goToProperties();
// add original drag and drop
- selenium.setSpeed("5000");
+ //selenium.setSpeed("5000");
selectIfNotSelected(SEL_PREDEF_PROP, "Drag and drop");
selenium.click(SUB_POR_PROPERTY);
selenium.waitForPageToLoad(PAGE_LOAD);
14 years, 10 months
JBoss Portal SVN: r13501 - in modules/wsrp/trunk: admin-gui and 27 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-06-25 12:30:42 -0400 (Thu, 25 Jun 2009)
New Revision: 13501
Added:
modules/wsrp/trunk/core/src/assemble/
modules/wsrp/trunk/core/src/assemble/portal-wsrp-client-jar.xml
modules/wsrp/trunk/core/src/assemble/portal-wsrp-war.xml
modules/wsrp/trunk/service/
modules/wsrp/trunk/service/pom.xml
modules/wsrp/trunk/service/src/
modules/wsrp/trunk/service/src/main/
modules/wsrp/trunk/service/src/main/resources/
modules/wsrp/trunk/service/src/main/resources/META-INF/
modules/wsrp/trunk/service/src/main/resources/META-INF/jboss-service.xml
modules/wsrp/trunk/service/src/main/resources/conf/
modules/wsrp/trunk/service/src/main/resources/conf/hibernate/
modules/wsrp/trunk/service/src/main/resources/conf/hibernate/consumer/
modules/wsrp/trunk/service/src/main/resources/conf/hibernate/consumer/domain.hbm.xml
modules/wsrp/trunk/service/src/main/resources/conf/hibernate/consumer/ehcache.xml
modules/wsrp/trunk/service/src/main/resources/conf/hibernate/consumer/hibernate.cfg.xml
modules/wsrp/trunk/service/src/main/resources/conf/producer/
modules/wsrp/trunk/service/src/main/resources/conf/producer/config.xml
modules/wsrp/trunk/service/src/main/resources/default-wsrp.xml
modules/wsrp/trunk/service/src/main/resources/dtd/
modules/wsrp/trunk/service/src/main/resources/dtd/jboss-wsrp-consumer_2_6.dtd
modules/wsrp/trunk/service/src/main/resources/dtd/jboss-wsrp-producer_2_6.dtd
modules/wsrp/trunk/service/src/main/resources/wsrp-aop.xml
modules/wsrp/trunk/service/src/main/resources/xsd/
modules/wsrp/trunk/service/src/main/resources/xsd/jboss-wsrp-consumer_2_6.xsd
modules/wsrp/trunk/service/src/main/resources/xsd/jboss-wsrp-producer_2_6.xsd
modules/wsrp/trunk/service/src/main/resources/xsd/jboss-wsrp-producer_2_7.xsd
modules/wsrp/trunk/service/src/main/resources/xsd/xml.xsd
modules/wsrp/trunk/src/
modules/wsrp/trunk/src/assemble/
modules/wsrp/trunk/src/assemble/wsrp-service.xml
modules/wsrp/trunk/test-support/
modules/wsrp/trunk/test-support/pom.xml
modules/wsrp/trunk/test-support/src/
modules/wsrp/trunk/test-support/src/main/
modules/wsrp/trunk/test-support/src/main/java/
modules/wsrp/trunk/test-support/src/main/java/org/
modules/wsrp/trunk/test-support/src/main/java/org/jboss/
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/BehaviorRegistry.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/InitCookieFakerHandler.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/MarkupBehavior.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/PortletManagementBehavior.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/RegistrationBehavior.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/ServiceDescriptionBehavior.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/TestProducerBehavior.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/TestWSRPProducer.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/TestWSRPProducerImpl.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BasicInstanceContext.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BasicPortalContext.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BasicSecurityContext.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BasicUserContext.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BehaviorBackedServiceFactory.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockConsumerRegistry.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockHttpServletRequest.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockHttpServletResponse.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockHttpSession.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockWSRPConsumer.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/ServiceObjectFactory.java
modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/TestPortletInvocationContext.java
Modified:
modules/wsrp/trunk/admin-gui/pom.xml
modules/wsrp/trunk/build/pom.xml
modules/wsrp/trunk/core/pom.xml
modules/wsrp/trunk/pom.xml
Log:
- JBPORTAL-2186: More WSRP extraction
+ Extracted common test framework into test-support module
+ Extracted SAR generation to separate service module (still needs work)
+ Uses assembly plugin to generate client and server WSRP artefacts from core.
Modified: modules/wsrp/trunk/admin-gui/pom.xml
===================================================================
--- modules/wsrp/trunk/admin-gui/pom.xml 2009-06-25 15:10:55 UTC (rev 13500)
+++ modules/wsrp/trunk/admin-gui/pom.xml 2009-06-25 16:30:42 UTC (rev 13501)
@@ -41,6 +41,11 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.portal.wsrp</groupId>
+ <artifactId>wsrp-test-support</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>1.2_12</version>
@@ -50,6 +55,11 @@
<artifactId>faces</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.portal.common</groupId>
+ <artifactId>common-common</artifactId>
+ <version>${version.common}</version>
+ </dependency>
</dependencies>
Modified: modules/wsrp/trunk/build/pom.xml
===================================================================
--- modules/wsrp/trunk/build/pom.xml 2009-06-25 15:10:55 UTC (rev 13500)
+++ modules/wsrp/trunk/build/pom.xml 2009-06-25 16:30:42 UTC (rev 13501)
@@ -49,6 +49,7 @@
<!--All artifacts versions should be defined here-->
<properties>
<version.portlet>trunk-SNAPSHOT</version.portlet>
+ <version.common>trunk-SNAPSHOT</version.common>
<version.jaxrpc>1.1</version.jaxrpc>
<version.slf4j>1.5.6</version.slf4j>
<version.jbossas>4.2.3.GA</version.jbossas>
Modified: modules/wsrp/trunk/core/pom.xml
===================================================================
--- modules/wsrp/trunk/core/pom.xml 2009-06-25 15:10:55 UTC (rev 13500)
+++ modules/wsrp/trunk/core/pom.xml 2009-06-25 16:30:42 UTC (rev 13501)
@@ -48,12 +48,12 @@
<dependency>
<groupId>org.jboss.portal.common</groupId>
<artifactId>common-common</artifactId>
- <version>1.2.3</version>
+ <version>${version.common}</version>
</dependency>
<dependency>
<groupId>org.jboss.portal.common</groupId>
<artifactId>common-portal</artifactId>
- <version>1.2.3</version>
+ <version>${version.common}</version>
</dependency>
<dependency>
<groupId>org.jboss.portal.registration</groupId>
@@ -63,12 +63,12 @@
<dependency>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>portlet-portlet</artifactId>
- <version>trunk-SNAPSHOT</version>
+ <version>${version.portlet}</version>
</dependency>
<dependency>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>portlet-federation</artifactId>
- <version>trunk-SNAPSHOT</version>
+ <version>${version.portlet}</version>
</dependency>
<!-- JBoss dependencies -->
@@ -128,7 +128,9 @@
</dependencies>
<build>
- <!--<plugins>
+ <finalName>portal-wsrp</finalName>
+ <sourceDirectory>src/main</sourceDirectory>
+ <plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
@@ -136,7 +138,28 @@
<target>1.5</target>
</configuration>
</plugin>
- </plugins>-->
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assemble/portal-wsrp-client-jar.xml</descriptor>
+ <descriptor>src/assemble/portal-wsrp-war.xml</descriptor>
+ <descriptor>src/assemble/portal-wsrp-sar.xml</descriptor>
+ <!--<descriptor>src/assemble/portal-wsrp-tests-jar.xml</descriptor>-->
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
</project>
\ No newline at end of file
Added: modules/wsrp/trunk/core/src/assemble/portal-wsrp-client-jar.xml
===================================================================
--- modules/wsrp/trunk/core/src/assemble/portal-wsrp-client-jar.xml (rev 0)
+++ modules/wsrp/trunk/core/src/assemble/portal-wsrp-client-jar.xml 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,39 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+ <id>client</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>src/main/resources/portal-wsrp-client-jar</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>
+
Added: modules/wsrp/trunk/core/src/assemble/portal-wsrp-war.xml
===================================================================
--- modules/wsrp/trunk/core/src/assemble/portal-wsrp-war.xml (rev 0)
+++ modules/wsrp/trunk/core/src/assemble/portal-wsrp-war.xml 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,39 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+ <id>server</id>
+ <formats>
+ <format>war</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>src/main/resources/portal-wsrp-war</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>
+
Modified: modules/wsrp/trunk/pom.xml
===================================================================
--- modules/wsrp/trunk/pom.xml 2009-06-25 15:10:55 UTC (rev 13500)
+++ modules/wsrp/trunk/pom.xml 2009-06-25 16:30:42 UTC (rev 13501)
@@ -31,8 +31,6 @@
<version>1.0.0-SNAPSHOT</version>
<url>http://www.jboss.org/jbossportal</url>
- <dependencies/>
-
<!--Repository definition needed to deploy artifacts into JBoss maven repositories-->
<distributionManagement>
<repository>
@@ -54,8 +52,49 @@
<module>api</module>
<module>wsrp1-rpc</module>
<module>core</module>
+ <module>test-support</module>
<module>admin-gui</module>
+ <module>service</module>
</modules>
+ <!--<build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.0</version>
+ <executions>
+ <execution>
+ <id>copy-portal-jopr-plugin-jar</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.portal.jopr</groupId>
+ <artifactId>portal-management</artifactId>
+ <version>${project.version}</version>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>2.0-beta-1</version>
+
+ <!– Enable packaging types and lifecycle bindings. –>
+ <extensions>true</extensions>
+ <configuration>
+ <excludeAll>true</excludeAll>
+ <primaryArtifact>false</primaryArtifact>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>-->
</project>
\ No newline at end of file
Added: modules/wsrp/trunk/service/pom.xml
===================================================================
--- modules/wsrp/trunk/service/pom.xml (rev 0)
+++ modules/wsrp/trunk/service/pom.xml 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,87 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<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.jboss.portal.wsrp</groupId>
+ <artifactId>module-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>wsrp-service</artifactId>
+ <packaging>jboss-sar</packaging>
+ <name>JBoss Portal WSRP Service</name>
+
+ <!--<dependencies>
+ <dependency>
+ <groupId>org.jboss.portal.jopr</groupId>
+ <artifactId>portal-management</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+-->
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.0</version>
+ <executions>
+ <execution>
+ <id>copy-portal-wsrp-libs</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.portal.wsrp</groupId>
+ <artifactId>wsrp-core</artifactId>
+ <version>${project.version}</version>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>2.0-beta-1</version>
+
+ <!-- Enable packaging types and lifecycle bindings. -->
+ <extensions>true</extensions>
+ <configuration>
+ <excludeAll>true</excludeAll>
+ <primaryArtifact>false</primaryArtifact>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
Added: modules/wsrp/trunk/service/src/main/resources/META-INF/jboss-service.xml
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/META-INF/jboss-service.xml (rev 0)
+++ modules/wsrp/trunk/service/src/main/resources/META-INF/jboss-service.xml 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<server>
+ <!-- WSRP Producer implementation -->
+ <mbean
+ code="org.jboss.portal.wsrp.producer.WSRPProducerImpl"
+ name="portal.wsrp:service=WSRPProducer"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="Invoker" proxy-type="attribute">portal:service=PortletInvoker,type=Producer
+ </depends>
+ <depends optional-attribute-name="RegistrationManager" proxy-type="attribute">
+ portal.wsrp:service=RegistrationManager,type=Producer
+ </depends>
+ <depends optional-attribute-name="ProducerConfigurationService" proxy-type="attribute">
+ portal.wsrp:service=ProducerConfiguration
+ </depends>
+ </mbean>
+
+ <!-- Registration manager -->
+ <mbean code="org.jboss.portal.registration.impl.RegistrationManagerImpl"
+ name="portal.wsrp:service=RegistrationManager,type=Producer" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="PersistenceManager" proxy-type="attribute">
+ portal.wsrp:service=PersistenceManager
+ </depends>
+ </mbean>
+
+ <!-- Persistence manager for registrations -->
+ <mbean code="org.jboss.portal.core.impl.portlet.state.PersistentPortletStatePersistenceManager"
+ name="portal.wsrp:service=PersistenceManager" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends>portal:service=Hibernate,type=Portlet</depends>
+ <attribute name="SessionFactoryJNDIName">java:/portal/PortletSessionFactory</attribute>
+ </mbean>
+
+ <!-- Producer configuration service -->
+ <mbean code="org.jboss.portal.wsrp.producer.config.impl.ProducerConfigurationServiceImpl"
+ name="portal.wsrp:service=ProducerConfiguration" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="ConfigLocation">conf/producer/config.xml</attribute>
+ </mbean>
+
+ <mbean
+ code="org.jboss.portal.server.impl.xml.EntityResolverService"
+ name="portal.wsrp:service=EntityResolver"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="DTDMapping">
+ <properties>
+ <entry
+ key="-//JBoss Portal//DTD WSRP Remote Producer Configuration 2.6//EN">
+ dtd/jboss-wsrp-consumer_2_6.dtd
+ </entry>
+ <entry
+ key="-//JBoss Portal//DTD WSRP Local Producer Configuration 2.6//EN">
+ dtd/jboss-wsrp-producer_2_6.dtd
+ </entry>
+ <entry key="urn:jboss:portal:wsrp:consumer:v2_6">/xsd/jboss-wsrp-consumer_2_6.xsd</entry>
+ <entry key="urn:jboss:portal:wsrp:producer:v2_6">/xsd/jboss-wsrp-consumer_2_6.xsd</entry>
+ </properties>
+ </attribute>
+ </mbean>
+
+ <!-- Deployer for *-wsrp.xml files. Deploys default-wsrp.xml which contains the 'self' consumer -->
+ <mbean code="org.jboss.portal.wsrp.deployment.WSRPDeployer" name="portal.wsrp:service=WSRPDeployer">
+ <attribute name="DefaultWSRPLocation">default-wsrp.xml</attribute>
+ <depends>jboss.system:service=MainDeployer</depends>
+ <depends optional-attribute-name="ConsumerRegistry"
+ proxy-type="attribute">portal.wsrp:service=ConsumerRegistry
+ </depends>
+ <depends optional-attribute-name="EntityResolver"
+ proxy-type="attribute">portal.wsrp:service=EntityResolver
+ </depends>
+ </mbean>
+
+ <mbean
+ code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
+ name="portal:service=Hibernate,type=WSRPConsumer"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends>jboss.jca:service=DataSourceBinding,name=@portal.datasource.name@</depends>
+ <!-- Uncomment in clustered mode : hibernate depends on its tree cache service @portal.single.xml.close@
+ <depends>portal:service=TreeCacheProvider,type=hibernate</depends>
+ @portal.single.xml.open@ -->
+ <attribute name="DoChecking">true</attribute>
+ <attribute name="ConfigLocation">conf/hibernate/consumer/hibernate.cfg.xml</attribute>
+ <attribute name="JNDIName">java:/portal/WSRPConsumerSessionFactory</attribute>
+ </mbean>
+
+ <!-- Consumers registry for WSRP consumers -->
+ <mbean code="org.jboss.portal.wsrp.consumer.ConsumerRegistryService"
+ name="portal.wsrp:service=ConsumerRegistry"
+ xmbean-dd="" xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends>portal:service=Hibernate,type=WSRPConsumer</depends>
+ <attribute name="SessionFactoryJNDIName">java:/portal/WSRPConsumerSessionFactory</attribute>
+ <depends optional-attribute-name="FederatingPortletInvoker" proxy-type="attribute">
+ portal:service=PortletInvoker,type=Federating
+ </depends>
+ <depends optional-attribute-name="PortalEventListenerRegistry" proxy-type="attribute">
+ portal:service=ListenerRegistry
+ </depends>
+ </mbean>
+</server>
+
Property changes on: modules/wsrp/trunk/service/src/main/resources/META-INF/jboss-service.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/wsrp/trunk/service/src/main/resources/conf/hibernate/consumer/domain.hbm.xml
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/conf/hibernate/consumer/domain.hbm.xml (rev 0)
+++ modules/wsrp/trunk/service/src/main/resources/conf/hibernate/consumer/domain.hbm.xml 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,146 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.jboss.portal.wsrp.consumer.ProducerInfo" table="JBP_PRODUCER_INFO">
+ <cache usage="@portal.hibernate.cache.usage@"/>
+ <id name="key" column="PK" access="field" type="java.lang.Long">
+ <generator class="native">
+ <param name="sequence">wsrpconsumer_seq</param>
+ </generator>
+ </id>
+ <many-to-one name="endpointConfigurationInfo"
+ column="ENDPOINT_ID"
+ class="org.jboss.portal.wsrp.consumer.EndpointConfigurationInfo"
+ unique="true"
+ not-null="true"
+ cascade="all"
+ lazy="false"/>
+ <many-to-one name="registrationInfo"
+ column="REGISTRATION_ID"
+ class="org.jboss.portal.wsrp.consumer.RegistrationInfo"
+ unique="true"
+ not-null="false"
+ cascade="all"
+ lazy="false"/>
+ <property name="expirationCacheSeconds" column="EXPIRATION_CACHE_SECONDS" type="java.lang.Integer"/>
+ <property name="active" not-null="true" column="ACTIVE" type="boolean"/>
+ <property name="persistentId" column="PRODUCER_ID" not-null="true" unique="true" type="java.lang.String"
+ access="field"/>
+ </class>
+
+ <class name="org.jboss.portal.wsrp.consumer.EndpointConfigurationInfo" table="JBP_ENDPOINT_INFO">
+ <cache usage="@portal.hibernate.cache.usage@"/>
+ <id name="key" column="PK" type="java.lang.Long">
+ <generator class="native">
+ <param name="sequence">wsrpconsumer_seq</param>
+ </generator>
+ </id>
+ <property name="serviceDescriptionURL" column="SD_URL" type="java.lang.String" not-null="true"/>
+ <property name="markupURL" column="M_URL" type="java.lang.String" not-null="true"/>
+ <property name="portletManagementURL" column="PM_URL" type="java.lang.String" not-null="false"/>
+ <property name="registrationURL" column="R_URL" type="java.lang.String" not-null="false"/>
+ <property name="wsdlDefinitionURL" column="WSDL_URL" type="java.lang.String" not-null="false"/>
+ </class>
+
+ <class name="org.jboss.portal.wsrp.consumer.RegistrationInfo" table="JBP_REGISTRATION_INFO">
+ <cache usage="@portal.hibernate.cache.usage@"/>
+ <id name="key" column="PK" type="java.lang.Long">
+ <generator class="native">
+ <param name="sequence">wsrpconsumer_seq</param>
+ </generator>
+ </id>
+ <property name="persistentConsumerName" column="CONSUMER_NAME" type="java.lang.String" not-null="true"
+ access="field"/>
+ <property name="persistentRegistrationHandle" column="HANDLE" type="java.lang.String" access="field"/>
+ <property name="registrationState" column="STATE" type="binary" length="16384"/>
+ <map name="persistentRegistrationProperties" cascade="all,delete-orphan" lazy="false" access="field">
+ <cache usage="@portal.hibernate.cache.usage@"/>
+ <key column="REG_PK" not-null="true"/>
+ <map-key type="string" formula="NAME"/>
+ <one-to-many class="org.jboss.portal.wsrp.consumer.RegistrationProperty"/>
+ </map>
+ </class>
+
+ <class name="org.jboss.portal.wsrp.consumer.RegistrationProperty" table="JBP_REG_PROPERTY">
+ <cache usage="@portal.hibernate.cache.usage@"/>
+ <id name="key" column="PK" type="java.lang.Long">
+ <generator class="native">
+ <param name="sequence">wsrpconsumer_seq</param>
+ </generator>
+ </id>
+ <property name="name" column="NAME" type="java.lang.String" not-null="true"/>
+ <property name="value" column="VALUE" type="java.lang.String"/>
+ <property name="invalid" column="INVALID" type="java.lang.Boolean"/>
+ <property name="lang" column="LANG" type="java.lang.String" not-null="true"/>
+ <many-to-one
+ name="description"
+ column="DESC_PK"
+ class="org.jboss.portal.wsrp.registration.RegistrationPropertyDescription"
+ unique="true"
+ cascade="all"
+ lazy="false"/>
+ </class>
+ <class name="org.jboss.portal.wsrp.registration.RegistrationPropertyDescription" table="JBP_REG_PROP_DESC">
+ <cache usage="@portal.hibernate.cache.usage@"/>
+ <id name="key" column="PK" type="java.lang.Long">
+ <generator class="native">
+ <param name="sequence">portlet_seq</param>
+ </generator>
+ </id>
+ <property name="name" column="NAME" type="org.jboss.portal.jems.hibernate.QNameUserType" not-null="true"/>
+ <property name="type" column="TYPE" type="org.jboss.portal.jems.hibernate.QNameUserType" not-null="true"/>
+ <property name="schemaLocation" column="SCHEMA_LOCATION" type="java.lang.String"/>
+ <component name="description" class="org.jboss.portal.wsrp.registration.LocalizedString">
+ <property name="value" column="DESC_VALUE"/>
+ <property name="locale" column="DESC_LOCALE"/>
+ <property name="resourceName" column="DESC_RES"/>
+ </component>
+ <component name="hint" class="org.jboss.portal.wsrp.registration.LocalizedString">
+ <property name="value" column="HINT_VALUE"/>
+ <property name="locale" column="HINT_LOCALE"/>
+ <property name="resourceName" column="HINT_RES"/>
+ </component>
+ <component name="label" class="org.jboss.portal.wsrp.registration.LocalizedString">
+ <property name="value" column="LABEL_VALUE"/>
+ <property name="locale" column="LABEL_LOCALE"/>
+ <property name="resourceName" column="LABEL_RES"/>
+ </component>
+ <array name="usages" table="JBP_REG_PROP_DESC_USAGES" cascade="all" fetch="join">
+ <cache usage="@portal.hibernate.cache.usage@"/>
+ <key column="PK"/>
+ <index column="IDX"/>
+ <element column="DESC_USAGE" type="java.lang.String" not-null="true" unique="false"/>
+ </array>
+ <array name="aliases" table="JBP_REG_PROP_DESC_ALIASES" cascade="all" fetch="join">
+ <cache usage="@portal.hibernate.cache.usage@"/>
+ <key column="PK"/>
+ <index column="IDX"/>
+ <element column="ALIAS" type="org.jboss.portal.jems.hibernate.QNameUserType" not-null="true" unique="false"/>
+ </array>
+ </class>
+</hibernate-mapping>
Added: modules/wsrp/trunk/service/src/main/resources/conf/hibernate/consumer/ehcache.xml
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/conf/hibernate/consumer/ehcache.xml (rev 0)
+++ modules/wsrp/trunk/service/src/main/resources/conf/hibernate/consumer/ehcache.xml 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,60 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<ehcache>
+
+ <!-- Sets the path to the directory where cache .data files are created.
+
+If the path is a Java System Property it is replaced by
+its value in the running VM.
+
+The following properties are translated:
+user.home - User's home directory
+user.dir - User's current working directory
+java.io.tmpdir - Default temp file path -->
+ <diskStore path="java.io.tmpdir/wsrpconsumer"/>
+
+
+ <!--Default Cache configuration. These will applied to caches programmatically created through
+ the CacheManager.
+
+ The following attributes are required for defaultCache:
+
+ maxInMemory - Sets the maximum number of objects that will be created in memory
+ eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the element
+ is never expired.
+ timeToIdleSeconds - Sets the time to idle for an element before it expires. Is only used
+ if the element is not eternal. Idle time is now - last accessed time
+ timeToLiveSeconds - Sets the time to live for an element before it expires. Is only used
+ if the element is not eternal. TTL is now - creation time
+ overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
+ has reached the maxInMemory limit.
+
+ -->
+ <defaultCache
+ maxElementsInMemory="10000"
+ eternal="false"
+ timeToIdleSeconds="1800"
+ timeToLiveSeconds="1800"
+ overflowToDisk="false"
+ />
+</ehcache>
\ No newline at end of file
Added: modules/wsrp/trunk/service/src/main/resources/conf/hibernate/consumer/hibernate.cfg.xml
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/conf/hibernate/consumer/hibernate.cfg.xml (rev 0)
+++ modules/wsrp/trunk/service/src/main/resources/conf/hibernate/consumer/hibernate.cfg.xml 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,58 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+<hibernate-configuration>
+ <session-factory>
+ <property name="connection.datasource">java:@portal.datasource.name@</property>
+ <property name="show_sql">@portal.sql.show@</property>
+ <property name="cache.use_second_level_cache">true</property>
+ <property name="cache.use_query_cache">true</property>
+
+ <!--
+ | Uncomment in clustered mode : use transactional replicated cache
+ @portal.single.xml.close@
+ <property name="cache.provider_class">org.jboss.portal.jems.hibernate.JMXTreeCacheProvider</property>
+ <property name="cache.object_name">portal:service=TreeCacheProvider,type=hibernate</property>
+ @portal.single.xml.open@
+ -->
+
+ <!--
+ | Comment in clustered mode
+ @portal.clustered.xml.close@
+ <property name="cache.provider_configuration_file_resource_path">conf/consumer/hibernate/ehcache.xml</property>
+ <property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
+ @portal.clustered.xml.open@
+ -->
+
+ <!-- Force the dialect instead of using autodetection -->
+ <!--
+ <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+ -->
+
+ <!-- Mapping files -->
+ <mapping resource="conf/hibernate/consumer/domain.hbm.xml"/>
+ </session-factory>
+</hibernate-configuration>
\ No newline at end of file
Added: modules/wsrp/trunk/service/src/main/resources/conf/producer/config.xml
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/conf/producer/config.xml (rev 0)
+++ modules/wsrp/trunk/service/src/main/resources/conf/producer/config.xml 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,40 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!--
+<!DOCTYPE producer-configuration PUBLIC "-//JBoss Portal//DTD WSRP Local Producer Configuration 2.6//EN"
+ "http://www.jboss.org/portal/dtd/jboss-wsrp-producer_2_6.dtd">
+-->
+
+<!-- Configuration using registration with default registration property validator. -->
+<producer-configuration xmlns="urn:jboss:portal:wsrp:producer:v2_6"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:portal:wsrp:producer:v2_6 http://www.jboss.org/portal/xsd/jboss-wsrp-producer_2_6.xsd">
+ <registration-configuration fullServiceDescriptionRequiresRegistration="true">
+ <registration-property-validator>org.jboss.portal.registration.policies.DefaultRegistrationPropertyValidator
+ </registration-property-validator>
+ </registration-configuration>
+</producer-configuration>
+
+ <!-- Configuration without registration -->
+ <!--<producer-configuration/>-->
\ No newline at end of file
Added: modules/wsrp/trunk/service/src/main/resources/default-wsrp.xml
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/default-wsrp.xml (rev 0)
+++ modules/wsrp/trunk/service/src/main/resources/default-wsrp.xml 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,88 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!--<!DOCTYPE deployments PUBLIC "-//JBoss Portal//DTD WSRP Remote Producer Configuration 2.6//EN"
+ "http://www.jboss.org/portal/dtd/jboss-wsrp-consumer_2_6.dtd">-->
+
+<deployments xmlns="urn:jboss:portal:wsrp:consumer:v2_6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:portal:wsrp:consumer:v2_6 http://www.jboss.org/portal/xsd/jboss-wsrp-consumer_2_6.xsd">
+ <deployment>
+ <wsrp-producer id="self" expiration-cache="300">
+ <!--
+ we need to use the individual endpoint configuration because the configuration via wsdl forces an
+ immediate attempt to access the web service description which is not available yet at this point of deployment
+ -->
+ <endpoint-config>
+ <service-description-url>http://localhost:8080/portal-wsrp/ServiceDescriptionService
+ </service-description-url>
+ <markup-url>http://localhost:8080/portal-wsrp/MarkupService</markup-url>
+ <registration-url>http://localhost:8080/portal-wsrp/RegistrationService</registration-url>
+ <portlet-management-url>http://localhost:8080/portal-wsrp/PortletManagementService</portlet-management-url>
+ </endpoint-config>
+ <registration-data/>
+ </wsrp-producer>
+ </deployment>
+ <!--<deployment>
+ <wsrp-producer id="NetUnity" expiration-cache="300">
+ <endpoint-wsdl-url>http://wsrp.netunitysoftware.com/WSRPTestService/WSRPTestService.asmx?Ope...</endpoint-wsdl-url>
+ <registration-data/>
+ </wsrp-producer>
+ </deployment>-->
+ <!--<deployment>
+ <wsrp-producer id="vignette" expiration-cache="300">
+ <endpoint-wsdl-url>http://wsrpdemo.vignette.com:8080/producer/wsdl</endpoint-wsdl-url>
+ <registration-data>
+ <property>
+ <name>com.vignette.wsrp.registration.username</name>
+ <lang>en</lang>
+ <value>test</value>
+ </property>
+ <property>
+ <name>com.vignette.wsrp.registration.password</name>
+ <lang>en</lang>
+ <value>test</value>
+ </property>
+ </registration-data>
+ </wsrp-producer>
+ </deployment>-->
+ <!--<deployment>
+ <wsrp-producer id="bea" expiration-cache="300">
+ <endpoint-wsdl-url>http://wsrp.bea.com:7001/producer/producer?WSDL</endpoint-wsdl-url>
+ <registration-data>
+ <property>
+ <name>registration/consumerRole</name>
+ <lang>en</lang>
+ <value>public</value>
+ </property>
+ </registration-data>
+ </wsrp-producer>
+ </deployment>-->
+ <!--<deployment>
+ <wsrp-producer id="oracle" expiration-cache="300">
+ <endpoint-wsdl-url>http://portalstandards.oracle.com/portletapp/portlets?WSDL</endpoint-wsdl-url>
+ <registration-data/>
+ </wsrp-producer>
+ </deployment>-->
+</deployments>
\ No newline at end of file
Property changes on: modules/wsrp/trunk/service/src/main/resources/default-wsrp.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/wsrp/trunk/service/src/main/resources/dtd/jboss-wsrp-consumer_2_6.dtd
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/dtd/jboss-wsrp-consumer_2_6.dtd (rev 0)
+++ modules/wsrp/trunk/service/src/main/resources/dtd/jboss-wsrp-consumer_2_6.dtd 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,85 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!--
+JBoss Portal's WSRP Remote Producer Configuration deployment descriptor for the *-wsrp.xml files used by Portal to be
+able to consume WSRP portlets exposed by a remote producer.
+author: <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+version: 1.1 (Portal 2.6)
+revision: $Revision: 8784 $
+-->
+
+<!-- The root element. Contains deployment elements. -->
+<!ELEMENT deployments ( deployment* )>
+
+<!-- Deployment related information. As of Portal 2.6, the only deployment information relates to WSRP remote producers. -->
+<!ELEMENT deployment ( wsrp-producer )>
+
+<!-- Information on a remote WSRP producer identified by the mandatory producer-id attribute. -->
+<!ELEMENT wsrp-producer ( ( endpoint-config | endpoint-wsdl-url ), registration-data? )>
+
+<!-- The producer identifier. This should be unique for a given Portal deployment. The identifier is used to
+identify the portlet provider in the management interface. -->
+<!ATTLIST wsrp-producer id CDATA #REQUIRED>
+
+<!-- The period of producer information (such as list of offered portlets) cache refreshing in seconds. -->
+<!ATTLIST wsrp-producer expiration-cache CDATA #IMPLIED>
+
+<!-- WSRP endpoints configuration information by interface URL. Mutually exclusive with endpoint-wsdl-url. -->
+<!ELEMENT endpoint-config ( service-description-url, markup-url, registration-url?, portlet-management-url? )>
+
+<!-- The URL for the service description interface endpoint on the remote producer. -->
+<!ELEMENT service-description-url ( #PCDATA )>
+
+<!-- The URL for the markup interface endpoint on the remote producer. -->
+<!ELEMENT markup-url ( #PCDATA )>
+
+<!-- The URL for the optional portlet management interface endpoint on the remote producer. -->
+<!ELEMENT portlet-management-url ( #PCDATA )>
+
+<!-- The URL for the optional registration interface endpoint on the remote producer. -->
+<!ELEMENT registration-url ( #PCDATA )>
+
+<!-- The URL of the WSDL description of the producer's WSRP services. Mutally exclusive with endpoint-config. -->
+<!ELEMENT endpoint-wsdl-url ( #PCDATA )>
+
+<!-- Container for registration information. -->
+<!ELEMENT registration-data ( consumer-name?, property* )>
+
+<!--
+An optional name (preferably unique) that identifies the Consumer. An example of such a name would be the Consumer's URL.
+If no consumer-name is provided, one will be automatically generated by JBoss Portal.
+-->
+<!ELEMENT consumer-name ( #PCDATA )>
+
+<!-- A registration property. -->
+<!ELEMENT property ( name, lang, value )>
+
+<!-- The name of the property. -->
+<!ELEMENT name ( #PCDATA )>
+
+<!-- The language the property is in. -->
+<!ELEMENT lang ( #PCDATA )>
+
+<!-- The value of the property. -->
+<!ELEMENT value ( #PCDATA )>
\ No newline at end of file
Added: modules/wsrp/trunk/service/src/main/resources/dtd/jboss-wsrp-producer_2_6.dtd
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/dtd/jboss-wsrp-producer_2_6.dtd (rev 0)
+++ modules/wsrp/trunk/service/src/main/resources/dtd/jboss-wsrp-producer_2_6.dtd 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,87 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!--
+A DTD for the configuration of Portal's WSRP producer.
+
+author: <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+version: 1.0 (Portal 2.6)
+revision: $Revision: 8784 $
+-->
+
+<!-- Root element for the producer configuration. Contains a single registration-configuration as of Portal 2.6 -->
+<!ELEMENT producer-configuration ( registration-configuration? )>
+
+
+<!-- Allows configuration of whether the producer requires registration or not and how to deal with registrations. -->
+<!ELEMENT registration-configuration ( (registration-property-validator | registration-policy)?, registration-property-description* )>
+
+<!--
+Specifies whether the producer will send a complete service description (that is one including offered portlets) or not
+to unregistered consumers.
+-->
+<!ATTLIST registration-configuration fullServiceDescriptionRequiresRegistration (true | false) "false">
+
+<!--
+A fully-qualified class name for a class implementing the RegistrationPropertyValidator interface. Only makes sense when
+using the default RegistrationPolicy.
+-->
+<!ELEMENT registration-property-validator ( #PCDATA )>
+
+<!--
+A fully-qualified class name for an implementation of the RegistrationPolicy interface, allowing users to customize
+the behavior of the producer when handling registration attempts.
+ -->
+<!ELEMENT registration-policy ( #PCDATA )>
+
+<!--
+The description for a registration property for which the producer will require consumers to provide a value.
+Example:
+<registration-property-description>
+ <name>name1</name>
+ <type>xsd:string</type>
+ <label xml:lang="en" resourceName="resource.label1">label1</label>
+ <hint xml:lang="en" resourceName="resource.hint1">hint1</hint>
+</registration-property-description>
+-->
+<!ELEMENT registration-property-description ( name, type, label, hint? )>
+
+<!-- The name of the registration property -->
+<!ELEMENT name ( #PCDATA )>
+
+<!-- The qualified name of the type of the registration property. As of Portal 2.6, only xsd:string is supported. -->
+<!ELEMENT type ( #PCDATA )>
+
+<!-- A description of the registration property and its usage targeted at end users. -->
+<!ELEMENT hint ( #PCDATA )>
+<!-- The language in which the hint is written. -->
+<!ATTLIST hint xml:lang CDATA #REQUIRED>
+<!-- A resource name identifying the hint in localization bundles (currently unsupported in Portal 2.6). -->
+<!ATTLIST hint resourceName CDATA #IMPLIED>
+
+<!-- A short, human readable name for the property, intended for consumer-generated administration interface. -->
+<!ELEMENT label ( #PCDATA )>
+<!-- The language in which the label is written. -->
+<!ATTLIST label xml:lang CDATA #REQUIRED>
+<!-- A resource name identifying the label in localization bundles (currently unsupported in Portal 2.6). -->
+<!ATTLIST label resourceName CDATA #IMPLIED>
Added: modules/wsrp/trunk/service/src/main/resources/wsrp-aop.xml
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/wsrp-aop.xml (rev 0)
+++ modules/wsrp/trunk/service/src/main/resources/wsrp-aop.xml 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,79 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<aop>
+ <metadata tag="transaction" class="org.jboss.portal.wsrp.consumer.ConsumerRegistryService">
+ <method name="startService">
+ <trans-attribute>Required</trans-attribute>
+ </method>
+ <method name="persistConsumer">
+ <trans-attribute>Required</trans-attribute>
+ </method>
+ <method name="activateConsumerWith">
+ <trans-attribute>Required</trans-attribute>
+ </method>
+ <method name="updateProducerInfo">
+ <trans-attribute>Required</trans-attribute>
+ </method>
+ <method name="createConsumer">
+ <trans-attribute>Required</trans-attribute>
+ </method>
+ <method name="destroyConsumer">
+ <trans-attribute>Required</trans-attribute>
+ </method>
+ </metadata>
+
+ <!-- TRANSACTIONS -->
+ <interceptor class="org.jboss.aspects.tx.TxPropagationInterceptor" scope="PER_VM"/>
+ <interceptor factory="org.jboss.aspects.tx.TxInterceptorFactory" scope="PER_CLASS_JOINPOINT"/>
+
+ <bind pointcut="all(@transaction)">
+ <interceptor-ref name="org.jboss.aspects.tx.TxInterceptorFactory"/>
+ </bind>
+
+ <interceptor name="class-txsynchronized" factory="org.jboss.aspects.txlock.TxLockInterceptorFactory"
+ scope="PER_CLASS"/>
+ <interceptor name="instance-txsynchronized" factory="org.jboss.aspects.txlock.TxLockInterceptorFactory"
+ scope="PER_INSTANCE"/>
+
+ <bind pointcut="execution(static * *->@TxSynchronized(..)) OR execution(*->@TxSynchronized(..))">
+ <interceptor-ref name="class-txsynchronized"/>
+ </bind>
+
+ <bind pointcut="execution(!static * *->@TxSynchronized(..))">
+ <interceptor-ref name="instance-txsynchronized"/>
+ </bind>
+
+ <bind pointcut="all((a)org.jboss.aspects.tx.Tx)">
+ <interceptor-ref name="org.jboss.aspects.tx.TxInterceptorFactory"/>
+ </bind>
+
+ <bind
+ pointcut="execution(static * *->@org.jboss.aspects.txlock.TxSynchronized(..)) OR execution(*->@org.jboss.aspects.txlock.TxSynchronized(..))">
+ <interceptor-ref name="class-txsynchronized"/>
+ </bind>
+
+ <bind pointcut="execution(!static * *->@org.jboss.aspects.txlock.TxSynchronized(..))">
+ <interceptor-ref name="instance-txsynchronized"/>
+ </bind>
+</aop>
\ No newline at end of file
Added: modules/wsrp/trunk/service/src/main/resources/xsd/jboss-wsrp-consumer_2_6.xsd
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/xsd/jboss-wsrp-consumer_2_6.xsd (rev 0)
+++ modules/wsrp/trunk/service/src/main/resources/xsd/jboss-wsrp-consumer_2_6.xsd 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,202 @@
+<?xml version="1.0"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="urn:jboss:portal:wsrp:consumer:v2_6"
+ xmlns="urn:jboss:portal:wsrp:consumer:v2_6"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
+ xmlns:wcc="urn:jboss:portal:wsrp:consumer:v2_6"
+ elementFormDefault="qualified">
+
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
+
+ <xs:element name="deployments">
+ <xs:annotation>
+ <xs:documentation>Root element. Contains deployment elements.</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="deployment" type="wcc:Deployment" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="Deployment">
+ <xs:annotation>
+ <xs:documentation>Deployment related information. As of Portal 2.6, the only deployment information relates to
+ WSRP remote producers.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="wsrp-producer" type="wcc:WSRPProducer" maxOccurs="1" minOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="WSRPProducer">
+ <xs:annotation>
+ <xs:documentation>Information on a remote WSRP producer identified by the mandatory id attribute.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:choice>
+ <xs:element name="endpoint-config" type="wcc:EndpointConfig">
+ <xs:annotation>
+ <xs:documentation>
+ WSRP endpoints configuration information by interface URL. Mutually exclusive with
+ endpoint-wsdl-url.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="endpoint-wsdl-url" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>
+ The URL of the WSDL description of the producer's WSRP services. Mutally exclusive with
+ endpoint-config.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:choice>
+ <xs:element name="registration-data" type="wcc:RegistrationData" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ Container for registration information.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ The producer identifier. This should be unique for a given Portal deployment. The identifier is used to
+ identify the portlet provider in the management interface.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="expiration-cache" type="wcc:cacheValue" use="required">
+ <xs:annotation>
+ <xs:documentation>The period of producer information (such as list of offered portlets) cache refreshing in
+ seconds.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+
+ <xs:simpleType name="cacheValue" id="cacheValue">
+ <xs:annotation>
+ <xs:documentation>
+ Type for cache information. Positive or null integer, allowing -1 as a value to indicate that cache should
+ not
+ be used.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:integer">
+ <xs:minInclusive value="-1"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:complexType name="EndpointConfig">
+ <xs:sequence>
+ <xs:element name="service-description-url" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>
+ The mandatory URL for the service description interface endpoint on the remote producer.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="markup-url" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>
+ The madatory URL for the markup interface endpoint on the remote producer.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="registration-url" type="xs:anyURI" minOccurs="0" maxOccurs="1">
+ <xs:annotation>
+ <xs:documentation>
+ The optional URL for the registration interface endpoint on the remote producer.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="portlet-management-url" type="xs:anyURI" minOccurs="0" maxOccurs="1">
+ <xs:annotation>
+ <xs:documentation>
+ The optional URL for the portlet management interface endpoint on the remote producer.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="RegistrationData">
+ <xs:sequence>
+ <xs:element name="consumer-name" type="xs:string" minOccurs="0" maxOccurs="1">
+ <xs:annotation>
+ <xs:documentation>
+ An optional name (preferably unique) that identifies the Consumer. An example of such a name would be
+ the Consumer's URL. If no consumer-name is provided, one will be automatically generated by JBoss
+ Portal.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="property" type="wcc:Property" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>
+ Optional registration properties required by the remote producer.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="Property">
+ <xs:annotation>
+ <xs:documentation>
+ Registration property.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="name" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ Name of the property.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="lang" type="xs:language">
+ <xs:annotation>
+ <xs:documentation>
+ Language the property is in.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="value" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ Value of the property.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
Added: modules/wsrp/trunk/service/src/main/resources/xsd/jboss-wsrp-producer_2_6.xsd
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/xsd/jboss-wsrp-producer_2_6.xsd (rev 0)
+++ modules/wsrp/trunk/service/src/main/resources/xsd/jboss-wsrp-producer_2_6.xsd 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="urn:jboss:portal:wsrp:producer:v2_6"
+ xmlns="urn:jboss:portal:wsrp:producer:v2_6"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
+ xmlns:wpc="urn:jboss:portal:wsrp:producer:v2_6" elementFormDefault="qualified">
+
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
+
+ <xs:element name="producer-configuration">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="registration-configuration" type="wpc:RegistrationConfiguration"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="RegistrationConfiguration">
+ <xs:sequence>
+ <xs:element name="registration-policy" type="xs:string" minOccurs="0"/>
+ <xs:element name="registration-property-validator" type="xs:string" minOccurs="0"/>
+ <xs:element name="registration-property-description" type="wpc:RegistrationPropertyDescription" minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="fullServiceDescriptionRequiresRegistration" type="xs:boolean" use="optional"/>
+ </xs:complexType>
+
+ <xs:complexType name="RegistrationPropertyDescription">
+ <xs:sequence>
+ <xs:element name="name" type="xs:QName"/>
+ <xs:element name="type" type="xs:QName"/>
+ <xs:element name="label" type="wpc:LocalizedString" minOccurs="0"/>
+ <xs:element name="hint" type="wpc:LocalizedString" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="LocalizedString">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute ref="xml:lang" use="required"/>
+ <xs:attribute name="resourceName" type="xs:string" use="optional"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+</xs:schema>
Added: modules/wsrp/trunk/service/src/main/resources/xsd/jboss-wsrp-producer_2_7.xsd
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/xsd/jboss-wsrp-producer_2_7.xsd (rev 0)
+++ modules/wsrp/trunk/service/src/main/resources/xsd/jboss-wsrp-producer_2_7.xsd 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="urn:jboss:portal:wsrp:producer:v2_7"
+ xmlns="urn:jboss:portal:wsrp:producer:v2_7"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
+ xmlns:wpc="urn:jboss:portal:wsrp:producer:v2_7" elementFormDefault="qualified">
+
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
+
+ <xs:element name="producer-configuration">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="registration-configuration" type="wpc:RegistrationConfiguration"/>
+ </xs:sequence>
+ <xs:attribute name="useStrictMode" type="xs:boolean" use="optional"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="RegistrationConfiguration">
+ <xs:sequence>
+ <xs:element name="registration-policy" type="xs:string" minOccurs="0"/>
+ <xs:element name="registration-property-validator" type="xs:string" minOccurs="0"/>
+ <xs:element name="registration-property-description" type="wpc:RegistrationPropertyDescription" minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="fullServiceDescriptionRequiresRegistration" type="xs:boolean" use="optional"/>
+ </xs:complexType>
+
+ <xs:complexType name="RegistrationPropertyDescription">
+ <xs:sequence>
+ <xs:element name="name" type="xs:QName"/>
+ <xs:element name="type" type="xs:QName"/>
+ <xs:element name="label" type="wpc:LocalizedString" minOccurs="0"/>
+ <xs:element name="hint" type="wpc:LocalizedString" minOccurs="0"/>
+ <xs:element name="description" type="wpc:LocalizedString" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="LocalizedString">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute ref="xml:lang" use="required"/>
+ <xs:attribute name="resourceName" type="xs:string" use="optional"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+</xs:schema>
Added: modules/wsrp/trunk/service/src/main/resources/xsd/xml.xsd
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/xsd/xml.xsd (rev 0)
+++ modules/wsrp/trunk/service/src/main/resources/xsd/xml.xsd 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,174 @@
+<?xml version='1.0'?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xml:lang="en">
+
+ <xs:annotation>
+ <xs:documentation>
+ See http://www.w3.org/XML/1998/namespace.html and
+ http://www.w3.org/TR/REC-xml for information about this namespace.
+
+ This schema document describes the XML namespace, in a form
+ suitable for import by other schema documents.
+
+ Note that local names in this namespace are intended to be defined
+ only by the World Wide Web Consortium or its subgroups. The
+ following names are currently defined in this namespace and should
+ not be used with conflicting semantics by any Working Group,
+ specification, or document instance:
+
+ base (as an attribute name): denotes an attribute whose value
+ provides a URI to be used as the base for interpreting any
+ relative URIs in the scope of the element on which it
+ appears; its value is inherited. This name is reserved
+ by virtue of its definition in the XML Base specification.
+
+ id (as an attribute name): denotes an attribute whose value
+ should be interpreted as if declared to be of type ID.
+ This name is reserved by virtue of its definition in the
+ xml:id specification.
+
+ lang (as an attribute name): denotes an attribute whose value
+ is a language code for the natural language of the content of
+ any element; its value is inherited. This name is reserved
+ by virtue of its definition in the XML specification.
+
+ space (as an attribute name): denotes an attribute whose
+ value is a keyword indicating what whitespace processing
+ discipline is intended for the content of the element; its
+ value is inherited. This name is reserved by virtue of its
+ definition in the XML specification.
+
+ Father (in any context at all): denotes Jon Bosak, the chair of
+ the original XML Working Group. This name is reserved by
+ the following decision of the W3C XML Plenary and
+ XML Coordination groups:
+
+ In appreciation for his vision, leadership and dedication
+ the W3C XML Plenary on this 10th day of February, 2000
+ reserves for Jon Bosak in perpetuity the XML name
+ xml:Father
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>This schema defines attributes and an attribute group
+ suitable for use by
+ schemas wishing to allow xml:base, xml:lang, xml:space or xml:id
+ attributes on elements they define.
+
+ To enable this, such a schema must import this schema
+ for the XML namespace, e.g. as follows:
+ <schema . . .>
+ . . .
+ <import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+ Subsequently, qualified reference to any of the attributes
+ or the group defined below will have the desired effect, e.g.
+
+ <type . . .>
+ . . .
+ <attributeGroup ref="xml:specialAttrs"/>
+
+ will define a type which will schema-validate an instance
+ element with any of those attributes
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>In keeping with the XML Schema WG's standard versioning
+ policy, this schema document will persist at
+ http://www.w3.org/2007/08/xml.xsd.
+ At the date of issue it can also be found at
+ http://www.w3.org/2001/xml.xsd.
+ The schema document at that URI may however change in the future,
+ in order to remain compatible with the latest version of XML Schema
+ itself, or with the XML namespace itself. In other words, if the XML
+ Schema or XML namespaces change, the version of this document at
+ http://www.w3.org/2001/xml.xsd will change
+ accordingly; the version at
+ http://www.w3.org/2007/08/xml.xsd will not change.
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:attribute name="lang">
+ <xs:annotation>
+ <xs:documentation>Attempting to install the relevant ISO 2- and 3-letter
+ codes as the enumerated possible values is probably never
+ going to be a realistic possibility. See
+ RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry
+ at http://www.iana.org/assignments/lang-tag-apps.htm for
+ further information.
+
+ The union allows for the 'un-declaration' of xml:lang with
+ the empty string.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:language">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value=""/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="space">
+ <xs:simpleType>
+ <xs:restriction base="xs:NCName">
+ <xs:enumeration value="default"/>
+ <xs:enumeration value="preserve"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="base" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
+ information about this attribute.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="id" type="xs:ID">
+ <xs:annotation>
+ <xs:documentation>See http://www.w3.org/TR/xml-id/ for
+ information about this attribute.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attributeGroup name="specialAttrs">
+ <xs:attribute ref="xml:base"/>
+ <xs:attribute ref="xml:lang"/>
+ <xs:attribute ref="xml:space"/>
+ <xs:attribute ref="xml:id"/>
+ </xs:attributeGroup>
+
+</xs:schema>
Added: modules/wsrp/trunk/src/assemble/wsrp-service.xml
===================================================================
--- modules/wsrp/trunk/src/assemble/wsrp-service.xml (rev 0)
+++ modules/wsrp/trunk/src/assemble/wsrp-service.xml 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,40 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+ <id>wsrp-service</id>
+ <formats>
+ <format>sar</format>
+ </formats>
+ <moduleSets>
+ <moduleSet>
+ <includes>
+ <include>org.jboss.portal.wsrp:child1</include>
+ </includes>
+ <sources>
+ <outputDirectory>sources/${artifactId}</outputDirectory>
+ </sources>
+ </moduleSet>
+ </moduleSets>
+</assembly>
Added: modules/wsrp/trunk/test-support/pom.xml
===================================================================
--- modules/wsrp/trunk/test-support/pom.xml (rev 0)
+++ modules/wsrp/trunk/test-support/pom.xml 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,54 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<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.jboss.portal.wsrp</groupId>
+ <artifactId>module-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>wsrp-test-support</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Portal WSRP Test Support</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.portal.wsrp</groupId>
+ <artifactId>wsrp1-rpc</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.wsrp</groupId>
+ <artifactId>wsrp-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-portlet</artifactId>
+ <version>${version.portlet}</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/BehaviorRegistry.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/BehaviorRegistry.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/BehaviorRegistry.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,110 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework;
+
+import org.jboss.portal.wsrp.WSRPExceptionFactory;
+import org.jboss.portal.wsrp.core.InvalidHandleFault;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 9360 $
+ * @since 2.6
+ */
+public class BehaviorRegistry
+{
+ private final Map<String, MarkupBehavior> behaviors = new HashMap<String, MarkupBehavior>();
+ private PortletManagementBehavior portletManagementBehavior;
+ private ServiceDescriptionBehavior serviceDescriptionBehavior;
+ private RegistrationBehavior registrationBehavior;
+
+ public ServiceDescriptionBehavior getServiceDescriptionBehavior()
+ {
+ // this is required since the consumer will try to access the producer as soon as it's started and the test
+ // producer will not be properly setup at that time since it's set up in the test's setUp method...
+ if (serviceDescriptionBehavior == null)
+ {
+ return ServiceDescriptionBehavior.DEFAULT;
+ }
+
+ return serviceDescriptionBehavior;
+ }
+
+ public void clear()
+ {
+ behaviors.clear();
+ }
+
+ public MarkupBehavior getMarkupBehaviorFor(String handle) throws InvalidHandleFault
+ {
+ if (behaviors.containsKey(handle))
+ {
+ return behaviors.get(handle);
+ }
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INVALID_HANDLE,
+ "There is no registered MarkupBehavior for handle '" + handle + "'", null);
+ }
+
+ public void registerMarkupBehavior(MarkupBehavior behavior)
+ {
+ for (String handle : behavior.getSupportedHandles())
+ {
+ MarkupBehavior existing = behaviors.get(handle);
+ if (existing != null)
+ {
+ throw new IllegalArgumentException("Cannot register behavior " + behavior.getClass().getName()
+ + " because it uses a handle '" + handle + "' that's already associated with behavior "
+ + existing.getClass().getName());
+ }
+ behaviors.put(handle, behavior);
+ }
+ }
+
+ public PortletManagementBehavior getPortletManagementBehavior()
+ {
+ return portletManagementBehavior;
+ }
+
+ public void setPortletManagementBehavior(PortletManagementBehavior portletManagementBehavior)
+ {
+ this.portletManagementBehavior = portletManagementBehavior;
+ }
+
+ public void setServiceDescriptionBehavior(ServiceDescriptionBehavior serviceDescriptionBehavior)
+ {
+ this.serviceDescriptionBehavior = serviceDescriptionBehavior;
+ }
+
+ public RegistrationBehavior getRegistrationBehavior()
+ {
+ return registrationBehavior;
+ }
+
+ public void setRegistrationBehavior(RegistrationBehavior registrationBehavior)
+ {
+ this.registrationBehavior = registrationBehavior;
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/InitCookieFakerHandler.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/InitCookieFakerHandler.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/InitCookieFakerHandler.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,72 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.GenericHandler;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.soap.MimeHeaders;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 8784 $
+ * @since 2.6
+ */
+public class InitCookieFakerHandler extends GenericHandler
+{
+ public QName[] getHeaders()
+ {
+ return null;
+ }
+
+ public boolean handleResponse(MessageContext msgContext)
+ {
+ SOAPMessageContext smc = (SOAPMessageContext)msgContext;
+ SOAPMessage message = smc.getMessage();
+ try
+ {
+ SOAPBody body = message.getSOAPBody();
+ String messageType = body.getFirstChild().getLocalName();
+
+ if (!"initCookieResponse".equals(messageType))
+ {
+ // only process if we're returning from initCookie
+ return super.handleResponse(msgContext);
+ }
+ }
+ catch (SOAPException e)
+ {
+ e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ }
+
+ MimeHeaders mimeHeaders = message.getMimeHeaders();
+ mimeHeaders.setHeader("Set-Cookie", "value");
+
+ return super.handleResponse(msgContext);
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/MarkupBehavior.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/MarkupBehavior.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/MarkupBehavior.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,181 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework;
+
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.common.net.media.MediaType;
+import org.jboss.portal.wsrp.WSRPTypeFactory;
+import org.jboss.portal.wsrp.WSRPUtils;
+import org.jboss.portal.wsrp.core.AccessDeniedFault;
+import org.jboss.portal.wsrp.core.BlockingInteractionResponse;
+import org.jboss.portal.wsrp.core.GetMarkup;
+import org.jboss.portal.wsrp.core.InconsistentParametersFault;
+import org.jboss.portal.wsrp.core.InitCookie;
+import org.jboss.portal.wsrp.core.InvalidCookieFault;
+import org.jboss.portal.wsrp.core.InvalidHandleFault;
+import org.jboss.portal.wsrp.core.InvalidRegistrationFault;
+import org.jboss.portal.wsrp.core.InvalidSessionFault;
+import org.jboss.portal.wsrp.core.InvalidUserCategoryFault;
+import org.jboss.portal.wsrp.core.MarkupContext;
+import org.jboss.portal.wsrp.core.MarkupParams;
+import org.jboss.portal.wsrp.core.MarkupResponse;
+import org.jboss.portal.wsrp.core.MissingParametersFault;
+import org.jboss.portal.wsrp.core.OperationFailedFault;
+import org.jboss.portal.wsrp.core.PerformBlockingInteraction;
+import org.jboss.portal.wsrp.core.PortletDescription;
+import org.jboss.portal.wsrp.core.PortletStateChangeRequiredFault;
+import org.jboss.portal.wsrp.core.ReleaseSessions;
+import org.jboss.portal.wsrp.core.ReturnAny;
+import org.jboss.portal.wsrp.core.UnsupportedLocaleFault;
+import org.jboss.portal.wsrp.core.UnsupportedMimeTypeFault;
+import org.jboss.portal.wsrp.core.UnsupportedModeFault;
+import org.jboss.portal.wsrp.core.UnsupportedWindowStateFault;
+import org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType;
+
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Behavior delivering Markup services.
+ *
+ * @author <a href="mailto:chris.laprun@jboss.com?subject=org.jboss.portal.test.wsrp.framework.AbstractMarkupBehavior">Chris
+ * Laprun</a>
+ * @version $Revision: 10337 $
+ * @since 2.6
+ */
+public abstract class MarkupBehavior extends TestProducerBehavior implements WSRP_v1_Markup_PortType
+{
+ private List<String> handles = new ArrayList<String>(3);
+ private BehaviorRegistry registry;
+
+
+ protected MarkupBehavior(BehaviorRegistry registry)
+ {
+ this.registry = registry;
+ }
+
+ public MarkupResponse getMarkup(GetMarkup getMarkup) throws UnsupportedWindowStateFault, InvalidCookieFault,
+ InvalidSessionFault, AccessDeniedFault, InconsistentParametersFault, InvalidHandleFault, UnsupportedLocaleFault,
+ UnsupportedModeFault, OperationFailedFault, MissingParametersFault, InvalidUserCategoryFault,
+ InvalidRegistrationFault, UnsupportedMimeTypeFault, RemoteException
+ {
+ MarkupParams markupParams = getMarkup.getMarkupParams();
+
+ String markupString = getMarkupString(WSRPUtils.getJSR168PortletModeFromWSRPName(markupParams.getMode()),
+ WSRPUtils.getJSR168WindowStateFromWSRPName(markupParams.getWindowState()), markupParams.getNavigationalState(),
+ getMarkup);
+
+ MarkupContext markupContext = WSRPTypeFactory.createMarkupContext(MediaType.TEXT_HTML.getValue(), markupString);
+ markupContext.setRequiresUrlRewriting(Boolean.TRUE);
+
+ MarkupResponse markupResponse = WSRPTypeFactory.createMarkupResponse(markupContext);
+
+ modifyResponseIfNeeded(markupResponse);
+
+ return markupResponse;
+ }
+
+
+ /**
+ * Performs a blocking interaction and returns the appropriate response. Default implementation returns
+ * <code>null</code>.
+ *
+ * @param performBlockingInteraction the original interaction request
+ * @return a BlockingInteractionResponse
+ */
+ public BlockingInteractionResponse performBlockingInteraction(PerformBlockingInteraction performBlockingInteraction)
+ throws InvalidSessionFault, UnsupportedModeFault, UnsupportedMimeTypeFault, OperationFailedFault,
+ UnsupportedWindowStateFault, UnsupportedLocaleFault, AccessDeniedFault, PortletStateChangeRequiredFault,
+ InvalidRegistrationFault, MissingParametersFault, InvalidUserCategoryFault, InconsistentParametersFault,
+ InvalidHandleFault, InvalidCookieFault, RemoteException
+ {
+ return null;
+ }
+
+ public ReturnAny releaseSessions(ReleaseSessions releaseSessions) throws InvalidRegistrationFault,
+ OperationFailedFault, MissingParametersFault, AccessDeniedFault, RemoteException
+ {
+ return null;
+ }
+
+ public ReturnAny initCookie(InitCookie initCookie) throws AccessDeniedFault, OperationFailedFault,
+ InvalidRegistrationFault, RemoteException
+ {
+ return null;
+ }
+
+ /**
+ * Returns a markup String based on the passed information.
+ *
+ * @param mode the requested mode
+ * @param windowState the requested window state
+ * @param navigationalState the current navigational state
+ * @param getMarkup the original GetMarkup request (in case more information is required by this behavior)
+ * @return a possibly <code>null</code> markup String
+ */
+ protected abstract String getMarkupString(Mode mode, WindowState windowState, String navigationalState, GetMarkup getMarkup)
+ throws UnsupportedWindowStateFault, InvalidCookieFault, InvalidSessionFault, AccessDeniedFault,
+ InconsistentParametersFault, InvalidHandleFault, UnsupportedLocaleFault, UnsupportedModeFault,
+ OperationFailedFault, MissingParametersFault, InvalidUserCategoryFault, InvalidRegistrationFault,
+ UnsupportedMimeTypeFault, RemoteException;
+
+ /**
+ * Allows this behavior to modify the response after the markup has been generated. The default implementation does
+ * nothing.
+ *
+ * @param markupResponse the response that will be passed on to the consumer
+ */
+ public void modifyResponseIfNeeded(MarkupResponse markupResponse)
+ {
+ // default implementation does not nothing
+ }
+
+ public List<String> getSupportedHandles()
+ {
+ return handles;
+ }
+
+ public PortletDescription getPortletDescriptionFor(String handle)
+ {
+ if (handles.contains(handle))
+ {
+ return createPortletDescription(handle, getSuffixFor(handle));
+ }
+ throw new IllegalArgumentException("MarkupBehavior " + getClass().getName() + " is not associated with handle '"
+ + handle + "'");
+ }
+
+ protected String getSuffixFor(String handle)
+ {
+ return "";
+ }
+
+ protected void registerHandle(String handle)
+ {
+ handles.add(handle);
+ registry.getServiceDescriptionBehavior().addPortletDescription(createPortletDescription(handle, getSuffixFor(handle)));
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/PortletManagementBehavior.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/PortletManagementBehavior.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/PortletManagementBehavior.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,104 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework;
+
+import org.jboss.portal.wsrp.WSRPTypeFactory;
+import org.jboss.portal.wsrp.core.AccessDeniedFault;
+import org.jboss.portal.wsrp.core.ClonePortlet;
+import org.jboss.portal.wsrp.core.DestroyPortlets;
+import org.jboss.portal.wsrp.core.DestroyPortletsResponse;
+import org.jboss.portal.wsrp.core.GetPortletDescription;
+import org.jboss.portal.wsrp.core.GetPortletProperties;
+import org.jboss.portal.wsrp.core.GetPortletPropertyDescription;
+import org.jboss.portal.wsrp.core.InconsistentParametersFault;
+import org.jboss.portal.wsrp.core.InvalidHandleFault;
+import org.jboss.portal.wsrp.core.InvalidRegistrationFault;
+import org.jboss.portal.wsrp.core.InvalidUserCategoryFault;
+import org.jboss.portal.wsrp.core.MissingParametersFault;
+import org.jboss.portal.wsrp.core.OperationFailedFault;
+import org.jboss.portal.wsrp.core.PortletContext;
+import org.jboss.portal.wsrp.core.PortletDescriptionResponse;
+import org.jboss.portal.wsrp.core.PortletPropertyDescriptionResponse;
+import org.jboss.portal.wsrp.core.PropertyList;
+import org.jboss.portal.wsrp.core.SetPortletProperties;
+import org.jboss.portal.wsrp.core.WSRP_v1_PortletManagement_PortType;
+
+import java.rmi.RemoteException;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com?subject=org.jboss.portal.test.wsrp.framework.PortletManagementBehavior">Chris
+ * Laprun</a>
+ * @version $Revision: 8784 $
+ * @since 2.6
+ */
+public class PortletManagementBehavior extends TestProducerBehavior implements WSRP_v1_PortletManagement_PortType
+{
+ public PortletDescriptionResponse getPortletDescription(GetPortletDescription getPortletDescription)
+ throws AccessDeniedFault, InvalidHandleFault, InvalidUserCategoryFault, InconsistentParametersFault,
+ MissingParametersFault, InvalidRegistrationFault, OperationFailedFault, RemoteException
+ {
+ incrementCallCount();
+ return null;
+ }
+
+ public PortletContext clonePortlet(ClonePortlet clonePortlet)
+ throws InvalidUserCategoryFault, AccessDeniedFault, OperationFailedFault, InvalidHandleFault,
+ InvalidRegistrationFault, InconsistentParametersFault, MissingParametersFault, RemoteException
+ {
+ incrementCallCount();
+ return null;
+ }
+
+ public DestroyPortletsResponse destroyPortlets(DestroyPortlets destroyPortlets)
+ throws InconsistentParametersFault, MissingParametersFault, InvalidRegistrationFault, OperationFailedFault,
+ RemoteException
+ {
+ incrementCallCount();
+ return null;
+ }
+
+ public PortletContext setPortletProperties(SetPortletProperties setPortletProperties)
+ throws OperationFailedFault, InvalidHandleFault, MissingParametersFault, InconsistentParametersFault,
+ InvalidUserCategoryFault, AccessDeniedFault, InvalidRegistrationFault, RemoteException
+ {
+ incrementCallCount();
+ return null;
+ }
+
+ public PropertyList getPortletProperties(GetPortletProperties getPortletProperties)
+ throws InvalidHandleFault, MissingParametersFault, InvalidRegistrationFault, AccessDeniedFault,
+ OperationFailedFault, InconsistentParametersFault, InvalidUserCategoryFault, RemoteException
+ {
+ incrementCallCount();
+ return null;
+ }
+
+ public PortletPropertyDescriptionResponse getPortletPropertyDescription(GetPortletPropertyDescription getPortletPropertyDescription)
+ throws MissingParametersFault, InconsistentParametersFault, InvalidUserCategoryFault, InvalidRegistrationFault,
+ AccessDeniedFault, InvalidHandleFault, OperationFailedFault, RemoteException
+ {
+ incrementCallCount();
+ return WSRPTypeFactory.createPortletPropertyDescriptionResponse(null);
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/RegistrationBehavior.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/RegistrationBehavior.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/RegistrationBehavior.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,69 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework;
+
+import org.jboss.portal.wsrp.WSRPTypeFactory;
+import org.jboss.portal.wsrp.core.InvalidRegistrationFault;
+import org.jboss.portal.wsrp.core.MissingParametersFault;
+import org.jboss.portal.wsrp.core.ModifyRegistration;
+import org.jboss.portal.wsrp.core.OperationFailedFault;
+import org.jboss.portal.wsrp.core.RegistrationContext;
+import org.jboss.portal.wsrp.core.RegistrationData;
+import org.jboss.portal.wsrp.core.RegistrationState;
+import org.jboss.portal.wsrp.core.ReturnAny;
+import org.jboss.portal.wsrp.core.WSRP_v1_Registration_PortType;
+
+import java.rmi.RemoteException;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com?subject=org.jboss.portal.test.wsrp.framework.RegistrationBehavior">Chris
+ * Laprun</a>
+ * @version $Revision: 8784 $
+ * @since 2.6
+ */
+public class RegistrationBehavior extends TestProducerBehavior implements WSRP_v1_Registration_PortType
+{
+ public static final String REGISTRATION_HANDLE = "registration";
+
+ public RegistrationContext register(RegistrationData register)
+ throws MissingParametersFault, OperationFailedFault, RemoteException
+ {
+ incrementCallCount();
+ return WSRPTypeFactory.createRegistrationContext(REGISTRATION_HANDLE);
+ }
+
+ public ReturnAny deregister(RegistrationContext deregister)
+ throws OperationFailedFault, InvalidRegistrationFault, RemoteException
+ {
+ incrementCallCount();
+ return null;
+ }
+
+ public RegistrationState modifyRegistration(ModifyRegistration modifyRegistration)
+ throws MissingParametersFault, OperationFailedFault, InvalidRegistrationFault, RemoteException
+ {
+ incrementCallCount();
+ return null;
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/ServiceDescriptionBehavior.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/ServiceDescriptionBehavior.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/ServiceDescriptionBehavior.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,137 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework;
+
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.wsrp.WSRPConstants;
+import org.jboss.portal.wsrp.WSRPTypeFactory;
+import org.jboss.portal.wsrp.core.CookieProtocol;
+import org.jboss.portal.wsrp.core.GetServiceDescription;
+import org.jboss.portal.wsrp.core.InvalidRegistrationFault;
+import org.jboss.portal.wsrp.core.OperationFailedFault;
+import org.jboss.portal.wsrp.core.PortletDescription;
+import org.jboss.portal.wsrp.core.PropertyDescription;
+import org.jboss.portal.wsrp.core.ServiceDescription;
+import org.jboss.portal.wsrp.core.WSRP_v1_ServiceDescription_PortType;
+
+import java.rmi.RemoteException;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com?subject=org.jboss.portal.test.wsrp.framework.ServiceDescriptionBehavior">Chris
+ * Laprun</a>
+ * @version $Revision: 11320 $
+ * @since 2.6
+ */
+public class ServiceDescriptionBehavior extends TestProducerBehavior implements WSRP_v1_ServiceDescription_PortType
+{
+ protected ServiceDescription serviceDescription;
+ private static final ServiceDescription DEFAULT_SERVICE_DESCRIPTION = WSRPTypeFactory.createServiceDescription(false);
+ public static final ServiceDescriptionBehavior DEFAULT = new ServiceDescriptionBehavior();
+
+ public ServiceDescriptionBehavior()
+ {
+ //Prepare sample ServiceDescription
+ serviceDescription = WSRPTypeFactory.createServiceDescription(false);
+ }
+
+ public ServiceDescription getServiceDescription(GetServiceDescription getServiceDescription) throws
+ OperationFailedFault, InvalidRegistrationFault, RemoteException
+ {
+ incrementCallCount();
+ return serviceDescription;
+ }
+
+ public void setRequiresRegistration(boolean requiresRegistration)
+ {
+ serviceDescription.setRequiresRegistration(requiresRegistration);
+ }
+
+ public void setRequiresInitCookie(CookieProtocol requiresInitCookie)
+ {
+ serviceDescription.setRequiresInitCookie(requiresInitCookie);
+ }
+
+ public void setServiceDescription(boolean requiresRegistration, int numberOfProps)
+ {
+ serviceDescription = createServiceDescription(requiresRegistration, numberOfProps);
+ }
+
+ public static ServiceDescription getDefaultServiceDescription()
+ {
+ return DEFAULT_SERVICE_DESCRIPTION;
+ }
+
+ public void addPortletDescription(PortletDescription portletDescription)
+ {
+ PortletDescription[] initial = serviceDescription.getOfferedPortlets();
+ if (initial == null || initial.length == 0)
+ {
+ serviceDescription.setOfferedPortlets(new PortletDescription[]{portletDescription});
+ }
+ else
+ {
+ List<PortletDescription> portlets = Tools.toList(initial);
+ portlets.add(portletDescription);
+ serviceDescription.setOfferedPortlets(portlets.toArray(new PortletDescription[portlets.size()]));
+ }
+ }
+
+ public Set<String> getPortletHandles()
+ {
+ PortletDescription[] portletDescriptions = serviceDescription.getOfferedPortlets();
+ Set<String> handles = new HashSet<String>(portletDescriptions.length);
+
+ for (PortletDescription description : portletDescriptions)
+ {
+ handles.add(description.getPortletHandle());
+ }
+
+ return handles;
+ }
+
+ public int getPortletNumber()
+ {
+ return serviceDescription.getOfferedPortlets().length;
+ }
+
+ public static ServiceDescription createServiceDescription(boolean requiresRegistration, int numberOfProperties)
+ {
+ ServiceDescription sd = WSRPTypeFactory.createServiceDescription(requiresRegistration);
+
+ if (requiresRegistration)
+ {
+ PropertyDescription[] descriptions = new PropertyDescription[numberOfProperties];
+ for (int i = 0; i < numberOfProperties; i++)
+ {
+ descriptions[i] = WSRPTypeFactory.createPropertyDescription("prop" + i, WSRPConstants.XSD_STRING);
+ }
+ sd.setRegistrationPropertyDescription(WSRPTypeFactory.createModelDescription(descriptions));
+ }
+
+ return sd;
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/TestProducerBehavior.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/TestProducerBehavior.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/TestProducerBehavior.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework;
+
+import org.jboss.portal.common.net.media.MediaType;
+import org.jboss.portal.wsrp.WSRPConstants;
+import org.jboss.portal.wsrp.core.LocalizedString;
+import org.jboss.portal.wsrp.core.MarkupType;
+import org.jboss.portal.wsrp.core.PortletDescription;
+import org.jboss.portal.wsrp.framework.support.ServiceObjectFactory;
+
+/**
+ * Provides a base class for Producer behavior used in Consumer testing.
+ *
+ * @author <a href="mailto:chris.laprun@jboss.com?subject=org.jboss.portal.test.wsrp.framework.TestProducerBehavior">Chris
+ * Laprun</a>
+ * @version $Revision: 11317 $
+ * @since 2.6
+ */
+public abstract class TestProducerBehavior
+{
+ protected int callCount;
+
+ /**
+ * Increment the number of times methods of this behavior have been called. Used when the behavior changes depending
+ * on how many times methods have been called.
+ */
+ public void incrementCallCount()
+ {
+ callCount++;
+ }
+
+ public int getCallCount()
+ {
+ return callCount;
+ }
+
+ public PortletDescription createPortletDescription(String portletHandle, String suffix)
+ {
+ PortletDescription portletDesc = new PortletDescription();
+ portletDesc.setPortletHandle(portletHandle);
+ portletDesc.setMarkupTypes(new MarkupType[]{new MarkupType(MediaType.TEXT_HTML.getValue(), new String[]{WSRPConstants.VIEW_MODE},
+ new String[]{WSRPConstants.NORMAL_WINDOW_STATE}, WSRPConstants.getDefaultLocales(), null)});
+
+ String suffixString = suffix == null ? "" : suffix;
+ portletDesc.setDescription(ServiceObjectFactory.createLocalizedString(ServiceObjectFactory.SAMPLE_DESCRIPTION + suffixString));
+ portletDesc.setTitle(ServiceObjectFactory.createLocalizedString(ServiceObjectFactory.SAMPLE_TITLE + suffixString));
+ portletDesc.setShortTitle(ServiceObjectFactory.createLocalizedString(ServiceObjectFactory.SAMPLE_SHORTTITLE + suffixString));
+ portletDesc.setDisplayName(ServiceObjectFactory.createLocalizedString(ServiceObjectFactory.SAMPLE_DISPLAYNAME + suffixString));
+ portletDesc.setKeywords(new LocalizedString[]{ServiceObjectFactory.createLocalizedString(ServiceObjectFactory.SAMPLE_KEYWORD + suffixString)});
+ return portletDesc;
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/TestWSRPProducer.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/TestWSRPProducer.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/TestWSRPProducer.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework;
+
+import org.jboss.portal.wsrp.WSRPProducer;
+
+/**
+ * Exposes WSPRProducer test implementation methods - we inject what it returns
+ *
+ * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
+ * @version $Revision: 10610 $
+ */
+public interface TestWSRPProducer extends WSRPProducer
+{
+ /** Resets any currently held state. */
+ void reset();
+
+ BehaviorRegistry getBehaviorRegistry();
+
+ /**
+ * Sets the currently used portlet handle identifying the MarkupBehavior we're using. This is needed to be able to
+ * dispatch calls to initCookie to the proper behavior.
+ *
+ * @param handle
+ */
+ void setCurrentMarkupBehaviorHandle(String handle);
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/TestWSRPProducerImpl.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/TestWSRPProducerImpl.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/TestWSRPProducerImpl.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,284 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework;
+
+import org.jboss.portal.registration.RegistrationManager;
+import org.jboss.portal.wsrp.WSRPTypeFactory;
+import org.jboss.portal.wsrp.core.AccessDeniedFault;
+import org.jboss.portal.wsrp.core.BlockingInteractionResponse;
+import org.jboss.portal.wsrp.core.ClonePortlet;
+import org.jboss.portal.wsrp.core.CookieProtocol;
+import org.jboss.portal.wsrp.core.DestroyPortlets;
+import org.jboss.portal.wsrp.core.DestroyPortletsResponse;
+import org.jboss.portal.wsrp.core.GetMarkup;
+import org.jboss.portal.wsrp.core.GetPortletDescription;
+import org.jboss.portal.wsrp.core.GetPortletProperties;
+import org.jboss.portal.wsrp.core.GetPortletPropertyDescription;
+import org.jboss.portal.wsrp.core.GetServiceDescription;
+import org.jboss.portal.wsrp.core.InconsistentParametersFault;
+import org.jboss.portal.wsrp.core.InitCookie;
+import org.jboss.portal.wsrp.core.InvalidCookieFault;
+import org.jboss.portal.wsrp.core.InvalidHandleFault;
+import org.jboss.portal.wsrp.core.InvalidRegistrationFault;
+import org.jboss.portal.wsrp.core.InvalidSessionFault;
+import org.jboss.portal.wsrp.core.InvalidUserCategoryFault;
+import org.jboss.portal.wsrp.core.MarkupResponse;
+import org.jboss.portal.wsrp.core.MissingParametersFault;
+import org.jboss.portal.wsrp.core.ModifyRegistration;
+import org.jboss.portal.wsrp.core.OperationFailedFault;
+import org.jboss.portal.wsrp.core.PerformBlockingInteraction;
+import org.jboss.portal.wsrp.core.PortletContext;
+import org.jboss.portal.wsrp.core.PortletDescriptionResponse;
+import org.jboss.portal.wsrp.core.PortletPropertyDescriptionResponse;
+import org.jboss.portal.wsrp.core.PortletStateChangeRequiredFault;
+import org.jboss.portal.wsrp.core.PropertyList;
+import org.jboss.portal.wsrp.core.RegistrationContext;
+import org.jboss.portal.wsrp.core.RegistrationData;
+import org.jboss.portal.wsrp.core.RegistrationState;
+import org.jboss.portal.wsrp.core.ReleaseSessions;
+import org.jboss.portal.wsrp.core.ReturnAny;
+import org.jboss.portal.wsrp.core.ServiceDescription;
+import org.jboss.portal.wsrp.core.SetPortletProperties;
+import org.jboss.portal.wsrp.core.UnsupportedLocaleFault;
+import org.jboss.portal.wsrp.core.UnsupportedMimeTypeFault;
+import org.jboss.portal.wsrp.core.UnsupportedModeFault;
+import org.jboss.portal.wsrp.core.UnsupportedWindowStateFault;
+import org.jboss.portal.wsrp.producer.WSRPValidator;
+import org.jboss.portal.wsrp.producer.config.ProducerConfiguration;
+import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequirements;
+import org.jboss.portal.wsrp.services.AbstractJBossService;
+
+import java.rmi.RemoteException;
+
+/**
+ * This is dummy clone of org.jboss.portal.wsrp.producer.WSRPProducerImpl customizable from client side. Just for
+ * consumer implementation testing purposes.
+ *
+ * @author <a href="mailto:Boleslaw.Dawidowicz@jboss.com">Boleslaw Dawidowicz</a>
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 12020 $
+ * @since 2.4
+ */
+public class TestWSRPProducerImpl extends AbstractJBossService implements TestWSRPProducer
+{
+ private int sessionExpirationTime = DEFAULT_SESSION_EXPIRATION_TIME;
+
+ private CookieProtocol requiresInitCookie = CookieProtocol.none;
+
+ private BehaviorRegistry behaviorRegistry = new BehaviorRegistry();
+
+ public static final String USER_COOKIE = "cookie";
+
+ private String currentMarkupBehaviorHandle;
+
+ public TestWSRPProducerImpl()
+ {
+ reset();
+ }
+
+ public BehaviorRegistry getBehaviorRegistry()
+ {
+ return behaviorRegistry;
+ }
+
+ public void setCurrentMarkupBehaviorHandle(String handle)
+ {
+ currentMarkupBehaviorHandle = handle;
+ }
+
+ public void reset()
+ {
+ requiresInitCookie = null;
+ currentMarkupBehaviorHandle = null;
+ behaviorRegistry.clear();
+ }
+
+ private MarkupBehavior getMarkupBehaviorFor(String portletHandle) throws InvalidHandleFault
+ {
+ return behaviorRegistry.getMarkupBehaviorFor(portletHandle);
+ }
+
+ private ServiceDescriptionBehavior getServiceDescriptionBehavior()
+ {
+ return behaviorRegistry.getServiceDescriptionBehavior();
+ }
+
+ public PortletManagementBehavior getPortletManagementBehavior()
+ {
+ return behaviorRegistry.getPortletManagementBehavior();
+ }
+
+ // ServiceDescription implementation ********************************************************************************
+
+ public ServiceDescription getServiceDescription(GetServiceDescription gs)
+ throws InvalidRegistrationFault, OperationFailedFault, RemoteException
+ {
+ return getServiceDescriptionBehavior().getServiceDescription(gs);
+ }
+
+ // MarkupService implementation *************************************************************************************
+
+ public MarkupResponse getMarkup(GetMarkup getMarkup)
+ throws UnsupportedWindowStateFault, InvalidCookieFault, InvalidSessionFault, AccessDeniedFault,
+ InconsistentParametersFault, InvalidHandleFault, UnsupportedLocaleFault, UnsupportedModeFault,
+ OperationFailedFault, MissingParametersFault, InvalidUserCategoryFault, InvalidRegistrationFault,
+ UnsupportedMimeTypeFault, RemoteException
+ {
+
+ return getMarkupBehaviorFor(getMarkup.getPortletContext().getPortletHandle())
+ .getMarkup(getMarkup);
+ }
+
+ public BlockingInteractionResponse performBlockingInteraction(PerformBlockingInteraction performBlockingInteraction)
+ throws InvalidSessionFault, UnsupportedModeFault, UnsupportedMimeTypeFault, OperationFailedFault,
+ UnsupportedWindowStateFault, UnsupportedLocaleFault, AccessDeniedFault, PortletStateChangeRequiredFault,
+ InvalidRegistrationFault, MissingParametersFault, InvalidUserCategoryFault, InconsistentParametersFault,
+ InvalidHandleFault, InvalidCookieFault, RemoteException
+ {
+
+ return getMarkupBehaviorFor(performBlockingInteraction.getPortletContext().getPortletHandle())
+ .performBlockingInteraction(performBlockingInteraction);
+ }
+
+ public ReturnAny releaseSessions(ReleaseSessions releaseSessions)
+ throws InvalidRegistrationFault, OperationFailedFault, MissingParametersFault, AccessDeniedFault, RemoteException
+ {
+ return null;
+ }
+
+ public ReturnAny initCookie(InitCookie initCookie)
+ throws AccessDeniedFault, OperationFailedFault, InvalidRegistrationFault, RemoteException
+ {
+ // should only be called if we required cookies to be initialized
+ if (requiresInitCookie == null || CookieProtocol.none.equals(requiresInitCookie))
+ {
+ throw new OperationFailedFault();
+ }
+
+ try
+ {
+ return getMarkupBehaviorFor(currentMarkupBehaviorHandle).initCookie(initCookie);
+ }
+ catch (InvalidHandleFault invalidHandleFault)
+ {
+ throw new OperationFailedFault();
+ }
+ }
+
+ // Registration implementation **************************************************************************************
+
+ public RegistrationContext register(RegistrationData register) throws MissingParametersFault, OperationFailedFault, RemoteException
+ {
+ return WSRPTypeFactory.createRegistrationContext("registration");
+ }
+
+ public ReturnAny deregister(RegistrationContext deregister) throws OperationFailedFault, InvalidRegistrationFault, RemoteException
+ {
+ return null;
+ }
+
+ public RegistrationState modifyRegistration(ModifyRegistration modifyRegistration) throws MissingParametersFault, OperationFailedFault, InvalidRegistrationFault, RemoteException
+ {
+ return null;
+ }
+
+ // PortletManagement implementation *********************************************************************************
+
+ public PortletDescriptionResponse getPortletDescription(GetPortletDescription getPortletDescription)
+ throws AccessDeniedFault, InvalidHandleFault, InvalidUserCategoryFault, InconsistentParametersFault,
+ MissingParametersFault, InvalidRegistrationFault, OperationFailedFault, RemoteException
+ {
+ return getPortletManagementBehavior().getPortletDescription(getPortletDescription);
+ }
+
+ public PortletContext clonePortlet(ClonePortlet clonePortlet) throws InvalidUserCategoryFault, AccessDeniedFault, OperationFailedFault, InvalidHandleFault, InvalidRegistrationFault, InconsistentParametersFault, MissingParametersFault, RemoteException
+ {
+ return getPortletManagementBehavior().clonePortlet(clonePortlet);
+ }
+
+ public DestroyPortletsResponse destroyPortlets(DestroyPortlets destroyPortlets) throws InconsistentParametersFault, MissingParametersFault, InvalidRegistrationFault, OperationFailedFault, RemoteException
+ {
+ return getPortletManagementBehavior().destroyPortlets(destroyPortlets);
+ }
+
+ public PortletContext setPortletProperties(SetPortletProperties setPortletProperties) throws OperationFailedFault, InvalidHandleFault, MissingParametersFault, InconsistentParametersFault, InvalidUserCategoryFault, AccessDeniedFault, InvalidRegistrationFault, RemoteException
+ {
+ return getPortletManagementBehavior().setPortletProperties(setPortletProperties);
+ }
+
+ public PropertyList getPortletProperties(GetPortletProperties getPortletProperties) throws InvalidHandleFault, MissingParametersFault, InvalidRegistrationFault, AccessDeniedFault, OperationFailedFault, InconsistentParametersFault, InvalidUserCategoryFault, RemoteException
+ {
+ return getPortletManagementBehavior().getPortletProperties(getPortletProperties);
+ }
+
+ public PortletPropertyDescriptionResponse getPortletPropertyDescription(GetPortletPropertyDescription getPortletPropertyDescription) throws MissingParametersFault, InconsistentParametersFault, InvalidUserCategoryFault, InvalidRegistrationFault, AccessDeniedFault, InvalidHandleFault, OperationFailedFault, RemoteException
+ {
+ return getPortletManagementBehavior().getPortletPropertyDescription(getPortletPropertyDescription);
+ }
+
+ // Producer implementation ******************************************************************************************
+
+ public CookieProtocol getRequiresInitCookie()
+ {
+ return requiresInitCookie;
+ }
+
+ public void setRequiresInitCookie(CookieProtocol requiresInitCookie)
+ {
+ this.requiresInitCookie = requiresInitCookie;
+ getServiceDescriptionBehavior().setRequiresInitCookie(requiresInitCookie);
+ }
+
+ public int getSessionExpirationTime()
+ {
+ return sessionExpirationTime;
+ }
+
+ public void setSessionExpirationTime(int sessionExpirationTime)
+ {
+ this.sessionExpirationTime = sessionExpirationTime;
+ }
+
+ public ProducerRegistrationRequirements getProducerRegistrationRequirements()
+ {
+ throw new UnsupportedOperationException("getProducerRegistrationRequirements not implemented");
+ }
+
+
+ public RegistrationManager getRegistrationManager()
+ {
+ throw new UnsupportedOperationException("getRegistrationManager not implemented");
+ }
+
+
+ public ProducerConfiguration getProducerConfiguration()
+ {
+ throw new UnsupportedOperationException("getProducerConfiguration not implemented");
+ }
+
+ public void usingStrictModeChangedTo(boolean strictMode)
+ {
+ WSRPValidator.setStrict(strictMode);
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BasicInstanceContext.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BasicInstanceContext.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BasicInstanceContext.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework.support;
+
+import org.jboss.portal.portlet.StateEvent;
+import org.jboss.portal.portlet.spi.InstanceContext;
+import org.jboss.portal.portlet.state.AccessMode;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com?subject=org.jboss.portal.test.wsrp.framework.support.BasicInstanceContext">Chris
+ * Laprun</a>
+ * @version $Revision: 10198 $
+ * @since 2.4
+ */
+public class BasicInstanceContext implements InstanceContext
+{
+ String id;
+
+ public BasicInstanceContext(String id)
+ {
+ this.id = id;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public AccessMode getAccessMode()
+ {
+ return AccessMode.READ_ONLY;
+ }
+
+ public void onStateEvent(StateEvent event)
+ {
+ // do nothing
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BasicPortalContext.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BasicPortalContext.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BasicPortalContext.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework.support;
+
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.portlet.spi.PortalContext;
+import org.jboss.portal.wsrp.WSRPUtils;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class BasicPortalContext implements PortalContext
+{
+ public String getInfo()
+ {
+ return PortalContext.VERSION.toString();
+ }
+
+ public Set<WindowState> getWindowStates()
+ {
+ return WSRPUtils.DEFAULT_JSR168_WINDOWSTATES;
+ }
+
+ public Set<Mode> getModes()
+ {
+ return WSRPUtils.DEFAULT_JSR168_MODES;
+ }
+
+ public Map<String, String> getProperties()
+ {
+ return Collections.emptyMap();
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BasicSecurityContext.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BasicSecurityContext.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BasicSecurityContext.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,67 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework.support;
+
+import org.jboss.portal.portlet.spi.SecurityContext;
+
+import java.security.Principal;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com?subject=org.jboss.portal.test.wsrp.framework.support.BasicSecurityContext">Chris
+ * Laprun</a>
+ * @version $Revision: 10198 $
+ * @since 2.4
+ */
+public class BasicSecurityContext implements SecurityContext
+{
+ public String getAuthType()
+ {
+ return null;
+ }
+
+ public String getRemoteUser()
+ {
+ return null;
+ }
+
+ public Principal getUserPrincipal()
+ {
+ return null;
+ }
+
+ public boolean isUserInRole(String s)
+ {
+ return false;
+ }
+
+ public boolean isSecure()
+ {
+ return false;
+ }
+
+ public boolean isAuthenticated()
+ {
+ return false;
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BasicUserContext.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BasicUserContext.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BasicUserContext.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework.support;
+
+import org.jboss.portal.portlet.spi.UserContext;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com?subject=org.jboss.portal.test.wsrp.framework.support.BasicUserContext">Chris
+ * Laprun</a>
+ * @version $Revision: 11068 $
+ * @since 2.4
+ */
+public class BasicUserContext implements UserContext
+{
+ /** . */
+ private Map<String, Object> attributes;
+
+ public String getId()
+ {
+ return null;
+ }
+
+ public Map<String, String> getInformations()
+ {
+ return null;
+ }
+
+ public Locale getLocale()
+ {
+ return Locale.ENGLISH;
+ }
+
+ public List getLocales()
+ {
+ return Collections.singletonList(getLocale());
+ }
+
+ public Object getAttribute(String arg0)
+ {
+ if (attributes != null)
+ {
+ return attributes.get(arg0);
+ }
+ return null;
+ }
+
+ public void setAttribute(String arg0, Object arg1)
+ {
+ if (attributes == null)
+ {
+ attributes = new HashMap<String, Object>();
+ }
+ attributes.put(arg0, arg1);
+ }
+
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BehaviorBackedServiceFactory.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BehaviorBackedServiceFactory.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/BehaviorBackedServiceFactory.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,204 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework.support;
+
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.portal.wsrp.core.AccessDeniedFault;
+import org.jboss.portal.wsrp.core.GetMarkup;
+import org.jboss.portal.wsrp.core.InconsistentParametersFault;
+import org.jboss.portal.wsrp.core.InvalidCookieFault;
+import org.jboss.portal.wsrp.core.InvalidHandleFault;
+import org.jboss.portal.wsrp.core.InvalidRegistrationFault;
+import org.jboss.portal.wsrp.core.InvalidSessionFault;
+import org.jboss.portal.wsrp.core.InvalidUserCategoryFault;
+import org.jboss.portal.wsrp.core.MissingParametersFault;
+import org.jboss.portal.wsrp.core.OperationFailedFault;
+import org.jboss.portal.wsrp.core.UnsupportedLocaleFault;
+import org.jboss.portal.wsrp.core.UnsupportedMimeTypeFault;
+import org.jboss.portal.wsrp.core.UnsupportedModeFault;
+import org.jboss.portal.wsrp.core.UnsupportedWindowStateFault;
+import org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType;
+import org.jboss.portal.wsrp.core.WSRP_v1_PortletManagement_PortType;
+import org.jboss.portal.wsrp.core.WSRP_v1_Registration_PortType;
+import org.jboss.portal.wsrp.core.WSRP_v1_ServiceDescription_PortType;
+import org.jboss.portal.wsrp.framework.BehaviorRegistry;
+import org.jboss.portal.wsrp.framework.MarkupBehavior;
+import org.jboss.portal.wsrp.services.ServiceFactory;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 11461 $
+ * @since 2.6
+ */
+public class BehaviorBackedServiceFactory implements ServiceFactory
+{
+ private BehaviorRegistry registry;
+ private final static String MARKUP = "markup";
+ private final static String SD_URL = "sd";
+ private final static String M_URL = "m";
+ private final static String PM_URL = "pm";
+ private final static String R_URL = "r";
+ private boolean initialized = false;
+
+
+ public BehaviorBackedServiceFactory()
+ {
+ registry = new BehaviorRegistry();
+ registry.registerMarkupBehavior(new SimpleMarkupBehavior());
+ }
+
+ public <T extends Remote> T getService(Class<T> serviceClass) throws Exception
+ {
+ if (WSRP_v1_ServiceDescription_PortType.class.isAssignableFrom(serviceClass))
+ {
+ return (T)registry.getServiceDescriptionBehavior();
+ }
+ if (WSRP_v1_Markup_PortType.class.isAssignableFrom(serviceClass))
+ {
+ return (T)registry.getMarkupBehaviorFor(MARKUP);
+ }
+ if (WSRP_v1_PortletManagement_PortType.class.isAssignableFrom(serviceClass))
+ {
+ return (T)registry.getPortletManagementBehavior();
+ }
+ if (WSRP_v1_Registration_PortType.class.isAssignableFrom(serviceClass))
+ {
+ return (T)registry.getRegistrationBehavior();
+ }
+ return null;
+ }
+
+ public BehaviorRegistry getRegistry()
+ {
+ return registry;
+ }
+
+ public void setRegistry(BehaviorRegistry registry)
+ {
+ this.registry = registry;
+ }
+
+ public boolean isAvailable()
+ {
+ if (!initialized)
+ {
+ initialized = true;
+ return false;
+ }
+ return true;
+ }
+
+ public boolean isFailed()
+ {
+ return false;
+ }
+
+ public void setFailed(boolean failed)
+ {
+ // do nothing
+ }
+
+ public String getServiceDescriptionURL()
+ {
+ return SD_URL;
+ }
+
+ public String getMarkupURL()
+ {
+ return M_URL;
+ }
+
+ public String getRegistrationURL()
+ {
+ return R_URL;
+ }
+
+ public String getPortletManagementURL()
+ {
+ return PM_URL;
+ }
+
+ public void setServiceDescriptionURL(String serviceDescriptionURL)
+ {
+ // do nothing
+ }
+
+ public void setMarkupURL(String markupURL)
+ {
+ // do nothing
+ }
+
+ public void setRegistrationURL(String registrationURL)
+ {
+ // do nothing
+ }
+
+ public void setPortletManagementURL(String portletManagementURL)
+ {
+ // do nothing
+ }
+
+ public void create() throws Exception
+ {
+ throw new NotYetImplemented();
+ }
+
+ public void start() throws Exception
+ {
+ // do nothing
+ }
+
+ public void stop()
+ {
+ throw new NotYetImplemented();
+ }
+
+ public void destroy()
+ {
+ throw new NotYetImplemented();
+ }
+
+ private class SimpleMarkupBehavior extends MarkupBehavior
+ {
+ public SimpleMarkupBehavior()
+ {
+ super(BehaviorBackedServiceFactory.this.registry);
+ registerHandle(MARKUP);
+ }
+
+ protected String getMarkupString(Mode mode, WindowState windowState, String navigationalState, GetMarkup getMarkup)
+ throws UnsupportedWindowStateFault, InvalidCookieFault, InvalidSessionFault, AccessDeniedFault,
+ InconsistentParametersFault, InvalidHandleFault, UnsupportedLocaleFault, UnsupportedModeFault,
+ OperationFailedFault, MissingParametersFault, InvalidUserCategoryFault, InvalidRegistrationFault,
+ UnsupportedMimeTypeFault, RemoteException
+ {
+ return MARKUP;
+ }
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockConsumerRegistry.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockConsumerRegistry.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockConsumerRegistry.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,127 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework.support;
+
+import org.jboss.portal.common.util.ParameterValidation;
+import org.jboss.portal.portlet.federation.FederatingPortletInvoker;
+import org.jboss.portal.wsrp.WSRPConsumer;
+import org.jboss.portal.wsrp.consumer.ConsumerException;
+import org.jboss.portal.wsrp.consumer.ConsumerRegistry;
+import org.jboss.portal.wsrp.consumer.EndpointConfigurationInfo;
+import org.jboss.portal.wsrp.consumer.ProducerInfo;
+
+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>
+ * @version $Revision: 12693 $
+ * @since 2.6
+ */
+public class MockConsumerRegistry implements ConsumerRegistry
+{
+ private Map consumers = new HashMap(3);
+ public static final String MOCK_SERVICE_DESCRIPTION = "mock-service-description";
+ public static final String MOCK_MARKUP = "mock-markup";
+ public static final String CONSUMER1 = "inDB";
+ public static final String CONSUMER2 = "inDB2";
+
+ /**
+ * Creates a ConsumerRegistry containing 2 consumers with id '{@link #CONSUMER1}' and '{@link #CONSUMER2}'
+ * respectively. CONSUMER2 is active and has a service description URL set to {@link #MOCK_SERVICE_DESCRIPTION} and a
+ * markup URL set to {@link #MOCK_MARKUP}
+ */
+ public MockConsumerRegistry()
+ {
+ reloadConsumers();
+ }
+
+ public List<WSRPConsumer> getConfiguredConsumers()
+ {
+ return new ArrayList<WSRPConsumer>(consumers.values());
+ }
+
+ public WSRPConsumer getConsumer(String id)
+ {
+ return (WSRPConsumer)consumers.get(id);
+ }
+
+ public FederatingPortletInvoker getFederatingPortletInvoker()
+ {
+ return null;
+ }
+
+ public WSRPConsumer createConsumer(String id, Integer expirationCacheSeconds)
+ {
+ MockWSRPConsumer consumer = new MockWSRPConsumer(id);
+ consumer.getProducerInfo().setExpirationCacheSeconds(expirationCacheSeconds);
+ consumers.put(id, consumer);
+ return consumer;
+ }
+
+ public void persistConsumer(WSRPConsumer consumer)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(consumer, "WSRPConsumer");
+ consumers.put(consumer.getProducerId(), consumer);
+ }
+
+ public void activateConsumerWith(String id) throws ConsumerException
+ {
+ // do nothing
+ }
+
+ public void updateProducerInfo(ProducerInfo producerInfo)
+ {
+ // do nothing
+ }
+
+ public void deactivateConsumerWith(String id) throws ConsumerException
+ {
+ // do nothing
+ }
+
+ public void registerOrDeregisterConsumerWith(String id, boolean register)
+ {
+ // do nothing
+ }
+
+ public void destroyConsumer(String id)
+ {
+ // do nothing
+ }
+
+ public void reloadConsumers()
+ {
+ consumers.clear();
+ consumers.put(CONSUMER1, new MockWSRPConsumer(CONSUMER1));
+ MockWSRPConsumer consumer = new MockWSRPConsumer(CONSUMER2);
+ consumer.getProducerInfo().setActive(true);
+ EndpointConfigurationInfo info = consumer.getProducerInfo().getEndpointConfigurationInfo();
+ info.setServiceDescriptionURL(MOCK_SERVICE_DESCRIPTION);
+ info.setMarkupURL(MOCK_MARKUP);
+ consumers.put(CONSUMER2, consumer);
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockHttpServletRequest.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockHttpServletRequest.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockHttpServletRequest.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,111 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework.support;
+
+import javax.servlet.http.HttpSession;
+import java.io.Serializable;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com?subject=org.jboss.portal.test.wsrp.framework.support.MockHttpServletRequest">Chris
+ * Laprun</a>
+ * @version $Revision: 11416 $
+ * @since 2.4
+ */
+public class MockHttpServletRequest implements InvocationHandler, Serializable
+{
+ private HttpSession session;
+
+ private Map attrs;
+ public static String scheme = "http";
+ public static String serverName = "test";
+ public static Integer serverPort = 1234;
+
+ public MockHttpServletRequest(HttpSession session)
+ {
+ this.session = session;
+ this.attrs = new HashMap();
+ }
+
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+ {
+ String methodName = method.getName();
+ if ("getSession".equals(methodName))
+ {
+ return session;
+ }
+ if ("getHeader".equals(methodName))
+ {
+ if ("User-Agent".equals(args[0]))
+ {
+ return "Mock Client User Agent";
+ }
+ return null;
+ }
+ if ("toString".equals(methodName))
+ {
+ return "MockHttpServletResponse";
+ }
+ if ("getAttribute".equals(methodName))
+ {
+ return attrs.get(args[0]);
+ }
+ if ("setAttribute".equals(methodName))
+ {
+ String name = (String)args[0];
+ Object value = args[1];
+ if (value != null)
+ {
+ attrs.put(name, value);
+ }
+ else
+ {
+ attrs.remove(value);
+ }
+ return null;
+ }
+ if ("removeAttribute".equals(methodName))
+ {
+ String name = (String)args[0];
+ attrs.remove(name);
+ return null;
+ }
+ if ("getScheme".equals(methodName))
+ {
+ return scheme;
+ }
+ if ("getServerName".equals(methodName))
+ {
+ return serverName;
+ }
+ if ("getServerPort".equals(methodName))
+ {
+ return serverPort;
+ }
+ throw new UnsupportedOperationException("MockHttpServletRequest does not support: " + method);
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockHttpServletResponse.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockHttpServletResponse.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockHttpServletResponse.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework.support;
+
+import java.io.Serializable;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com?subject=org.jboss.portal.test.wsrp.framework.support.MockHttpServletResponse">Chris
+ * Laprun</a>
+ * @version $Revision: 8784 $
+ * @since 2.4
+ */
+public class MockHttpServletResponse implements InvocationHandler, Serializable
+{
+ Object cookie;
+
+ public MockHttpServletResponse()
+ {
+ }
+
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+ {
+ String methodName = method.getName();
+ if ("addCookie".equals(methodName))
+ {
+ cookie = args[0];
+ return null;
+ }
+ else if ("reset".equals(methodName))
+ {
+ cookie = null;
+ return null;
+ }
+ else if ("toString".equals(methodName))
+ {
+ return "MockHttpServletResponse";
+ }
+ throw new UnsupportedOperationException("MockHttpServletResponse does not support: " + method);
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockHttpSession.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockHttpSession.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockHttpSession.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,78 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework.support;
+
+import org.jboss.portal.common.util.Tools;
+
+import java.io.Serializable;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com?subject=org.jboss.portal.test.wsrp.framework.support.MockHttpSession">Chris
+ * Laprun</a>
+ * @version $Revision: 8784 $
+ * @since 2.4
+ */
+public class MockHttpSession implements InvocationHandler, Serializable
+{
+ private final Map map = new HashMap();
+
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+ {
+ String methodName = method.getName();
+ if ("setAttribute".equals(methodName))
+ {
+ map.put(args[0], args[1]);
+ return null;
+ }
+ else if ("removeAttribute".equals(methodName))
+ {
+ map.remove(args[0]);
+ return null;
+ }
+ else if ("getAttribute".equals(methodName))
+ {
+ return map.get(args[0]);
+ }
+ else if ("getAttributeNames".equals(methodName))
+ {
+ return Tools.toEnumeration(map.keySet().iterator());
+ }
+ else if ("toString".equals(methodName))
+ {
+ return "MockHttpSession";
+ }
+ else if ("getId".equals(methodName))
+ {
+ return "SESSION_ID";
+ }
+ else
+ {
+ throw new UnsupportedOperationException("MockHttpSession does not support: " + method);
+ }
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockWSRPConsumer.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockWSRPConsumer.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/MockWSRPConsumer.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,181 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework.support;
+
+import org.jboss.portal.portlet.Portlet;
+import org.jboss.portal.portlet.PortletContext;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+import org.jboss.portal.portlet.state.PropertyChange;
+import org.jboss.portal.portlet.state.PropertyMap;
+import org.jboss.portal.wsrp.WSRPConsumer;
+import org.jboss.portal.wsrp.api.SessionEvent;
+import org.jboss.portal.wsrp.consumer.ProducerInfo;
+import org.jboss.portal.wsrp.consumer.ProducerSessionInformation;
+import org.jboss.portal.wsrp.consumer.RefreshResult;
+import org.jboss.portal.wsrp.services.ServiceFactory;
+
+import javax.servlet.http.HttpSession;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 8784 $
+ * @since 2.6
+ */
+public class MockWSRPConsumer implements WSRPConsumer
+{
+ private ProducerInfo producerInfo;
+
+ public MockWSRPConsumer(String id)
+ {
+ producerInfo = new ProducerInfo();
+ producerInfo.setId(id);
+ }
+
+ public String getProducerId()
+ {
+ return producerInfo.getId();
+ }
+
+ public void setServiceFactory(ServiceFactory serviceFactory)
+ {
+ }
+
+ public ProducerSessionInformation getProducerSessionInformationFrom(PortletInvocation invocation)
+ {
+ return null;
+ }
+
+ public ProducerSessionInformation getProducerSessionInformationFrom(HttpSession session)
+ {
+ return null;
+ }
+
+ public ProducerInfo getProducerInfo()
+ {
+ return producerInfo;
+ }
+
+ public void setProducerInfo(ProducerInfo producerInfo)
+ {
+ }
+
+ public void refreshProducerInfo() throws PortletInvokerException
+ {
+ }
+
+ public void releaseSessions()
+ {
+ }
+
+ public void activate() throws Exception
+ {
+ }
+
+ public void deactivate() throws Exception
+ {
+ }
+
+ public boolean isActive()
+ {
+ return true;
+ }
+
+ public boolean isRefreshNeeded()
+ {
+ return false;
+ }
+
+ public RefreshResult refresh(boolean forceRefresh)
+ {
+ return null;
+ }
+
+ public Set getPortlets() throws PortletInvokerException
+ {
+ return null;
+ }
+
+ public Portlet getPortlet(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
+ {
+ return null;
+ }
+
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
+ {
+ return null;
+ }
+
+ public PortletContext createClone(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ {
+ return null;
+ }
+
+ public List destroyClones(List portletContexts) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ {
+ return null;
+ }
+
+ public PropertyMap getProperties(PortletContext portletContext, Set keys) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ {
+ return null;
+ }
+
+ public PropertyMap getProperties(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ {
+ return null;
+ }
+
+ public PortletContext setProperties(PortletContext portletContext, PropertyChange[] changes) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ {
+ return null;
+ }
+
+ public void create() throws Exception
+ {
+ }
+
+ public void start() throws Exception
+ {
+ }
+
+ public void stop()
+ {
+ }
+
+ public void destroy()
+ {
+ }
+
+ public void sessionCreated(SessionEvent event)
+ {
+ }
+
+ public void sessionDestroyed(SessionEvent event)
+ {
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/ServiceObjectFactory.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/ServiceObjectFactory.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/ServiceObjectFactory.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,66 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework.support;
+
+import org.jboss.portal.wsrp.WSRPTypeFactory;
+import org.jboss.portal.wsrp.core.LocalizedString;
+
+/**
+ * Service Object Factory for testing
+ *
+ * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
+ * @version $Revision: 9360 $
+ */
+public class ServiceObjectFactory
+{
+ public static final String SAMPLE_DESCRIPTION = "SampleDescription";
+
+ public static final String SAMPLE_SHORTTITLE = "SampleShortTitle";
+
+ public static final String SAMPLE_TITLE = "SampleTitle";
+
+ public static final String SAMPLE_DISPLAYNAME = "SampleDisplayName";
+ public static final String SAMPLE_KEYWORD = "keyword";
+
+ private ServiceObjectFactory()
+ {
+ }
+
+ /**
+ * Create the dummiest form of LocalizedString
+ *
+ * @param value
+ * @return
+ */
+ public static LocalizedString createLocalizedString(String value)
+ {
+ return WSRPTypeFactory.createLocalizedString(value);
+ }
+
+ /** Produces String from LocalizedString */
+ public static String extractString(org.jboss.portal.common.i18n.LocalizedString ls)
+ {
+ return ls.getPreferredOrBestLocalizedMappingFor(new String[]{"en"}).getString();
+ }
+}
Added: modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/TestPortletInvocationContext.java
===================================================================
--- modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/TestPortletInvocationContext.java (rev 0)
+++ modules/wsrp/trunk/test-support/src/main/java/org/jboss/portal/wsrp/framework/support/TestPortletInvocationContext.java 2009-06-25 16:30:42 UTC (rev 13501)
@@ -0,0 +1,140 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.framework.support;
+
+import org.jboss.portal.common.net.media.MediaType;
+import org.jboss.portal.common.util.MarkupInfo;
+import org.jboss.portal.common.util.ParameterMap;
+import org.jboss.portal.portlet.ContainerURL;
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.URLFormat;
+import org.jboss.portal.portlet.impl.spi.AbstractPortletInvocationContext;
+import org.jboss.portal.portlet.spi.PortletInvocationContext;
+import org.jboss.portal.wsrp.WSRPConstants;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Proxy;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 11068 $
+ * @since 2.4
+ */
+public class TestPortletInvocationContext extends AbstractPortletInvocationContext implements PortletInvocationContext
+{
+
+ private HttpServletRequest mockRequest;
+ private HttpServletResponse mockResponse;
+
+ public TestPortletInvocationContext()
+ {
+ super(new MarkupInfo(MediaType.TEXT_HTML, WSRPConstants.DEFAULT_CHARACTER_SET));
+
+ ClassLoader classLoader = getClass().getClassLoader();
+ HttpSession session = (HttpSession)Proxy.newProxyInstance(classLoader, new Class[]{HttpSession.class},
+ new MockHttpSession());
+ mockRequest = (HttpServletRequest)Proxy.newProxyInstance(classLoader, new Class[]{HttpServletRequest.class},
+ new MockHttpServletRequest(session));
+ mockResponse = (HttpServletResponse)Proxy.newProxyInstance(classLoader, new Class[]{HttpServletResponse.class},
+ new MockHttpServletResponse());
+ }
+
+ public void setMockRequest(HttpServletRequest mockRequest)
+ {
+ this.mockRequest = mockRequest;
+ }
+
+ public void setMockResponse(HttpServletResponse mockResponse)
+ {
+ this.mockResponse = mockResponse;
+ }
+
+ public HttpServletRequest getClientRequest()
+ {
+ if (mockRequest == null)
+ {
+ throw new IllegalStateException();
+ }
+ return mockRequest;
+ }
+
+ public HttpServletResponse getClientResponse()
+ {
+ if (mockResponse == null)
+ {
+ throw new IllegalStateException();
+ }
+ return mockResponse;
+ }
+
+ public String encodeResourceURL(String url)
+ {
+ return null;
+ }
+
+ public String renderURL(ContainerURL containerURL, URLFormat urlFormat)
+ {
+ return null;
+ }
+
+ public String getCharacterEncoding()
+ {
+ return null;
+ }
+
+ public int getContentLength()
+ {
+ return 0;
+ }
+
+ public BufferedReader getReader() throws IOException
+ {
+ return null;
+ }
+
+ public InputStream getInputStream() throws IOException
+ {
+ return null;
+ }
+
+ public String getContentType()
+ {
+ return null;
+ }
+
+ public StateString getInteractionState()
+ {
+ return null;
+ }
+
+ public ParameterMap getForm()
+ {
+ return null;
+ }
+}
14 years, 10 months
JBoss Portal SVN: r13500 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: mposolda(a)redhat.com
Date: 2009-06-25 11:10:55 -0400 (Thu, 25 Jun 2009)
New Revision: 13500
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
Log:
[selenium] Refactoring of locator.properties
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-06-25 11:48:06 UTC (rev 13499)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-06-25 15:10:55 UTC (rev 13500)
@@ -1,12 +1,12 @@
# JBossPortalSeleniumTestCase
-portal.lnk.logout=link=Logout
+portal.link.logout=link=Logout
portal.sub.login=login-submit
-portal.adr.portal=/portal/
-portal.frm.login.content=login-content
-portal.inp.password=//input[contains(@id,'j_password')]
-portal.inp.username=//input[contains(@id,'j_username')]
-portal.lnk.login=link=Login
+portal.addr.portal=/portal/
+portal.frame.login.content=login-content
+portal.input.password=//input[contains(@id,'j_password')]
+portal.input.username=//input[contains(@id,'j_username')]
+portal.link.login=link=Login
# UserLoginTestCase
14 years, 10 months
JBoss Portal SVN: r13499 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium: cms and 1 other directories.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-06-25 07:48:06 -0400 (Thu, 25 Jun 2009)
New Revision: 13499
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesFullTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortletUserCreationTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowUploadTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/DashboardsTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletDefinitionsTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java
Log:
[selenium] - many assert descriptions
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesFullTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesFullTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesFullTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -102,6 +102,10 @@
Assert.assertTrue(selenium.getLocation().endsWith("/portal/portal/default/Coordination+Samples?xyz=123"));
}
+ private void assertIsInTable(String table, String value){
+ Assert.assertTrue(findTableRow(table, value, 0) > 0, value + " not found in table " + table);
+ }
+
@Test(enabled = true)
public void eventsExplicitTest() {
selenium.click("link=Events - Explicit");
@@ -119,14 +123,14 @@
selenium.click(MessageFormat.format(EVT_L_LNK, r));
waitFor(AJAX_LOAD);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C1, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C1);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C1);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C2, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C2);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C2);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C3, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C3);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C3);
Assert.assertFalse(selenium.isElementPresent(EVT_R2_TAB));
Assert.assertFalse(selenium.isElementPresent(EVT_R3_TAB));
@@ -141,23 +145,23 @@
selenium.click(MessageFormat.format(EVT_R_LNK, r));
waitFor(AJAX_LOAD);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C1, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C1);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C1);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C2, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C2);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C2);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C3, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C3);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C3);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C1, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C1);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C1);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C2, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C2);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C2);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C3, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C3);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C3);
}
@Test(enabled = true)
@@ -177,17 +181,17 @@
selenium.click(MessageFormat.format(EVT_L_LNK, r));
waitFor(AJAX_LOAD);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C1, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C1);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C1);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C2, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C2);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C2);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C3, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C3);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C3);
- Assert.assertFalse(selenium.isElementPresent(EVT_R2_TAB));
- Assert.assertFalse(selenium.isElementPresent(EVT_R3_TAB));
+ Assert.assertFalse(selenium.isElementPresent(EVT_R2_TAB),EVT_R2_TAB + " table was found");
+ Assert.assertFalse(selenium.isElementPresent(EVT_R3_TAB),EVT_R3_TAB + " table was found");
r = findTableRow(EVT_R1_TAB, EVT_R_C1, 0);
selenium.click(MessageFormat.format(EVT_R_LNK, r));
@@ -199,23 +203,23 @@
selenium.click(MessageFormat.format(EVT_R_LNK, r));
waitFor(AJAX_LOAD);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C1, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C1);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C1);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C2, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C2);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C2);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C3, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C3);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C3);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C1, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C1);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C1);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C2, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C2);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C2);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C3, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C3);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C3);
}
@Test(enabled = true)
@@ -235,23 +239,23 @@
selenium.click(MessageFormat.format(EVT_L_LNK, r));
waitFor(AJAX_LOAD);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C1, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C1);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C1);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C2, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C2);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C2);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C3, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C3);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C3);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_L_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_L_C1, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_L_C1);
+ assertIsInTable(EVT_R3_TAB, EVT_L_C1);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_L_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_L_C2, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_L_C2);
+ assertIsInTable(EVT_R3_TAB, EVT_L_C2);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_L_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_L_C3, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_L_C3);
+ assertIsInTable(EVT_R3_TAB, EVT_L_C3);
r = findTableRow(EVT_R1_TAB, EVT_R_C1, 0);
selenium.click(MessageFormat.format(EVT_R_LNK, r));
@@ -263,41 +267,41 @@
selenium.click(MessageFormat.format(EVT_R_LNK, r));
waitFor(AJAX_LOAD);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C1, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C1);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C1);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C2, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C2);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C2);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C3, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C3);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C3);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_L_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_L_C1, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_L_C1);
+ assertIsInTable(EVT_R3_TAB, EVT_L_C1);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_L_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_L_C2, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_L_C2);
+ assertIsInTable(EVT_R3_TAB, EVT_L_C2);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_L_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_L_C3, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_L_C3);
+ assertIsInTable(EVT_R3_TAB, EVT_L_C3);
//--------------------------------------------------------//
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_R_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_R_C1, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_R_C1);
+ assertIsInTable(EVT_L3_TAB, EVT_R_C1);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_R_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_R_C2, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_R_C2);
+ assertIsInTable(EVT_L3_TAB, EVT_R_C2);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_R_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_R_C3, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_R_C3);
+ assertIsInTable(EVT_L3_TAB, EVT_R_C3);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C1, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C1);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C1);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C2, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C2);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C2);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C3, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C3);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C3);
}
@Test(enabled = true)
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -144,7 +144,10 @@
Assert.assertTrue(selenium.getLocation().endsWith("/portal/portal/default/Coordination+Samples?xyz=123"));
}
-
+ private void assertIsInTable(String table, String value){
+ Assert.assertTrue(findTableRow(table, value, 0) > 0, value + " not found in table " + table);
+ }
+
/**
* Events explicit test.
*
@@ -193,14 +196,14 @@
selenium.click(MessageFormat.format(EVT_L_LNK, r));
waitFor(AJAX_LOAD);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C1, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C1);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C1);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C2, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C2);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C2);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C3, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C3);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C3);
Assert.assertFalse(selenium.isElementPresent(EVT_R2_TAB));
Assert.assertFalse(selenium.isElementPresent(EVT_R3_TAB));
@@ -215,23 +218,23 @@
selenium.click(MessageFormat.format(EVT_R_LNK, r));
waitFor(AJAX_LOAD);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C1, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C1);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C1);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C2, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C2);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C2);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C3, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C3);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C3);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C1, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C1);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C1);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C2, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C2);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C2);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C3, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C3);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C3);
}
/**
@@ -284,14 +287,14 @@
selenium.click(MessageFormat.format(EVT_L_LNK, r));
waitFor(AJAX_LOAD);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C1, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C1);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C1);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C2, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C2);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C2);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C3, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C3);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C3);
Assert.assertFalse(selenium.isElementPresent(EVT_R2_TAB));
Assert.assertFalse(selenium.isElementPresent(EVT_R3_TAB));
@@ -306,23 +309,23 @@
selenium.click(MessageFormat.format(EVT_R_LNK, r));
waitFor(AJAX_LOAD);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C1, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C1);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C1);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C2, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C2);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C2);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C3, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C3);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C3);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C1, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C1);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C1);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C2, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C2);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C2);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C3, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C3);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C3);
}
/**
@@ -375,23 +378,23 @@
selenium.click(MessageFormat.format(EVT_L_LNK, r));
waitFor(AJAX_LOAD);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C1, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C1);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C1);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C2, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C2);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C2);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C3, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C3);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C3);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_L_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_L_C1, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_L_C1);
+ assertIsInTable(EVT_R3_TAB, EVT_L_C1);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_L_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_L_C2, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_L_C2);
+ assertIsInTable(EVT_R3_TAB, EVT_L_C2);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_L_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_L_C3, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_L_C3);
+ assertIsInTable(EVT_R3_TAB, EVT_L_C3);
r = findTableRow(EVT_R1_TAB, EVT_R_C1, 0);
selenium.click(MessageFormat.format(EVT_R_LNK, r));
@@ -403,41 +406,41 @@
selenium.click(MessageFormat.format(EVT_R_LNK, r));
waitFor(AJAX_LOAD);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C1, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C1);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C1);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C2, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C2);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C2);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_L_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_L_C3, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_L_C3);
+ assertIsInTable(EVT_L3_TAB, EVT_L_C3);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_L_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_L_C1, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_L_C1);
+ assertIsInTable(EVT_R3_TAB, EVT_L_C1);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_L_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_L_C2, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_L_C2);
+ assertIsInTable(EVT_R3_TAB, EVT_L_C2);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_L_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_L_C3, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_L_C3);
+ assertIsInTable(EVT_R3_TAB, EVT_L_C3);
// --------------------------------------------------------//
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_R_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_R_C1, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_R_C1);
+ assertIsInTable(EVT_L3_TAB, EVT_R_C1);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_R_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_R_C2, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_R_C2);
+ assertIsInTable(EVT_L3_TAB, EVT_R_C2);
- Assert.assertTrue(findTableRow(EVT_L2_TAB, EVT_R_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_L3_TAB, EVT_R_C3, 0) > 0);
+ assertIsInTable(EVT_L2_TAB, EVT_R_C3);
+ assertIsInTable(EVT_L3_TAB, EVT_R_C3);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C1, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C1, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C1);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C1);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C2, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C2, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C2);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C2);
- Assert.assertTrue(findTableRow(EVT_R2_TAB, EVT_R_C3, 0) > 0);
- Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C3, 0) > 0);
+ assertIsInTable(EVT_R2_TAB, EVT_R_C3);
+ assertIsInTable(EVT_R3_TAB, EVT_R_C3);
}
/**
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -371,8 +371,8 @@
selenium.click("link=" + pageName);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertFalse(assertTextOrder("Current;Greetings"));
- Assert.assertTrue(assertTextOrder("Greetings;Current"));
+ Assert.assertFalse(assertTextOrder("Current;Greetings"),"greetings and current strings not in expected order");
+ Assert.assertTrue(assertTextOrder("Greetings;Current"),"greetings and current strings not in expected order");
selenium.click(LNK_CONFIGURE_DASHBOARD);
// selenium.waitForPageToLoad(PAGE_LOAD);
@@ -388,8 +388,8 @@
selenium.click("link=" + pageName);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(assertTextOrder("Current;Greetings"));
- Assert.assertFalse(assertTextOrder("Greetings;Current"));
+ Assert.assertTrue(assertTextOrder("Current;Greetings"),"greetings and current strings not in expected order");
+ Assert.assertFalse(assertTextOrder("Greetings;Current"),"greetings and current strings not in expected order");
}
@@ -535,7 +535,7 @@
Assert.assertTrue(selenium.isElementPresent("link=" + pageName));
selenium.click("link=" + pageName);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_POWER));
+ Assert.assertTrue(selenium.isTextPresent(MSG_POWER),"powered by jboss message is missing");
// then rename it
selenium.click(LNK_CONFIGURE_DASHBOARD);
@@ -576,7 +576,7 @@
selenium.click(SUB_ADDCENTER);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_WINDOW_NAME_VALID));
+ Assert.assertTrue(selenium.isTextPresent(MSG_WINDOW_NAME_VALID),"validation message missing or other than expected");
}
/**
@@ -667,7 +667,7 @@
selenium.click("link=" + pageName);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_POWER));
+ Assert.assertTrue(selenium.isTextPresent(MSG_POWER),"powered by jboss message not found");
// add weather portlet
selenium.open("/portal/");
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -124,8 +124,7 @@
selenium.type(INPUT_CONSWSDL, "http://wsrp.bea.com:7001/producer/producer?WSDL");
selenium.click(SUBMIT_REFRESHSAVE);
selenium.waitForPageToLoad(PAGE_LOAD);
- //Assert.assertTrue(selenium.isTextPresent("Refresh failed (probably because the registration information was not valid)."));
- Assert.assertTrue(selenium.isTextPresent("Missing value"));
+ Assert.assertTrue(selenium.isTextPresent("Missing value"),"missing value message missing or other than expected");
selenium.type(INPUT_CONS_REGVALUE, "public");
selenium.click(SUBMIT_CONS_REGVAL);
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -510,7 +510,7 @@
selenium.type(INP_USERNAME, XSS_STR1);
clickAndWait(SUB_CREATE_USER);
- Assert.assertTrue(selenium.isTextPresent("is an invalid username"));
+ Assert.assertTrue(selenium.isTextPresent("is an invalid username"),"validation message missing or other than expected");
openAndWait(ADR_PORTAL);
@@ -523,7 +523,7 @@
clickAndWait(SUB_CREATE_USER);
- Assert.assertTrue(selenium.isTextPresent("Invalid E-Mail address."));
+ Assert.assertTrue(selenium.isTextPresent("Invalid E-Mail address."),"validation message missing or other than expected");
}
@@ -550,7 +550,7 @@
selenium.type(INP_ROLEDISNAME, "diddi");
clickAndWait(SUB_ROLE_CREATE);
- Assert.assertTrue(selenium.isTextPresent(MSG_ROLE_NAME_VALID));
+ Assert.assertTrue(selenium.isTextPresent(MSG_ROLE_NAME_VALID),"validation message missing or other than expected");
openAndWait(ADR_PORTAL);
clickIfVisible(LNK_ADMIN);
@@ -565,7 +565,7 @@
clickAndWait(SUB_ROLE_CREATE);
- Assert.assertTrue(selenium.isTextPresent(MSG_ROLE_DISPNAME_VALID));
+ Assert.assertTrue(selenium.isTextPresent(MSG_ROLE_DISPNAME_VALID),"validation message missing or other than expected");
}
@@ -607,7 +607,7 @@
selenium.click(SUB_EDIT_ROLE_SUBMIT);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_ROLE_DISPNAME_VALID));
+ Assert.assertTrue(selenium.isTextPresent(MSG_ROLE_DISPNAME_VALID),"validation message missing or other than expected");
deleteRole(roleName);
}
@@ -700,7 +700,7 @@
waitFor(SEARCH_TIMEOUT);
- Assert.assertTrue(selenium.isTextPresent("is an invalid"));
+ Assert.assertTrue(selenium.isTextPresent("is an invalid"),"validation message missing or other than expected");
}
/**
@@ -720,7 +720,7 @@
selenium.click(SUB_ROLE_SEARCH_USER);
waitFor(10000);
- Assert.assertTrue(selenium.isTextPresent("is an invalid"));
+ Assert.assertTrue(selenium.isTextPresent("is an invalid"),"validation message missing or other than expected");
}
private void goToEdit(String userName, String userMail) {
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -40,7 +40,7 @@
}
protected final String LINK_LOGOUT = getLoc(casePfx + "link.logout", "link=Logout");
- protected final String SUBMIT_LOGIN = getLoc(casePfx + "submit.login", "login");
+ protected final String SUBMIT_LOGIN = getLoc(casePfx + "sub.login", "login");
protected final String ADR_PORTAL = getLoc(casePfx + "addr.portal", "/portal/");
protected final String FRAME_LOGIN_CONTENT = getLoc(casePfx + "frame.login.content", "login-content");
protected final String LINK_LOGIN = getLoc(casePfx + "link.login", "link=Login");
@@ -395,7 +395,7 @@
selenium.type(INPUT_USERNAME, username);
selenium.type(INPUT_PASSWORD, password);
selenium.fireEvent(INPUT_PASSWORD, "keydown");
- Assert.assertTrue(selenium.isElementPresent(SUBMIT_LOGIN));
+ Assert.assertTrue(selenium.isElementPresent(SUBMIT_LOGIN),"login submit button not found");
selenium.click(SUBMIT_LOGIN);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("Logged in as: " + username), "Not logged in, login message missing.");
@@ -407,7 +407,7 @@
public void logout() {
selenium.open(ADR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent(LINK_LOGOUT));
+ Assert.assertTrue(selenium.isElementPresent(LINK_LOGOUT),"logout link not found");
selenium.click(LINK_LOGOUT);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertFalse(selenium.isTextPresent("Logged in as:"), "Not logged in, login message missing.");
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortletUserCreationTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortletUserCreationTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortletUserCreationTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -41,24 +41,24 @@
selenium.open("/portal");
selenium.waitForPageToLoad(PAGE_LOAD);
clickIfVisible(TAB_WELCOME);
- Assert.assertTrue((selenium.isElementPresent(LNK_CREATE_USER)));
+ Assert.assertTrue((selenium.isElementPresent(LNK_CREATE_USER)),"create user link not found");
selenium.click(LNK_CREATE_USER);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue((selenium.isTextPresent("Username *")));
- Assert.assertTrue((selenium.isTextPresent("E-Mail *")));
- Assert.assertTrue((selenium.isTextPresent("Password *")));
- Assert.assertTrue((selenium.isTextPresent("Confirm Password *")));
+ Assert.assertTrue((selenium.isTextPresent("Username *")),"username form label not found");
+ Assert.assertTrue((selenium.isTextPresent("E-Mail *")),"email form label not found");
+ Assert.assertTrue((selenium.isTextPresent("Password *")),"password form label not found");
+ Assert.assertTrue((selenium.isTextPresent("Confirm Password *")),"password confirm form label not found");
selenium.type(INP_USERNAME, "portletUser");
selenium.type(INP_USERMAIL, "portletUser(a)redhat.com");
selenium.type(INP_USERPASSWD, "portletUserPassword");
selenium.type(INP_USERPASSWDCONF, "portletUserPassword");
selenium.click(SUB_CREATE_USER);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue((selenium.isTextPresent("portletUser")));
- Assert.assertTrue((selenium.isTextPresent("portletUser(a)redhat.com")));
+ Assert.assertTrue((selenium.isTextPresent("portletUser")), "portletUser not found on screen");
+ Assert.assertTrue((selenium.isTextPresent("portletUser(a)redhat.com")),"user email not found");
selenium.click(SUB_CREATE_CONF);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue((selenium.isTextPresent("Your account has been successfully created. You may want to login now.")));
+ Assert.assertTrue((selenium.isTextPresent("Your account has been successfully created. You may want to login now.")),"account created message not found");
}
/**
@@ -71,13 +71,13 @@
selenium.open("/portal");
selenium.waitForPageToLoad(PAGE_LOAD);
clickIfVisible(TAB_WELCOME);
- Assert.assertTrue((selenium.isElementPresent(LNK_CREATE_USER)));
+ Assert.assertTrue((selenium.isElementPresent(LNK_CREATE_USER)),"create user link not found");
selenium.click(LNK_CREATE_USER);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue((selenium.isTextPresent("Username *")));
- Assert.assertTrue((selenium.isTextPresent("E-Mail *")));
- Assert.assertTrue((selenium.isTextPresent("Password *")));
- Assert.assertTrue((selenium.isTextPresent("Confirm Password *")));
+ Assert.assertTrue((selenium.isTextPresent("Username *")),"username form label not found");
+ Assert.assertTrue((selenium.isTextPresent("E-Mail *")),"email form label not found");
+ Assert.assertTrue((selenium.isTextPresent("Password *")),"password form label not found");
+ Assert.assertTrue((selenium.isTextPresent("Confirm Password *")),"password confirmation form label not found");
selenium.type(INP_USERNAME, "portletLongUser");
selenium.type(INP_USERMAIL, "portletLongUser(a)redhat.com");
selenium.type(INP_USERPASSWD, "portletLongUserPassword");
@@ -90,7 +90,7 @@
selenium.open("/portal");
selenium.waitForPageToLoad(PAGE_LOAD);
clickIfVisible(TAB_WELCOME);
- Assert.assertTrue((selenium.isElementPresent(LNK_CREATE_USER)));
+ Assert.assertTrue((selenium.isElementPresent(LNK_CREATE_USER)),"create user link not found");
selenium.click(LNK_CREATE_USER);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.type(INP_USERNAME, "portlextLongUser");
@@ -184,7 +184,7 @@
selenium.type(INP_USERPASSWDCONF, "invalidMailp");
selenium.click(SUB_CREATE_USER);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("Invalid E-Mail address."));
+ Assert.assertTrue(selenium.isTextPresent("Invalid E-Mail address."),"validation message not found");
}
@@ -204,7 +204,7 @@
selenium.type(INP_USERPASSWDCONF, "wrongPass2");
selenium.click(SUB_CREATE_USER);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("The passwords doesn't match."));
+ Assert.assertTrue(selenium.isTextPresent("The passwords doesn't match."),"password not match message not found");
}
/**
@@ -220,7 +220,8 @@
selenium.open("/portal");
selenium.waitForPageToLoad(PAGE_LOAD);
clickIfVisible(TAB_WELCOME);
- Assert.assertTrue((selenium.isElementPresent(LNK_CREATE_USER)));
+ Assert.assertTrue((selenium.isElementPresent(LNK_CREATE_USER)),"create user link not found");
+
selenium.click(LNK_CREATE_USER);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -291,7 +292,7 @@
selenium.type(INP_USERPASSWDCONF, "w1");
selenium.click(SUB_CREATE_USER);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("password: Validation Error: Value is less than allowable minimum of '6'"));
+ Assert.assertTrue(selenium.isTextPresent("password: Validation Error: Value is less than allowable minimum of '6'"),"min lenght password message not found");
}
}
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -259,7 +259,7 @@
selenium.fireEvent(INP_PASSWORD, "keydown");
selenium.click(SUB_LOGIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_LOGIN_WRONGPASS));
+ Assert.assertTrue(selenium.isTextPresent(MSG_LOGIN_WRONGPASS),"validation message missing or other than expected");
selenium.open(ADR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -116,16 +116,16 @@
selenium.type(INPUT_CONSWSDL, "http://wsrp.bea.com:7001/producer/producer?WSDL");
selenium.click(SUBMIT_REFRESHSAVE);
selenium.waitForPageToLoad(PAGE_LOAD);
- //Assert.assertTrue(selenium.isTextPresent("Refresh failed (probably because the registration information was not valid)."));
- Assert.assertTrue(selenium.isTextPresent("Missing value"));
+
+ Assert.assertTrue(selenium.isTextPresent("Missing value"),"missing value message missing or other than expected");
selenium.type(INPUT_CONS_REGVALUE, "public");
selenium.click(SUB_CONS_REGVAL);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("configuration (active)"));
+ Assert.assertTrue(selenium.isTextPresent("configuration (active)"),"message about active configuration missing or other than expected");
selenium.click(SUB_REFRESHFINAL);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("BEA"));
+ Assert.assertTrue(selenium.isTextPresent("BEA"),"name of consumer missing or other than expected");
}
/**
@@ -192,11 +192,11 @@
clickIfVisible(LINK_CONSUMER_HOME);
int r = findTableRow(WSRP_CONSUMER_TABLE, "BEAact", 0) - 1;
- Assert.assertTrue(selenium.isTextPresent("BEAact (inactive) (refresh needed)"));
+ Assert.assertTrue(selenium.isTextPresent("BEAact (inactive) (refresh needed)"),"message about inactive configuration missing or other than expected");
selenium.click(MessageFormat.format(LINK_T_CONS_ACT, r));
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertFalse(selenium.isTextPresent("BEAact (inactive) (refresh needed)"));
+ Assert.assertFalse(selenium.isTextPresent("BEAact (inactive) (refresh needed)"),"message about inactive configuration was found");
}
@@ -219,11 +219,11 @@
int r = findTableRow(WSRP_CONSUMER_TABLE, "BEAact", 0) - 1;
- Assert.assertFalse(selenium.isTextPresent("BEAact (inactive) (refresh needed)"));
+ Assert.assertFalse(selenium.isTextPresent("BEAact (inactive) (refresh needed)"),"message about inactive configuration was found");
selenium.click(MessageFormat.format(LINK_T_CONS_DEA, r));
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("BEAact (inactive) (refresh needed)"));
+ Assert.assertTrue(selenium.isTextPresent("BEAact (inactive) (refresh needed)"),"message about inactive configuration missing or other than expected");
}
@@ -304,7 +304,7 @@
selenium.click(SUB_PROD_SAVE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_PROD_SAVED));
+ Assert.assertTrue(selenium.isTextPresent(MSG_PROD_SAVED),"producer saved message is missing");
clickIfVisible(ID_LINK_CONSCONF);
clickIfVisible(ID_LINK_PRODCONF);
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -93,9 +93,8 @@
// assuring that the directory is created
- selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent("//div[@id='center']/div/div/ul/li[3]"));
- Assert.assertEquals(tempDirName, selenium.getText("//div[@id='center']/div/div/ul/li[3]"));
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isElementPresent("link=" + tempDirName),"Created directory link not found.");
@@ -216,8 +215,10 @@
/**
* Copies a directory.
*
- * With action selector an action to copy a directory is chosen. Before that a directory named "copySrc" was created.
- * Then it was copied into "default" directory. Then the existence of the copied directory in both root and default directories is asserted.
+ * With action selector an action to copy a directory is chosen. Before that
+ * a directory named "copySrc" was created. Then it was copied into
+ * "default" directory. Then the existence of the copied directory in both
+ * root and default directories is asserted.
*/
@Test(enabled = true, dependsOnMethods = "testCreateDirectory", description = "Copying of directory.")
public void testCopyDirectory() {
@@ -249,13 +250,13 @@
selenium.click(INP_DIR_SUB);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("copySrc", selenium.getText("//div[@id='center']/div/div/ul/li[5]"));
- Assert.assertTrue(selenium.isElementPresent("link=" + defaultDirName));
+ Assert.assertTrue(selenium.isElementPresent("link=" + defaultDirName),"default dir link not found.");
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent("link=" + copyDirName));
+ Assert.assertTrue(selenium.isElementPresent("link=" + copyDirName),"copied directory not found in home directory");
selenium.click("link=" + defaultDirName);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent("link=" + copyDirName));
+ Assert.assertTrue(selenium.isElementPresent("link=" + copyDirName),"copied directory not found in default directory");
}
@@ -306,8 +307,10 @@
/**
* Moves a directory.
*
- * With action selector an action to move a directory is chosen. Before that a directory named "moveSrc" was created.
- * Then it was copied into "default" directory. Then the existence of the moved directory in default and not in the root directory is asserted.
+ * With action selector an action to move a directory is chosen. Before that
+ * a directory named "moveSrc" was created. Then it was copied into
+ * "default" directory. Then the existence of the moved directory in default
+ * and not in the root directory is asserted.
*/
@Test(enabled = true, dependsOnMethods = "testCreateDirectory", description = "Moving a directory.")
public void testMoveDirectory() {
@@ -317,9 +320,9 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent(INP_DIR_NAME));
- Assert.assertTrue(selenium.isElementPresent(INP_DIR_DESC));
- Assert.assertEquals("Confirm Directory Creation", selenium.getText("//div[@id='center']/div/h3"));
+ Assert.assertTrue(selenium.isElementPresent(INP_DIR_NAME),"directory name input not found");
+ Assert.assertTrue(selenium.isElementPresent(INP_DIR_DESC),"directory description input not found");
+ Assert.assertEquals("Confirm Directory Creation", selenium.getText("//div[@id='center']/div/h3"),"confirm message missing or other than expected");
selenium.type(INP_DIR_NAME, moveDirName);
selenium.type(INP_DIR_DESC, "source folder for move");
@@ -331,7 +334,7 @@
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent("link=" + moveDirName));
+ Assert.assertTrue(selenium.isElementPresent("link=" + moveDirName),"directory for moving link not found");
selenium.select(takeAction(moveDirName) + "/select", "label=Move");
selenium.click(takeAction(moveDirName) + "/select/option[2]");
selenium.click(takeAction(moveDirName) + "/input");
@@ -342,13 +345,13 @@
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals(moveDirName, selenium.getText("//div[@id='center']/div/div/ul/li[5]"));
- Assert.assertTrue(selenium.isElementPresent("link=" + defaultDirName));
+ Assert.assertTrue(selenium.isElementPresent("link=" + defaultDirName),"defaut directory link not found");
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertFalse(selenium.isElementPresent("link=" + moveDirName));
+ Assert.assertFalse(selenium.isElementPresent("link=" + moveDirName),"moved directory found in root directory");
selenium.click("link=" + defaultDirName);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent("link=" + moveDirName));
+ Assert.assertTrue(selenium.isElementPresent("link=" + moveDirName),"moved directory not found in default directory");
}
@@ -368,9 +371,9 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent(INP_DIR_NAME));
- Assert.assertTrue(selenium.isElementPresent(INP_DIR_DESC));
- Assert.assertEquals("Confirm Directory Creation", selenium.getText("//div[@id='center']/div/h3"));
+ Assert.assertTrue(selenium.isElementPresent(INP_DIR_NAME),"input for directory name not found");
+ Assert.assertTrue(selenium.isElementPresent(INP_DIR_DESC),"input for directory description not found");
+ Assert.assertEquals("Confirm Directory Creation", selenium.getText("//div[@id='center']/div/h3"),"confirmation message not found or other than expected");
selenium.type(INP_DIR_NAME, moveCancelDirName);
selenium.type(INP_DIR_DESC, "source folder for move");
@@ -389,7 +392,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent("link=" + moveCancelDirName));
+ Assert.assertTrue(selenium.isElementPresent("link=" + moveCancelDirName),"previously created directory not found");
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -397,7 +400,7 @@
selenium.click("link=" + defaultDirName);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertFalse(selenium.isElementPresent("link=" + moveCancelDirName));
+ Assert.assertFalse(selenium.isElementPresent("link=" + moveCancelDirName),"moving to default directory was canceled, but the directory was found in the default directory");
}
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -56,16 +56,16 @@
selenium.click("link=CMS");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent("link=default"));
+ Assert.assertTrue(selenium.isElementPresent("link=default"),"default link not found");
selenium.click("link=default");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent("link=images"));
- Assert.assertTrue(selenium.isElementPresent("link=private"));
- Assert.assertTrue(selenium.isElementPresent("link=index.html"));
- Assert.assertTrue(selenium.isElementPresent("link=project.html"));
+ Assert.assertTrue(selenium.isElementPresent("link=images"),"images link not found");
+ Assert.assertTrue(selenium.isElementPresent("link=private"),"private link not found");
+ Assert.assertTrue(selenium.isElementPresent("link=index.html"),"index link not found");
+ Assert.assertTrue(selenium.isElementPresent("link=project.html"),"project link not found");
selenium.click("link=index.html");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent("link=text/html"));
+ Assert.assertTrue(selenium.isElementPresent("link=text/html"),"xontenty type link not found");
Assert.assertTrue(selenium.isElementPresent("//div[@id='center']/div/div/table/tbody/tr[4]/td[6]"));
Assert.assertEquals("JBoss Portal", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[6]"));
selenium.click("link=Home");
@@ -74,7 +74,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=images");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent("link=jbosslogo.png"));
+ Assert.assertTrue(selenium.isElementPresent("link=jbosslogo.png"),"jboss logo link not found");
}
/**
@@ -154,22 +154,12 @@
selenium.select(INP_FC_LANGUAGE, "label=Czech");
selenium.click(INP_FC_SAVE);
selenium.waitForPageToLoad(PAGE_LOAD);
- /*
- * Assert.assertTrue(selenium.isElementPresent(TBL_FILE_PENDING));
- * Assert.assertTrue(findTableRow(TBL_FILE_PENDING, "text/plain", 0) >=
- * 0); Assert.assertTrue(findTableRow(TBL_FILE_PENDING, "0kb", 1) >= 0);
- * //Assert.assertTrue(findTableRow(CMS_FILE_PENDING_TABLE, "admin", 3)
- * >= 0);
- *
- * selenium.click("link=Approve");
- * selenium.waitForPageToLoad(PAGE_LOAD);
- */
Assert.assertEquals("Czech", selenium.getText("link=Czech"));
- Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "text/plain", 0) >= 0);
- Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "0kb", 1) >= 0);
- Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "1.0", 2) >= 0);
- Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "newFile title", 5) >= 0);
+ Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "text/plain", 0) >= 0,"file content type not found in the table");
+ Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "0kb", 1) >= 0,"file size not found in the table");
+ Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "1.0", 2) >= 0,"file version not found in the table");
+ Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "newFile title", 5) >= 0,"file title not found in the table");
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -259,7 +249,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(INP_FC_SAVE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("1.1"));
+ Assert.assertTrue(selenium.isTextPresent("1.1"),"correct version string not found");
Assert.assertTrue(selenium.isElementPresent("//div[@id='center']/div/div/table/tbody/tr[5]/td[3]/img"));
selenium.click("link=Home");
@@ -295,9 +285,9 @@
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("Czech", selenium.getText("link=Czech"));
Assert.assertEquals("text/plain", selenium.getText("link=text/plain"));
- Assert.assertTrue(selenium.isTextPresent("1.0"));
- Assert.assertTrue(selenium.isTextPresent("1.1"));
- Assert.assertFalse(selenium.isTextPresent("1.2"));
+ Assert.assertTrue(selenium.isTextPresent("1.0"),"correct version string not found");
+ Assert.assertTrue(selenium.isTextPresent("1.1"),"correct version string not found");
+ Assert.assertFalse(selenium.isTextPresent("1.2"),"uncorrect version string was found");
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("existingFile", selenium.getText("link=" + filename));
@@ -443,9 +433,9 @@
selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr["+r+"]/td[2]/form/select/option[4]");
selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr["+r+"]/td[2]/form/input");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("Confirm Deletion of /newFile"));
- Assert.assertTrue(selenium.isTextPresent("WARNING! You will not be able to undo these change!"));
- Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"));
+ Assert.assertTrue(selenium.isTextPresent("Confirm Deletion of /newFile"),"confirmation message missing or other than expected");
+ Assert.assertTrue(selenium.isTextPresent("WARNING! You will not be able to undo these change!"),"confirmation message missing or other than expected");
+ Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"),"confirmation message missing or other than expected");
selenium.click("cancel");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -455,9 +445,9 @@
selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr["+r+"]/td[2]/form/select/option[4]");
selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr["+r+"]/td[2]/form/input");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("Confirm Deletion of /newFile"));
- Assert.assertTrue(selenium.isTextPresent("WARNING! You will not be able to undo these change!"));
- Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"));
+ Assert.assertTrue(selenium.isTextPresent("Confirm Deletion of /newFile"),"confirmation message missing or other than expected");
+ Assert.assertTrue(selenium.isTextPresent("WARNING! You will not be able to undo these change!"),"confirmation message missing or other than expected");
+ Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"),"confirmation message missing or other than expected");
selenium.click("submit");
selenium.waitForPageToLoad(PAGE_LOAD);
}
@@ -510,9 +500,9 @@
selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr["+r+"]/td[2]/form/select/option[4]");
selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr["+r+"]/td[2]/form/input");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("Confirm Deletion of /" + name));
- Assert.assertTrue(selenium.isTextPresent("WARNING! You will not be able to undo these change!"));
- Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"));
+ Assert.assertTrue(selenium.isTextPresent("Confirm Deletion of /" + name),"confirmation message not found");
+ Assert.assertTrue(selenium.isTextPresent("WARNING! You will not be able to undo these change!"),"confirmation message not found");
+ Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"),"confirmation message not found");
selenium.click("submit");
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -109,10 +109,10 @@
int row = countTableRows(CMS_WF_TABLE) - 1;
Assert.assertEquals(row, 1, "More instances of newly created document exists.");
- Assert.assertTrue(selenium.isTextPresent("Pending Approval Queue"));
- Assert.assertTrue(selenium.isElementPresent(LNK_PREVIEW));
- Assert.assertTrue(selenium.isElementPresent(LNK_APPROVE));
- Assert.assertTrue(selenium.isElementPresent(LNK_DENY));
+ Assert.assertTrue(selenium.isTextPresent("Pending Approval Queue"),"pending queue text not found");
+ Assert.assertTrue(selenium.isElementPresent(LNK_PREVIEW), "preview link not found");
+ Assert.assertTrue(selenium.isElementPresent(LNK_APPROVE), "approve link not found");
+ Assert.assertTrue(selenium.isElementPresent(LNK_DENY), "deny link not found");
selenium.click(LNK_APPROVE);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -146,10 +146,10 @@
int row = countTableRows(CMS_WF_TABLE) - 1;
Assert.assertEquals(row, 1, "More instances of newly created document exists.");
- Assert.assertTrue(selenium.isTextPresent("Pending Approval Queue"));
- Assert.assertTrue(selenium.isElementPresent(LNK_PREVIEW));
- Assert.assertTrue(selenium.isElementPresent(LNK_APPROVE));
- Assert.assertTrue(selenium.isElementPresent(LNK_DENY));
+ Assert.assertTrue(selenium.isTextPresent("Pending Approval Queue"),"pending queue text not found");
+ Assert.assertTrue(selenium.isElementPresent(LNK_PREVIEW), "preview link not found");
+ Assert.assertTrue(selenium.isElementPresent(LNK_APPROVE), "approve link not found");
+ Assert.assertTrue(selenium.isElementPresent(LNK_DENY), "deny link not found");
selenium.click(LNK_DENY);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -187,10 +187,10 @@
selenium.click(LNK_PREVIEW);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("Pending Approval Queue"));
+ Assert.assertTrue(selenium.isTextPresent("Pending Approval Queue"),"pending queue text not found");
selenium.selectFrame(WYSIWYG_EDITOR_LOCATOR);
- Assert.assertTrue(selenium.isTextPresent("vivat!"));
+ Assert.assertTrue(selenium.isTextPresent("vivat!"),"file content text not found");
selenium.selectFrame("relative=top");
}
@@ -216,9 +216,9 @@
selenium.click(MessageFormat.format(CMS_T_SUBMIT, row));
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("Confirm Deletion of /newFile"));
- Assert.assertTrue(selenium.isTextPresent("WARNING! You will not be able to undo these change!"));
- Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"));
+ Assert.assertTrue(selenium.isTextPresent("Confirm Deletion of /newFile"),"confirmation message not found");
+ Assert.assertTrue(selenium.isTextPresent("WARNING! You will not be able to undo these change!"),"confirmation message not found");
+ Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"),"confirmation message not found");
selenium.click(SUB_FILE_CREATE_CANCEL);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -229,9 +229,9 @@
selenium.click(MessageFormat.format(CMS_T_SUBMIT, row));
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("Confirm Deletion of /newFile"));
- Assert.assertTrue(selenium.isTextPresent("WARNING! You will not be able to undo these change!"));
- Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"));
+ Assert.assertTrue(selenium.isTextPresent("Confirm Deletion of /newFile"),"confirmation message not found");
+ Assert.assertTrue(selenium.isTextPresent("WARNING! You will not be able to undo these change!"),"confirmation message not found");
+ Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"),"confirmation message not found");
selenium.click(SUB_MOVE);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertFalse(selenium.isTextPresent("newFile"));
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowUploadTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowUploadTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowUploadTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -123,15 +123,15 @@
selenium.click(SUB_FIL_SUBMIT);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent(LNK_PREVIEW));
- Assert.assertTrue(selenium.isElementPresent(LNK_APPROVE));
- Assert.assertTrue(selenium.isElementPresent(LNK_DENY));
+ Assert.assertTrue(selenium.isElementPresent(LNK_PREVIEW),"preview link not found");
+ Assert.assertTrue(selenium.isElementPresent(LNK_APPROVE),"approve link not found");
+ Assert.assertTrue(selenium.isElementPresent(LNK_DENY),"deny link not found");
selenium.click(LNK_APPROVE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(fileName));
- Assert.assertTrue(selenium.isElementPresent("link=text/plain"));
+ Assert.assertTrue(selenium.isTextPresent(fileName),"filename not found on screen");
+ Assert.assertTrue(selenium.isElementPresent("link=text/plain"),"link about content format missing");
int r = findTableRow(TAB_FILE_VER, "file to upload", 5);
@@ -172,9 +172,9 @@
selenium.click(SUB_FIL_SUBMIT);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent(LNK_PREVIEW));
- Assert.assertTrue(selenium.isElementPresent(LNK_APPROVE));
- Assert.assertTrue(selenium.isElementPresent(LNK_DENY));
+ Assert.assertTrue(selenium.isElementPresent(LNK_PREVIEW),"preview link not found");
+ Assert.assertTrue(selenium.isElementPresent(LNK_APPROVE),"approve link not found");
+ Assert.assertTrue(selenium.isElementPresent(LNK_DENY),"deny link not found");
selenium.click(LNK_DENY);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -214,9 +214,9 @@
selenium.click(SUB_FIL_SUBMIT);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent(LNK_PREVIEW));
- Assert.assertTrue(selenium.isElementPresent(LNK_APPROVE));
- Assert.assertTrue(selenium.isElementPresent(LNK_DENY));
+ Assert.assertTrue(selenium.isElementPresent(LNK_PREVIEW),"preview link not found");
+ Assert.assertTrue(selenium.isElementPresent(LNK_APPROVE),"approve link not found");
+ Assert.assertTrue(selenium.isElementPresent(LNK_DENY),"deny link not found");
selenium.click(LNK_PREVIEW);
selenium.waitForPageToLoad(PAGE_LOAD);
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -309,11 +309,11 @@
logout();
- Assert.assertTrue(selenium.isTextPresent(MSG_ACCESS_DENIED));
+ Assert.assertTrue(selenium.isTextPresent(MSG_ACCESS_DENIED),"access denied message not found");
login("user", "user");
- Assert.assertTrue(selenium.isTextPresent(MSG_ACCESS_DENIED));
+ Assert.assertTrue(selenium.isTextPresent(MSG_ACCESS_DENIED),"access denied message not found");
logout();
}
@@ -360,12 +360,12 @@
selenium.open("/portal/portal/default");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertFalse(selenium.isTextPresent("Enteprise Portal Platform"));
- Assert.assertTrue(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
+ Assert.assertFalse(selenium.isTextPresent("Enteprise Portal Platform"),"JBoss portal name was found on default page");
+ Assert.assertTrue(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"),"JBoss portal logo not found on default page");
selenium.click(LNK_EXPLORE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("Enteprise Portal Platform"));
- Assert.assertFalse(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
+ Assert.assertTrue(selenium.isTextPresent("Enteprise Portal Platform"),"JBoss portal name is not found on explore page");
+ Assert.assertFalse(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"),"JBoss portal logo is found on explore page");
login("admin", "admin");
selenium.click(LNK_ADMIN);
@@ -389,7 +389,7 @@
logout();
Assert.assertFalse(selenium.isTextPresent("Enteprise Portal Platform"));
- Assert.assertTrue(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
+ Assert.assertTrue(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"),"jboss portal logo not found");
selenium.open("/portal/portal/default");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_EXPLORE);
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-06-25 11:48:06 UTC (rev 13499)
@@ -1,7 +1,7 @@
# JBossPortalSeleniumTestCase
portal.lnk.logout=link=Logout
-portal.sub.login=login
+portal.sub.login=login-submit
portal.adr.portal=/portal/
portal.frm.login.content=login-content
portal.inp.password=//input[contains(@id,'j_password')]
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -1079,7 +1079,7 @@
selenium.click(INPUT_SUBMIT_CREATEPORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("is an invalid portal name"));
+ Assert.assertTrue(selenium.isTextPresent("is an invalid portal name"),"validation message not found");
}
@@ -1117,7 +1117,7 @@
selenium.click(INPUT_SUBMIT_PAGECREATE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_PAGE_NAME_VALID));
+ Assert.assertTrue(selenium.isTextPresent(MSG_PAGE_NAME_VALID),"validation message missing or other than expected");
}
/**
@@ -1158,7 +1158,7 @@
selenium.click(SUB_LAYOUT_ADD_CENTER);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_WINDOW_NAME_VALID));
+ Assert.assertTrue(selenium.isTextPresent(MSG_WINDOW_NAME_VALID),"validation message missing or other than expected");
}
@@ -1200,7 +1200,7 @@
selenium.click(SUB_PP_PROPADD);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_PROP_NAME_VALID));
+ Assert.assertTrue(selenium.isTextPresent(MSG_PROP_NAME_VALID),"validation message missing or other than expected");
selenium.type(INP_PP_PROPNAME, "XssValuesProp");
selenium.click(SUB_PP_PROPADD);
@@ -1212,7 +1212,7 @@
selenium.click(SUB_PP_PROPVAL_UPDATE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_PROP_VAL_VALID));
+ Assert.assertTrue(selenium.isTextPresent(MSG_PROP_VAL_VALID),"validation message missing or other than expected");
// redirection
@@ -1221,14 +1221,14 @@
selenium.type(INP_PP_RES_INPUT, XSS_STR1);
selenium.click(SUB_PP_ERROR_FORM_UPDATE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_PORTAL_ERR_VALID));
+ Assert.assertTrue(selenium.isTextPresent(MSG_PORTAL_ERR_VALID),"validation message missing or other than expected");
check(CHK_PPA_RES_CHECK, false);
waitFor(AJAX_LOAD);
selenium.type(INP_PPA_RES_SELECT, XSS_STR1);
selenium.click(SUB_PPA_FORM_UPDATE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_PAGE_ERR_VALID));
+ Assert.assertTrue(selenium.isTextPresent(MSG_PAGE_ERR_VALID),"validation message missing or other than expected");
}
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/DashboardsTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/DashboardsTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/DashboardsTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -79,7 +79,7 @@
selenium.type(INPUT_PROP_NAME, propName);
selenium.click(SUBMIT_ADD_PROP);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(propName));
+ Assert.assertTrue(selenium.isTextPresent(propName),"property name string not found");
}
/**
@@ -95,7 +95,7 @@
selenium.type(INPUT_PROP_NAME, XSS_STR1);
selenium.click(SUBMIT_ADD_PROP);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_PROP_ADD_VALID));
+ Assert.assertTrue(selenium.isTextPresent(MSG_PROP_ADD_VALID),"validation message missing or other than expected");
}
/**
@@ -112,7 +112,7 @@
selenium.type(INPUT_PROP_NAME, propName);
selenium.click(SUBMIT_ADD_PROP);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(propName));
+ Assert.assertTrue(selenium.isTextPresent(propName),"property name string not found");
int r = findTableRow(TABLE_PROPS, propName, 1);
@@ -138,7 +138,7 @@
selenium.type(INPUT_PROP_NAME, propName);
selenium.click(SUBMIT_ADD_PROP);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(propName));
+ Assert.assertTrue(selenium.isTextPresent(propName),"property name string not found");
int r = findTableRow(TABLE_PROPS, propName, 1);
@@ -146,7 +146,7 @@
selenium.click(SUBMIT_UPDATE_VALUE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_PROP_UPDATE_VALID));
+ Assert.assertTrue(selenium.isTextPresent(MSG_PROP_UPDATE_VALID),"validation message missing or other than expected");
}
/**
@@ -163,7 +163,7 @@
selenium.click(SUBMIT_ADD_PROP);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(propName));
+ Assert.assertTrue(selenium.isTextPresent(propName),"property name string not found");
int r = findTableRow(TABLE_PROPS, propName, 0);
@@ -216,7 +216,7 @@
selenium.click(T_PO_SUB_UPDATE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_PORTAL_ERR_VALID));
+ Assert.assertTrue(selenium.isTextPresent(MSG_PORTAL_ERR_VALID),"validation message missing or other than expected");
}
/**
@@ -265,7 +265,7 @@
selenium.click(T_PA_SUB_UPDATE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_PAGE_ERR_VALID));
+ Assert.assertTrue(selenium.isTextPresent(MSG_PAGE_ERR_VALID),"validation message missing or other than expected");
}
/**
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -197,11 +197,11 @@
selenium.open(ADR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("", selenium.getText(DIV_PORT_CONTENT));
- Assert.assertTrue(selenium.isElementPresent("link=" + page1Name));
- Assert.assertTrue(selenium.isElementPresent("link=" + page2Name));
- Assert.assertTrue(selenium.isElementPresent("link=" + page3Name));
- Assert.assertTrue(selenium.isElementPresent("link=" + page4Name));
- Assert.assertTrue(selenium.isElementPresent("link=" + page5Name));
+ Assert.assertTrue(selenium.isElementPresent("link=" + page1Name),"link "+page1Name+" not found");
+ Assert.assertTrue(selenium.isElementPresent("link=" + page2Name),"link "+page2Name+" not found");
+ Assert.assertTrue(selenium.isElementPresent("link=" + page3Name),"link "+page3Name+" not found");
+ Assert.assertTrue(selenium.isElementPresent("link=" + page4Name),"link "+page4Name+" not found");
+ Assert.assertTrue(selenium.isElementPresent("link=" + page5Name),"link "+page5Name+" not found");
// Assert pages contain what they should
assertPageContains(page1Name, por1str);
@@ -497,7 +497,7 @@
selenium.click(INP_SUBMIT_CREATEPORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(portalName));
+ Assert.assertTrue(selenium.isTextPresent(portalName),"portal name string not found");
}
private void addPage(String portalName, String pageName) {
@@ -521,12 +521,12 @@
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertFalse(selenium.isTextPresent(pageName), "Portal page already present");
- Assert.assertTrue(selenium.isTextPresent("Create a page named:"));
+ Assert.assertTrue(selenium.isTextPresent("Create a page named:"),"create page label string not found");
selenium.type(INP_PAGENAME, pageName);
selenium.click(INP_SUBMIT_PAGECREATE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(pageName));
+ Assert.assertTrue(selenium.isTextPresent(pageName),"page name string not found");
}
private void addPortlet(String portalName, String pageName, String portletName, String type) {
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -94,20 +94,20 @@
@Test(enabled = true)
public void testDefaultPageCoordination(){
openAndWait("/portal/auth/portal/default/Coordination+Samples");
- Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):null"));
- Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):null"));
+ Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):null"),"weather zipcode other than expected");
+ Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):null"),"map zipcode other than expected");
openAndWait("/portal/auth/portal/default/Coordination+Samples?zipcode=10101");
- Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):null"));
- Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):10101"));
+ Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):null"),"weather zipcode other than expected");
+ Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):10101"),"map zipcode other than expected");
openAndWait("/portal/auth/portal/default/Coordination+Samples?zip=10102");
- Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):10102"));
- Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):10102"));
+ Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):10102"),"weather zipcode other than expected");
+ Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):10102"),"map zipcode other than expected");
openAndWait("/portal/auth/portal/default/Coordination+Samples?zipcode=10103");
- Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):null"));
- Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):10103"));
+ Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):null"),"weather zipcode other than expected");
+ Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):10103"),"map zipcode other than expected");
}
/**
@@ -154,8 +154,8 @@
selenium.waitForPageToLoad(PAGE_LOAD);
openAndWait("/portal/auth/portal/default/Coordination+Samples?aliasBindTest=222333");
- Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):null"));
- Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):222333"));
+ Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):null"),"weather zipcode other than expected");
+ Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):222333"),"map zipcode other than expected");
}
@@ -184,7 +184,7 @@
debugScreenshot(++count + ".jpg");
clickIfVisible(LINK_PORTAL_HOME);
debugScreenshot(++count + ".jpg");
- Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
+ Assert.assertTrue(selenium.isTextPresent("Create a portal named:"),"create portal label not found");
int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
debugPrint("Position of admin portal : " + findTableRow(TABLE_PORTAL_ADMIN, "admin", 0));
@@ -380,7 +380,7 @@
clickIfVisible(TAB_PORTALOBJ_ID);
clickIfVisible(LINK_PORTALS_ID);
clickIfVisible(LINK_PORTAL_HOME);
- Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
+ Assert.assertTrue(selenium.isTextPresent("Create a portal named:"),"create portal message not found");
int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
@@ -402,7 +402,7 @@
clickIfVisible(TAB_PORTALOBJ_ID);
clickIfVisible(LINK_PORTALS_ID);
clickIfVisible(LINK_PORTAL_HOME);
- Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
+ Assert.assertTrue(selenium.isTextPresent("Create a portal named:"),"create portal message not found");
r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletDefinitionsTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletDefinitionsTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletDefinitionsTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -107,7 +107,7 @@
selenium.type(INPUT_INSTANCE_NAME, XSS_STR1);
selenium.click(SUBMIT_CREATE_INST);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent(MSG_INS_NAME_VALID));
+ Assert.assertTrue(selenium.isTextPresent(MSG_INS_NAME_VALID),"validation message missing or other than expected");
}
/**
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java 2009-06-24 23:28:48 UTC (rev 13498)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java 2009-06-25 11:48:06 UTC (rev 13499)
@@ -423,7 +423,7 @@
selenium.open("/portal/auth/portal/default/");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("Greetings !"));
+ Assert.assertTrue(selenium.isTextPresent("Greetings !"),"greetings message not found");
// then cancel
@@ -442,7 +442,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.open("/portal/auth/portal/default/");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isTextPresent("Greetings !"));
+ Assert.assertTrue(selenium.isTextPresent("Greetings !"),"greetings message not found");
// then really stop the greetings portlet
goToPI();
@@ -477,8 +477,8 @@
Assert.assertTrue(selenium.isElementPresent(MessageFormat.format(LNK_INSTANCE_BUTTON, r)), instance_name + " portlet not found.");
clickAndWait(MessageFormat.format(LNK_DEL_BUTTON, r));
- Assert.assertTrue(selenium.isTextPresent("WARNING!"));
- Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this portlet instance ?"));
+ Assert.assertTrue(selenium.isTextPresent("WARNING!"),"warning message not found");
+ Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this portlet instance ?"),"warning message not found");
selenium.click(SUBMIT_PI_DELETE_CANC);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -488,8 +488,8 @@
Assert.assertTrue(selenium.isElementPresent(MessageFormat.format(LNK_INSTANCE_BUTTON, r)), instance_name + " portlet not found.");
clickAndWait(MessageFormat.format(LNK_DEL_BUTTON, r));
- Assert.assertTrue(selenium.isTextPresent("WARNING!"));
- Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this portlet instance ?"));
+ Assert.assertTrue(selenium.isTextPresent("WARNING!"),"warning message not found");
+ Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this portlet instance ?"),"warning message not found");
selenium.click(SUBMIT_PI_DELETE_CONF);
selenium.waitForPageToLoad(PAGE_LOAD);
14 years, 10 months
JBoss Portal SVN: r13498 - branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2009-06-24 19:28:48 -0400 (Wed, 24 Jun 2009)
New Revision: 13498
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml
Log:
JBPORTAL-2418
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml 2009-06-24 15:43:56 UTC (rev 13497)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml 2009-06-24 23:28:48 UTC (rev 13498)
@@ -21,6 +21,14 @@
</tr>
<tr>
<td colspan="2">
+ <script type="text/javascript">
+ function kH(e) {
+ var pK = e ? e.which : window.event.keyCode;
+ return pK != 13;
+ }
+ document.onkeypress = kH;
+ if (document.layers) document.captureEvents(Event.KEYPRESS);
+ </script>
<h:form id="windowForm">
<label for="windowName">
<span class="portlet-form-field-label admin-label">#{bundle.COMMON_WINDOW_NAME}:</span>
14 years, 10 months