gatein SVN: r3315 - in portal/trunk: webui/portal/src/main/java/org/exoplatform/portal/webui and 1 other directory.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2010-06-13 23:39:48 -0400 (Sun, 13 Jun 2010)
New Revision: 3315
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterForm.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/UICaptcha.java
Log:
GTNPORTAL-1037 fix UICaptcha and refresh ui when register form input is invalid
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterForm.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterForm.java 2010-06-14 03:10:03 UTC (rev 3314)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterForm.java 2010-06-14 03:39:48 UTC (rev 3315)
@@ -103,6 +103,7 @@
HttpServletRequest request = prContext.getRequest();
HttpSession session = request.getSession();
session.removeAttribute(Captcha.NAME);
+ context.addUIComponentToUpdateByAjax(getChild(UIRegisterInputSet.class));
}
}
@@ -124,11 +125,11 @@
{
//TODO: Send email and add Account Activating feature
UIApplication uiApp = context.getUIApplication();
- uiApp.addMessage(new ApplicationMessage("UIRegisterForm.registerWithSuccess.message", null));
- HttpServletRequest request = prContext.getRequest();
- HttpSession session = request.getSession();
- session.removeAttribute(Captcha.NAME);
+ uiApp.addMessage(new ApplicationMessage("UIRegisterForm.registerWithSuccess.message", null));
}
+ HttpServletRequest request = prContext.getRequest();
+ HttpSession session = request.getSession();
+ session.removeAttribute(Captcha.NAME);
}
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/UICaptcha.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/UICaptcha.java 2010-06-14 03:10:03 UTC (rev 3314)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/UICaptcha.java 2010-06-14 03:39:48 UTC (rev 3315)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.exoplatform.portal.webui;
+import java.util.Calendar;
+
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.form.UIFormStringInput;
@@ -38,9 +40,11 @@
}
public void processRender(WebuiRequestContext context) throws Exception
- {
- context.getWriter().write("<img src=\"" + context.getPortalContextPath() + "/captcha\" /><br/>");
+ {
+ context.getWriter().write("<div id='" + getId() + "'><img src=\"" + context.getPortalContextPath() + "/captcha?v=" +
+ Calendar.getInstance().getTimeInMillis() + "\" /><br/>");
super.processRender(context);
+ context.getWriter().write("</div>");
}
}
14 years, 7 months
gatein SVN: r3314 - portal/trunk/web/portal/src/main/webapp/WEB-INF.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-06-13 23:10:03 -0400 (Sun, 13 Jun 2010)
New Revision: 3314
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml
Log:
GTNPORTAL-1315 add a missing filter mapping
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml 2010-06-14 02:02:15 UTC (rev 3313)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml 2010-06-14 03:10:03 UTC (rev 3314)
@@ -137,6 +137,11 @@
</filter-mapping>
<filter-mapping>
+ <filter-name>ThreadLocalSessionProviderInitializedFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
<filter-name>CacheUserProfileFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
@@ -145,11 +150,6 @@
<filter-name>RestEncodingFilter</filter-name>
<url-pattern>/rest/*</url-pattern>
</filter-mapping>
-
- <filter-mapping>
- <filter-name>RestEncodingFilter</filter-name>
- <url-pattern>/rest/*</url-pattern>
- </filter-mapping>
<!-- ================================================================== -->
<!-- LISTENER -->
14 years, 7 months
gatein SVN: r3313 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-06-13 22:02:15 -0400 (Sun, 13 Jun 2010)
New Revision: 3313
Added:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_002_CheckCloneNodeContainSubNode.html
Log:
TESTVN-399: Create new GateIn Selenium Scrips
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_002_CheckCloneNodeContainSubNode.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_002_CheckCloneNodeContainSubNode.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_002_CheckCloneNodeContainSubNode.html 2010-06-14 02:02:15 UTC (rev 3313)
@@ -0,0 +1,402 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Test_POR_14_07_002_CheckCloneNodeContainSubNode</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_14_07_002_CheckCloneNodeContainSubNode</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login portal--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Open Site Menu Editor--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Add new page --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add New Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Add New Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Home</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Home</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>pageName</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageName</td>
+ <td>Test_POR_14_07_002</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageDisplayName</td>
+ <td>Test_POR_14_07_002</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Click Next to move to step 2</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Click Next to move to step 3, keep Empty layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Click Save to complete adding page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Open Navigation Menu--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Clone a node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Home']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Clone Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Clone Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Paste Clone node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[3]/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='SiteMap']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='NavigationNodePopupMenu']/div/div[2]/div/div/div[7]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Check page list in Manage Page--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Page Management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Page Management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Check existing of page with title 'Test_POR_14_07_002'--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>searchTerm</td>
+ <td>Test_POR_14_07_002</td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>searchOption</td>
+ <td>label=Title</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//form[@id='UIPageSearch']/div[2]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//form[@id='UIPageSearch']/div[2]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Delete page--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//img[@title='Delete Page']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//img[@title='Delete Page']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Do you want to delete this page?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//img[@title='Delete Page']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//img[@title='Delete Page']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Do you want to delete this page?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Delete page (node)--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon' and @title='Test_POR_14_07_002']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Delete Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Delete Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this node?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon' and @title='SiteMap']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[3]/div[2]/div/div//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Delete Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Delete Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this node?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Sign out --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
14 years, 7 months
gatein SVN: r3312 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-06-13 22:01:13 -0400 (Sun, 13 Jun 2010)
New Revision: 3312
Modified:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_002_CreateNewPortalWithValidValue.html
Log:
TESTVN-399: Clean and improve
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_002_CreateNewPortalWithValidValue.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_002_CreateNewPortalWithValidValue.html 2010-06-13 21:28:19 UTC (rev 3311)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_002_CreateNewPortalWithValidValue.html 2010-06-14 02:01:13 UTC (rev 3312)
@@ -22,7 +22,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Sign in</td>
<td></td>
</tr>
@@ -42,7 +42,7 @@
<td>gtn</td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickAndWait</td>
<td>xpath=//div[@id='UIPortalLoginFormAction']//a</td>
<td></td>
</tr>
@@ -52,48 +52,28 @@
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
+ <td>clickAndWait</td>
<td>link=Site</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
- <td>link=Site</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForElementPresent</td>
+ <td>click</td>
<td>link=Add New Portal</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
- <td>link=Add New Portal</td>
- <td></td>
-</tr>
-<tr>
<td>echo</td>
- <td>--Choose Portal Template--</td>
- <td></td>
-</tr>
-<tr>
- <td>clickAt</td>
- <td>xpath=//div[@id='UISiteManagement']//div[@class='UIAction']//div[@class='ActionButton BlueButton']</td>
- <td></td>
-</tr>
-<tr>
- <td>echo</td>
<td>--Choose Portal Setting--</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>xpath=//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']</td>
+ <td>//div[(a)onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPortalForm', 'PortalSetting');javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','SelectTab','&objectId=PortalSetting')"]</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
- <td>xpath=//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']</td>
+ <td>click</td>
+ <td>//div[(a)onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPortalForm', 'PortalSetting');javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','SelectTab','&objectId=PortalSetting')"]</td>
<td></td>
</tr>
<tr>
@@ -113,7 +93,7 @@
</tr>
<tr>
<td>echo</td>
- <td>--Choose Properties--</td>
+ <td>--Select Permission Setting--</td>
<td></td>
</tr>
<tr>
@@ -122,22 +102,17 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
- <td>xpath=//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='LeftTab']</td>
+ <td>click</td>
+ <td>xpath=//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']</td>
<td></td>
</tr>
<tr>
- <td>echo</td>
- <td>--Select Permission Setting--</td>
+ <td>waitForElementPresent</td>
+ <td>publicMode</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
- <td>xpath=//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']</td>
- <td></td>
-</tr>
-<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>publicMode</td>
<td></td>
</tr>
@@ -147,9 +122,9 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Edit Permission Setting</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
@@ -157,9 +132,9 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Select Permission</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
@@ -167,7 +142,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Platform</td>
<td></td>
</tr>
@@ -177,7 +152,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Administrators</td>
<td></td>
</tr>
@@ -187,27 +162,22 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=exact:*</td>
<td></td>
</tr>
<tr>
- <td>waitForText</td>
- <td>xpath=//div[@id='UIPermissionSelector']/div/div[2]/div[1]/div[3]/div[2]</td>
- <td>exact:*</td>
-</tr>
-<tr>
- <td>clickAt</td>
+ <td>waitForElementPresent</td>
<td>link=Save</td>
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
- <td>xpath=//div[@id='UISiteManagement']/table[2]/tbody/tr/td[3]/a[4]</td>
+ <td>click</td>
+ <td>link=Save</td>
<td></td>
</tr>
<tr>
- <td>waitForText</td>
+ <td>waitForElementPresent</td>
<td>xpath=//div[@id='UISiteManagement']/table[2]/tbody/tr/td[2]/div</td>
<td>Test_POR_09_002</td>
</tr>
@@ -222,55 +192,25 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickAndWait</td>
<td>link=Site</td>
<td></td>
</tr>
<tr>
- <td>waitForTextPresent</td>
- <td>Portal Navigation</td>
+ <td>clickAndWait</td>
+ <td>link=Delete</td>
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
- <td>xpath=//div[@id='UISiteManagement']/table[2]/tbody/tr/td[3]/a[4]</td>
- <td></td>
-</tr>
-<tr>
- <td>clickAt</td>
- <td>xpath=//div[@id='UISiteManagement']/table[2]//a[@class='DeleteIcon']</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure you want to delete this portal?</td>
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
- <td>link=Site</td>
- <td></td>
-</tr>
-<tr>
- <td>clickAt</td>
- <td>link=Site</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForTextPresent</td>
- <td>Portal Navigation</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForElementPresent</td>
+ <td>clickAndWait</td>
<td>link=Sign out</td>
<td></td>
</tr>
-<tr>
- <td>clickAt</td>
- <td>link=Sign out</td>
- <td></td>
-</tr>
</tbody></table>
</body>
14 years, 7 months
gatein SVN: r3311 - in portal/trunk: component/common and 2 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-06-13 17:28:19 -0400 (Sun, 13 Jun 2010)
New Revision: 3311
Modified:
portal/trunk/component/common/pom.xml
portal/trunk/component/resources/pom.xml
portal/trunk/component/test/jcr/pom.xml
portal/trunk/pom.xml
Log:
GTNPORTAL-1317 : Integrate with MOP 1.0.3
Modified: portal/trunk/component/common/pom.xml
===================================================================
--- portal/trunk/component/common/pom.xml 2010-06-13 20:55:36 UTC (rev 3310)
+++ portal/trunk/component/common/pom.xml 2010-06-13 21:28:19 UTC (rev 3311)
@@ -56,10 +56,6 @@
<artifactId>exo.jcr.component.core</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-core</artifactId>
- </dependency>
- <dependency>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>exo.jcr.component.ext</artifactId>
</dependency>
Modified: portal/trunk/component/resources/pom.xml
===================================================================
--- portal/trunk/component/resources/pom.xml 2010-06-13 20:55:36 UTC (rev 3310)
+++ portal/trunk/component/resources/pom.xml 2010-06-13 21:28:19 UTC (rev 3311)
@@ -69,11 +69,6 @@
</dependency>
<dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-core</artifactId>
- </dependency>
-
- <dependency>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>exo.jcr.component.ext</artifactId>
</dependency>
Modified: portal/trunk/component/test/jcr/pom.xml
===================================================================
--- portal/trunk/component/test/jcr/pom.xml 2010-06-13 20:55:36 UTC (rev 3310)
+++ portal/trunk/component/test/jcr/pom.xml 2010-06-13 21:28:19 UTC (rev 3311)
@@ -38,11 +38,6 @@
</dependency>
<dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-core</artifactId>
- </dependency>
-
- <dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2010-06-13 20:55:36 UTC (rev 3310)
+++ portal/trunk/pom.xml 2010-06-13 21:28:19 UTC (rev 3311)
@@ -37,10 +37,10 @@
<name>GateIn - Portal</name>
<properties>
- <org.exoplatform.kernel.version>2.2.2-CR1</org.exoplatform.kernel.version>
- <org.exoplatform.core.version>2.3.2-CR1</org.exoplatform.core.version>
- <org.exoplatform.ws.version>2.1.2-CR1</org.exoplatform.ws.version>
- <org.exoplatform.jcr.version>1.12.2-CR1</org.exoplatform.jcr.version>
+ <org.exoplatform.kernel.version>2.2.2-GA</org.exoplatform.kernel.version>
+ <org.exoplatform.core.version>2.3.2-GA</org.exoplatform.core.version>
+ <org.exoplatform.ws.version>2.1.2-GA</org.exoplatform.ws.version>
+ <org.exoplatform.jcr.version>1.12.2-GA</org.exoplatform.jcr.version>
<org.jibx.version>1.2.1</org.jibx.version>
<org.shindig.version>1.0-r790473-Patch02</org.shindig.version>
<nl.captcha.simplecaptcha.version>1.1.1-GA-Patch01</nl.captcha.simplecaptcha.version>
@@ -49,12 +49,12 @@
<org.gatein.pc.version>2.1.1-GA</org.gatein.pc.version>
<org.picketlink.idm>1.1.5.CR01</org.picketlink.idm>
<org.gatein.wsrp.version>1.1.1-GA</org.gatein.wsrp.version>
- <org.gatein.mop.version>1.0.3-CR01</org.gatein.mop.version>
+ <org.gatein.mop.version>1.0.3-GA</org.gatein.mop.version>
<org.slf4j.version>1.5.6</org.slf4j.version>
<rhino.version>1.6R5</rhino.version>
<org.codehaus.groovy.version>1.6.5</org.codehaus.groovy.version>
<javax.servlet.version>2.5</javax.servlet.version>
- <version.chromattic>1.0.2</version.chromattic>
+ <version.chromattic>1.0.3</version.chromattic>
<version.reflect>1.0.0</version.reflect>
<jcip.version>1.0</jcip.version>
@@ -198,19 +198,8 @@
<groupId>org.exoplatform.jcr</groupId>
<artifactId>exo.jcr.component.core</artifactId>
<version>${org.exoplatform.jcr.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-core</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-core</artifactId>
- <version>3.2.4.GA</version>
- </dependency>
- <dependency>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>exo.jcr.component.ext</artifactId>
<version>${org.exoplatform.jcr.version}</version>
14 years, 7 months
gatein SVN: r3310 - in components/mop/trunk: api and 2 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-06-13 16:55:36 -0400 (Sun, 13 Jun 2010)
New Revision: 3310
Modified:
components/mop/trunk/api/pom.xml
components/mop/trunk/core/pom.xml
components/mop/trunk/pom.xml
components/mop/trunk/spi/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: components/mop/trunk/api/pom.xml
===================================================================
--- components/mop/trunk/api/pom.xml 2010-06-13 20:55:21 UTC (rev 3309)
+++ components/mop/trunk/api/pom.xml 2010-06-13 20:55:36 UTC (rev 3310)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.mop</groupId>
<artifactId>mop-parent</artifactId>
- <version>1.0.3-GA</version>
+ <version>1.0.4-GA-SNAPSHOT</version>
</parent>
<!-- ****************** -->
Modified: components/mop/trunk/core/pom.xml
===================================================================
--- components/mop/trunk/core/pom.xml 2010-06-13 20:55:21 UTC (rev 3309)
+++ components/mop/trunk/core/pom.xml 2010-06-13 20:55:36 UTC (rev 3310)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.mop</groupId>
<artifactId>mop-parent</artifactId>
- <version>1.0.3-GA</version>
+ <version>1.0.4-GA-SNAPSHOT</version>
</parent>
<!-- ****************** -->
Modified: components/mop/trunk/pom.xml
===================================================================
--- components/mop/trunk/pom.xml 2010-06-13 20:55:21 UTC (rev 3309)
+++ components/mop/trunk/pom.xml 2010-06-13 20:55:36 UTC (rev 3310)
@@ -34,16 +34,16 @@
<groupId>org.gatein.mop</groupId>
<artifactId>mop-parent</artifactId>
- <version>1.0.3-GA</version>
+ <version>1.0.4-GA-SNAPSHOT</version>
<packaging>pom</packaging>
<name>GateIn - MOP</name>
<description>Model Object for Portal</description>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/mop/tags/1.0.3-GA</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/mop/tags/1.0.3-GA</developerConnection>
- <url>http://fisheye.jboss.org/browse/gatein/components/mop/tags/1.0.3-GA</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/mop/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/mop/trunk/</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/mop/trunk/</url>
</scm>
<dependencyManagement>
Modified: components/mop/trunk/spi/pom.xml
===================================================================
--- components/mop/trunk/spi/pom.xml 2010-06-13 20:55:21 UTC (rev 3309)
+++ components/mop/trunk/spi/pom.xml 2010-06-13 20:55:36 UTC (rev 3310)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.mop</groupId>
<artifactId>mop-parent</artifactId>
- <version>1.0.3-GA</version>
+ <version>1.0.4-GA-SNAPSHOT</version>
</parent>
<!-- ****************** -->
14 years, 7 months
gatein SVN: r3309 - components/mop/tags.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-06-13 16:55:21 -0400 (Sun, 13 Jun 2010)
New Revision: 3309
Added:
components/mop/tags/1.0.3-GA/
Log:
[maven-scm] copy for tag 1.0.3-GA
Copied: components/mop/tags/1.0.3-GA (from rev 3308, components/mop/trunk)
14 years, 7 months
gatein SVN: r3308 - in components/mop/trunk: api and 2 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-06-13 16:55:01 -0400 (Sun, 13 Jun 2010)
New Revision: 3308
Modified:
components/mop/trunk/api/pom.xml
components/mop/trunk/core/pom.xml
components/mop/trunk/pom.xml
components/mop/trunk/spi/pom.xml
Log:
[maven-release-plugin] prepare release 1.0.3-GA
Modified: components/mop/trunk/api/pom.xml
===================================================================
--- components/mop/trunk/api/pom.xml 2010-06-13 20:53:01 UTC (rev 3307)
+++ components/mop/trunk/api/pom.xml 2010-06-13 20:55:01 UTC (rev 3308)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.mop</groupId>
<artifactId>mop-parent</artifactId>
- <version>1.0.3-CR02-SNAPSHOT</version>
+ <version>1.0.3-GA</version>
</parent>
<!-- ****************** -->
Modified: components/mop/trunk/core/pom.xml
===================================================================
--- components/mop/trunk/core/pom.xml 2010-06-13 20:53:01 UTC (rev 3307)
+++ components/mop/trunk/core/pom.xml 2010-06-13 20:55:01 UTC (rev 3308)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.mop</groupId>
<artifactId>mop-parent</artifactId>
- <version>1.0.3-CR02-SNAPSHOT</version>
+ <version>1.0.3-GA</version>
</parent>
<!-- ****************** -->
Modified: components/mop/trunk/pom.xml
===================================================================
--- components/mop/trunk/pom.xml 2010-06-13 20:53:01 UTC (rev 3307)
+++ components/mop/trunk/pom.xml 2010-06-13 20:55:01 UTC (rev 3308)
@@ -34,16 +34,16 @@
<groupId>org.gatein.mop</groupId>
<artifactId>mop-parent</artifactId>
- <version>1.0.3-CR02-SNAPSHOT</version>
+ <version>1.0.3-GA</version>
<packaging>pom</packaging>
<name>GateIn - MOP</name>
<description>Model Object for Portal</description>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/mop/trunk/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/mop/trunk/</developerConnection>
- <url>http://fisheye.jboss.org/browse/gatein/components/mop/trunk/</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/mop/tags/1.0.3-GA</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/mop/tags/1.0.3-GA</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/mop/tags/1.0.3-GA</url>
</scm>
<dependencyManagement>
Modified: components/mop/trunk/spi/pom.xml
===================================================================
--- components/mop/trunk/spi/pom.xml 2010-06-13 20:53:01 UTC (rev 3307)
+++ components/mop/trunk/spi/pom.xml 2010-06-13 20:55:01 UTC (rev 3308)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.mop</groupId>
<artifactId>mop-parent</artifactId>
- <version>1.0.3-CR02-SNAPSHOT</version>
+ <version>1.0.3-GA</version>
</parent>
<!-- ****************** -->
14 years, 7 months
gatein SVN: r3307 - components/mop/trunk.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-06-13 16:53:01 -0400 (Sun, 13 Jun 2010)
New Revision: 3307
Modified:
components/mop/trunk/pom.xml
Log:
GTNMOP-26 : Update to Chromattic 1.0.3 and JCR 1.12.2
Modified: components/mop/trunk/pom.xml
===================================================================
--- components/mop/trunk/pom.xml 2010-06-13 19:31:48 UTC (rev 3306)
+++ components/mop/trunk/pom.xml 2010-06-13 20:53:01 UTC (rev 3307)
@@ -127,7 +127,7 @@
<!-- maven-enforcer-plugin -->
<jdk.min.version>1.6</jdk.min.version>
- <org.chromattic.version>1.0.2</org.chromattic.version>
+ <org.chromattic.version>1.0.3</org.chromattic.version>
</properties>
14 years, 7 months
gatein SVN: r3306 - in components/wsrp/trunk: consumer/src/main/java/org/gatein/wsrp/services/v1 and 1 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-06-13 15:31:48 -0400 (Sun, 13 Jun 2010)
New Revision: 3306
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V1ToV2Converter.java
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V2ToV1Converter.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1PortletManagementService.java
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1/PortletManagementEndpoint.java
Log:
- Finished implementing portlet management. NOT TESTED!
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V1ToV2Converter.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V1ToV2Converter.java 2010-06-12 13:15:54 UTC (rev 3305)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V1ToV2Converter.java 2010-06-13 19:31:48 UTC (rev 3306)
@@ -25,13 +25,16 @@
import com.google.common.base.Function;
import com.google.common.collect.Lists;
+import org.gatein.common.util.ParameterValidation;
import org.gatein.pc.api.OpaqueStateString;
+import org.gatein.wsrp.WSRPConstants;
import org.gatein.wsrp.WSRPExceptionFactory;
import org.gatein.wsrp.WSRPTypeFactory;
import org.gatein.wsrp.WSRPUtils;
import org.oasis.wsrp.v1.V1ClientData;
import org.oasis.wsrp.v1.V1Contact;
import org.oasis.wsrp.v1.V1CookieProtocol;
+import org.oasis.wsrp.v1.V1DestroyFailed;
import org.oasis.wsrp.v1.V1EmployerInfo;
import org.oasis.wsrp.v1.V1Extension;
import org.oasis.wsrp.v1.V1InteractionParams;
@@ -47,8 +50,11 @@
import org.oasis.wsrp.v1.V1PortletContext;
import org.oasis.wsrp.v1.V1PortletDescription;
import org.oasis.wsrp.v1.V1Postal;
+import org.oasis.wsrp.v1.V1Property;
import org.oasis.wsrp.v1.V1PropertyDescription;
+import org.oasis.wsrp.v1.V1PropertyList;
import org.oasis.wsrp.v1.V1RegistrationContext;
+import org.oasis.wsrp.v1.V1ResetProperty;
import org.oasis.wsrp.v1.V1Resource;
import org.oasis.wsrp.v1.V1ResourceList;
import org.oasis.wsrp.v1.V1ResourceValue;
@@ -65,6 +71,7 @@
import org.oasis.wsrp.v2.CookieProtocol;
import org.oasis.wsrp.v2.EmployerInfo;
import org.oasis.wsrp.v2.Extension;
+import org.oasis.wsrp.v2.FailedPortlets;
import org.oasis.wsrp.v2.InteractionParams;
import org.oasis.wsrp.v2.ItemDescription;
import org.oasis.wsrp.v2.LocalizedString;
@@ -78,8 +85,11 @@
import org.oasis.wsrp.v2.PortletContext;
import org.oasis.wsrp.v2.PortletDescription;
import org.oasis.wsrp.v2.Postal;
+import org.oasis.wsrp.v2.Property;
import org.oasis.wsrp.v2.PropertyDescription;
+import org.oasis.wsrp.v2.PropertyList;
import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.ResetProperty;
import org.oasis.wsrp.v2.Resource;
import org.oasis.wsrp.v2.ResourceList;
import org.oasis.wsrp.v2.ResourceValue;
@@ -93,6 +103,8 @@
import org.oasis.wsrp.v2.UserContext;
import org.oasis.wsrp.v2.UserProfile;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
/**
@@ -111,6 +123,8 @@
public static final V1ToV2ResourceValue RESOURCEVALUE = new V1ToV2ResourceValue();
public static final V1ToV2NamedString NAMEDSTRING = new V1ToV2NamedString();
public static final V1ToV2UploadContext UPLOADCONTEXT = new V1ToV2UploadContext();
+ public static final V1ToV2Property PROPERTY = new V1ToV2Property();
+ public static final V1ToV2ResetProperty RESETPROPERTY = new V1ToV2ResetProperty();
public static MarkupParams toV2MarkupParams(V1MarkupParams v1MarkupParams)
{
@@ -623,6 +637,56 @@
}
}
+ public static PropertyList toV2PropertyList(V1PropertyList v1PropertyList)
+ {
+ if (v1PropertyList != null)
+ {
+ PropertyList result = WSRPTypeFactory.createPropertyList();
+
+ List<Property> properties = WSRPUtils.transform(v1PropertyList.getProperties(), PROPERTY);
+ if (properties != null)
+ {
+ result.getProperties().addAll(properties);
+ }
+
+ List<Extension> extensions = WSRPUtils.transform(v1PropertyList.getExtensions(), EXTENSION);
+ if (extensions != null)
+ {
+ result.getExtensions().addAll(extensions);
+ }
+
+ return result;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public static PortletDescription toV2PortletDescription(V1PortletDescription v1PortletDescription)
+ {
+ return PORTLETDESCRIPTION.apply(v1PortletDescription);
+ }
+
+ public static List<FailedPortlets> toV2FailedPortlets(List<V1DestroyFailed> destroyFailed)
+ {
+ if (ParameterValidation.existsAndIsNotEmpty(destroyFailed))
+ {
+ // todo: might need improvements
+ List<FailedPortlets> result = new ArrayList<FailedPortlets>(destroyFailed.size());
+ for (V1DestroyFailed failed : destroyFailed)
+ {
+ result.add(WSRPTypeFactory.createFailedPortlets(Collections.singletonList(failed.getPortletHandle()), failed.getReason()));
+ }
+
+ return result;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
public static class V1ToV2Extension implements Function<V1Extension, Extension>
{
public Extension apply(V1Extension from)
@@ -865,4 +929,42 @@
}
}
}
+
+ public static class V1ToV2Property implements Function<V1Property, Property>
+ {
+ public Property apply(V1Property from)
+ {
+ if (from != null)
+ {
+ Property result = WSRPTypeFactory.createProperty(from.getName(), from.getLang(), from.getStringValue());
+ result.setType(WSRPConstants.XSD_STRING); // todo: not sure what to do here... :(
+
+ List<Object> any = from.getAny();
+ if (ParameterValidation.existsAndIsNotEmpty(any))
+ {
+ result.getAny().addAll(any);
+ }
+ return result;
+ }
+ else
+ {
+ return null;
+ }
+ }
+ }
+
+ private static class V1ToV2ResetProperty implements Function<V1ResetProperty, ResetProperty>
+ {
+ public ResetProperty apply(V1ResetProperty from)
+ {
+ if (from != null)
+ {
+ return WSRPTypeFactory.createResetProperty(from.getName());
+ }
+ else
+ {
+ return null;
+ }
+ }
+ }
}
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V2ToV1Converter.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V2ToV1Converter.java 2010-06-12 13:15:54 UTC (rev 3305)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V2ToV1Converter.java 2010-06-13 19:31:48 UTC (rev 3306)
@@ -25,11 +25,13 @@
import com.google.common.base.Function;
import com.google.common.collect.Lists;
+import org.gatein.common.util.ParameterValidation;
import org.gatein.wsrp.WSRPUtils;
import org.oasis.wsrp.v1.V1CacheControl;
import org.oasis.wsrp.v1.V1ClientData;
import org.oasis.wsrp.v1.V1Contact;
import org.oasis.wsrp.v1.V1CookieProtocol;
+import org.oasis.wsrp.v1.V1DestroyFailed;
import org.oasis.wsrp.v1.V1EmployerInfo;
import org.oasis.wsrp.v1.V1Extension;
import org.oasis.wsrp.v1.V1InteractionParams;
@@ -48,6 +50,7 @@
import org.oasis.wsrp.v1.V1Postal;
import org.oasis.wsrp.v1.V1Property;
import org.oasis.wsrp.v1.V1PropertyDescription;
+import org.oasis.wsrp.v1.V1PropertyList;
import org.oasis.wsrp.v1.V1RegistrationContext;
import org.oasis.wsrp.v1.V1ResetProperty;
import org.oasis.wsrp.v1.V1Resource;
@@ -69,6 +72,7 @@
import org.oasis.wsrp.v2.CookieProtocol;
import org.oasis.wsrp.v2.EmployerInfo;
import org.oasis.wsrp.v2.Extension;
+import org.oasis.wsrp.v2.FailedPortlets;
import org.oasis.wsrp.v2.InteractionParams;
import org.oasis.wsrp.v2.ItemDescription;
import org.oasis.wsrp.v2.LocalizedString;
@@ -85,6 +89,7 @@
import org.oasis.wsrp.v2.Postal;
import org.oasis.wsrp.v2.Property;
import org.oasis.wsrp.v2.PropertyDescription;
+import org.oasis.wsrp.v2.PropertyList;
import org.oasis.wsrp.v2.RegistrationContext;
import org.oasis.wsrp.v2.ResetProperty;
import org.oasis.wsrp.v2.Resource;
@@ -101,6 +106,8 @@
import org.oasis.wsrp.v2.UserContext;
import org.oasis.wsrp.v2.UserProfile;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -728,6 +735,58 @@
return PORTLETDESCRIPTION.apply(description);
}
+ public static List<V1DestroyFailed> toV1DestroyFailed(List<FailedPortlets> failedPortletsList)
+ {
+ if (failedPortletsList != null)
+ {
+ List<V1DestroyFailed> result = new ArrayList<V1DestroyFailed>(failedPortletsList.size());
+
+ for (FailedPortlets failedPortlets : failedPortletsList)
+ {
+ QName errorCode = failedPortlets.getErrorCode();
+ V1LocalizedString reason = toV1LocalizedString(failedPortlets.getReason());
+ String v1Reason = errorCode.toString() + ": " + reason.getValue();
+ for (String handle : failedPortlets.getPortletHandles())
+ {
+ V1DestroyFailed destroyFailed = WSRP1TypeFactory.createDestroyFailed(handle, v1Reason);
+ result.add(destroyFailed);
+ }
+ }
+
+ return result;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public static V1PropertyList toV1PropertyList(PropertyList propertyList)
+ {
+ if (propertyList != null)
+ {
+ V1PropertyList result = new V1PropertyList();
+
+ List<V1Property> properties = WSRPUtils.transform(propertyList.getProperties(), PROPERTY);
+ if (properties != null)
+ {
+ result.getProperties().addAll(properties);
+ }
+
+ List<V1Extension> extensions = WSRPUtils.transform(propertyList.getExtensions(), EXTENSION);
+ if (extensions != null)
+ {
+ result.getExtensions().addAll(extensions);
+ }
+
+ return result;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
private static class V2ToV1Extension implements Function<Extension, V1Extension>
{
public V1Extension apply(Extension from)
@@ -991,7 +1050,7 @@
{
V1Property result = WSRP1TypeFactory.createProperty(from.getName().toString(), from.getLang(), from.getStringValue());
List<Object> any = from.getAny();
- if (any != null)
+ if (ParameterValidation.existsAndIsNotEmpty(any))
{
result.getAny().addAll(any);
}
@@ -1007,25 +1066,6 @@
private static class V2ToV1ResetProperty implements Function<ResetProperty, V1ResetProperty>
{
- public V1Property apply(Property from)
- {
- if (from != null)
- {
- V1Property result = WSRP1TypeFactory.createProperty(from.getName().toString(), from.getLang(), from.getStringValue());
- List<Object> any = from.getAny();
- if (any != null)
- {
- result.getAny().addAll(any);
- }
-
- return result;
- }
- else
- {
- return null;
- }
- }
-
public V1ResetProperty apply(ResetProperty from)
{
if (from != null)
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1PortletManagementService.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1PortletManagementService.java 2010-06-12 13:15:54 UTC (rev 3305)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1PortletManagementService.java 2010-06-13 19:31:48 UTC (rev 3306)
@@ -27,16 +27,21 @@
import org.gatein.wsrp.WSRPExceptionFactory;
import org.gatein.wsrp.WSRPUtils;
import org.gatein.wsrp.services.PortletManagementService;
+import org.gatein.wsrp.spec.v1.V1ToV2Converter;
import org.gatein.wsrp.spec.v1.V2ToV1Converter;
import org.oasis.wsrp.v1.V1AccessDenied;
+import org.oasis.wsrp.v1.V1DestroyFailed;
import org.oasis.wsrp.v1.V1Extension;
import org.oasis.wsrp.v1.V1InconsistentParameters;
import org.oasis.wsrp.v1.V1InvalidHandle;
import org.oasis.wsrp.v1.V1InvalidRegistration;
import org.oasis.wsrp.v1.V1InvalidUserCategory;
import org.oasis.wsrp.v1.V1MissingParameters;
+import org.oasis.wsrp.v1.V1ModelDescription;
import org.oasis.wsrp.v1.V1OperationFailed;
import org.oasis.wsrp.v1.V1PortletDescription;
+import org.oasis.wsrp.v1.V1Property;
+import org.oasis.wsrp.v1.V1ResetProperty;
import org.oasis.wsrp.v1.V1ResourceList;
import org.oasis.wsrp.v1.WSRPV1PortletManagementPortType;
import org.oasis.wsrp.v2.AccessDenied;
@@ -90,14 +95,21 @@
{
try
{
+ Holder<V1PortletDescription> v1PortletDescriptionHolder = new Holder<V1PortletDescription>();
+ Holder<V1ResourceList> v1ResourceListHolder = new Holder<V1ResourceList>();
+ Holder<List<V1Extension>> v1Extensions = new Holder<List<V1Extension>>();
service.getPortletDescription(
V2ToV1Converter.toV1RegistrationContext(registrationContext),
V2ToV1Converter.toV1PortletContext(portletContext),
V2ToV1Converter.toV1UserContext(userContext),
desiredLocales,
- new Holder<V1PortletDescription>(V2ToV1Converter.toV1PortletDescription(portletDescription.value)),
- new Holder<V1ResourceList>(V2ToV1Converter.toV1ResourceList(resourceList.value)),
- new Holder<List<V1Extension>>(WSRPUtils.transform(extensions.value, V2ToV1Converter.EXTENSION)));
+ v1PortletDescriptionHolder,
+ v1ResourceListHolder,
+ v1Extensions);
+
+ portletDescription.value = V1ToV2Converter.toV2PortletDescription(v1PortletDescriptionHolder.value);
+ resourceList.value = V1ToV2Converter.toV2ResourceList(v1ResourceListHolder.value);
+ extensions.value = WSRPUtils.transform(v1Extensions.value, V1ToV2Converter.EXTENSION);
}
catch (V1AccessDenied v1AccessDenied)
{
@@ -132,13 +144,82 @@
@Override
public void clonePortlet(RegistrationContext registrationContext, PortletContext portletContext, UserContext userContext, Lifetime lifetime, Holder<String> portletHandle, Holder<byte[]> portletState, Holder<Lifetime> scheduledDestruction, Holder<List<Extension>> extensions) throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
{
- throw new NotYetImplemented();
+ try
+ {
+ Holder<List<V1Extension>> v1Extensions = new Holder<List<V1Extension>>();
+ service.clonePortlet(
+ V2ToV1Converter.toV1RegistrationContext(registrationContext),
+ V2ToV1Converter.toV1PortletContext(portletContext),
+ V2ToV1Converter.toV1UserContext(userContext),
+ portletHandle,
+ portletState,
+ v1Extensions
+ );
+ extensions.value = WSRPUtils.transform(v1Extensions.value, V1ToV2Converter.EXTENSION);
+ }
+ catch (V1AccessDenied v1AccessDenied)
+ {
+ WSRPExceptionFactory.throwWSException(AccessDenied.class, v1AccessDenied.getMessage(), v1AccessDenied);
+ }
+ catch (V1InconsistentParameters v1InconsistentParameters)
+ {
+ WSRPExceptionFactory.throwWSException(InconsistentParameters.class, v1InconsistentParameters.getMessage(), v1InconsistentParameters);
+ }
+ catch (V1InvalidHandle v1InvalidHandle)
+ {
+ WSRPExceptionFactory.throwWSException(InvalidHandle.class, v1InvalidHandle.getMessage(), v1InvalidHandle);
+ }
+ catch (V1InvalidRegistration v1InvalidRegistration)
+ {
+ WSRPExceptionFactory.throwWSException(InvalidRegistration.class, v1InvalidRegistration.getMessage(), v1InvalidRegistration);
+ }
+ catch (V1InvalidUserCategory v1InvalidUserCategory)
+ {
+ WSRPExceptionFactory.throwWSException(InvalidUserCategory.class, v1InvalidUserCategory.getMessage(), v1InvalidUserCategory);
+ }
+ catch (V1MissingParameters v1MissingParameters)
+ {
+ WSRPExceptionFactory.throwWSException(MissingParameters.class, v1MissingParameters.getMessage(), v1MissingParameters);
+ }
+ catch (V1OperationFailed v1OperationFailed)
+ {
+ WSRPExceptionFactory.throwWSException(OperationFailed.class, v1OperationFailed.getMessage(), v1OperationFailed);
+ }
}
@Override
public void destroyPortlets(RegistrationContext registrationContext, List<String> portletHandles, UserContext userContext, Holder<List<FailedPortlets>> failedPortlets, Holder<List<Extension>> extensions) throws InconsistentParameters, InvalidRegistration, MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
{
- throw new NotYetImplemented();
+ try
+ {
+ Holder<List<V1DestroyFailed>> destroyFailed = new Holder<List<V1DestroyFailed>>();
+ Holder<List<V1Extension>> v1Extensions = new Holder<List<V1Extension>>();
+ service.destroyPortlets(
+ V2ToV1Converter.toV1RegistrationContext(registrationContext),
+ portletHandles,
+ destroyFailed,
+ v1Extensions
+ );
+
+ failedPortlets.value = V1ToV2Converter.toV2FailedPortlets(destroyFailed.value);
+ extensions.value = WSRPUtils.transform(v1Extensions.value, V1ToV2Converter.EXTENSION);
+ }
+ catch (V1InconsistentParameters v1InconsistentParameters)
+ {
+ WSRPExceptionFactory.throwWSException(InconsistentParameters.class, v1InconsistentParameters.getMessage(), v1InconsistentParameters);
+ }
+ catch (V1InvalidRegistration v1InvalidRegistration)
+ {
+ WSRPExceptionFactory.throwWSException(InvalidRegistration.class, v1InvalidRegistration.getMessage(), v1InvalidRegistration);
+ }
+ catch (V1MissingParameters v1MissingParameters)
+ {
+ WSRPExceptionFactory.throwWSException(MissingParameters.class, v1MissingParameters.getMessage(), v1MissingParameters);
+ }
+ catch (V1OperationFailed v1OperationFailed)
+ {
+ WSRPExceptionFactory.throwWSException(OperationFailed.class, v1OperationFailed.getMessage(), v1OperationFailed);
+ }
}
@Override
@@ -186,18 +267,150 @@
@Override
public void setPortletProperties(RegistrationContext registrationContext, PortletContext portletContext, UserContext userContext, PropertyList propertyList, Holder<String> portletHandle, Holder<byte[]> portletState, Holder<Lifetime> scheduledDestruction, Holder<List<Extension>> extensions) throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
{
- throw new NotYetImplemented();
+ try
+ {
+ Holder<List<V1Extension>> v1Extensions = new Holder<List<V1Extension>>();
+ service.setPortletProperties(
+ V2ToV1Converter.toV1RegistrationContext(registrationContext),
+ V2ToV1Converter.toV1PortletContext(portletContext),
+ V2ToV1Converter.toV1UserContext(userContext),
+ V2ToV1Converter.toV1PropertyList(propertyList),
+ portletHandle,
+ portletState,
+ v1Extensions
+ );
+ extensions.value = WSRPUtils.transform(v1Extensions.value, V1ToV2Converter.EXTENSION);
+ }
+ catch (V1AccessDenied v1AccessDenied)
+ {
+ WSRPExceptionFactory.throwWSException(AccessDenied.class, v1AccessDenied.getMessage(), v1AccessDenied);
+ }
+ catch (V1InconsistentParameters v1InconsistentParameters)
+ {
+ WSRPExceptionFactory.throwWSException(InconsistentParameters.class, v1InconsistentParameters.getMessage(), v1InconsistentParameters);
+ }
+ catch (V1InvalidHandle v1InvalidHandle)
+ {
+ WSRPExceptionFactory.throwWSException(InvalidHandle.class, v1InvalidHandle.getMessage(), v1InvalidHandle);
+ }
+ catch (V1InvalidRegistration v1InvalidRegistration)
+ {
+ WSRPExceptionFactory.throwWSException(InvalidRegistration.class, v1InvalidRegistration.getMessage(), v1InvalidRegistration);
+ }
+ catch (V1InvalidUserCategory v1InvalidUserCategory)
+ {
+ WSRPExceptionFactory.throwWSException(InvalidUserCategory.class, v1InvalidUserCategory.getMessage(), v1InvalidUserCategory);
+ }
+ catch (V1MissingParameters v1MissingParameters)
+ {
+ WSRPExceptionFactory.throwWSException(MissingParameters.class, v1MissingParameters.getMessage(), v1MissingParameters);
+ }
+ catch (V1OperationFailed v1OperationFailed)
+ {
+ WSRPExceptionFactory.throwWSException(OperationFailed.class, v1OperationFailed.getMessage(), v1OperationFailed);
+ }
}
@Override
public void getPortletProperties(RegistrationContext registrationContext, PortletContext portletContext, UserContext userContext, List<String> names, Holder<List<Property>> properties, Holder<List<ResetProperty>> resetProperties, Holder<List<Extension>> extensions) throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
{
- throw new NotYetImplemented();
+ try
+ {
+ Holder<List<V1Property>> v1PropertyList = new Holder<List<V1Property>>();
+ Holder<List<V1ResetProperty>> v1ResetPropertyList = new Holder<List<V1ResetProperty>>();
+ Holder<List<V1Extension>> v1Extensions = new Holder<List<V1Extension>>();
+ service.getPortletProperties(
+ V2ToV1Converter.toV1RegistrationContext(registrationContext),
+ V2ToV1Converter.toV1PortletContext(portletContext),
+ V2ToV1Converter.toV1UserContext(userContext),
+ names,
+ v1PropertyList,
+ v1ResetPropertyList,
+ v1Extensions
+ );
+ properties.value = WSRPUtils.transform(v1PropertyList.value, V1ToV2Converter.PROPERTY);
+ resetProperties.value = WSRPUtils.transform(v1ResetPropertyList.value, V1ToV2Converter.RESETPROPERTY);
+ extensions.value = WSRPUtils.transform(v1Extensions.value, V1ToV2Converter.EXTENSION);
+ }
+ catch (V1AccessDenied v1AccessDenied)
+ {
+ WSRPExceptionFactory.throwWSException(AccessDenied.class, v1AccessDenied.getMessage(), v1AccessDenied);
+ }
+ catch (V1InconsistentParameters v1InconsistentParameters)
+ {
+ WSRPExceptionFactory.throwWSException(InconsistentParameters.class, v1InconsistentParameters.getMessage(), v1InconsistentParameters);
+ }
+ catch (V1InvalidHandle v1InvalidHandle)
+ {
+ WSRPExceptionFactory.throwWSException(InvalidHandle.class, v1InvalidHandle.getMessage(), v1InvalidHandle);
+ }
+ catch (V1InvalidRegistration v1InvalidRegistration)
+ {
+ WSRPExceptionFactory.throwWSException(InvalidRegistration.class, v1InvalidRegistration.getMessage(), v1InvalidRegistration);
+ }
+ catch (V1InvalidUserCategory v1InvalidUserCategory)
+ {
+ WSRPExceptionFactory.throwWSException(InvalidUserCategory.class, v1InvalidUserCategory.getMessage(), v1InvalidUserCategory);
+ }
+ catch (V1MissingParameters v1MissingParameters)
+ {
+ WSRPExceptionFactory.throwWSException(MissingParameters.class, v1MissingParameters.getMessage(), v1MissingParameters);
+ }
+ catch (V1OperationFailed v1OperationFailed)
+ {
+ WSRPExceptionFactory.throwWSException(OperationFailed.class, v1OperationFailed.getMessage(), v1OperationFailed);
+ }
}
@Override
public void getPortletPropertyDescription(RegistrationContext registrationContext, PortletContext portletContext, UserContext userContext, List<String> desiredLocales, Holder<ModelDescription> modelDescription, Holder<ResourceList> resourceList, Holder<List<Extension>> extensions) throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
{
- throw new NotYetImplemented();
+ try
+ {
+ Holder<V1ResourceList> v1ResourceListHolder = new Holder<V1ResourceList>();
+ Holder<List<V1Extension>> v1Extensions = new Holder<List<V1Extension>>();
+ Holder<V1ModelDescription> v1ModelDescription = new Holder<V1ModelDescription>();
+
+ service.getPortletPropertyDescription(
+ V2ToV1Converter.toV1RegistrationContext(registrationContext),
+ V2ToV1Converter.toV1PortletContext(portletContext),
+ V2ToV1Converter.toV1UserContext(userContext),
+ desiredLocales,
+ v1ModelDescription,
+ v1ResourceListHolder,
+ v1Extensions);
+
+ modelDescription.value = V1ToV2Converter.toV2ModelDescription(v1ModelDescription.value);
+ resourceList.value = V1ToV2Converter.toV2ResourceList(v1ResourceListHolder.value);
+ extensions.value = WSRPUtils.transform(v1Extensions.value, V1ToV2Converter.EXTENSION);
+ }
+ catch (V1AccessDenied v1AccessDenied)
+ {
+ WSRPExceptionFactory.throwWSException(AccessDenied.class, v1AccessDenied.getMessage(), v1AccessDenied);
+ }
+ catch (V1InconsistentParameters v1InconsistentParameters)
+ {
+ WSRPExceptionFactory.throwWSException(InconsistentParameters.class, v1InconsistentParameters.getMessage(), v1InconsistentParameters);
+ }
+ catch (V1InvalidHandle v1InvalidHandle)
+ {
+ WSRPExceptionFactory.throwWSException(InvalidHandle.class, v1InvalidHandle.getMessage(), v1InvalidHandle);
+ }
+ catch (V1InvalidRegistration v1InvalidRegistration)
+ {
+ WSRPExceptionFactory.throwWSException(InvalidRegistration.class, v1InvalidRegistration.getMessage(), v1InvalidRegistration);
+ }
+ catch (V1InvalidUserCategory v1InvalidUserCategory)
+ {
+ WSRPExceptionFactory.throwWSException(InvalidUserCategory.class, v1InvalidUserCategory.getMessage(), v1InvalidUserCategory);
+ }
+ catch (V1MissingParameters v1MissingParameters)
+ {
+ WSRPExceptionFactory.throwWSException(MissingParameters.class, v1MissingParameters.getMessage(), v1MissingParameters);
+ }
+ catch (V1OperationFailed v1OperationFailed)
+ {
+ WSRPExceptionFactory.throwWSException(OperationFailed.class, v1OperationFailed.getMessage(), v1OperationFailed);
+ }
}
}
Modified: components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1/PortletManagementEndpoint.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1/PortletManagementEndpoint.java 2010-06-12 13:15:54 UTC (rev 3305)
+++ components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1/PortletManagementEndpoint.java 2010-06-13 19:31:48 UTC (rev 3306)
@@ -23,7 +23,6 @@
package org.gatein.wsrp.endpoints.v1;
-import org.gatein.common.NotYetImplemented;
import org.gatein.wsrp.WSRPUtils;
import org.gatein.wsrp.endpoints.WSRPBaseEndpoint;
import org.gatein.wsrp.spec.v1.V1ToV2Converter;
@@ -49,16 +48,23 @@
import org.oasis.wsrp.v1.V1UserContext;
import org.oasis.wsrp.v1.WSRPV1PortletManagementPortType;
import org.oasis.wsrp.v2.AccessDenied;
+import org.oasis.wsrp.v2.ClonePortlet;
+import org.oasis.wsrp.v2.DestroyPortlets;
+import org.oasis.wsrp.v2.DestroyPortletsResponse;
import org.oasis.wsrp.v2.GetPortletDescription;
import org.oasis.wsrp.v2.GetPortletProperties;
+import org.oasis.wsrp.v2.GetPortletPropertyDescription;
import org.oasis.wsrp.v2.InconsistentParameters;
import org.oasis.wsrp.v2.InvalidHandle;
import org.oasis.wsrp.v2.InvalidRegistration;
import org.oasis.wsrp.v2.InvalidUserCategory;
import org.oasis.wsrp.v2.MissingParameters;
import org.oasis.wsrp.v2.OperationFailed;
+import org.oasis.wsrp.v2.PortletContext;
import org.oasis.wsrp.v2.PortletDescriptionResponse;
+import org.oasis.wsrp.v2.PortletPropertyDescriptionResponse;
import org.oasis.wsrp.v2.PropertyList;
+import org.oasis.wsrp.v2.SetPortletProperties;
import javax.jws.HandlerChain;
import javax.jws.WebParam;
@@ -91,19 +97,48 @@
@WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<List<V1Extension>> extensions
) throws V1MissingParameters, V1InconsistentParameters, V1InvalidHandle, V1InvalidRegistration, V1InvalidUserCategory, V1AccessDenied, V1OperationFailed
{
- /*GetPortletPropertyDescription getPortletPropertyDescription = new GetPortletPropertyDescription();
- getPortletPropertyDescription.setRegistrationContext(registrationContext);
- getPortletPropertyDescription.setPortletContext(portletContext);
- getPortletPropertyDescription.setUserContext(userContext);
+ GetPortletPropertyDescription getPortletPropertyDescription = new GetPortletPropertyDescription();
+ getPortletPropertyDescription.setRegistrationContext(V1ToV2Converter.toV2RegistrationContext(registrationContext));
+ getPortletPropertyDescription.setPortletContext(V1ToV2Converter.toV2PortletContext(portletContext));
+ getPortletPropertyDescription.setUserContext(V1ToV2Converter.toV2UserContext(userContext));
getPortletPropertyDescription.getDesiredLocales().addAll(desiredLocales);
+ PortletPropertyDescriptionResponse descriptionResponse;
+ try
+ {
+ descriptionResponse = producer.getPortletPropertyDescription(getPortletPropertyDescription);
- PortletPropertyDescriptionResponse descriptionResponse = producer.getPortletPropertyDescription(getPortletPropertyDescription);
-
- modelDescription.value = descriptionResponse.getModelDescription();
- resourceList.value = descriptionResponse.getResourceList();
- extensions.value = descriptionResponse.getExtensions();*/
-
- throw new NotYetImplemented();
+ modelDescription.value = V2ToV1Converter.toV1ModelDescription(descriptionResponse.getModelDescription());
+ resourceList.value = V2ToV1Converter.toV1ResourceList(descriptionResponse.getResourceList());
+ extensions.value = WSRPUtils.transform(descriptionResponse.getExtensions(), V2ToV1Converter.EXTENSION);
+ }
+ catch (AccessDenied accessDenied)
+ {
+ WSRP1ExceptionFactory.throwWSException(accessDenied.getClass(), accessDenied.getMessage(), accessDenied);
+ }
+ catch (InvalidHandle invalidHandle)
+ {
+ WSRP1ExceptionFactory.throwWSException(invalidHandle.getClass(), invalidHandle.getMessage(), invalidHandle);
+ }
+ catch (InvalidUserCategory invalidUserCategory)
+ {
+ WSRP1ExceptionFactory.throwWSException(invalidUserCategory.getClass(), invalidUserCategory.getMessage(), invalidUserCategory);
+ }
+ catch (InconsistentParameters inconsistentParameters)
+ {
+ WSRP1ExceptionFactory.throwWSException(inconsistentParameters.getClass(), inconsistentParameters.getMessage(), inconsistentParameters);
+ }
+ catch (MissingParameters missingParameters)
+ {
+ WSRP1ExceptionFactory.throwWSException(missingParameters.getClass(), missingParameters.getMessage(), missingParameters);
+ }
+ catch (InvalidRegistration invalidRegistration)
+ {
+ WSRP1ExceptionFactory.throwWSException(invalidRegistration.getClass(), invalidRegistration.getMessage(), invalidRegistration);
+ }
+ catch (OperationFailed operationFailed)
+ {
+ WSRP1ExceptionFactory.throwWSException(operationFailed.getClass(), operationFailed.getMessage(), operationFailed);
+ }
}
public void setPortletProperties(
@@ -116,19 +151,48 @@
@WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<List<V1Extension>> extensions
) throws V1MissingParameters, V1InconsistentParameters, V1InvalidHandle, V1InvalidRegistration, V1InvalidUserCategory, V1AccessDenied, V1OperationFailed
{
- /*SetPortletProperties setPortletProperties = new SetPortletProperties();
- setPortletProperties.setRegistrationContext(registrationContext);
- setPortletProperties.setPortletContext(portletContext);
- setPortletProperties.setUserContext(userContext);
- setPortletProperties.setPropertyList(propertyList);
+ SetPortletProperties setPortletProperties = new SetPortletProperties();
+ setPortletProperties.setRegistrationContext(V1ToV2Converter.toV2RegistrationContext(registrationContext));
+ setPortletProperties.setPortletContext(V1ToV2Converter.toV2PortletContext(portletContext));
+ setPortletProperties.setUserContext(V1ToV2Converter.toV2UserContext(userContext));
+ setPortletProperties.setPropertyList(V1ToV2Converter.toV2PropertyList(propertyList));
- PortletContext response = producer.setPortletProperties(setPortletProperties);
-
- portletHandle.value = response.getPortletHandle();
- portletState.value = response.getPortletState();
- extensions.value = response.getExtensions();*/
-
- throw new NotYetImplemented();
+ PortletContext response;
+ try
+ {
+ response = producer.setPortletProperties(setPortletProperties);
+ portletHandle.value = response.getPortletHandle();
+ portletState.value = response.getPortletState();
+ extensions.value = WSRPUtils.transform(response.getExtensions(), V2ToV1Converter.EXTENSION);
+ }
+ catch (AccessDenied accessDenied)
+ {
+ WSRP1ExceptionFactory.throwWSException(accessDenied.getClass(), accessDenied.getMessage(), accessDenied);
+ }
+ catch (InvalidHandle invalidHandle)
+ {
+ WSRP1ExceptionFactory.throwWSException(invalidHandle.getClass(), invalidHandle.getMessage(), invalidHandle);
+ }
+ catch (InvalidUserCategory invalidUserCategory)
+ {
+ WSRP1ExceptionFactory.throwWSException(invalidUserCategory.getClass(), invalidUserCategory.getMessage(), invalidUserCategory);
+ }
+ catch (InconsistentParameters inconsistentParameters)
+ {
+ WSRP1ExceptionFactory.throwWSException(inconsistentParameters.getClass(), inconsistentParameters.getMessage(), inconsistentParameters);
+ }
+ catch (MissingParameters missingParameters)
+ {
+ WSRP1ExceptionFactory.throwWSException(missingParameters.getClass(), missingParameters.getMessage(), missingParameters);
+ }
+ catch (InvalidRegistration invalidRegistration)
+ {
+ WSRP1ExceptionFactory.throwWSException(invalidRegistration.getClass(), invalidRegistration.getMessage(), invalidRegistration);
+ }
+ catch (OperationFailed operationFailed)
+ {
+ WSRP1ExceptionFactory.throwWSException(operationFailed.getClass(), operationFailed.getMessage(), operationFailed);
+ }
}
public void clonePortlet(
@@ -140,18 +204,47 @@
@WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<List<V1Extension>> extensions
) throws V1MissingParameters, V1InconsistentParameters, V1InvalidHandle, V1InvalidRegistration, V1InvalidUserCategory, V1AccessDenied, V1OperationFailed
{
- /*ClonePortlet clonePortlet = new ClonePortlet();
- clonePortlet.setRegistrationContext(registrationContext);
- clonePortlet.setPortletContext(portletContext);
- clonePortlet.setUserContext(userContext);
+ ClonePortlet clonePortlet = new ClonePortlet();
+ clonePortlet.setRegistrationContext(V1ToV2Converter.toV2RegistrationContext(registrationContext));
+ clonePortlet.setPortletContext(V1ToV2Converter.toV2PortletContext(portletContext));
+ clonePortlet.setUserContext(V1ToV2Converter.toV2UserContext(userContext));
- PortletContext response = producer.clonePortlet(clonePortlet);
-
- portletHandle.value = response.getPortletHandle();
- portletState.value = response.getPortletState();
- extensions.value = response.getExtensions();*/
-
- throw new NotYetImplemented();
+ PortletContext response;
+ try
+ {
+ response = producer.clonePortlet(clonePortlet);
+ portletHandle.value = response.getPortletHandle();
+ portletState.value = response.getPortletState();
+ extensions.value = WSRPUtils.transform(response.getExtensions(), V2ToV1Converter.EXTENSION);
+ }
+ catch (AccessDenied accessDenied)
+ {
+ WSRP1ExceptionFactory.throwWSException(accessDenied.getClass(), accessDenied.getMessage(), accessDenied);
+ }
+ catch (InvalidHandle invalidHandle)
+ {
+ WSRP1ExceptionFactory.throwWSException(invalidHandle.getClass(), invalidHandle.getMessage(), invalidHandle);
+ }
+ catch (InvalidUserCategory invalidUserCategory)
+ {
+ WSRP1ExceptionFactory.throwWSException(invalidUserCategory.getClass(), invalidUserCategory.getMessage(), invalidUserCategory);
+ }
+ catch (InconsistentParameters inconsistentParameters)
+ {
+ WSRP1ExceptionFactory.throwWSException(inconsistentParameters.getClass(), inconsistentParameters.getMessage(), inconsistentParameters);
+ }
+ catch (MissingParameters missingParameters)
+ {
+ WSRP1ExceptionFactory.throwWSException(missingParameters.getClass(), missingParameters.getMessage(), missingParameters);
+ }
+ catch (InvalidRegistration invalidRegistration)
+ {
+ WSRP1ExceptionFactory.throwWSException(invalidRegistration.getClass(), invalidRegistration.getMessage(), invalidRegistration);
+ }
+ catch (OperationFailed operationFailed)
+ {
+ WSRP1ExceptionFactory.throwWSException(operationFailed.getClass(), operationFailed.getMessage(), operationFailed);
+ }
}
public void getPortletDescription(
@@ -231,7 +324,6 @@
properties.value = WSRPUtils.transform(result.getProperties(), V2ToV1Converter.PROPERTY);
resetProperties.value = WSRPUtils.transform(result.getResetProperties(), V2ToV1Converter.RESETPROPERTY);
extensions.value = WSRPUtils.transform(result.getExtensions(), V2ToV1Converter.EXTENSION);
-
}
catch (AccessDenied accessDenied)
{
@@ -270,15 +362,33 @@
@WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<List<V1Extension>> extensions
) throws V1MissingParameters, V1InconsistentParameters, V1InvalidRegistration, V1OperationFailed
{
- /*DestroyPortlets destroyPortlets = new DestroyPortlets();
- destroyPortlets.setRegistrationContext(registrationContext);
+ DestroyPortlets destroyPortlets = new DestroyPortlets();
+ destroyPortlets.setRegistrationContext(V1ToV2Converter.toV2RegistrationContext(registrationContext));
destroyPortlets.getPortletHandles().addAll(portletHandles);
- DestroyPortletsResponse destroyPortletsResponse = producer.destroyPortlets(destroyPortlets);
+ DestroyPortletsResponse destroyPortletsResponse;
+ try
+ {
+ destroyPortletsResponse = producer.destroyPortlets(destroyPortlets);
- destroyFailed.value = destroyPortletsResponse.getDestroyFailed();
- extensions.value = destroyPortletsResponse.getExtensions();*/
-
- throw new NotYetImplemented();
+ destroyFailed.value = V2ToV1Converter.toV1DestroyFailed(destroyPortletsResponse.getFailedPortlets());
+ extensions.value = WSRPUtils.transform(destroyPortletsResponse.getExtensions(), V2ToV1Converter.EXTENSION);
+ }
+ catch (InconsistentParameters inconsistentParameters)
+ {
+ WSRP1ExceptionFactory.throwWSException(inconsistentParameters.getClass(), inconsistentParameters.getMessage(), inconsistentParameters);
+ }
+ catch (MissingParameters missingParameters)
+ {
+ WSRP1ExceptionFactory.throwWSException(missingParameters.getClass(), missingParameters.getMessage(), missingParameters);
+ }
+ catch (InvalidRegistration invalidRegistration)
+ {
+ WSRP1ExceptionFactory.throwWSException(invalidRegistration.getClass(), invalidRegistration.getMessage(), invalidRegistration);
+ }
+ catch (OperationFailed operationFailed)
+ {
+ WSRP1ExceptionFactory.throwWSException(operationFailed.getClass(), operationFailed.getMessage(), operationFailed);
+ }
}
}
14 years, 7 months