JBoss Portal SVN: r12319 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests: src/org/jboss/portal/test/selenium and 1 other directory.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-11-28 10:55:22 -0500 (Fri, 28 Nov 2008)
New Revision: 12319
Added:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSeleniumTestListener.java
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/JBossSelenium.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/testng.xml
Log:
more debugging
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 2008-11-28 14:19:15 UTC (rev 12318)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2008-11-28 15:55:22 UTC (rev 12319)
@@ -35,7 +35,7 @@
public void setupChromeForLogin() throws Exception {
String browser = System.getProperty("browser");
selenium = new JBossSelenium("127.0.0.1", 44444, browser, "http://localhost:8080/portal/");
-
+ JBossSeleniumTestListener.selenium = selenium;
selenium.start();
selenium.setTimeout(PAGE_LOAD);
}
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSelenium.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSelenium.java 2008-11-28 14:19:15 UTC (rev 12318)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSelenium.java 2008-11-28 15:55:22 UTC (rev 12319)
@@ -4,7 +4,10 @@
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.SeleniumException;
@@ -19,15 +22,30 @@
super.click(locator);
}
catch (SeleniumException e){
+
+ String name = "E_";
+ Pattern methodname = Pattern.compile("^org.jboss.portal.test.selenium\\S+test\\S+\\(\\S+\\)");
+ for(int i=0;i<e.getStackTrace().length;i++){
+ String input = e.getStackTrace()[i].toString();
+ Matcher match = methodname.matcher(input);
+ if (match.matches()){
+ input = input.replace("org.jboss.portal.test.selenium","");
+ input = input.replaceAll("\\(.*\\)","");
+ name += input;
+ }
+ }
+ name += "."+count;
try {
- PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("html"+count+".html")));
+ PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(name+".html")));
out.println(getHtmlSource());
out.close();
} catch (IOException e1) {
e1.printStackTrace();
- }
- captureScreenshot("shot"+ count +".jpg");
+ }
+
+ captureScreenshot(name +".jpg");
count++;
+
throw new SeleniumException(e);
}
}
Added: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSeleniumTestListener.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSeleniumTestListener.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSeleniumTestListener.java 2008-11-28 15:55:22 UTC (rev 12319)
@@ -0,0 +1,33 @@
+package org.jboss.portal.test.selenium;
+
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import org.testng.ITestResult;
+import org.testng.TestListenerAdapter;
+
+import com.thoughtworks.selenium.Selenium;
+
+public class JBossSeleniumTestListener extends TestListenerAdapter {
+
+ protected static Selenium selenium;
+ protected static int count;
+
+ @Override
+ public void onTestFailure(ITestResult tr) {
+
+ String name = "F_"+tr.getName()+"-" + count ;
+ try {
+ PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(name + ".html")));
+ out.println(selenium.getHtmlSource());
+ out.close();
+ } catch (IOException e1) {
+ e1.printStackTrace();
+ }
+ selenium.captureScreenshot(name + ".jpg");
+ count++;
+ }
+
+}
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 2008-11-28 14:19:15 UTC (rev 12318)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java 2008-11-28 15:55:22 UTC (rev 12319)
@@ -21,14 +21,13 @@
selenium.click("link=Logout");
selenium.waitForPageToLoad(PAGE_LOAD);
}
-
}
@Test(enabled = true, description = "login as default user 'user' with password 'user'.")
public void testDefaultUserLogin() throws Exception {
selenium.open("/portal");
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
Assert.assertTrue(selenium.isElementPresent("link=Login"), "Expected DOM element for login link does not exist.");
Assert.assertEquals(selenium.getText("link=Login"), "Login", "Login button doesn't exist.");
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml 2008-11-28 14:19:15 UTC (rev 12318)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml 2008-11-28 15:55:22 UTC (rev 12319)
@@ -69,8 +69,9 @@
<classes>
<class name="org.jboss.portal.test.selenium.portal.AdminPortalTestCase"></class></classes>
</test>
-<!--
+
<listeners>
- <listener class-name="org.testng.reporters.JUnitXMLReporter"></listener></listeners>
--->
+<!-- <listener class-name="org.testng.reporters.JUnitXMLReporter"></listener> -->
+ <listener class-name="org.jboss.portal.test.selenium.JBossSeleniumTestListener"/>
+</listeners>
</suite>
15 years, 6 months
JBoss Portal SVN: r12318 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-11-28 09:19:15 -0500 (Fri, 28 Nov 2008)
New Revision: 12318
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStateEntry.java
Log:
JBPORTAL-2252: PortletPreferences composed of multiple strings always only return one
Thank you Manuel !
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStateEntry.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStateEntry.java 2008-11-28 11:36:21 UTC (rev 12317)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStateEntry.java 2008-11-28 14:19:15 UTC (rev 12318)
@@ -149,9 +149,9 @@
{
if (dirty)
{
+ value = new ArrayList<String>();
for (int i=0; i<strings.length; i++)
{
- value = new ArrayList<String>();
value.add(strings[i]);
}
dirty = false;
15 years, 6 months
JBoss Portal SVN: r12317 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-11-28 06:36:21 -0500 (Fri, 28 Nov 2008)
New Revision: 12317
Added:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSelenium.java
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java
Log:
jbossselenium class
Added: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSelenium.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSelenium.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSelenium.java 2008-11-28 11:36:21 UTC (rev 12317)
@@ -0,0 +1,134 @@
+package org.jboss.portal.test.selenium;
+
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import com.thoughtworks.selenium.DefaultSelenium;
+import com.thoughtworks.selenium.SeleniumException;
+
+public class JBossSelenium extends DefaultSelenium {
+
+ protected static String PAGE_LOAD= "250000";
+ protected static int count;
+
+ @Override
+ public void click(String locator) {
+ try {
+ super.click(locator);
+ }
+ catch (SeleniumException e){
+ try {
+ PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("html"+count+".html")));
+ out.println(getHtmlSource());
+ out.close();
+ } catch (IOException e1) {
+ e1.printStackTrace();
+ }
+ captureScreenshot("shot"+ count +".jpg");
+ count++;
+ throw new SeleniumException(e);
+ }
+ }
+
+ @Override
+ public void open(String locator) {
+ try {
+ super.open(locator);
+ }
+ catch (SeleniumException e){
+ try {
+ PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("html"+count+".html")));
+ out.println(getHtmlSource());
+ out.close();
+ } catch (IOException e1) {
+ e1.printStackTrace();
+ }
+ captureScreenshot("shot"+ count +".jpg");
+ count++;
+ throw new SeleniumException(e);
+ }
+ }
+
+ @Override
+ public boolean isElementPresent(String locator){
+ try {
+ return super.isElementPresent(locator);
+ }
+ catch (SeleniumException e){
+ try {
+ PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("html"+count+".html")));
+ out.println(getHtmlSource());
+ out.close();
+ } catch (IOException e1) {
+ e1.printStackTrace();
+ }
+ captureScreenshot("shot"+ count +".jpg");
+ count++;
+ throw new SeleniumException(e);
+ }
+ }
+
+
+
+ public JBossSelenium(String serverHost, int serverPort, String browserStartCommand, String browserURL, String timeout) {
+ super(serverHost, serverPort, browserStartCommand, browserURL);
+ PAGE_LOAD = timeout;
+ }
+
+ public JBossSelenium(String serverHost, int serverPort, String browserStartCommand, String browserURL) {
+ super(serverHost, serverPort, browserStartCommand, browserURL);
+ }
+
+ protected void clickAndWait(String locator) {
+ click(locator);
+ waitForPageToLoad(PAGE_LOAD);
+ }
+
+ protected void clickAndWait(String locator, String timeout) {
+ click(locator);
+ waitForPageToLoad(timeout);
+ }
+
+ protected void clickAndWaitIfVisible(String id) {
+
+ if (isElementPresent(id)) {
+ click(id);
+
+ waitForPageToLoad(PAGE_LOAD);
+ }
+ }
+
+ public void clickIfVisible(String id) {
+
+ if (isElementPresent(id)){
+ click(id);
+
+ waitForPageToLoad(PAGE_LOAD);
+ }
+ }
+ protected boolean findLink(String id) {
+ for (String link : getAllLinks()) {
+ if (link.equals(id)) {
+ return true;
+ }
+ }
+ for (String link : getAllFields()) {
+ if (link.equals(id)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ protected int findTableRow(String tableLocation, String searchName, int searchCol) {
+ return Integer.valueOf(getEval("selenium.findTableRow(\"" + tableLocation + "\",'" + searchName + "'," + searchCol + ")"));
+ }
+
+ protected int countTableRows(String tableLocation) {
+ return Integer.valueOf(getEval("selenium.countTableRows(\"" + tableLocation + "\")"));
+ }
+
+}
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 2008-11-28 10:58:31 UTC (rev 12316)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java 2008-11-28 11:36:21 UTC (rev 12317)
@@ -28,7 +28,7 @@
public void testDefaultUserLogin() throws Exception {
selenium.open("/portal");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("mastenica");
+
Assert.assertTrue(selenium.isElementPresent("link=Login"), "Expected DOM element for login link does not exist.");
Assert.assertEquals(selenium.getText("link=Login"), "Login", "Login button doesn't exist.");
15 years, 6 months
JBoss Portal SVN: r12316 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-11-28 05:58:31 -0500 (Fri, 28 Nov 2008)
New Revision: 12316
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:
making shots after error
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 2008-11-27 22:18:53 UTC (rev 12315)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2008-11-28 10:58:31 UTC (rev 12316)
@@ -34,7 +34,7 @@
@BeforeClass
public void setupChromeForLogin() throws Exception {
String browser = System.getProperty("browser");
- selenium = new DefaultSelenium("127.0.0.1", 44444, browser, "http://localhost:8080/portal/");
+ selenium = new JBossSelenium("127.0.0.1", 44444, browser, "http://localhost:8080/portal/");
selenium.start();
selenium.setTimeout(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 2008-11-27 22:18:53 UTC (rev 12315)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java 2008-11-28 10:58:31 UTC (rev 12316)
@@ -28,7 +28,7 @@
public void testDefaultUserLogin() throws Exception {
selenium.open("/portal");
selenium.waitForPageToLoad(PAGE_LOAD);
-
+ selenium.click("mastenica");
Assert.assertTrue(selenium.isElementPresent("link=Login"), "Expected DOM element for login link does not exist.");
Assert.assertEquals(selenium.getText("link=Login"), "Login", "Login button doesn't exist.");
15 years, 6 months
JBoss Portal SVN: r12314 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-11-27 17:16:51 -0500 (Thu, 27 Nov 2008)
New Revision: 12314
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowRenderCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowResourceCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokeWindowCommand.java
Log:
JBPORTAL-2248: Action URL retained by client
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java 2008-11-27 20:12:57 UTC (rev 12313)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java 2008-11-27 22:16:51 UTC (rev 12314)
@@ -25,18 +25,29 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
import org.jboss.portal.common.util.ParameterMap;
+import org.jboss.portal.core.controller.ControllerException;
+import org.jboss.portal.core.controller.ControllerResponse;
import org.jboss.portal.core.controller.NoSuchResourceException;
import org.jboss.portal.core.controller.command.info.ActionCommandInfo;
import org.jboss.portal.core.controller.command.info.CommandInfo;
+import org.jboss.portal.core.controller.portlet.ControllerPageNavigationalState;
+import org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext;
+import org.jboss.portal.core.controller.portlet.ControllerResponseFactory;
import org.jboss.portal.core.model.content.Content;
import org.jboss.portal.core.model.instance.Instance;
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.Window;
+import org.jboss.portal.core.model.portal.command.response.UpdatePageResponse;
import org.jboss.portal.identity.User;
+import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.info.PortletInfo;
+import org.jboss.portal.portlet.controller.PortletController;
import org.jboss.portal.portlet.controller.request.PortletActionRequest;
import org.jboss.portal.portlet.controller.request.ContainerRequest;
+import org.jboss.portal.portlet.controller.response.PageUpdateResponse;
+import org.jboss.portal.portlet.controller.response.PortletResponse;
+import org.jboss.portal.portlet.controller.response.ResourceResponse;
import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
@@ -140,4 +151,43 @@
pageNS
);
}
+
+ public ControllerResponse execute() throws ControllerException
+ {
+ try
+ {
+ ControllerPortletControllerContext cpcc = new ControllerPortletControllerContext(
+ context,
+ page
+ );
+
+ //
+ PortletPageNavigationalState pageNS = cpcc.getStateControllerContext().createPortletPageNavigationalState(false);
+
+ //
+ PortletWindowNavigationalState windowNS = pageNS.getPortletWindowNavigationalState(window.getName());
+
+ //
+ PortletInfo portletInfo = cpcc.getPortletInfo(window.getName());
+
+ //
+ ContainerRequest containerRequest = createPortletRequest(portletInfo, pageNS, windowNS);
+
+ //
+ PortletController controller = new PortletController();
+
+ //
+ org.jboss.portal.portlet.controller.response.ControllerResponse cr = controller.process(cpcc, containerRequest);
+
+ PortletResponse portletResponse = (PortletResponse)cr;
+
+ //
+ return ControllerResponseFactory.createActionResponse(targetId, portletResponse.getResponse());
+ }
+ catch (PortletInvokerException e)
+ {
+ return ControllerResponseFactory.createResponse(e);
+ }
+ }
+
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowRenderCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowRenderCommand.java 2008-11-27 20:12:57 UTC (rev 12313)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowRenderCommand.java 2008-11-27 22:16:51 UTC (rev 12314)
@@ -24,15 +24,26 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
+import org.jboss.portal.core.controller.ControllerException;
+import org.jboss.portal.core.controller.ControllerResponse;
import org.jboss.portal.core.controller.command.info.CommandInfo;
import org.jboss.portal.core.controller.command.info.ActionCommandInfo;
+import org.jboss.portal.core.controller.portlet.ControllerPageNavigationalState;
+import org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext;
+import org.jboss.portal.core.controller.portlet.ControllerResponseFactory;
import org.jboss.portal.core.model.portal.PortalObjectId;
+import org.jboss.portal.core.model.portal.command.response.UpdatePageResponse;
+import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.info.ParameterInfo;
+import org.jboss.portal.portlet.controller.PortletController;
import org.jboss.portal.portlet.controller.request.PortletRenderRequest;
import org.jboss.portal.portlet.controller.request.ContainerRequest;
+import org.jboss.portal.portlet.controller.response.PageUpdateResponse;
+import org.jboss.portal.portlet.controller.response.PortletResponse;
+import org.jboss.portal.portlet.controller.response.ResourceResponse;
import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
@@ -153,4 +164,51 @@
pageNS
);
}
+
+ public ControllerResponse execute() throws ControllerException
+ {
+ try
+ {
+ ControllerPortletControllerContext cpcc = new ControllerPortletControllerContext(
+ context,
+ page
+ );
+
+ //
+ PortletPageNavigationalState pageNS = cpcc.getStateControllerContext().createPortletPageNavigationalState(false);
+
+ //
+ PortletWindowNavigationalState windowNS = pageNS.getPortletWindowNavigationalState(window.getName());
+
+ //
+ PortletInfo portletInfo = cpcc.getPortletInfo(window.getName());
+
+ //
+ ContainerRequest containerRequest = createPortletRequest(portletInfo, pageNS, windowNS);
+
+ //
+ PortletController controller = new PortletController();
+
+ //
+ org.jboss.portal.portlet.controller.response.ControllerResponse cr = controller.process(cpcc, containerRequest);
+
+ //
+ PageUpdateResponse pageUpdate = (PageUpdateResponse)cr;
+
+ //
+ ControllerPageNavigationalState pageNavigationalState = (ControllerPageNavigationalState)pageUpdate.getPageNavigationalState();
+
+ // Flush all NS
+ pageNavigationalState.flushUpdates();
+
+ //
+ return new UpdatePageResponse(page.getId());
+
+ }
+ catch (PortletInvokerException e)
+ {
+ return ControllerResponseFactory.createResponse(e);
+ }
+ }
+
}
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowResourceCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowResourceCommand.java 2008-11-27 20:12:57 UTC (rev 12313)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowResourceCommand.java 2008-11-27 22:16:51 UTC (rev 12314)
@@ -23,14 +23,25 @@
package org.jboss.portal.core.model.portal.command.action;
import org.jboss.portal.core.model.portal.PortalObjectId;
+import org.jboss.portal.core.model.portal.command.response.UpdatePageResponse;
+import org.jboss.portal.core.controller.ControllerException;
+import org.jboss.portal.core.controller.ControllerResponse;
import org.jboss.portal.core.controller.command.info.CommandInfo;
import org.jboss.portal.core.controller.command.info.ActionCommandInfo;
+import org.jboss.portal.core.controller.portlet.ControllerPageNavigationalState;
+import org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext;
+import org.jboss.portal.core.controller.portlet.ControllerResponseFactory;
import org.jboss.portal.common.util.ParameterMap;
+import org.jboss.portal.portlet.controller.PortletController;
import org.jboss.portal.portlet.controller.request.PortletResourceRequest;
import org.jboss.portal.portlet.controller.request.ContainerRequest;
+import org.jboss.portal.portlet.controller.response.PageUpdateResponse;
+import org.jboss.portal.portlet.controller.response.PortletResponse;
+import org.jboss.portal.portlet.controller.response.ResourceResponse;
import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
import org.jboss.portal.portlet.cache.CacheLevel;
+import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.info.PortletInfo;
@@ -133,4 +144,44 @@
resourceForm,
scope);
}
+
+ public ControllerResponse execute() throws ControllerException
+ {
+ try
+ {
+ ControllerPortletControllerContext cpcc = new ControllerPortletControllerContext(
+ context,
+ page
+ );
+
+ //
+ PortletPageNavigationalState pageNS = cpcc.getStateControllerContext().createPortletPageNavigationalState(false);
+
+ //
+ PortletWindowNavigationalState windowNS = pageNS.getPortletWindowNavigationalState(window.getName());
+
+ //
+ PortletInfo portletInfo = cpcc.getPortletInfo(window.getName());
+
+ //
+ ContainerRequest containerRequest = createPortletRequest(portletInfo, pageNS, windowNS);
+
+ //
+ PortletController controller = new PortletController();
+
+ //
+ org.jboss.portal.portlet.controller.response.ControllerResponse cr = controller.process(cpcc, containerRequest);
+
+ //
+ ResourceResponse resourceResponse = (ResourceResponse)cr;
+
+ //
+ return ControllerResponseFactory.createActionResponse(targetId, resourceResponse.getResponse());
+ }
+ catch (PortletInvokerException e)
+ {
+ return ControllerResponseFactory.createResponse(e);
+ }
+ }
+
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokeWindowCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokeWindowCommand.java 2008-11-27 20:12:57 UTC (rev 12313)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokeWindowCommand.java 2008-11-27 22:16:51 UTC (rev 12314)
@@ -57,65 +57,4 @@
PortletPageNavigationalState pageNS,
PortletWindowNavigationalState windowNS);
- public ControllerResponse execute() throws ControllerException
- {
- try
- {
- ControllerPortletControllerContext cpcc = new ControllerPortletControllerContext(
- context,
- page
- );
-
- //
- PortletPageNavigationalState pageNS = cpcc.getStateControllerContext().createPortletPageNavigationalState(false);
-
- //
- PortletWindowNavigationalState windowNS = pageNS.getPortletWindowNavigationalState(window.getName());
-
- //
- PortletInfo portletInfo = cpcc.getPortletInfo(window.getName());
-
- //
- ContainerRequest containerRequest = createPortletRequest(portletInfo, pageNS, windowNS);
-
- //
- PortletController controller = new PortletController();
-
- //
- org.jboss.portal.portlet.controller.response.ControllerResponse cr = controller.process(cpcc, containerRequest);
-
- //
- if (cr instanceof PageUpdateResponse)
- {
- PageUpdateResponse pageUpdate = (PageUpdateResponse)cr;
-
- //
- ControllerPageNavigationalState pageNavigationalState = (ControllerPageNavigationalState)pageUpdate.getPageNavigationalState();
-
- // Flush all NS
- pageNavigationalState.flushUpdates();
-
- //
- return new UpdatePageResponse(page.getId());
- }
- else if (cr instanceof PortletResponse)
- {
- PortletResponse portletResponse = (PortletResponse)cr;
-
- //
- return ControllerResponseFactory.createActionResponse(targetId, portletResponse.getResponse());
- }
- else
- {
- ResourceResponse resourceResponse = (ResourceResponse)cr;
-
- //
- return ControllerResponseFactory.createActionResponse(targetId, resourceResponse.getResponse());
- }
- }
- catch (PortletInvokerException e)
- {
- return ControllerResponseFactory.createResponse(e);
- }
- }
}
15 years, 6 months
JBoss Portal SVN: r12313 - in branches/JBoss_Portal_Branch_2_7: core and 9 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-11-27 15:12:57 -0500 (Thu, 27 Nov 2008)
New Revision: 12313
Modified:
branches/JBoss_Portal_Branch_2_7/api/.classpath
branches/JBoss_Portal_Branch_2_7/core-admin/.classpath
branches/JBoss_Portal_Branch_2_7/core-cms/.classpath
branches/JBoss_Portal_Branch_2_7/core-identity/.classpath
branches/JBoss_Portal_Branch_2_7/core-search/.classpath
branches/JBoss_Portal_Branch_2_7/core-wsrp/.classpath
branches/JBoss_Portal_Branch_2_7/core/.classpath
branches/JBoss_Portal_Branch_2_7/faces/.classpath
branches/JBoss_Portal_Branch_2_7/jems/.classpath
branches/JBoss_Portal_Branch_2_7/migration/.classpath
branches/JBoss_Portal_Branch_2_7/wsrp/.classpath
Log:
Eclipse classpath
Modified: branches/JBoss_Portal_Branch_2_7/api/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/api/.classpath 2008-11-27 19:30:30 UTC (rev 12312)
+++ branches/JBoss_Portal_Branch_2_7/api/.classpath 2008-11-27 20:12:57 UTC (rev 12313)
@@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src/main"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-jaxb/lib/jaxb-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
- <classpathentry kind="lib" path="/thirdparty/sun-jaxb/lib/jaxb-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/.classpath 2008-11-27 19:30:30 UTC (rev 12312)
+++ branches/JBoss_Portal_Branch_2_7/core/.classpath 2008-11-27 20:12:57 UTC (rev 12313)
@@ -6,8 +6,6 @@
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/jsp-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/oswego-concurrent/lib/concurrent.jar"/>
- <classpathentry kind="lib" path="/thirdparty/sun-javamail/lib/mail.jar"/>
- <classpathentry kind="lib" path="/thirdparty/beanshell/lib/bsh-1.3.0.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-fileupload/lib/commons-fileupload.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-httpclient/lib/commons-httpclient.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-logging/lib/commons-logging.jar"/>
@@ -37,9 +35,8 @@
<classpathentry combineaccessrules="false" kind="src" path="/registration"/>
<classpathentry combineaccessrules="false" kind="src" path="/workflow"/>
<classpathentry combineaccessrules="false" kind="src" path="/portlet-server"/>
- <classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/xml-apis.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar" sourcepath="/module-common-trunk"/>
- <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/web/lib/portal-web-lib.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/web/lib/portal-web-lib.jar" sourcepath="/module-web"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/identity/lib/portal-identity-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-microcontainer.jar"/>
@@ -49,7 +46,9 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-federation-lib.jar" sourcepath="/module-portlet-trunk"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar" sourcepath="/module-portlet"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-controller-lib.jar" sourcepath="/module-portlet-2.0.0.CR2"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-controller-lib.jar" sourcepath="/module-portlet"/>
<classpathentry kind="lib" path="/thirdparty/jboss/cache/lib/jboss-cache-jdk50.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/glassfish/jsf/lib/jsf-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/glassfish/javamail/lib/mail.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/.classpath 2008-11-27 19:30:30 UTC (rev 12312)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/.classpath 2008-11-27 20:12:57 UTC (rev 12313)
@@ -23,6 +23,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/portlet-server"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
- <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/glassfish/jsf/lib/jsf-api.jar"/>
<classpathentry kind="output" path="output/classes"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/.classpath 2008-11-27 19:30:30 UTC (rev 12312)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/.classpath 2008-11-27 20:12:57 UTC (rev 12313)
@@ -24,8 +24,8 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
- <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbpm/jpdl/lib/jbpm-jpdl.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/cms/lib/cms-jackrabbit.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/glassfish/jsf/lib/jsf-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/.classpath 2008-11-27 19:30:30 UTC (rev 12312)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/.classpath 2008-11-27 20:12:57 UTC (rev 12313)
@@ -42,9 +42,7 @@
<classpathentry combineaccessrules="false" kind="src" path="/theme"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
- <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
- <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-impl.jar" sourcepath="/jsf-1.2.08"/>
- <classpathentry kind="lib" path="/thirdparty/sun-jstl/lib/jstl.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbpm/jpdl/lib/jbpm-jpdl.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/glassfish/jsf/lib/jsf-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core-search/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-search/.classpath 2008-11-27 19:30:30 UTC (rev 12312)
+++ branches/JBoss_Portal_Branch_2_7/core-search/.classpath 2008-11-27 20:12:57 UTC (rev 12313)
@@ -15,7 +15,7 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
- <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/glassfish/jsf/lib/jsf-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/.classpath 2008-11-27 19:30:30 UTC (rev 12312)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/.classpath 2008-11-27 20:12:57 UTC (rev 12313)
@@ -12,6 +12,8 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jaxrpc.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
- <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/glassfish/jsf/lib/jsf-api.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/faces"/>
+ <classpathentry kind="lib" path="/thirdparty/apache-log4j/lib/log4j.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/faces/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/.classpath 2008-11-27 19:30:30 UTC (rev 12312)
+++ branches/JBoss_Portal_Branch_2_7/faces/.classpath 2008-11-27 20:12:57 UTC (rev 12313)
@@ -15,8 +15,7 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-bridge-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar" sourcepath="/module-portlet-trunk"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
- <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
- <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-impl.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/web/lib/jsp-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/glassfish/jsf/lib/jsf-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/jems/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/jems/.classpath 2008-11-27 19:30:30 UTC (rev 12312)
+++ branches/JBoss_Portal_Branch_2_7/jems/.classpath 2008-11-27 20:12:57 UTC (rev 12313)
@@ -14,7 +14,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
<classpathentry kind="lib" path="/thirdparty/hibernate/lib/hibernate3.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jbossha.jar"/>
- <classpathentry kind="lib" path="/thirdparty/beanshell/lib/bsh-1.3.0.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-j2ee.jar"/>
@@ -24,5 +23,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/cache/lib/jboss-cache-jdk50.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/beanshell/lib/bsh.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/migration/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/migration/.classpath 2008-11-27 19:30:30 UTC (rev 12312)
+++ branches/JBoss_Portal_Branch_2_7/migration/.classpath 2008-11-27 20:12:57 UTC (rev 12313)
@@ -8,7 +8,7 @@
<classpathentry kind="lib" path="/thirdparty/hibernate/lib/hibernate3.jar"/>
<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
- <classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/glassfish/jsf/lib/jsf-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/.classpath 2008-11-27 19:30:30 UTC (rev 12312)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/.classpath 2008-11-27 20:12:57 UTC (rev 12313)
@@ -30,10 +30,10 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-federation-lib.jar"/>
- <classpathentry kind="lib" path="/thirdparty/sun-javamail/lib/mail.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-fileupload/lib/commons-fileupload.jar"/>
<classpathentry kind="lib" path="/tools/lib/xercesImpl.jar"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/core"/>
+ <classpathentry kind="lib" path="/thirdparty/glassfish/javamail/lib/mail.jar"/>
<classpathentry kind="output" path="output/classes"/>
</classpath>
15 years, 6 months
JBoss Portal SVN: r12312 - in branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core: modules and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-11-27 14:30:30 -0500 (Thu, 27 Nov 2008)
New Revision: 12312
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/mail/MailModuleImpl.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/modules/MailModule.java
Log:
JBPORTAL-2251: MailModule update to support non-plaintext email
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/mail/MailModuleImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/mail/MailModuleImpl.java 2008-11-27 17:16:27 UTC (rev 12311)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/mail/MailModuleImpl.java 2008-11-27 19:30:30 UTC (rev 12312)
@@ -100,6 +100,9 @@
/** A serial id used to track messages locally. */
private final SynchronizedLong currentSerialId = new SynchronizedLong(0);
+ /** Default Content Type for Mail */
+ public static final String DEFAULT_CONTENT_MIME_TYPE = "text/plain";
+
public int getSMTPConnectionTimeout()
{
return SMTPConnectionTimeout;
@@ -225,11 +228,12 @@
public void send(String from,
String to,
String subject,
- String body)
+ String body,
+ String contentType)
{
try
{
- MyMessage runnable = new MyMessage(from, to, subject, body);
+ MyMessage runnable = new MyMessage(from, to, subject, body, contentType);
log.debug("Enqueuing serialId=" + runnable.serialId);
executor.execute(runnable);
log.debug("Enqueued serialId=" + runnable.serialId);
@@ -239,6 +243,14 @@
log.debug("Interrupted during deliver attempt");
}
}
+
+ public void send(String from,
+ String to,
+ String subject,
+ String body)
+ {
+ send(from, to, subject, body, DEFAULT_CONTENT_MIME_TYPE);
+ }
protected void startService()
throws Exception
@@ -303,13 +315,23 @@
String to,
String subject,
String body)
+ {
+ return deliver(serialId, from, to, subject, body, DEFAULT_CONTENT_MIME_TYPE);
+ }
+
+ public boolean deliver(long serialId,
+ String from,
+ String to,
+ String subject,
+ String body,
+ String contentType)
{
boolean delivered = false;
try
{
if ((gateway != null) && (gateway.length() > 0))
{
- delivered = deliver(serialId, gateway, from, to, subject, body);
+ delivered = deliver(serialId, gateway, from, to, subject, body, contentType);
}
else
{
@@ -329,7 +351,8 @@
String from,
String to,
String subject,
- String body)
+ String body,
+ String contentType)
throws AddressException,
NoSuchProviderException,
MessagingException
@@ -354,8 +377,11 @@
// Prepare message
MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress(from));
- message.setSubject(subject);
- message.setText(body);
+
+ // Replaced message.setText(body); for setContent(...) to allow
+ // a MIME type be set. Now MailModule can support text/html messages
+ message.setContent(body, contentType);
+ message.setSubject(subject);
message.setSentDate(new Date());
message.addRecipient(javax.mail.Message.RecipientType.TO, toAddress);
@@ -417,17 +443,21 @@
public final String subject;
public final String body;
+
+ public final String contentType;
public MyMessage(String from,
String to,
String subject,
- String body)
+ String body,
+ String contentType)
{
this.serialId = currentSerialId.increment();
this.from = from;
this.to = to;
this.subject = subject;
this.body = body;
+ this.contentType = contentType;
}
public void run()
@@ -435,7 +465,7 @@
try
{
log.debug("Dequeued serialId=" + serialId + " and delivering it");
- boolean delivered = deliver(serialId, from, to, subject, body);
+ boolean delivered = deliver(serialId, from, to, subject, body, contentType);
log.debug(delivered + " on delivery for serialId=" + serialId);
}
catch (Throwable t)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/modules/MailModule.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/modules/MailModule.java 2008-11-27 17:16:27 UTC (rev 12311)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/modules/MailModule.java 2008-11-27 19:30:30 UTC (rev 12312)
@@ -29,6 +29,8 @@
void send(String from, String to, String subject, String body);
+ void send(String from, String to, String subject, String body, String contentType);
+
void setSMTPConnectionTimeout(int SMTPConnectionTimeout);
void setSMTPTimeout(int SMTPTimeout);
15 years, 6 months
JBoss Portal SVN: r12311 - in modules/presentation/trunk: portal/src/assemble and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-11-27 12:16:27 -0500 (Thu, 27 Nov 2008)
New Revision: 12311
Modified:
modules/presentation/trunk/ajax/pom.xml
modules/presentation/trunk/portal/src/assemble/presentation-portal-war.xml
Log:
- Use gwt-servlet instead of gwt-user.
- Re-add MC kernel that got removed for some reason. Without it, it won't deploy with gwt-servlet. Not sure why it was deploying with gwt-user.
Modified: modules/presentation/trunk/ajax/pom.xml
===================================================================
--- modules/presentation/trunk/ajax/pom.xml 2008-11-27 13:06:10 UTC (rev 12310)
+++ modules/presentation/trunk/ajax/pom.xml 2008-11-27 17:16:27 UTC (rev 12311)
@@ -31,6 +31,11 @@
</dependency>
<dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-servlet</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.portal.common</groupId>
<artifactId>common-common</artifactId>
</dependency>
@@ -139,7 +144,7 @@
<classifier>${gwt.os}</classifier>
<scope>provided</scope>
</dependency>
- </dependencies>
+ </dependencies>
<executions>
<execution>
<id>package</id>
Modified: modules/presentation/trunk/portal/src/assemble/presentation-portal-war.xml
===================================================================
--- modules/presentation/trunk/portal/src/assemble/presentation-portal-war.xml 2008-11-27 13:06:10 UTC (rev 12310)
+++ modules/presentation/trunk/portal/src/assemble/presentation-portal-war.xml 2008-11-27 17:16:27 UTC (rev 12311)
@@ -53,15 +53,13 @@
<include>org.jboss.portal.presentation:presentation-classic</include>
<include>org.jboss.portal.presentation:presentation-ajax</include >
- <include>com.google.gwt:gwt-user</include>
+ <include>com.google.gwt:gwt-servlet</include>
<include>javax.ccpp:ccpp</include>
<include>javax.portlet:portlet-api</include>
<include>org.jboss:jboss-common-core</include>
- <!--
<include>org.jboss.microcontainer:jboss-kernel</include>
- -->
<include>org.jboss.microcontainer:jboss-dependency</include>
<include>org.jboss:jboss-reflect</include>
<include>org.jboss:jboss-mdr</include>
15 years, 6 months
JBoss Portal SVN: r12310 - 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: 2008-11-27 08:06:10 -0500 (Thu, 27 Nov 2008)
New Revision: 12310
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/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/portal/AdminPortalTestCase.java
Log:
saving pages for debug
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 2008-11-26 19:18:43 UTC (rev 12309)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2008-11-27 13:06:10 UTC (rev 12310)
@@ -1,5 +1,10 @@
package org.jboss.portal.test.selenium;
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
@@ -28,9 +33,7 @@
@BeforeClass
public void setupChromeForLogin() throws Exception {
-
String browser = System.getProperty("browser");
-
selenium = new DefaultSelenium("127.0.0.1", 44444, browser, "http://localhost:8080/portal/");
selenium.start();
@@ -212,4 +215,15 @@
Assert.assertTrue(selenium.isElementPresent("Link=Login"), "Login link not present.");
}
}
+
+ protected void savePage(String filename) {
+ try {
+ PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(filename)));
+ out.print(selenium.getHtmlSource());
+ out.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
}
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 2008-11-26 19:18:43 UTC (rev 12309)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2008-11-27 13:06:10 UTC (rev 12310)
@@ -71,6 +71,7 @@
selenium.click(SUBMIT_CREATECONS);
selenium.waitForPageToLoad(PAGE_LOAD);
+ savePage("1.html");
selenium.type(INPUT_CACHEEXP, "600");
selenium.type(INPUT_CONSWSDL, "http://wsrp.bea.com:7001/producer/producer?WSDL");
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 2008-11-26 19:18:43 UTC (rev 12309)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java 2008-11-27 13:06:10 UTC (rev 12310)
@@ -173,7 +173,7 @@
selenium.click("link=" + defaultDirName);
selenium.click("submit");
selenium.waitForPageToLoad(PAGE_LOAD);
-
+ savePage("2.html");
Assert.assertEquals("copySrc", selenium.getText("//div[@id='center']/div/div/ul/li[5]"));
Assert.assertTrue(selenium.isElementPresent("link=" + defaultDirName));
selenium.click("link=Home");
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 2008-11-26 19:18:43 UTC (rev 12309)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java 2008-11-27 13:06:10 UTC (rev 12310)
@@ -316,6 +316,7 @@
selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr[3]/td[2]/form/select/option[4]");
selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr[3]/td[2]/form/input");
selenium.waitForPageToLoad(PAGE_LOAD);
+ savePage("3.html");
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?"));
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 2008-11-26 19:18:43 UTC (rev 12309)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java 2008-11-27 13:06:10 UTC (rev 12310)
@@ -67,7 +67,7 @@
clickIfVisible(TAB_PORTALOBJ_ID);
clickIfVisible(LINK_PORTALS_ID);
-
+ savePage("4.html");
Assert.assertFalse(selenium.isTextPresent("TestPortal"), "Not created page already exist.");
selenium.type(INPUT_PORTALNAME, "TestPortal");
15 years, 6 months
JBoss Portal SVN: r12309 - branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-11-26 14:18:43 -0500 (Wed, 26 Nov 2008)
New Revision: 12309
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/RegistrationTestCase.java
Log:
- JBPORTAL-2244: Test was bad (relying on order where none actually exists)
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/RegistrationTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/RegistrationTestCase.java 2008-11-26 18:10:13 UTC (rev 12308)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/RegistrationTestCase.java 2008-11-26 19:18:43 UTC (rev 12309)
@@ -144,7 +144,7 @@
// now modify Producer's set of required registration info
String newPropName = "New Prop";
RegistrationPropertyDescription regProp = new RegistrationPropertyDescription(newPropName,
- new QName("urn:oasis:names:tc:wsrp:v1:types", "LocalizedString", "ns1"));
+ new QName("urn:oasis:names:tc:wsrp:v1:types", "LocalizedString", "ns1"));
regProp.setDefaultLabel("New Registration Property");
producer.getProducerRegistrationRequirements().addRegistrationProperty(regProp);
@@ -184,10 +184,20 @@
// remove registration context, try again and check that we get new registration info
gs.setRegistrationContext(null);
PropertyDescription[] pds = serviceDescriptionService.getServiceDescription(gs)
- .getRegistrationPropertyDescription().getPropertyDescriptions();
+ .getRegistrationPropertyDescription().getPropertyDescriptions();
ExtendedAssert.assertEquals(2, pds.length);
- assertEquals(WSRPUtils.convertToPropertyDescription(regProp), pds[1]);
+ // Check that one of the returned property description is equal to the one we just added
+ PropertyDescription description = pds[1];
+ if (description.getName().startsWith("New"))
+ {
+ assertEquals(WSRPUtils.convertToPropertyDescription(regProp), description);
+ }
+ else
+ {
+ assertEquals(WSRPUtils.convertToPropertyDescription(regProp), pds[0]);
+ }
+
// Update registration data
RegistrationData regData = createBaseRegData();
org.jboss.portal.wsrp.core.Property[] props = regData.getRegistrationProperties();
@@ -211,7 +221,7 @@
// now modify Producer's set of required registration info
String newPropName = "New Prop";
RegistrationPropertyDescription regProp = new RegistrationPropertyDescription(newPropName,
- new QName("urn:oasis:names:tc:wsrp:v1:types", "LocalizedString", "ns1"));
+ new QName("urn:oasis:names:tc:wsrp:v1:types", "LocalizedString", "ns1"));
regProp.setDefaultLabel("New Registration Property");
producer.getProducerRegistrationRequirements().addRegistrationProperty(regProp);
15 years, 6 months