gatein SVN: r2946 - portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: mvanco(a)redhat.com
Date: 2010-05-03 14:11:25 -0400 (Mon, 03 May 2010)
New Revision: 2946
Modified:
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_002_CreateNewPortalWithValidValue.html
Log:
EPP5 UI tests: improved test 09_002
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_002_CreateNewPortalWithValidValue.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_002_CreateNewPortalWithValidValue.html 2010-05-03 18:02:49 UTC (rev 2945)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_002_CreateNewPortalWithValidValue.html 2010-05-03 18:11:25 UTC (rev 2946)
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/portal/public/classic/</td>
+ <td>/portal/public/classic</td>
<td></td>
</tr>
<tr>
@@ -22,6 +22,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Sign in</td>
<td></td>
@@ -73,30 +78,15 @@
</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>name</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
- <td>xpath=//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']</td>
- <td></td>
-</tr>
-<tr>
<td>type</td>
<td>name</td>
<td>Test_POR_09_002</td>
@@ -118,12 +108,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>xpath=//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='LeftTab']</td>
+ <td>xpath=//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[2]//div[@class='LeftTab']</td>
<td></td>
</tr>
<tr>
<td>clickAt</td>
- <td>xpath=//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='LeftTab']</td>
+ <td>xpath=//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[2]//div[@class='LeftTab']</td>
<td></td>
</tr>
<tr>
@@ -132,11 +122,21 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']</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>waitForElementPresent</td>
+ <td>publicMode</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>publicMode</td>
<td></td>
@@ -149,7 +149,7 @@
<tr>
<td>clickAt</td>
<td>link=Edit Permission Setting</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
@@ -159,7 +159,7 @@
<tr>
<td>clickAt</td>
<td>link=Select Permission</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
@@ -197,16 +197,46 @@
<td>exact:*</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>waitForText</td>
+ <td>xpath=//div[@id='UISiteManagement']/table[2]/tbody/tr/td[2]/div</td>
+ <td>Test_POR_09_002</td>
+</tr>
+<tr>
+ <td>verifyText</td>
+ <td>xpath=//div[@id='UISiteManagement']/table[2]/tbody/tr/td[2]/div</td>
+ <td>Test_POR_09_002</td>
+</tr>
+<tr>
<td>waitForElementPresent</td>
- <td>xpath=//div[@id='UISiteManagement']/table[2]/tbody/tr/td[3]/a[4]</td>
+ <td>link=Home</td>
<td></td>
</tr>
<tr>
+ <td>clickAt</td>
+ <td>link=Home</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>waitForText</td>
<td>xpath=//div[@id='UISiteManagement']/table[2]/tbody/tr/td[2]/div</td>
<td>Test_POR_09_002</td>
@@ -222,6 +252,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Site</td>
<td></td>
@@ -237,6 +272,11 @@
<td></td>
</tr>
<tr>
+ <td>pause</td>
+ <td>5000</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>xpath=//div[@id='UISiteManagement']/table[2]//a[@class='DeleteIcon']</td>
<td></td>
@@ -247,21 +287,11 @@
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
- <td>link=Site</td>
+ <td>waitForTextNotPresent</td>
+ <td>Test_POR_09_002</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>link=Sign out</td>
<td></td>
14 years, 7 months
gatein SVN: r2945 - in sandbox/mobile_delivery/trunk/examples/portlets: jsphellouser/src/main/java/org/jboss/portal/portlet/samples and 1 other directories.
by do-not-reply@jboss.org
Author: david.borruat
Date: 2010-05-03 14:02:49 -0400 (Mon, 03 May 2010)
New Revision: 2945
Modified:
sandbox/mobile_delivery/trunk/examples/portlets/davidportlet/src/main/webapp/jsp/welcome.jsp
sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java
sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser/src/main/webapp/jsp/welcome.jsp
Log:
example portlet JspHelloUser modified
Modified: sandbox/mobile_delivery/trunk/examples/portlets/davidportlet/src/main/webapp/jsp/welcome.jsp
===================================================================
--- sandbox/mobile_delivery/trunk/examples/portlets/davidportlet/src/main/webapp/jsp/welcome.jsp 2010-05-03 18:01:39 UTC (rev 2944)
+++ sandbox/mobile_delivery/trunk/examples/portlets/davidportlet/src/main/webapp/jsp/welcome.jsp 2010-05-03 18:02:49 UTC (rev 2945)
@@ -1,15 +1,7 @@
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
- <style type="text/css">
- h1 { color: navy; }
- h2 { color: blue; }
- .portlet-font { font-style: italic }
- .Default { width: 300px }
- body { background: #dedf00; font-size: 15px}
- </style>
+<div class="portlet-section-header">Welcome !</div>
-<div class="portlet-section-header"><h1>Welcome !</h1></div>
-
<br/>
<div class="portlet-font">
@@ -42,4 +34,4 @@
<input class="portlet-form-input-field" type="text" name="yourname"/>
<input class="portlet-form-button" type="Submit"/>
</form>
-</div>
+</div>
\ No newline at end of file
Modified: sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java
===================================================================
--- sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java 2010-05-03 18:01:39 UTC (rev 2944)
+++ sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java 2010-05-03 18:02:49 UTC (rev 2945)
@@ -38,7 +38,8 @@
public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
{
- String sYourName = (String) request.getParameter("yourname");
+
+ String sYourName = (String) request.getParameter("yourname");
if (sYourName != null)
{
PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/hello.jsp");
Modified: sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser/src/main/webapp/jsp/welcome.jsp
===================================================================
--- sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser/src/main/webapp/jsp/welcome.jsp 2010-05-03 18:01:39 UTC (rev 2944)
+++ sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser/src/main/webapp/jsp/welcome.jsp 2010-05-03 18:02:49 UTC (rev 2945)
@@ -1,45 +1,32 @@
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
- <style type="text/css">
- h1 { color: navy; }
- h2 { color: blue; }
- .portlet-font { font-style: italic }
- .Default { width: 300px }
- body { background: #dedf00; font-size: 15px}
+<style type="text/css">
+ .Default { background:navy }
+ /* .UIWorkingWorkspace { width: 500px } */
</style>
-<div class="portlet-section-header"><h1>Welcome !</h1></div>
+<SCRIPT type="text/javascript">
+<!--
+function change()
+{
+ document.getElementById('SITEBODY-VIEW-BLOCK').innerHTML="la_valeur_que_tu_veux_�crire";
+
+}
-<br/>
+function addHTML()
+{
+ //
+ //document.write("<style type='text/css'> .UIWorkingWorkspace { width: 500px } </style>");
+ // document.write("hello you");
+ //document.open();
+ document.write("User-agent header: " + navigator.userAgent);
+ document.write("<style type=\"text/css\"> .UIWorkingWorkspace { width: 500px } </style>");
+ document.close();
-<div class="portlet-font">
+}
- Welcome on the JSP Hello User portlet,
-my name is JBoss Portal. What's yours ?</div>
-
-<br/>
-
-<div class="portlet-font">Method 1: We simply pass the parameter to the render phase:<br/>
-<a href="<portlet:renderURL><portlet:param name="yourname" value="John Doe"/></portlet:renderURL>">John Doe</a></div>
-
-<br/>
-
-<div class="portlet-font">Method 2: We pass the parameter to the render phase, using valid markup:
-Please check the source code to see the difference with Method 1.
-<portlet:renderURL var="myRenderURL">
- <portlet:param name="yourname" value='John Doe'/>
-</portlet:renderURL>
-<br/>
-<a href="<%= myRenderURL %>">John Doe</a></div>
-
-<br/>
-
-<div class="portlet-font">Method 3: We use a form:<br/>
-
-<portlet:actionURL var="myActionURL"/>
-<form action="<%= myActionURL %>" method="POST">
- <span class="portlet-form-field-label">Name:</span>
- <input class="portlet-form-input-field" type="text" name="yourname"/>
- <input class="portlet-form-button" type="Submit"/>
-</form>
-</div>
+//-->
+</SCRIPT>
+<div class="portlet-section-header">Hidden portlet</div>
+<div onclick="javascript:change()"> Change content by ID </div>
+<div onclick="javascript:addHTML()"> Insert HTML in the code </div>
14 years, 7 months
gatein SVN: r2944 - portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: mvanco(a)redhat.com
Date: 2010-05-03 14:01:39 -0400 (Mon, 03 May 2010)
New Revision: 2944
Modified:
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_07_002_ChangeLanguage.html
Log:
EPP5 UI tests: improved test POR_07_002
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_07_002_ChangeLanguage.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_07_002_ChangeLanguage.html 2010-05-03 16:17:14 UTC (rev 2943)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_07_002_ChangeLanguage.html 2010-05-03 18:01:39 UTC (rev 2944)
@@ -22,6 +22,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Sign in</td>
<td></td>
@@ -42,12 +47,17 @@
<td>gtn</td>
</tr>
<tr>
- <td>clickAndWait</td>
+ <td>click</td>
<td>xpath=//div[@id='UIPortalLoginFormAction']/div/div/div/a</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
<td>link=Change Language</td>
<td></td>
</tr>
@@ -72,16 +82,26 @@
<td></td>
</tr>
<tr>
- <td>clickAndWait</td>
+ <td>waitForElementPresent</td>
<td>link=Apply</td>
<td></td>
</tr>
<tr>
+ <td>click</td>
+ <td>link=Apply</td>
+ <td></td>
+</tr>
+<tr>
<td>echo</td>
<td>--Verify</td>
<td></td>
</tr>
<tr>
+ <td>waitForTextPresent</td>
+ <td>Accueil</td>
+ <td></td>
+</tr>
+<tr>
<td>verifyTextPresent</td>
<td>Accueil</td>
<td></td>
@@ -102,11 +122,6 @@
<td></td>
</tr>
<tr>
- <td>open</td>
- <td>/portal/public/classic</td>
- <td></td>
-</tr>
-<tr>
<td>waitForElementPresent</td>
<td>link=Sign in</td>
<td></td>
@@ -132,11 +147,16 @@
<td>gtn</td>
</tr>
<tr>
- <td>clickAndWait</td>
+ <td>click</td>
<td>xpath=//div[@id='UIPortalLoginFormAction']/div/div/div/a</td>
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Déconnexion</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Déconnexion</td>
<td></td>
@@ -147,8 +167,8 @@
<td></td>
</tr>
<tr>
- <td>open</td>
- <td>/portal/public/classic</td>
+ <td>waitForElementPresent</td>
+ <td>link=Sign in</td>
<td></td>
</tr>
<tr>
@@ -172,16 +192,26 @@
<td>gtn</td>
</tr>
<tr>
- <td>clickAndWait</td>
+ <td>click</td>
<td>xpath=//div[@id='UIPortalLoginFormAction']/div/div/div/a</td>
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
<td>echo</td>
<td>--Change back to English</td>
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Changer la langue</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Changer la langue</td>
<td></td>
@@ -197,16 +227,31 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Appliquer</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAndWait</td>
<td>link=Appliquer</td>
<td></td>
</tr>
<tr>
+ <td>waitForTextPresent</td>
+ <td>Home</td>
+ <td></td>
+</tr>
+<tr>
<td>verifyTextPresent</td>
<td>Home</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>
14 years, 7 months
gatein SVN: r2943 - portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: mvanco(a)redhat.com
Date: 2010-05-03 12:17:14 -0400 (Mon, 03 May 2010)
New Revision: 2943
Modified:
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_24_EditNavigationAndEditPropertiesAndDeleteInGroupNavigation.html
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_30_CreateAndEditPageAndEditSiteLayoutForUser.html
Log:
EPP5 UI tests: improved test SNF_PRL_24, fixed test SNF_PRL_30
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_24_EditNavigationAndEditPropertiesAndDeleteInGroupNavigation.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_24_EditNavigationAndEditPropertiesAndDeleteInGroupNavigation.html 2010-05-03 14:54:51 UTC (rev 2942)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_24_EditNavigationAndEditPropertiesAndDeleteInGroupNavigation.html 2010-05-03 16:17:14 UTC (rev 2943)
@@ -22,6 +22,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Sign in</td>
<td></td>
@@ -42,7 +47,7 @@
<td>gtn</td>
</tr>
<tr>
- <td>clickAndWait</td>
+ <td>click</td>
<td>xpath=//div[@id='UIPortalLoginFormAction']/div/div/div/a</td>
<td></td>
</tr>
@@ -64,7 +69,7 @@
<tr>
<td>clickAt</td>
<td>link=Add Navigation</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
@@ -97,7 +102,7 @@
<td></td>
</tr>
<tr>
- <td>waitForText</td>
+ <td>waitForElementPresent</td>
<td>name</td>
<td></td>
</tr>
@@ -117,6 +122,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//div[@class='CenterHorizontalTabs']//div[@class='NormalTab']//div[@class='MiddleTab']</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>xpath=//div[@class='CenterHorizontalTabs']//div[@class='NormalTab']//div[@class='MiddleTab']</td>
<td></td>
@@ -152,9 +162,14 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Save</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>waitForTextNotPresent</td>
@@ -162,17 +177,17 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>waitForElementPresent</td>
<td>link=Save</td>
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
- <td>link=test_grp_label_24</td>
+ <td>clickAt</td>
+ <td>link=Save</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>waitForElementPresent</td>
<td>link=test_grp_label_24</td>
<td></td>
</tr>
@@ -207,6 +222,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Save</td>
<td></td>
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_30_CreateAndEditPageAndEditSiteLayoutForUser.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_30_CreateAndEditPageAndEditSiteLayoutForUser.html 2010-05-03 14:54:51 UTC (rev 2942)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_30_CreateAndEditPageAndEditSiteLayoutForUser.html 2010-05-03 16:17:14 UTC (rev 2943)
@@ -62,6 +62,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add Gadgets</td>
+ <td></td>
+</tr>
+<tr>
<td>echo</td>
<td>--Add new page in dashboard</td>
<td></td>
14 years, 7 months
gatein SVN: r2942 - in components/wsrp/branches/1.1.x: producer/src/main/java/org/gatein/registration and 6 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-05-03 10:54:51 -0400 (Mon, 03 May 2010)
New Revision: 2942
Modified:
components/wsrp/branches/1.1.x/pom.xml
components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/RegistrationManager.java
components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/RegistrationPolicy.java
components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/impl/RegistrationManagerImpl.java
components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/policies/DefaultRegistrationPolicy.java
components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/policies/RegistrationPolicyWrapper.java
components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/wsrp/producer/RegistrationHandler.java
components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/wsrp/producer/config/impl/AbstractProducerConfigurationService.java
components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/ConsumerGroupTestCase.java
components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/ConsumerTestCase.java
components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/DefaultRegistrationPolicyTestCase.java
components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/RegistrationManagerTestCase.java
components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/RegistrationTestCase.java
components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/wsrp/producer/config/TestRegistrationPolicy.java
Log:
- GTNWSRP-35: refactored registration validation to move towards a more stateless model
+ Adding a registration now requires a check against the producer expectations.
+ Some RegistrationPolicy methods now requires passing producer expectations and the contextual RegistrationManager instead of recording references to these.
This reduces problems with improper state management when the policy is changed and/or reloaded from persistent storage.
+ Trigger listeners after the producer configuration is reloaded so that they can be informed of changes.
- Do not notify listeners if the new policy is equal to the old one.
Modified: components/wsrp/branches/1.1.x/pom.xml
===================================================================
--- components/wsrp/branches/1.1.x/pom.xml 2010-05-03 14:28:01 UTC (rev 2941)
+++ components/wsrp/branches/1.1.x/pom.xml 2010-05-03 14:54:51 UTC (rev 2942)
@@ -49,7 +49,7 @@
<properties>
<version.gatein.pc>2.1.1-GA</version.gatein.pc>
- <version.gatein.common>2.0.2-GA</version.gatein.common>
+ <version.gatein.common>2.0.3-GA-SNAPSHOT</version.gatein.common>
<version.gatein.wci>2.0.1-GA</version.gatein.wci>
<version.jsf>1.2_12</version.jsf>
Modified: components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/RegistrationManager.java
===================================================================
--- components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/RegistrationManager.java 2010-05-03 14:28:01 UTC (rev 2941)
+++ components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/RegistrationManager.java 2010-05-03 14:54:51 UTC (rev 2942)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
@@ -23,6 +23,8 @@
package org.gatein.registration;
+import org.gatein.wsrp.registration.PropertyDescription;
+
import javax.xml.namespace.QName;
import java.util.Collection;
import java.util.Map;
@@ -44,7 +46,7 @@
void setPersistenceManager(RegistrationPersistenceManager persistenceManager);
- Registration addRegistrationTo(String consumerName, Map<QName, Object> registrationProperties, boolean createConsumerIfNeeded)
+ Registration addRegistrationTo(String consumerName, Map<QName, Object> registrationProperties, final Map<QName, ? extends PropertyDescription> expectations, boolean createConsumerIfNeeded)
throws RegistrationException;
Consumer createConsumer(String name) throws RegistrationException, InvalidConsumerDataException;
Modified: components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/RegistrationPolicy.java
===================================================================
--- components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/RegistrationPolicy.java 2010-05-03 14:28:01 UTC (rev 2941)
+++ components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/RegistrationPolicy.java 2010-05-03 14:54:51 UTC (rev 2942)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
@@ -48,10 +48,13 @@
* property value (Object) mappings
* @param consumerIdentity the Consumer identity (as returned by {@link #getConsumerIdFrom(String,
* java.util.Map)}) for which the registration properties must be ascertained
+ * @param expectations a Map containing the registration expectations of the producer
+ * @param manager the RegistrationManager in which context this RegistrationPolicy is invoked
* @throws IllegalArgumentException if any of the registration properties is invalid for the specified Consumer
* @throws RegistrationException if an exception occured in the registration service
*/
- void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity)
+ void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity,
+ final Map<QName, ? extends PropertyDescription> expectations, final RegistrationManager manager)
throws IllegalArgumentException, RegistrationException;
/**
@@ -100,10 +103,11 @@
* names must be unique.
*
* @param consumerName the name of the Consumer as passed during the registration process
+ * @param manager the RegistrationManager in which context this RegistrationPolicy is invoked
* @throws IllegalArgumentException if the specified Consumer name if <code>null</code> or empty
* @throws RegistrationException if an exception occurred in the Registration service
*/
- void validateConsumerName(String consumerName)
+ void validateConsumerName(String consumerName, final RegistrationManager manager)
throws IllegalArgumentException, RegistrationException;
/**
@@ -111,32 +115,10 @@
* created.
*
* @param groupName the name of the ConsumerGroup to be created
+ * @param manager the RegistrationManager in which context this RegistrationPolicy is invoked
* @throws IllegalArgumentException if the specified ConsumerGroup name if <code>null</code> or empty
* @throws RegistrationException if an exception occurred in the Registration service
*/
- void validateConsumerGroupName(String groupName) throws IllegalArgumentException, RegistrationException;
+ void validateConsumerGroupName(String groupName, RegistrationManager manager) throws IllegalArgumentException, RegistrationException;
- /**
- * Retrieves the RegistrationManager with which this RegistrationPolicy is associated.
- *
- * @return the RegistrationManager with which this RegistrationPolicy is associated.
- */
- RegistrationManager getManager();
-
- /**
- * Associates this RegistrationPolicy with the specified RegistrationManager. This method should not be called
- * directly by client code as it used in the wiring process of the Registration service.
- *
- * @param manager the RegistrationManager with which this RegistrationPolicy should be associated.
- */
- void setManager(RegistrationManager manager);
-
- /**
- * Define what the expectations are as far as acceptable registration properties go.
- *
- * @param registrationPropertyDescriptions
- * a map of containing the description of expected registrations
- * @since 2.6.3
- */
- void setExpectations(Map<QName, ? extends PropertyDescription> registrationPropertyDescriptions);
}
Modified: components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/impl/RegistrationManagerImpl.java
===================================================================
--- components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/impl/RegistrationManagerImpl.java 2010-05-03 14:28:01 UTC (rev 2941)
+++ components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/impl/RegistrationManagerImpl.java 2010-05-03 14:54:51 UTC (rev 2942)
@@ -68,7 +68,6 @@
public void setPolicy(RegistrationPolicy policy)
{
this.policy = policy;
- policy.setManager(this);
}
public RegistrationPersistenceManager getPersistenceManager()
@@ -81,14 +80,14 @@
this.persistenceManager = persistenceManager;
}
- public Registration addRegistrationTo(String consumerName, Map<QName, Object> registrationProperties, boolean createConsumerIfNeeded)
+ public Registration addRegistrationTo(String consumerName, Map<QName, Object> registrationProperties, final Map<QName, ? extends PropertyDescription> expectations, boolean createConsumerIfNeeded)
throws RegistrationException
{
// the policy determines the identity of the consumer based on the given information (note that this might be obsoleted by using WS-Security)
String identity = policy.getConsumerIdFrom(consumerName, registrationProperties);
// validate the registration information
- policy.validateRegistrationDataFor(registrationProperties, identity);
+ policy.validateRegistrationDataFor(registrationProperties, identity, expectations, this);
Consumer consumer = getOrCreateConsumer(identity, createConsumerIfNeeded, consumerName);
@@ -105,7 +104,7 @@
public Consumer createConsumer(String name) throws RegistrationException, InvalidConsumerDataException
{
// check with policy if we allow the consumer
- policy.validateConsumerName(name);
+ policy.validateConsumerName(name, this);
String identity = policy.getConsumerIdFrom(name, Collections.<QName, Object>emptyMap());
@@ -127,13 +126,13 @@
// check with the policy if we allow the group name in case we need to create it
if (createGroupIfNeeded)
{
- policy.validateConsumerGroupName(groupName);
+ policy.validateConsumerGroupName(groupName, this);
}
// check with policy if we allow the consumer name in case we need to create it
if (createConsumerIfNeeded)
{
- policy.validateConsumerName(consumerName);
+ policy.validateConsumerName(consumerName, this);
}
ConsumerGroup group = getConsumerGroup(groupName);
@@ -170,7 +169,7 @@
public ConsumerGroup createConsumerGroup(String groupName) throws RegistrationException
{
// check with the policy if we allow the group
- policy.validateConsumerGroupName(groupName);
+ policy.validateConsumerGroupName(groupName, this);
return persistenceManager.createConsumerGroup(groupName);
}
@@ -330,7 +329,11 @@
*/
public void propertiesHaveChanged(Map<QName, ? extends PropertyDescription> registrationProperties)
{
- log.debug("Registration properties have changed, existing registrations will be invalidated...");
+ if (log.isDebugEnabled())
+ {
+ log.debug("Registration properties have changed, existing registrations will be invalidated...");
+ }
+
Collection registrations = persistenceManager.getRegistrations();
for (Object registration : registrations)
{
@@ -345,9 +348,6 @@
// reg.clearAssociatedState(); //todo: do we need to clear the associated state? If we do, should we wait until current operations are done?
}
-
- // make policy aware of new registration properties
- policy.setExpectations(registrationProperties);
}
/**
Modified: components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/policies/DefaultRegistrationPolicy.java
===================================================================
--- components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/policies/DefaultRegistrationPolicy.java 2010-05-03 14:28:01 UTC (rev 2941)
+++ components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/policies/DefaultRegistrationPolicy.java 2010-05-03 14:54:51 UTC (rev 2942)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
@@ -52,25 +52,35 @@
*/
public class DefaultRegistrationPolicy implements RegistrationPolicy
{
- private RegistrationManager manager;
private RegistrationPropertyValidator validator;
- private Map<QName, ? extends PropertyDescription> expectations;
private static final Logger log = LoggerFactory.getLogger(DefaultRegistrationPolicy.class);
-
- public RegistrationManager getManager()
+ @Override
+ public boolean equals(Object o)
{
- return manager;
- }
+ if (this == o)
+ {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass())
+ {
+ return false;
+ }
- public void setManager(RegistrationManager manager)
- {
- this.manager = manager;
+ DefaultRegistrationPolicy that = (DefaultRegistrationPolicy)o;
+
+ if (!validator.equals(that.validator))
+ {
+ return false;
+ }
+
+ return true;
}
- public void setExpectations(Map<QName, ? extends PropertyDescription> registrationPropertyDescriptions)
+ @Override
+ public int hashCode()
{
- this.expectations = registrationPropertyDescriptions;
+ return validator.hashCode();
}
/**
@@ -80,7 +90,8 @@
* @throws DuplicateRegistrationException if a Consumer with the same identity has already registered with the same
* registration properties.
*/
- public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity)
+ public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity,
+ final Map<QName, ? extends PropertyDescription> expectations, final RegistrationManager manager)
throws IllegalArgumentException, RegistrationException
{
ParameterValidation.throwIllegalArgExceptionIfNull(registrationProperties, "Registration properties");
@@ -169,7 +180,7 @@
}
/** Rejects registration if a Consumer with the specified name already exists. */
- public void validateConsumerName(String consumerName) throws IllegalArgumentException, RegistrationException
+ public void validateConsumerName(String consumerName, final RegistrationManager manager) throws IllegalArgumentException, RegistrationException
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerName, "Consumer name", null);
@@ -181,7 +192,7 @@
}
/** Rejects name if a ConsumerGroup with the specified name already exists. */
- public void validateConsumerGroupName(String groupName) throws IllegalArgumentException, RegistrationException
+ public void validateConsumerGroupName(String groupName, RegistrationManager manager) throws IllegalArgumentException, RegistrationException
{
// this is already the behavior in the RegistrationPersistenceManager so no need to do anything
}
Modified: components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/policies/RegistrationPolicyWrapper.java
===================================================================
--- components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/policies/RegistrationPolicyWrapper.java 2010-05-03 14:28:01 UTC (rev 2941)
+++ components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/registration/policies/RegistrationPolicyWrapper.java 2010-05-03 14:54:51 UTC (rev 2942)
@@ -52,10 +52,10 @@
return delegate;
}
- public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity)
+ public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity, final Map<QName, ? extends PropertyDescription> expectations, final RegistrationManager manager)
throws IllegalArgumentException, RegistrationException
{
- delegate.validateRegistrationDataFor(registrationProperties, consumerIdentity);
+ delegate.validateRegistrationDataFor(registrationProperties, consumerIdentity, expectations, manager);
}
public String createRegistrationHandleFor(String registrationId)
@@ -76,33 +76,18 @@
return delegate.getConsumerIdFrom(sanitizeConsumerName(consumerName), registrationProperties);
}
- public void validateConsumerName(String consumerName)
+ public void validateConsumerName(String consumerName, final RegistrationManager manager)
throws IllegalArgumentException, RegistrationException
{
- delegate.validateConsumerName(consumerName);
+ delegate.validateConsumerName(consumerName, manager);
}
- public void validateConsumerGroupName(String groupName)
+ public void validateConsumerGroupName(String groupName, RegistrationManager manager)
throws IllegalArgumentException, RegistrationException
{
- delegate.validateConsumerGroupName(groupName);
+ delegate.validateConsumerGroupName(groupName, manager);
}
- public RegistrationManager getManager()
- {
- return delegate.getManager();
- }
-
- public void setManager(RegistrationManager manager)
- {
- delegate.setManager(manager);
- }
-
- public void setExpectations(Map<QName, ? extends PropertyDescription> registrationPropertyDescriptions)
- {
- delegate.setExpectations(registrationPropertyDescriptions);
- }
-
static String sanitizeConsumerName(String consumerName)
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerName, "Consumer name", null);
Modified: components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/wsrp/producer/RegistrationHandler.java
===================================================================
--- components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/wsrp/producer/RegistrationHandler.java 2010-05-03 14:28:01 UTC (rev 2941)
+++ components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/wsrp/producer/RegistrationHandler.java 2010-05-03 14:54:51 UTC (rev 2942)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
@@ -71,7 +71,8 @@
public RegistrationContext register(RegistrationData registrationData) throws MissingParameters, OperationFailed
{
- if (producer.getProducerRegistrationRequirements().isRegistrationRequired())
+ ProducerRegistrationRequirements registrationRequirements = producer.getProducerRegistrationRequirements();
+ if (registrationRequirements.isRegistrationRequired())
{
WSRPExceptionFactory.throwOperationFailedIfValueIsMissing(registrationData, "RegistrationData");
String consumerName = registrationData.getConsumerName();
@@ -88,7 +89,7 @@
// check that the consumer agent is valid before trying to register
RegistrationUtils.validateConsumerAgent(consumerAgent);
- registration = producer.getRegistrationManager().addRegistrationTo(consumerName, createRegistrationProperties(registrationData), true);
+ registration = producer.getRegistrationManager().addRegistrationTo(consumerName, createRegistrationProperties(registrationData), registrationRequirements.getRegistrationProperties(), true);
updateRegistrationInformation(registration, registrationData);
}
catch (Exception e)
@@ -218,7 +219,7 @@
// check that the given registration properties are acceptable according to expectations and policy
ProducerRegistrationRequirements req = producer.getProducerRegistrationRequirements();
- req.getPolicy().validateRegistrationDataFor(properties, consumerName);
+ req.getPolicy().validateRegistrationDataFor(properties, consumerName, req.getRegistrationProperties(), producer.getRegistrationManager());
registration.updateProperties(properties);
updateRegistrationInformation(registration, registrationData);
Modified: components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/wsrp/producer/config/impl/AbstractProducerConfigurationService.java
===================================================================
--- components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/wsrp/producer/config/impl/AbstractProducerConfigurationService.java 2010-05-03 14:28:01 UTC (rev 2941)
+++ components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/wsrp/producer/config/impl/AbstractProducerConfigurationService.java 2010-05-03 14:54:51 UTC (rev 2942)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
@@ -67,12 +67,13 @@
// reload
loadConfiguration();
- // restore listeners
+ // restore listeners and trigger them
if (listeners != null)
{
for (ProducerConfigurationChangeListener listener : listeners)
{
configuration.addChangeListener(listener);
+ listener.usingStrictModeChangedTo(configuration.isUsingStrictMode());
}
}
registrationRequirements = configuration.getRegistrationRequirements();
@@ -83,6 +84,7 @@
for (RegistrationPropertyChangeListener listener : propertyListeners)
{
registrationRequirements.addRegistrationPropertyChangeListener(listener);
+ listener.propertiesHaveChanged(registrationRequirements.getRegistrationProperties());
}
}
if (policyListeners != null)
@@ -90,6 +92,7 @@
for (RegistrationPolicyChangeListener listener : policyListeners)
{
registrationRequirements.addRegistrationPolicyChangeListener(listener);
+ listener.policyUpdatedTo(registrationRequirements.getPolicy());
}
}
}
Modified: components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
===================================================================
--- components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2010-05-03 14:28:01 UTC (rev 2941)
+++ components/wsrp/branches/1.1.x/producer/src/main/java/org/gatein/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2010-05-03 14:54:51 UTC (rev 2942)
@@ -260,22 +260,23 @@
public void setPolicy(RegistrationPolicy policy)
{
- this.policy = policy;
-
- if (policy != null)
+ if (ParameterValidation.isOldAndNewDifferent(this.policy, policy))
{
- policyClassName = policy.getClass().getName();
+ this.policy = policy;
- if (policy instanceof DefaultRegistrationPolicy)
+ if (policy != null)
{
- DefaultRegistrationPolicy registrationPolicy = (DefaultRegistrationPolicy)policy;
- validatorClassName = registrationPolicy.getValidator().getClass().getName();
+ policyClassName = policy.getClass().getName();
+
+ if (policy instanceof DefaultRegistrationPolicy)
+ {
+ DefaultRegistrationPolicy registrationPolicy = (DefaultRegistrationPolicy)policy;
+ validatorClassName = registrationPolicy.getValidator().getClass().getName();
+ }
}
- this.policy.setExpectations(registrationProperties);
+ notifyRegistrationPolicyChangeListeners();
}
-
- notifyRegistrationPolicyChangeListeners();
}
public RegistrationPolicy getPolicy()
Modified: components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/ConsumerGroupTestCase.java
===================================================================
--- components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/ConsumerGroupTestCase.java 2010-05-03 14:28:01 UTC (rev 2941)
+++ components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/ConsumerGroupTestCase.java 2010-05-03 14:54:51 UTC (rev 2942)
@@ -1,25 +1,25 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.gatein.registration;
@@ -46,7 +46,6 @@
RegistrationPolicy policy = new DefaultRegistrationPolicy();
manager.setPolicy(policy);
manager.setPersistenceManager(new RegistrationPersistenceManagerImpl());
- policy.setManager(manager);
group = manager.createConsumerGroup(NAME);
}
Modified: components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/ConsumerTestCase.java
===================================================================
--- components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/ConsumerTestCase.java 2010-05-03 14:28:01 UTC (rev 2941)
+++ components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/ConsumerTestCase.java 2010-05-03 14:54:51 UTC (rev 2942)
@@ -1,25 +1,25 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.gatein.registration;
@@ -27,6 +27,9 @@
import org.gatein.registration.impl.RegistrationManagerImpl;
import org.gatein.registration.impl.RegistrationPersistenceManagerImpl;
import org.gatein.registration.policies.DefaultRegistrationPolicy;
+import org.gatein.registration.policies.DefaultRegistrationPropertyValidator;
+import org.gatein.wsrp.WSRPConstants;
+import org.gatein.wsrp.registration.RegistrationPropertyDescription;
import javax.xml.namespace.QName;
import java.util.Collections;
@@ -42,14 +45,15 @@
{
private Consumer consumer;
private RegistrationManager manager;
+ private static final Map<QName, RegistrationPropertyDescription> EMPTY_EXPECTATIONS = Collections.emptyMap();
protected void setUp() throws Exception
{
manager = new RegistrationManagerImpl();
- RegistrationPolicy policy = new DefaultRegistrationPolicy();
+ DefaultRegistrationPolicy policy = new DefaultRegistrationPolicy();
+ policy.setValidator(new DefaultRegistrationPropertyValidator());
manager.setPolicy(policy);
manager.setPersistenceManager(new RegistrationPersistenceManagerImpl());
- policy.setManager(manager);
consumer = manager.createConsumer("name");
}
@@ -65,7 +69,7 @@
String name = consumer.getName();
// adding a registration that isn't validated doesn't change the status
- Registration registration = manager.addRegistrationTo(name, Collections.<QName, Object>emptyMap(), false);
+ Registration registration = manager.addRegistrationTo(name, Collections.<QName, Object>emptyMap(), EMPTY_EXPECTATIONS, false);
assertEquals(RegistrationStatus.PENDING, consumer.getStatus());
// but the consumer's status should become valid if the registration becomes so as well
@@ -75,8 +79,12 @@
// adding a new registration makes the consumer's status pending
// need to change the registration props to register this consumer again
Map<QName, Object> props = new HashMap<QName, Object>(1);
- props.put(new QName("prop"), "value");
- registration = manager.addRegistrationTo(name, props, false);
+ QName propName = new QName("prop");
+ props.put(propName, "value");
+ // need to change the expectations to allow the new registration property
+ Map<QName, RegistrationPropertyDescription> expectations = new HashMap<QName, RegistrationPropertyDescription>();
+ expectations.put(propName, new RegistrationPropertyDescription(propName, WSRPConstants.XSD_STRING));
+ registration = manager.addRegistrationTo(name, props, expectations, false);
assertEquals(2, consumer.getRegistrations().size());
assertEquals(RegistrationStatus.PENDING, consumer.getStatus());
Modified: components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/DefaultRegistrationPolicyTestCase.java
===================================================================
--- components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/DefaultRegistrationPolicyTestCase.java 2010-05-03 14:28:01 UTC (rev 2941)
+++ components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/DefaultRegistrationPolicyTestCase.java 2010-05-03 14:54:51 UTC (rev 2942)
@@ -1,5 +1,24 @@
/*
- * Copyright (c) 2007, Your Corporation. All Rights Reserved.
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.gatein.registration;
@@ -30,6 +49,7 @@
private static final QName PROP1 = new QName("prop1");
private static final QName PROP2 = new QName("prop2");
private static final QName PROP3 = new QName("prop3");
+ private RegistrationManager manager;
@Override
protected void setUp() throws Exception
@@ -38,26 +58,23 @@
policy.setValidator(new DefaultRegistrationPropertyValidator());
- RegistrationManager manager = new RegistrationManagerImpl();
+ manager = new RegistrationManagerImpl();
manager.setPolicy(policy);
manager.setPersistenceManager(new RegistrationPersistenceManagerImpl());
manager.createConsumer(CONSUMER);
- policy.setManager(manager);
-
registrationProperties = new HashMap<QName, Object>();
registrationProperties.put(PROP1, "value1");
registrationProperties.put(PROP2, "value2");
expectations = new HashMap<QName, PropertyDescription>();
- policy.setExpectations(expectations);
}
public void testValidateRegistrationDataForNull() throws RegistrationException
{
try
{
- policy.validateRegistrationDataFor(null, "foo");
+ policy.validateRegistrationDataFor(null, "foo", expectations, manager);
fail("null data cannot be validated");
}
catch (IllegalArgumentException e)
@@ -67,7 +84,7 @@
try
{
- policy.validateRegistrationDataFor(Collections.<QName, Object>emptyMap(), null);
+ policy.validateRegistrationDataFor(Collections.<QName, Object>emptyMap(), null, expectations, manager);
fail("null data cannot be validated");
}
catch (IllegalArgumentException e)
@@ -80,7 +97,7 @@
{
try
{
- policy.validateRegistrationDataFor(Collections.<QName, Object>emptyMap(), "foo");
+ policy.validateRegistrationDataFor(Collections.<QName, Object>emptyMap(), "foo", expectations, manager);
}
catch (RegistrationException e)
{
@@ -96,7 +113,7 @@
try
{
- policy.validateRegistrationDataFor(registrationProperties, CONSUMER);
+ policy.validateRegistrationDataFor(registrationProperties, CONSUMER, expectations, manager);
fail("Missing prop3 should have been detected");
}
catch (RegistrationException e)
@@ -111,7 +128,7 @@
try
{
- policy.validateRegistrationDataFor(registrationProperties, CONSUMER);
+ policy.validateRegistrationDataFor(registrationProperties, CONSUMER, expectations, manager);
fail("Extra prop2 should have been detected");
}
catch (RegistrationException e)
@@ -129,7 +146,7 @@
try
{
- policy.validateRegistrationDataFor(registrationProperties, CONSUMER);
+ policy.validateRegistrationDataFor(registrationProperties, CONSUMER, expectations, manager);
fail("Should have detected null value for prop1");
}
catch (RegistrationException e)
Modified: components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/RegistrationManagerTestCase.java
===================================================================
--- components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/RegistrationManagerTestCase.java 2010-05-03 14:28:01 UTC (rev 2941)
+++ components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/RegistrationManagerTestCase.java 2010-05-03 14:54:51 UTC (rev 2942)
@@ -1,25 +1,25 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.gatein.registration;
@@ -27,6 +27,9 @@
import org.gatein.registration.impl.RegistrationManagerImpl;
import org.gatein.registration.impl.RegistrationPersistenceManagerImpl;
import org.gatein.registration.policies.DefaultRegistrationPolicy;
+import org.gatein.registration.policies.DefaultRegistrationPropertyValidator;
+import org.gatein.wsrp.WSRPConstants;
+import org.gatein.wsrp.registration.RegistrationPropertyDescription;
import javax.xml.namespace.QName;
import java.util.Collection;
@@ -43,32 +46,38 @@
private RegistrationManager manager;
private Map<QName, Object> registrationProperties;
+ private Map<QName, RegistrationPropertyDescription> expectations;
protected void setUp() throws Exception
{
manager = new RegistrationManagerImpl();
- // todo: policy will need access to registration configuration information to validate properties
- RegistrationPolicy policy = new DefaultRegistrationPolicy();
+
+ DefaultRegistrationPolicy policy = new DefaultRegistrationPolicy();
+ policy.setValidator(new DefaultRegistrationPropertyValidator());
manager.setPolicy(policy);
manager.setPersistenceManager(new RegistrationPersistenceManagerImpl());
- policy.setManager(manager);
//todo: registration properties setup will need to be updated when property validation is implemented
+ QName prop1Name = new QName("prop1");
+ QName prop2Name = new QName("prop2");
registrationProperties = new HashMap<QName, Object>();
- registrationProperties.put(new QName("prop1"), "value1");
- registrationProperties.put(new QName("prop2"), "value2");
+ registrationProperties.put(prop1Name, "value1");
+ registrationProperties.put(prop2Name, "value2");
+
+ expectations = new HashMap<QName, RegistrationPropertyDescription>();
+ expectations.put(prop1Name, new RegistrationPropertyDescription(prop1Name, WSRPConstants.XSD_STRING));
+ expectations.put(prop2Name, new RegistrationPropertyDescription(prop2Name, WSRPConstants.XSD_STRING));
}
public void testPolicy()
{
RegistrationPolicy policy = manager.getPolicy();
assertNotNull(policy);
- assertEquals(manager, policy.getManager());
}
public void testAddRegistrationTo() throws Exception
{
- Registration registration = manager.addRegistrationTo("consumerName", registrationProperties, true);
+ Registration registration = manager.addRegistrationTo("consumerName", registrationProperties, expectations, true);
assertNotNull(registration);
assertNotNull(registration.getPersistentKey());
@@ -85,7 +94,7 @@
{
try
{
- manager.addRegistrationTo("consumerName", registrationProperties, false);
+ manager.addRegistrationTo("consumerName", registrationProperties, expectations, false);
fail("Should have failed: consumer does not exist");
}
catch (NoSuchRegistrationException expected)
@@ -142,7 +151,6 @@
}
};
manager.setPolicy(policy);
- policy.setManager(manager);
String name = "name";
Consumer consumer = manager.createConsumer(name);
@@ -286,7 +294,7 @@
Consumer consumer = manager.addConsumerToGroupNamed(consumerName, groupName, true, true);
String consumerIdentity = consumer.getId();
- Registration reg = manager.addRegistrationTo(consumerName, registrationProperties, false);
+ Registration reg = manager.addRegistrationTo(consumerName, registrationProperties, expectations, false);
String handle = reg.getRegistrationHandle();
ConsumerGroup group = manager.getConsumerGroup(groupName);
@@ -302,7 +310,7 @@
Consumer consumer = manager.createConsumer(consumerName);
String consumerIdentity = consumer.getId();
- Registration reg = manager.addRegistrationTo(consumerName, registrationProperties, false);
+ Registration reg = manager.addRegistrationTo(consumerName, registrationProperties, expectations, false);
String handle = reg.getRegistrationHandle();
manager.removeConsumer(consumer);
@@ -315,7 +323,7 @@
String consumerName = "consumer";
Consumer consumer = manager.createConsumer(consumerName);
- Registration reg = manager.addRegistrationTo(consumerName, registrationProperties, false);
+ Registration reg = manager.addRegistrationTo(consumerName, registrationProperties, expectations, false);
String handle = reg.getRegistrationHandle();
assertTrue(consumer.getRegistrations().contains(reg));
@@ -336,30 +344,35 @@
String consumerName = "consumer";
Consumer consumer = manager.createConsumer(consumerName);
- Registration reg = manager.addRegistrationTo(consumerName, registrationProperties, false);
+ Registration reg = manager.addRegistrationTo(consumerName, registrationProperties, expectations, false);
String handle = reg.getRegistrationHandle();
- // todo: this won't work anymore when properties validation is implemented
- registrationProperties.put(new QName("prop3"), "value3");
- Registration r2 = manager.addRegistrationTo(consumerName, registrationProperties, false);
-
RegistrationStatus status = consumer.getStatus();
-
manager.removeRegistration(handle);
// consumer status shouldn't have changed
assertEquals(status, consumer.getStatus());
- // should still be able to retrieve consumer from r2 handle
- assertEquals(consumer, manager.getConsumerFor(r2.getRegistrationHandle()));
-
- // ... but not from handle
+ // Shouldn't be possible to retrieve consumer from handle anymore
assertNull(manager.getConsumerFor(handle));
}
public void testAddRegistrationWithInvalidRegistrationProperties() throws Exception
{
- // todo: implement
+ String consumerName = "consumer";
+ Consumer consumer = manager.createConsumer(consumerName);
+
+ registrationProperties.put(new QName("prop3"), "value3");
+ try
+ {
+ manager.addRegistrationTo(consumerName, registrationProperties, expectations, false);
+ fail("Expectations does not contain prop3, so trying to register with a value for it should fail");
+ }
+ catch (RegistrationException e)
+ {
+ assertTrue(e.getMessage().contains("prop3"));
+ assertEquals(0, consumer.getRegistrations().size());
+ }
}
public void testRemoveInexistentRegistration() throws RegistrationException
@@ -407,8 +420,8 @@
manager.createConsumer("c2");
manager.addConsumerToGroupNamed("c1g1", "g1", true, true);
manager.createConsumerGroup("g2");
- Registration r1 = manager.addRegistrationTo("c1", registrationProperties, false);
- Registration r2 = manager.addRegistrationTo("c3", registrationProperties, true);
+ Registration r1 = manager.addRegistrationTo("c1", registrationProperties, expectations, false);
+ Registration r2 = manager.addRegistrationTo("c3", registrationProperties, expectations, true);
manager.clear();
assertTrue(manager.getConsumerGroups().isEmpty());
Modified: components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/RegistrationTestCase.java
===================================================================
--- components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/RegistrationTestCase.java 2010-05-03 14:28:01 UTC (rev 2941)
+++ components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/registration/RegistrationTestCase.java 2010-05-03 14:54:51 UTC (rev 2942)
@@ -1,25 +1,25 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.gatein.registration;
@@ -27,6 +27,9 @@
import org.gatein.registration.impl.RegistrationManagerImpl;
import org.gatein.registration.impl.RegistrationPersistenceManagerImpl;
import org.gatein.registration.policies.DefaultRegistrationPolicy;
+import org.gatein.wsrp.WSRPConstants;
+import org.gatein.wsrp.registration.PropertyDescription;
+import org.gatein.wsrp.registration.RegistrationPropertyDescription;
import javax.xml.namespace.QName;
import java.util.HashMap;
@@ -47,20 +50,25 @@
RegistrationManager manager = new RegistrationManagerImpl();
RegistrationPolicy policy = new DefaultRegistrationPolicy()
{
- public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity) throws IllegalArgumentException, RegistrationException, DuplicateRegistrationException
+ public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity, final Map<QName, ? extends PropertyDescription> expectations, final RegistrationManager manager) throws IllegalArgumentException, RegistrationException, DuplicateRegistrationException
{
// accept any registration data here
}
};
manager.setPolicy(policy);
manager.setPersistenceManager(new RegistrationPersistenceManagerImpl());
- policy.setManager(manager);
registrationProperties = new HashMap<QName, Object>();
- registrationProperties.put(new QName("prop1"), "value1");
- registrationProperties.put(new QName("prop2"), "value2");
+ QName prop1Name = new QName("prop1");
+ registrationProperties.put(prop1Name, "value1");
+ QName prop2Name = new QName("prop2");
+ registrationProperties.put(prop2Name, "value2");
- registration = manager.addRegistrationTo("name", registrationProperties, true);
+ Map<QName, RegistrationPropertyDescription> expectations = new HashMap<QName, RegistrationPropertyDescription>();
+ expectations.put(prop1Name, new RegistrationPropertyDescription(prop1Name, WSRPConstants.XSD_STRING));
+ expectations.put(prop2Name, new RegistrationPropertyDescription(prop2Name, WSRPConstants.XSD_STRING));
+
+ registration = manager.addRegistrationTo("name", registrationProperties, expectations, true);
}
public void testGetPropertiesIsUnmodifiable()
Modified: components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/wsrp/producer/config/TestRegistrationPolicy.java
===================================================================
--- components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/wsrp/producer/config/TestRegistrationPolicy.java 2010-05-03 14:28:01 UTC (rev 2941)
+++ components/wsrp/branches/1.1.x/producer/src/test/java/org/gatein/wsrp/producer/config/TestRegistrationPolicy.java 2010-05-03 14:54:51 UTC (rev 2942)
@@ -1,25 +1,25 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2007, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.gatein.wsrp.producer.config;
@@ -39,7 +39,7 @@
*/
public class TestRegistrationPolicy implements RegistrationPolicy
{
- public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity) throws IllegalArgumentException, RegistrationException
+ public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity, final Map<QName, ? extends PropertyDescription> expectations, final RegistrationManager manager) throws IllegalArgumentException, RegistrationException
{
}
@@ -58,24 +58,12 @@
return null;
}
- public void validateConsumerName(String consumerName) throws IllegalArgumentException, RegistrationException
+ public void validateConsumerName(String consumerName, final RegistrationManager manager) throws IllegalArgumentException, RegistrationException
{
}
- public void validateConsumerGroupName(String groupName) throws IllegalArgumentException, RegistrationException
+ public void validateConsumerGroupName(String groupName, RegistrationManager manager) throws IllegalArgumentException, RegistrationException
{
}
- public RegistrationManager getManager()
- {
- return null;
- }
-
- public void setManager(RegistrationManager manager)
- {
- }
-
- public void setExpectations(Map<QName, ? extends PropertyDescription> registrationPropertyDescriptions)
- {
- }
}
14 years, 7 months
gatein SVN: r2941 - in components/wsrp/trunk: admin-gui and 8 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-05-03 10:28:01 -0400 (Mon, 03 May 2010)
New Revision: 2941
Modified:
components/wsrp/trunk/admin-gui/pom.xml
components/wsrp/trunk/api/pom.xml
components/wsrp/trunk/common/pom.xml
components/wsrp/trunk/consumer/pom.xml
components/wsrp/trunk/hibernate-impl/pom.xml
components/wsrp/trunk/pom.xml
components/wsrp/trunk/producer/pom.xml
components/wsrp/trunk/test/pom.xml
components/wsrp/trunk/wsrp-producer-war/pom.xml
components/wsrp/trunk/wsrp1-ws/pom.xml
Log:
- Changed version to 2.0.0-Alpha-01-SNAPSHOT.
Modified: components/wsrp/trunk/admin-gui/pom.xml
===================================================================
--- components/wsrp/trunk/admin-gui/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
+++ components/wsrp/trunk/admin-gui/pom.xml 2010-05-03 14:28:01 UTC (rev 2941)
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.2-GA-SNAPSHOT</version>
+ <version>2.0.0-Alpha-01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-admin-gui</artifactId>
Modified: components/wsrp/trunk/api/pom.xml
===================================================================
--- components/wsrp/trunk/api/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
+++ components/wsrp/trunk/api/pom.xml 2010-05-03 14:28:01 UTC (rev 2941)
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.2-GA-SNAPSHOT</version>
+ <version>2.0.0-Alpha-01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-integration-api</artifactId>
Modified: components/wsrp/trunk/common/pom.xml
===================================================================
--- components/wsrp/trunk/common/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
+++ components/wsrp/trunk/common/pom.xml 2010-05-03 14:28:01 UTC (rev 2941)
@@ -20,11 +20,12 @@
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.2-GA-SNAPSHOT</version>
+ <version>2.0.0-Alpha-01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-common</artifactId>
Modified: components/wsrp/trunk/consumer/pom.xml
===================================================================
--- components/wsrp/trunk/consumer/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
+++ components/wsrp/trunk/consumer/pom.xml 2010-05-03 14:28:01 UTC (rev 2941)
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.2-GA-SNAPSHOT</version>
+ <version>2.0.0-Alpha-01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-consumer</artifactId>
Modified: components/wsrp/trunk/hibernate-impl/pom.xml
===================================================================
--- components/wsrp/trunk/hibernate-impl/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
+++ components/wsrp/trunk/hibernate-impl/pom.xml 2010-05-03 14:28:01 UTC (rev 2941)
@@ -22,13 +22,14 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.2-GA-SNAPSHOT</version>
+ <version>2.0.0-Alpha-01-SNAPSHOT</version>
</parent>
<groupId>org.gatein.wsrp</groupId>
Modified: components/wsrp/trunk/pom.xml
===================================================================
--- components/wsrp/trunk/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
+++ components/wsrp/trunk/pom.xml 2010-05-03 14:28:01 UTC (rev 2941)
@@ -30,7 +30,7 @@
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.2-GA-SNAPSHOT</version>
+ <version>2.0.0-Alpha-01-SNAPSHOT</version>
<packaging>pom</packaging>
Modified: components/wsrp/trunk/producer/pom.xml
===================================================================
--- components/wsrp/trunk/producer/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
+++ components/wsrp/trunk/producer/pom.xml 2010-05-03 14:28:01 UTC (rev 2941)
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.2-GA-SNAPSHOT</version>
+ <version>2.0.0-Alpha-01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-producer-lib</artifactId>
Modified: components/wsrp/trunk/test/pom.xml
===================================================================
--- components/wsrp/trunk/test/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
+++ components/wsrp/trunk/test/pom.xml 2010-05-03 14:28:01 UTC (rev 2941)
@@ -22,11 +22,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.2-GA-SNAPSHOT</version>
+ <version>2.0.0-Alpha-01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/wsrp/trunk/wsrp-producer-war/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
+++ components/wsrp/trunk/wsrp-producer-war/pom.xml 2010-05-03 14:28:01 UTC (rev 2941)
@@ -22,11 +22,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.2-GA-SNAPSHOT</version>
+ <version>2.0.0-Alpha-01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/wsrp/trunk/wsrp1-ws/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp1-ws/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
+++ components/wsrp/trunk/wsrp1-ws/pom.xml 2010-05-03 14:28:01 UTC (rev 2941)
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.2-GA-SNAPSHOT</version>
+ <version>2.0.0-Alpha-01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wsrp1-ws</artifactId>
14 years, 7 months
gatein SVN: r2940 - in components/wsrp/branches/1.1.x: admin-gui and 8 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-05-03 10:26:44 -0400 (Mon, 03 May 2010)
New Revision: 2940
Modified:
components/wsrp/branches/1.1.x/admin-gui/pom.xml
components/wsrp/branches/1.1.x/api/pom.xml
components/wsrp/branches/1.1.x/common/pom.xml
components/wsrp/branches/1.1.x/consumer/pom.xml
components/wsrp/branches/1.1.x/hibernate-impl/pom.xml
components/wsrp/branches/1.1.x/pom.xml
components/wsrp/branches/1.1.x/producer/pom.xml
components/wsrp/branches/1.1.x/test/pom.xml
components/wsrp/branches/1.1.x/wsrp-producer-war/pom.xml
components/wsrp/branches/1.1.x/wsrp1-ws/pom.xml
Log:
- Switched version to 1.1.2-GA-SNAPSHOT.
Modified: components/wsrp/branches/1.1.x/admin-gui/pom.xml
===================================================================
--- components/wsrp/branches/1.1.x/admin-gui/pom.xml 2010-05-03 13:56:42 UTC (rev 2939)
+++ components/wsrp/branches/1.1.x/admin-gui/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.1-GA</version>
+ <version>1.1.2-GA-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-admin-gui</artifactId>
Modified: components/wsrp/branches/1.1.x/api/pom.xml
===================================================================
--- components/wsrp/branches/1.1.x/api/pom.xml 2010-05-03 13:56:42 UTC (rev 2939)
+++ components/wsrp/branches/1.1.x/api/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.1-GA</version>
+ <version>1.1.2-GA-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-integration-api</artifactId>
Modified: components/wsrp/branches/1.1.x/common/pom.xml
===================================================================
--- components/wsrp/branches/1.1.x/common/pom.xml 2010-05-03 13:56:42 UTC (rev 2939)
+++ components/wsrp/branches/1.1.x/common/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
@@ -20,11 +20,12 @@
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.1-GA</version>
+ <version>1.1.2-GA-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-common</artifactId>
Modified: components/wsrp/branches/1.1.x/consumer/pom.xml
===================================================================
--- components/wsrp/branches/1.1.x/consumer/pom.xml 2010-05-03 13:56:42 UTC (rev 2939)
+++ components/wsrp/branches/1.1.x/consumer/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.1-GA</version>
+ <version>1.1.2-GA-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-consumer</artifactId>
Modified: components/wsrp/branches/1.1.x/hibernate-impl/pom.xml
===================================================================
--- components/wsrp/branches/1.1.x/hibernate-impl/pom.xml 2010-05-03 13:56:42 UTC (rev 2939)
+++ components/wsrp/branches/1.1.x/hibernate-impl/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
@@ -22,13 +22,14 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.1-GA</version>
+ <version>1.1.2-GA-SNAPSHOT</version>
</parent>
<groupId>org.gatein.wsrp</groupId>
Modified: components/wsrp/branches/1.1.x/pom.xml
===================================================================
--- components/wsrp/branches/1.1.x/pom.xml 2010-05-03 13:56:42 UTC (rev 2939)
+++ components/wsrp/branches/1.1.x/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
@@ -21,7 +21,8 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -29,7 +30,7 @@
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.1-GA</version>
+ <version>1.1.2-GA-SNAPSHOT</version>
<packaging>pom</packaging>
@@ -41,7 +42,8 @@
<scm>
<connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/wsrp/tags/1.1.1-GA</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/wsrp/tags/1.1.1-GA</developerConnection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/wsrp/tags/1.1.1-GA
+ </developerConnection>
<url>http://fisheye.jboss.org/browse/gatein/components/wsrp/tags/1.1.1-GA</url>
</scm>
Modified: components/wsrp/branches/1.1.x/producer/pom.xml
===================================================================
--- components/wsrp/branches/1.1.x/producer/pom.xml 2010-05-03 13:56:42 UTC (rev 2939)
+++ components/wsrp/branches/1.1.x/producer/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.1-GA</version>
+ <version>1.1.2-GA-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-producer-lib</artifactId>
Modified: components/wsrp/branches/1.1.x/test/pom.xml
===================================================================
--- components/wsrp/branches/1.1.x/test/pom.xml 2010-05-03 13:56:42 UTC (rev 2939)
+++ components/wsrp/branches/1.1.x/test/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
@@ -22,11 +22,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.1-GA</version>
+ <version>1.1.2-GA-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/wsrp/branches/1.1.x/wsrp-producer-war/pom.xml
===================================================================
--- components/wsrp/branches/1.1.x/wsrp-producer-war/pom.xml 2010-05-03 13:56:42 UTC (rev 2939)
+++ components/wsrp/branches/1.1.x/wsrp-producer-war/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
@@ -22,11 +22,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.1-GA</version>
+ <version>1.1.2-GA-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/wsrp/branches/1.1.x/wsrp1-ws/pom.xml
===================================================================
--- components/wsrp/branches/1.1.x/wsrp1-ws/pom.xml 2010-05-03 13:56:42 UTC (rev 2939)
+++ components/wsrp/branches/1.1.x/wsrp1-ws/pom.xml 2010-05-03 14:26:44 UTC (rev 2940)
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>1.1.1-GA</version>
+ <version>1.1.2-GA-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wsrp1-ws</artifactId>
14 years, 7 months
gatein SVN: r2939 - in components/wsrp/trunk: producer/src/main/java/org/gatein/registration and 6 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-05-03 09:56:42 -0400 (Mon, 03 May 2010)
New Revision: 2939
Modified:
components/wsrp/trunk/pom.xml
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/RegistrationManager.java
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/RegistrationPolicy.java
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationManagerImpl.java
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/policies/DefaultRegistrationPolicy.java
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/policies/RegistrationPolicyWrapper.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/RegistrationHandler.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/AbstractProducerConfigurationService.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
components/wsrp/trunk/producer/src/test/java/org/gatein/registration/ConsumerGroupTestCase.java
components/wsrp/trunk/producer/src/test/java/org/gatein/registration/ConsumerTestCase.java
components/wsrp/trunk/producer/src/test/java/org/gatein/registration/DefaultRegistrationPolicyTestCase.java
components/wsrp/trunk/producer/src/test/java/org/gatein/registration/RegistrationManagerTestCase.java
components/wsrp/trunk/producer/src/test/java/org/gatein/registration/RegistrationTestCase.java
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/TestRegistrationPolicy.java
Log:
- GTNWSRP-35: refactored registration validation to move towards a more stateless model
+ Adding a registration now requires a check against the producer expectations.
+ Some RegistrationPolicy methods now requires passing producer expectations and the contextual RegistrationManager instead of recording references to these.
This reduces problems with improper state management when the policy is changed and/or reloaded from persistent storage.
+ Trigger listeners after the producer configuration is reloaded so that they can be informed of changes.
- Do not notify listeners if the new policy is equal to the old one.
Modified: components/wsrp/trunk/pom.xml
===================================================================
--- components/wsrp/trunk/pom.xml 2010-05-03 13:39:39 UTC (rev 2938)
+++ components/wsrp/trunk/pom.xml 2010-05-03 13:56:42 UTC (rev 2939)
@@ -21,7 +21,8 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -47,7 +48,7 @@
<properties>
<version.gatein.pc>2.1.1-GA</version.gatein.pc>
- <version.gatein.common>2.0.2-GA</version.gatein.common>
+ <version.gatein.common>2.0.3-GA-SNAPSHOT</version.gatein.common>
<version.gatein.wci>2.0.1-GA</version.gatein.wci>
<version.jsf>1.2_12</version.jsf>
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/registration/RegistrationManager.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/registration/RegistrationManager.java 2010-05-03 13:39:39 UTC (rev 2938)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/registration/RegistrationManager.java 2010-05-03 13:56:42 UTC (rev 2939)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
@@ -23,6 +23,8 @@
package org.gatein.registration;
+import org.gatein.wsrp.registration.PropertyDescription;
+
import javax.xml.namespace.QName;
import java.util.Collection;
import java.util.Map;
@@ -44,7 +46,7 @@
void setPersistenceManager(RegistrationPersistenceManager persistenceManager);
- Registration addRegistrationTo(String consumerName, Map<QName, Object> registrationProperties, boolean createConsumerIfNeeded)
+ Registration addRegistrationTo(String consumerName, Map<QName, Object> registrationProperties, final Map<QName, ? extends PropertyDescription> expectations, boolean createConsumerIfNeeded)
throws RegistrationException;
Consumer createConsumer(String name) throws RegistrationException, InvalidConsumerDataException;
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/registration/RegistrationPolicy.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/registration/RegistrationPolicy.java 2010-05-03 13:39:39 UTC (rev 2938)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/registration/RegistrationPolicy.java 2010-05-03 13:56:42 UTC (rev 2939)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
@@ -48,10 +48,13 @@
* property value (Object) mappings
* @param consumerIdentity the Consumer identity (as returned by {@link #getConsumerIdFrom(String,
* java.util.Map)}) for which the registration properties must be ascertained
+ * @param expectations a Map containing the registration expectations of the producer
+ * @param manager the RegistrationManager in which context this RegistrationPolicy is invoked
* @throws IllegalArgumentException if any of the registration properties is invalid for the specified Consumer
* @throws RegistrationException if an exception occured in the registration service
*/
- void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity)
+ void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity,
+ final Map<QName, ? extends PropertyDescription> expectations, final RegistrationManager manager)
throws IllegalArgumentException, RegistrationException;
/**
@@ -100,10 +103,11 @@
* names must be unique.
*
* @param consumerName the name of the Consumer as passed during the registration process
+ * @param manager the RegistrationManager in which context this RegistrationPolicy is invoked
* @throws IllegalArgumentException if the specified Consumer name if <code>null</code> or empty
* @throws RegistrationException if an exception occurred in the Registration service
*/
- void validateConsumerName(String consumerName)
+ void validateConsumerName(String consumerName, final RegistrationManager manager)
throws IllegalArgumentException, RegistrationException;
/**
@@ -111,32 +115,10 @@
* created.
*
* @param groupName the name of the ConsumerGroup to be created
+ * @param manager the RegistrationManager in which context this RegistrationPolicy is invoked
* @throws IllegalArgumentException if the specified ConsumerGroup name if <code>null</code> or empty
* @throws RegistrationException if an exception occurred in the Registration service
*/
- void validateConsumerGroupName(String groupName) throws IllegalArgumentException, RegistrationException;
+ void validateConsumerGroupName(String groupName, RegistrationManager manager) throws IllegalArgumentException, RegistrationException;
- /**
- * Retrieves the RegistrationManager with which this RegistrationPolicy is associated.
- *
- * @return the RegistrationManager with which this RegistrationPolicy is associated.
- */
- RegistrationManager getManager();
-
- /**
- * Associates this RegistrationPolicy with the specified RegistrationManager. This method should not be called
- * directly by client code as it used in the wiring process of the Registration service.
- *
- * @param manager the RegistrationManager with which this RegistrationPolicy should be associated.
- */
- void setManager(RegistrationManager manager);
-
- /**
- * Define what the expectations are as far as acceptable registration properties go.
- *
- * @param registrationPropertyDescriptions
- * a map of containing the description of expected registrations
- * @since 2.6.3
- */
- void setExpectations(Map<QName, ? extends PropertyDescription> registrationPropertyDescriptions);
}
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationManagerImpl.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationManagerImpl.java 2010-05-03 13:39:39 UTC (rev 2938)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationManagerImpl.java 2010-05-03 13:56:42 UTC (rev 2939)
@@ -68,7 +68,6 @@
public void setPolicy(RegistrationPolicy policy)
{
this.policy = policy;
- policy.setManager(this);
}
public RegistrationPersistenceManager getPersistenceManager()
@@ -81,14 +80,14 @@
this.persistenceManager = persistenceManager;
}
- public Registration addRegistrationTo(String consumerName, Map<QName, Object> registrationProperties, boolean createConsumerIfNeeded)
+ public Registration addRegistrationTo(String consumerName, Map<QName, Object> registrationProperties, final Map<QName, ? extends PropertyDescription> expectations, boolean createConsumerIfNeeded)
throws RegistrationException
{
// the policy determines the identity of the consumer based on the given information (note that this might be obsoleted by using WS-Security)
String identity = policy.getConsumerIdFrom(consumerName, registrationProperties);
// validate the registration information
- policy.validateRegistrationDataFor(registrationProperties, identity);
+ policy.validateRegistrationDataFor(registrationProperties, identity, expectations, this);
Consumer consumer = getOrCreateConsumer(identity, createConsumerIfNeeded, consumerName);
@@ -105,7 +104,7 @@
public Consumer createConsumer(String name) throws RegistrationException, InvalidConsumerDataException
{
// check with policy if we allow the consumer
- policy.validateConsumerName(name);
+ policy.validateConsumerName(name, this);
String identity = policy.getConsumerIdFrom(name, Collections.<QName, Object>emptyMap());
@@ -127,13 +126,13 @@
// check with the policy if we allow the group name in case we need to create it
if (createGroupIfNeeded)
{
- policy.validateConsumerGroupName(groupName);
+ policy.validateConsumerGroupName(groupName, this);
}
// check with policy if we allow the consumer name in case we need to create it
if (createConsumerIfNeeded)
{
- policy.validateConsumerName(consumerName);
+ policy.validateConsumerName(consumerName, this);
}
ConsumerGroup group = getConsumerGroup(groupName);
@@ -170,7 +169,7 @@
public ConsumerGroup createConsumerGroup(String groupName) throws RegistrationException
{
// check with the policy if we allow the group
- policy.validateConsumerGroupName(groupName);
+ policy.validateConsumerGroupName(groupName, this);
return persistenceManager.createConsumerGroup(groupName);
}
@@ -330,7 +329,11 @@
*/
public void propertiesHaveChanged(Map<QName, ? extends PropertyDescription> registrationProperties)
{
- log.debug("Registration properties have changed, existing registrations will be invalidated...");
+ if (log.isDebugEnabled())
+ {
+ log.debug("Registration properties have changed, existing registrations will be invalidated...");
+ }
+
Collection registrations = persistenceManager.getRegistrations();
for (Object registration : registrations)
{
@@ -345,9 +348,6 @@
// reg.clearAssociatedState(); //todo: do we need to clear the associated state? If we do, should we wait until current operations are done?
}
-
- // make policy aware of new registration properties
- policy.setExpectations(registrationProperties);
}
/**
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/registration/policies/DefaultRegistrationPolicy.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/registration/policies/DefaultRegistrationPolicy.java 2010-05-03 13:39:39 UTC (rev 2938)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/registration/policies/DefaultRegistrationPolicy.java 2010-05-03 13:56:42 UTC (rev 2939)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
@@ -52,25 +52,35 @@
*/
public class DefaultRegistrationPolicy implements RegistrationPolicy
{
- private RegistrationManager manager;
private RegistrationPropertyValidator validator;
- private Map<QName, ? extends PropertyDescription> expectations;
private static final Logger log = LoggerFactory.getLogger(DefaultRegistrationPolicy.class);
-
- public RegistrationManager getManager()
+ @Override
+ public boolean equals(Object o)
{
- return manager;
- }
+ if (this == o)
+ {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass())
+ {
+ return false;
+ }
- public void setManager(RegistrationManager manager)
- {
- this.manager = manager;
+ DefaultRegistrationPolicy that = (DefaultRegistrationPolicy)o;
+
+ if (!validator.equals(that.validator))
+ {
+ return false;
+ }
+
+ return true;
}
- public void setExpectations(Map<QName, ? extends PropertyDescription> registrationPropertyDescriptions)
+ @Override
+ public int hashCode()
{
- this.expectations = registrationPropertyDescriptions;
+ return validator.hashCode();
}
/**
@@ -80,7 +90,8 @@
* @throws DuplicateRegistrationException if a Consumer with the same identity has already registered with the same
* registration properties.
*/
- public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity)
+ public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity,
+ final Map<QName, ? extends PropertyDescription> expectations, final RegistrationManager manager)
throws IllegalArgumentException, RegistrationException
{
ParameterValidation.throwIllegalArgExceptionIfNull(registrationProperties, "Registration properties");
@@ -169,7 +180,7 @@
}
/** Rejects registration if a Consumer with the specified name already exists. */
- public void validateConsumerName(String consumerName) throws IllegalArgumentException, RegistrationException
+ public void validateConsumerName(String consumerName, final RegistrationManager manager) throws IllegalArgumentException, RegistrationException
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerName, "Consumer name", null);
@@ -181,7 +192,7 @@
}
/** Rejects name if a ConsumerGroup with the specified name already exists. */
- public void validateConsumerGroupName(String groupName) throws IllegalArgumentException, RegistrationException
+ public void validateConsumerGroupName(String groupName, RegistrationManager manager) throws IllegalArgumentException, RegistrationException
{
// this is already the behavior in the RegistrationPersistenceManager so no need to do anything
}
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/registration/policies/RegistrationPolicyWrapper.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/registration/policies/RegistrationPolicyWrapper.java 2010-05-03 13:39:39 UTC (rev 2938)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/registration/policies/RegistrationPolicyWrapper.java 2010-05-03 13:56:42 UTC (rev 2939)
@@ -52,10 +52,10 @@
return delegate;
}
- public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity)
+ public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity, final Map<QName, ? extends PropertyDescription> expectations, final RegistrationManager manager)
throws IllegalArgumentException, RegistrationException
{
- delegate.validateRegistrationDataFor(registrationProperties, consumerIdentity);
+ delegate.validateRegistrationDataFor(registrationProperties, consumerIdentity, expectations, manager);
}
public String createRegistrationHandleFor(String registrationId)
@@ -76,33 +76,18 @@
return delegate.getConsumerIdFrom(sanitizeConsumerName(consumerName), registrationProperties);
}
- public void validateConsumerName(String consumerName)
+ public void validateConsumerName(String consumerName, final RegistrationManager manager)
throws IllegalArgumentException, RegistrationException
{
- delegate.validateConsumerName(consumerName);
+ delegate.validateConsumerName(consumerName, manager);
}
- public void validateConsumerGroupName(String groupName)
+ public void validateConsumerGroupName(String groupName, RegistrationManager manager)
throws IllegalArgumentException, RegistrationException
{
- delegate.validateConsumerGroupName(groupName);
+ delegate.validateConsumerGroupName(groupName, manager);
}
- public RegistrationManager getManager()
- {
- return delegate.getManager();
- }
-
- public void setManager(RegistrationManager manager)
- {
- delegate.setManager(manager);
- }
-
- public void setExpectations(Map<QName, ? extends PropertyDescription> registrationPropertyDescriptions)
- {
- delegate.setExpectations(registrationPropertyDescriptions);
- }
-
static String sanitizeConsumerName(String consumerName)
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerName, "Consumer name", null);
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/RegistrationHandler.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/RegistrationHandler.java 2010-05-03 13:39:39 UTC (rev 2938)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/RegistrationHandler.java 2010-05-03 13:56:42 UTC (rev 2939)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
@@ -71,7 +71,8 @@
public RegistrationContext register(RegistrationData registrationData) throws MissingParameters, OperationFailed
{
- if (producer.getProducerRegistrationRequirements().isRegistrationRequired())
+ ProducerRegistrationRequirements registrationRequirements = producer.getProducerRegistrationRequirements();
+ if (registrationRequirements.isRegistrationRequired())
{
WSRPExceptionFactory.throwOperationFailedIfValueIsMissing(registrationData, "RegistrationData");
String consumerName = registrationData.getConsumerName();
@@ -88,7 +89,7 @@
// check that the consumer agent is valid before trying to register
RegistrationUtils.validateConsumerAgent(consumerAgent);
- registration = producer.getRegistrationManager().addRegistrationTo(consumerName, createRegistrationProperties(registrationData), true);
+ registration = producer.getRegistrationManager().addRegistrationTo(consumerName, createRegistrationProperties(registrationData), registrationRequirements.getRegistrationProperties(), true);
updateRegistrationInformation(registration, registrationData);
}
catch (Exception e)
@@ -218,7 +219,7 @@
// check that the given registration properties are acceptable according to expectations and policy
ProducerRegistrationRequirements req = producer.getProducerRegistrationRequirements();
- req.getPolicy().validateRegistrationDataFor(properties, consumerName);
+ req.getPolicy().validateRegistrationDataFor(properties, consumerName, req.getRegistrationProperties(), producer.getRegistrationManager());
registration.updateProperties(properties);
updateRegistrationInformation(registration, registrationData);
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/AbstractProducerConfigurationService.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/AbstractProducerConfigurationService.java 2010-05-03 13:39:39 UTC (rev 2938)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/AbstractProducerConfigurationService.java 2010-05-03 13:56:42 UTC (rev 2939)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
@@ -67,12 +67,13 @@
// reload
loadConfiguration();
- // restore listeners
+ // restore listeners and trigger them
if (listeners != null)
{
for (ProducerConfigurationChangeListener listener : listeners)
{
configuration.addChangeListener(listener);
+ listener.usingStrictModeChangedTo(configuration.isUsingStrictMode());
}
}
registrationRequirements = configuration.getRegistrationRequirements();
@@ -83,6 +84,7 @@
for (RegistrationPropertyChangeListener listener : propertyListeners)
{
registrationRequirements.addRegistrationPropertyChangeListener(listener);
+ listener.propertiesHaveChanged(registrationRequirements.getRegistrationProperties());
}
}
if (policyListeners != null)
@@ -90,6 +92,7 @@
for (RegistrationPolicyChangeListener listener : policyListeners)
{
registrationRequirements.addRegistrationPolicyChangeListener(listener);
+ listener.policyUpdatedTo(registrationRequirements.getPolicy());
}
}
}
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2010-05-03 13:39:39 UTC (rev 2938)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2010-05-03 13:56:42 UTC (rev 2939)
@@ -260,22 +260,23 @@
public void setPolicy(RegistrationPolicy policy)
{
- this.policy = policy;
-
- if (policy != null)
+ if (ParameterValidation.isOldAndNewDifferent(this.policy, policy))
{
- policyClassName = policy.getClass().getName();
+ this.policy = policy;
- if (policy instanceof DefaultRegistrationPolicy)
+ if (policy != null)
{
- DefaultRegistrationPolicy registrationPolicy = (DefaultRegistrationPolicy)policy;
- validatorClassName = registrationPolicy.getValidator().getClass().getName();
+ policyClassName = policy.getClass().getName();
+
+ if (policy instanceof DefaultRegistrationPolicy)
+ {
+ DefaultRegistrationPolicy registrationPolicy = (DefaultRegistrationPolicy)policy;
+ validatorClassName = registrationPolicy.getValidator().getClass().getName();
+ }
}
- this.policy.setExpectations(registrationProperties);
+ notifyRegistrationPolicyChangeListeners();
}
-
- notifyRegistrationPolicyChangeListeners();
}
public RegistrationPolicy getPolicy()
Modified: components/wsrp/trunk/producer/src/test/java/org/gatein/registration/ConsumerGroupTestCase.java
===================================================================
--- components/wsrp/trunk/producer/src/test/java/org/gatein/registration/ConsumerGroupTestCase.java 2010-05-03 13:39:39 UTC (rev 2938)
+++ components/wsrp/trunk/producer/src/test/java/org/gatein/registration/ConsumerGroupTestCase.java 2010-05-03 13:56:42 UTC (rev 2939)
@@ -1,25 +1,25 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.gatein.registration;
@@ -46,7 +46,6 @@
RegistrationPolicy policy = new DefaultRegistrationPolicy();
manager.setPolicy(policy);
manager.setPersistenceManager(new RegistrationPersistenceManagerImpl());
- policy.setManager(manager);
group = manager.createConsumerGroup(NAME);
}
Modified: components/wsrp/trunk/producer/src/test/java/org/gatein/registration/ConsumerTestCase.java
===================================================================
--- components/wsrp/trunk/producer/src/test/java/org/gatein/registration/ConsumerTestCase.java 2010-05-03 13:39:39 UTC (rev 2938)
+++ components/wsrp/trunk/producer/src/test/java/org/gatein/registration/ConsumerTestCase.java 2010-05-03 13:56:42 UTC (rev 2939)
@@ -1,25 +1,25 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.gatein.registration;
@@ -27,6 +27,9 @@
import org.gatein.registration.impl.RegistrationManagerImpl;
import org.gatein.registration.impl.RegistrationPersistenceManagerImpl;
import org.gatein.registration.policies.DefaultRegistrationPolicy;
+import org.gatein.registration.policies.DefaultRegistrationPropertyValidator;
+import org.gatein.wsrp.WSRPConstants;
+import org.gatein.wsrp.registration.RegistrationPropertyDescription;
import javax.xml.namespace.QName;
import java.util.Collections;
@@ -42,14 +45,15 @@
{
private Consumer consumer;
private RegistrationManager manager;
+ private static final Map<QName, RegistrationPropertyDescription> EMPTY_EXPECTATIONS = Collections.emptyMap();
protected void setUp() throws Exception
{
manager = new RegistrationManagerImpl();
- RegistrationPolicy policy = new DefaultRegistrationPolicy();
+ DefaultRegistrationPolicy policy = new DefaultRegistrationPolicy();
+ policy.setValidator(new DefaultRegistrationPropertyValidator());
manager.setPolicy(policy);
manager.setPersistenceManager(new RegistrationPersistenceManagerImpl());
- policy.setManager(manager);
consumer = manager.createConsumer("name");
}
@@ -65,7 +69,7 @@
String name = consumer.getName();
// adding a registration that isn't validated doesn't change the status
- Registration registration = manager.addRegistrationTo(name, Collections.<QName, Object>emptyMap(), false);
+ Registration registration = manager.addRegistrationTo(name, Collections.<QName, Object>emptyMap(), EMPTY_EXPECTATIONS, false);
assertEquals(RegistrationStatus.PENDING, consumer.getStatus());
// but the consumer's status should become valid if the registration becomes so as well
@@ -75,8 +79,12 @@
// adding a new registration makes the consumer's status pending
// need to change the registration props to register this consumer again
Map<QName, Object> props = new HashMap<QName, Object>(1);
- props.put(new QName("prop"), "value");
- registration = manager.addRegistrationTo(name, props, false);
+ QName propName = new QName("prop");
+ props.put(propName, "value");
+ // need to change the expectations to allow the new registration property
+ Map<QName, RegistrationPropertyDescription> expectations = new HashMap<QName, RegistrationPropertyDescription>();
+ expectations.put(propName, new RegistrationPropertyDescription(propName, WSRPConstants.XSD_STRING));
+ registration = manager.addRegistrationTo(name, props, expectations, false);
assertEquals(2, consumer.getRegistrations().size());
assertEquals(RegistrationStatus.PENDING, consumer.getStatus());
Modified: components/wsrp/trunk/producer/src/test/java/org/gatein/registration/DefaultRegistrationPolicyTestCase.java
===================================================================
--- components/wsrp/trunk/producer/src/test/java/org/gatein/registration/DefaultRegistrationPolicyTestCase.java 2010-05-03 13:39:39 UTC (rev 2938)
+++ components/wsrp/trunk/producer/src/test/java/org/gatein/registration/DefaultRegistrationPolicyTestCase.java 2010-05-03 13:56:42 UTC (rev 2939)
@@ -1,5 +1,24 @@
/*
- * Copyright (c) 2007, Your Corporation. All Rights Reserved.
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.gatein.registration;
@@ -30,6 +49,7 @@
private static final QName PROP1 = new QName("prop1");
private static final QName PROP2 = new QName("prop2");
private static final QName PROP3 = new QName("prop3");
+ private RegistrationManager manager;
@Override
protected void setUp() throws Exception
@@ -38,26 +58,23 @@
policy.setValidator(new DefaultRegistrationPropertyValidator());
- RegistrationManager manager = new RegistrationManagerImpl();
+ manager = new RegistrationManagerImpl();
manager.setPolicy(policy);
manager.setPersistenceManager(new RegistrationPersistenceManagerImpl());
manager.createConsumer(CONSUMER);
- policy.setManager(manager);
-
registrationProperties = new HashMap<QName, Object>();
registrationProperties.put(PROP1, "value1");
registrationProperties.put(PROP2, "value2");
expectations = new HashMap<QName, PropertyDescription>();
- policy.setExpectations(expectations);
}
public void testValidateRegistrationDataForNull() throws RegistrationException
{
try
{
- policy.validateRegistrationDataFor(null, "foo");
+ policy.validateRegistrationDataFor(null, "foo", expectations, manager);
fail("null data cannot be validated");
}
catch (IllegalArgumentException e)
@@ -67,7 +84,7 @@
try
{
- policy.validateRegistrationDataFor(Collections.<QName, Object>emptyMap(), null);
+ policy.validateRegistrationDataFor(Collections.<QName, Object>emptyMap(), null, expectations, manager);
fail("null data cannot be validated");
}
catch (IllegalArgumentException e)
@@ -80,7 +97,7 @@
{
try
{
- policy.validateRegistrationDataFor(Collections.<QName, Object>emptyMap(), "foo");
+ policy.validateRegistrationDataFor(Collections.<QName, Object>emptyMap(), "foo", expectations, manager);
}
catch (RegistrationException e)
{
@@ -96,7 +113,7 @@
try
{
- policy.validateRegistrationDataFor(registrationProperties, CONSUMER);
+ policy.validateRegistrationDataFor(registrationProperties, CONSUMER, expectations, manager);
fail("Missing prop3 should have been detected");
}
catch (RegistrationException e)
@@ -111,7 +128,7 @@
try
{
- policy.validateRegistrationDataFor(registrationProperties, CONSUMER);
+ policy.validateRegistrationDataFor(registrationProperties, CONSUMER, expectations, manager);
fail("Extra prop2 should have been detected");
}
catch (RegistrationException e)
@@ -129,7 +146,7 @@
try
{
- policy.validateRegistrationDataFor(registrationProperties, CONSUMER);
+ policy.validateRegistrationDataFor(registrationProperties, CONSUMER, expectations, manager);
fail("Should have detected null value for prop1");
}
catch (RegistrationException e)
Modified: components/wsrp/trunk/producer/src/test/java/org/gatein/registration/RegistrationManagerTestCase.java
===================================================================
--- components/wsrp/trunk/producer/src/test/java/org/gatein/registration/RegistrationManagerTestCase.java 2010-05-03 13:39:39 UTC (rev 2938)
+++ components/wsrp/trunk/producer/src/test/java/org/gatein/registration/RegistrationManagerTestCase.java 2010-05-03 13:56:42 UTC (rev 2939)
@@ -1,25 +1,25 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.gatein.registration;
@@ -27,6 +27,9 @@
import org.gatein.registration.impl.RegistrationManagerImpl;
import org.gatein.registration.impl.RegistrationPersistenceManagerImpl;
import org.gatein.registration.policies.DefaultRegistrationPolicy;
+import org.gatein.registration.policies.DefaultRegistrationPropertyValidator;
+import org.gatein.wsrp.WSRPConstants;
+import org.gatein.wsrp.registration.RegistrationPropertyDescription;
import javax.xml.namespace.QName;
import java.util.Collection;
@@ -43,32 +46,38 @@
private RegistrationManager manager;
private Map<QName, Object> registrationProperties;
+ private Map<QName, RegistrationPropertyDescription> expectations;
protected void setUp() throws Exception
{
manager = new RegistrationManagerImpl();
- // todo: policy will need access to registration configuration information to validate properties
- RegistrationPolicy policy = new DefaultRegistrationPolicy();
+
+ DefaultRegistrationPolicy policy = new DefaultRegistrationPolicy();
+ policy.setValidator(new DefaultRegistrationPropertyValidator());
manager.setPolicy(policy);
manager.setPersistenceManager(new RegistrationPersistenceManagerImpl());
- policy.setManager(manager);
//todo: registration properties setup will need to be updated when property validation is implemented
+ QName prop1Name = new QName("prop1");
+ QName prop2Name = new QName("prop2");
registrationProperties = new HashMap<QName, Object>();
- registrationProperties.put(new QName("prop1"), "value1");
- registrationProperties.put(new QName("prop2"), "value2");
+ registrationProperties.put(prop1Name, "value1");
+ registrationProperties.put(prop2Name, "value2");
+
+ expectations = new HashMap<QName, RegistrationPropertyDescription>();
+ expectations.put(prop1Name, new RegistrationPropertyDescription(prop1Name, WSRPConstants.XSD_STRING));
+ expectations.put(prop2Name, new RegistrationPropertyDescription(prop2Name, WSRPConstants.XSD_STRING));
}
public void testPolicy()
{
RegistrationPolicy policy = manager.getPolicy();
assertNotNull(policy);
- assertEquals(manager, policy.getManager());
}
public void testAddRegistrationTo() throws Exception
{
- Registration registration = manager.addRegistrationTo("consumerName", registrationProperties, true);
+ Registration registration = manager.addRegistrationTo("consumerName", registrationProperties, expectations, true);
assertNotNull(registration);
assertNotNull(registration.getPersistentKey());
@@ -85,7 +94,7 @@
{
try
{
- manager.addRegistrationTo("consumerName", registrationProperties, false);
+ manager.addRegistrationTo("consumerName", registrationProperties, expectations, false);
fail("Should have failed: consumer does not exist");
}
catch (NoSuchRegistrationException expected)
@@ -142,7 +151,6 @@
}
};
manager.setPolicy(policy);
- policy.setManager(manager);
String name = "name";
Consumer consumer = manager.createConsumer(name);
@@ -286,7 +294,7 @@
Consumer consumer = manager.addConsumerToGroupNamed(consumerName, groupName, true, true);
String consumerIdentity = consumer.getId();
- Registration reg = manager.addRegistrationTo(consumerName, registrationProperties, false);
+ Registration reg = manager.addRegistrationTo(consumerName, registrationProperties, expectations, false);
String handle = reg.getRegistrationHandle();
ConsumerGroup group = manager.getConsumerGroup(groupName);
@@ -302,7 +310,7 @@
Consumer consumer = manager.createConsumer(consumerName);
String consumerIdentity = consumer.getId();
- Registration reg = manager.addRegistrationTo(consumerName, registrationProperties, false);
+ Registration reg = manager.addRegistrationTo(consumerName, registrationProperties, expectations, false);
String handle = reg.getRegistrationHandle();
manager.removeConsumer(consumer);
@@ -315,7 +323,7 @@
String consumerName = "consumer";
Consumer consumer = manager.createConsumer(consumerName);
- Registration reg = manager.addRegistrationTo(consumerName, registrationProperties, false);
+ Registration reg = manager.addRegistrationTo(consumerName, registrationProperties, expectations, false);
String handle = reg.getRegistrationHandle();
assertTrue(consumer.getRegistrations().contains(reg));
@@ -336,30 +344,35 @@
String consumerName = "consumer";
Consumer consumer = manager.createConsumer(consumerName);
- Registration reg = manager.addRegistrationTo(consumerName, registrationProperties, false);
+ Registration reg = manager.addRegistrationTo(consumerName, registrationProperties, expectations, false);
String handle = reg.getRegistrationHandle();
- // todo: this won't work anymore when properties validation is implemented
- registrationProperties.put(new QName("prop3"), "value3");
- Registration r2 = manager.addRegistrationTo(consumerName, registrationProperties, false);
-
RegistrationStatus status = consumer.getStatus();
-
manager.removeRegistration(handle);
// consumer status shouldn't have changed
assertEquals(status, consumer.getStatus());
- // should still be able to retrieve consumer from r2 handle
- assertEquals(consumer, manager.getConsumerFor(r2.getRegistrationHandle()));
-
- // ... but not from handle
+ // Shouldn't be possible to retrieve consumer from handle anymore
assertNull(manager.getConsumerFor(handle));
}
public void testAddRegistrationWithInvalidRegistrationProperties() throws Exception
{
- // todo: implement
+ String consumerName = "consumer";
+ Consumer consumer = manager.createConsumer(consumerName);
+
+ registrationProperties.put(new QName("prop3"), "value3");
+ try
+ {
+ manager.addRegistrationTo(consumerName, registrationProperties, expectations, false);
+ fail("Expectations does not contain prop3, so trying to register with a value for it should fail");
+ }
+ catch (RegistrationException e)
+ {
+ assertTrue(e.getMessage().contains("prop3"));
+ assertEquals(0, consumer.getRegistrations().size());
+ }
}
public void testRemoveInexistentRegistration() throws RegistrationException
@@ -407,8 +420,8 @@
manager.createConsumer("c2");
manager.addConsumerToGroupNamed("c1g1", "g1", true, true);
manager.createConsumerGroup("g2");
- Registration r1 = manager.addRegistrationTo("c1", registrationProperties, false);
- Registration r2 = manager.addRegistrationTo("c3", registrationProperties, true);
+ Registration r1 = manager.addRegistrationTo("c1", registrationProperties, expectations, false);
+ Registration r2 = manager.addRegistrationTo("c3", registrationProperties, expectations, true);
manager.clear();
assertTrue(manager.getConsumerGroups().isEmpty());
Modified: components/wsrp/trunk/producer/src/test/java/org/gatein/registration/RegistrationTestCase.java
===================================================================
--- components/wsrp/trunk/producer/src/test/java/org/gatein/registration/RegistrationTestCase.java 2010-05-03 13:39:39 UTC (rev 2938)
+++ components/wsrp/trunk/producer/src/test/java/org/gatein/registration/RegistrationTestCase.java 2010-05-03 13:56:42 UTC (rev 2939)
@@ -1,25 +1,25 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.gatein.registration;
@@ -27,6 +27,9 @@
import org.gatein.registration.impl.RegistrationManagerImpl;
import org.gatein.registration.impl.RegistrationPersistenceManagerImpl;
import org.gatein.registration.policies.DefaultRegistrationPolicy;
+import org.gatein.wsrp.WSRPConstants;
+import org.gatein.wsrp.registration.PropertyDescription;
+import org.gatein.wsrp.registration.RegistrationPropertyDescription;
import javax.xml.namespace.QName;
import java.util.HashMap;
@@ -47,20 +50,25 @@
RegistrationManager manager = new RegistrationManagerImpl();
RegistrationPolicy policy = new DefaultRegistrationPolicy()
{
- public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity) throws IllegalArgumentException, RegistrationException, DuplicateRegistrationException
+ public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity, final Map<QName, ? extends PropertyDescription> expectations, final RegistrationManager manager) throws IllegalArgumentException, RegistrationException, DuplicateRegistrationException
{
// accept any registration data here
}
};
manager.setPolicy(policy);
manager.setPersistenceManager(new RegistrationPersistenceManagerImpl());
- policy.setManager(manager);
registrationProperties = new HashMap<QName, Object>();
- registrationProperties.put(new QName("prop1"), "value1");
- registrationProperties.put(new QName("prop2"), "value2");
+ QName prop1Name = new QName("prop1");
+ registrationProperties.put(prop1Name, "value1");
+ QName prop2Name = new QName("prop2");
+ registrationProperties.put(prop2Name, "value2");
- registration = manager.addRegistrationTo("name", registrationProperties, true);
+ Map<QName, RegistrationPropertyDescription> expectations = new HashMap<QName, RegistrationPropertyDescription>();
+ expectations.put(prop1Name, new RegistrationPropertyDescription(prop1Name, WSRPConstants.XSD_STRING));
+ expectations.put(prop2Name, new RegistrationPropertyDescription(prop2Name, WSRPConstants.XSD_STRING));
+
+ registration = manager.addRegistrationTo("name", registrationProperties, expectations, true);
}
public void testGetPropertiesIsUnmodifiable()
Modified: components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/TestRegistrationPolicy.java
===================================================================
--- components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/TestRegistrationPolicy.java 2010-05-03 13:39:39 UTC (rev 2938)
+++ components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/TestRegistrationPolicy.java 2010-05-03 13:56:42 UTC (rev 2939)
@@ -1,25 +1,25 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2007, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.gatein.wsrp.producer.config;
@@ -39,7 +39,7 @@
*/
public class TestRegistrationPolicy implements RegistrationPolicy
{
- public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity) throws IllegalArgumentException, RegistrationException
+ public void validateRegistrationDataFor(Map<QName, Object> registrationProperties, String consumerIdentity, final Map<QName, ? extends PropertyDescription> expectations, final RegistrationManager manager) throws IllegalArgumentException, RegistrationException
{
}
@@ -58,24 +58,12 @@
return null;
}
- public void validateConsumerName(String consumerName) throws IllegalArgumentException, RegistrationException
+ public void validateConsumerName(String consumerName, final RegistrationManager manager) throws IllegalArgumentException, RegistrationException
{
}
- public void validateConsumerGroupName(String groupName) throws IllegalArgumentException, RegistrationException
+ public void validateConsumerGroupName(String groupName, RegistrationManager manager) throws IllegalArgumentException, RegistrationException
{
}
- public RegistrationManager getManager()
- {
- return null;
- }
-
- public void setManager(RegistrationManager manager)
- {
- }
-
- public void setExpectations(Map<QName, ? extends PropertyDescription> registrationPropertyDescriptions)
- {
- }
}
14 years, 7 months
gatein SVN: r2938 - portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: mvanco(a)redhat.com
Date: 2010-05-03 09:39:39 -0400 (Mon, 03 May 2010)
New Revision: 2938
Modified:
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_20_015_CreateNewUsersPageWithExistingGroupsPage.html
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_20_022_CreateGroupPageWithNameTheSameWithExistingPortalPage.html
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_30_CreateAndEditPageAndEditSiteLayoutForUser.html
Log:
EPP5 UI Tests: improved tests POR_20_015, SNF_PRL_30, POR_20_022
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_20_015_CreateNewUsersPageWithExistingGroupsPage.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_20_015_CreateNewUsersPageWithExistingGroupsPage.html 2010-05-03 11:45:49 UTC (rev 2937)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_20_015_CreateNewUsersPageWithExistingGroupsPage.html 2010-05-03 13:39:39 UTC (rev 2938)
@@ -22,6 +22,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Sign in</td>
<td></td>
@@ -92,11 +97,16 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
- <td>xpath=//option[@value='group']</td>
+ <td>pause</td>
+ <td>5000</td>
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>ownerId</td>
+ <td></td>
+</tr>
+<tr>
<td>select</td>
<td>ownerId</td>
<td>label=/organization/operations</td>
@@ -107,11 +117,6 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
- <td>xpath=//option[@value='/organization/operations']</td>
- <td></td>
-</tr>
-<tr>
<td>waitForElementPresent</td>
<td>name</td>
<td></td>
@@ -137,18 +142,23 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Access Permission Setting</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Access Permission Setting</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>waitForElementPresent</td>
<td>link=Edit Permission Setting</td>
<td></td>
</tr>
<tr>
<td>clickAt</td>
- <td>xpath=//div[(a)onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPageForm', 'UIPageTemplateOptions');javascript:eXo.webui.UIForm.submitEvent('UIPageForm','SelectTab','&objectId=UIPageTemplateOptions')"]</td>
+ <td>link=Edit Permission Setting</td>
<td></td>
</tr>
<tr>
@@ -162,16 +172,11 @@
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
- <td>link=Page Management</td>
+ <td>waitForTextNotPresent</td>
+ <td>Page Setting</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
- <td>link=Page Management</td>
- <td></td>
-</tr>
-<tr>
<td>echo</td>
<td>--Add new page for user--</td>
<td></td>
@@ -222,11 +227,31 @@
<td></td>
</tr>
<tr>
+ <td>waitForTextNotPresent</td>
+ <td>Page Setting</td>
+ <td></td>
+</tr>
+<tr>
<td>echo</td>
<td>--Search new page created--</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>waitForElementPresent</td>
+ <td>searchTerm</td>
+ <td></td>
+</tr>
+<tr>
<td>type</td>
<td>searchTerm</td>
<td>POR_20_015</td>
@@ -262,21 +287,11 @@
<td></td>
</tr>
<tr>
- <td>assertConfirmation</td>
+ <td>waitForConfirmation</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 of group--</td>
<td></td>
@@ -292,7 +307,7 @@
<td></td>
</tr>
<tr>
- <td>assertConfirmation</td>
+ <td>waitForConfirmation</td>
<td>Do you want to delete this page?</td>
<td></td>
</tr>
@@ -307,6 +322,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForTextNotPresent</td>
+ <td>POR_20_015</td>
+ <td></td>
+</tr>
+<tr>
<td>waitForElementPresent</td>
<td>link=Sign out</td>
<td></td>
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_20_022_CreateGroupPageWithNameTheSameWithExistingPortalPage.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_20_022_CreateGroupPageWithNameTheSameWithExistingPortalPage.html 2010-05-03 11:45:49 UTC (rev 2937)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_20_022_CreateGroupPageWithNameTheSameWithExistingPortalPage.html 2010-05-03 13:39:39 UTC (rev 2938)
@@ -162,13 +162,13 @@
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
- <td>ownerId</td>
+ <td>pause</td>
+ <td>5000</td>
<td></td>
</tr>
<tr>
- <td>pause</td>
- <td>5000</td>
+ <td>waitForElementPresent</td>
+ <td>ownerId</td>
<td></td>
</tr>
<tr>
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_30_CreateAndEditPageAndEditSiteLayoutForUser.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_30_CreateAndEditPageAndEditSiteLayoutForUser.html 2010-05-03 11:45:49 UTC (rev 2937)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_30_CreateAndEditPageAndEditSiteLayoutForUser.html 2010-05-03 13:39:39 UTC (rev 2938)
@@ -22,6 +22,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Sign in</td>
<td></td>
@@ -47,11 +52,16 @@
<td></td>
</tr>
<tr>
- <td>clickAtAndWait</td>
+ <td>waitForElementPresent</td>
<td>link=Dashboard</td>
<td></td>
</tr>
<tr>
+ <td>click</td>
+ <td>link=Dashboard</td>
+ <td></td>
+</tr>
+<tr>
<td>echo</td>
<td>--Add new page in dashboard</td>
<td></td>
@@ -92,6 +102,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]</td>
+ <td>1,1</td>
+</tr>
+<tr>
<td>clickAt</td>
<td>//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]</td>
<td>1,1</td>
@@ -102,6 +117,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForTextPresent</td>
+ <td>Select a Page Layout Template</td>
+ <td></td>
+</tr>
+<tr>
<td>waitForElementPresent</td>
<td>//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]</td>
<td></td>
@@ -117,6 +137,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForTextPresent</td>
+ <td>Re-arrange the Page Layout and add Portlets to the Page</td>
+ <td></td>
+</tr>
+<tr>
<td>waitForElementPresent</td>
<td>//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]</td>
<td></td>
@@ -152,9 +177,14 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Page</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Edit Page</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
@@ -197,11 +227,21 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Page</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Edit Page</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=View Page properties</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=View Page properties</td>
<td>1,1</td>
@@ -217,11 +257,21 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Cancel</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Cancel</td>
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>css=a.CloseButton</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>css=a.CloseButton</td>
<td></td>
@@ -237,6 +287,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=test_dashboardpage_name_30</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=test_dashboardpage_name_30</td>
<td></td>
@@ -249,16 +304,21 @@
<tr>
<td>clickAt</td>
<td>link=Edit Layout</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Portal Properties</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Portal Properties</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
- <td>verifyTextPresent</td>
- <td>Locale</td>
+ <td>waitForElementPresent</td>
+ <td>locale</td>
<td></td>
</tr>
<tr>
@@ -267,11 +327,21 @@
<td>label=English</td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[(a)onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPortalForm', 'Properties');javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','SelectTab','&objectId=Properties')"]</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>//div[(a)onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPortalForm', 'Properties');javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','SelectTab','&objectId=Properties')"]</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>
14 years, 7 months
gatein SVN: r2937 - sandbox/mobile_delivery/trunk/examples/portlets.
by do-not-reply@jboss.org
Author: david.borruat
Date: 2010-05-03 07:45:49 -0400 (Mon, 03 May 2010)
New Revision: 2937
Added:
sandbox/mobile_delivery/trunk/examples/portlets/davidportlet/
Log:
new portlet component
Copied: sandbox/mobile_delivery/trunk/examples/portlets/davidportlet (from rev 2936, sandbox/mobile_delivery/trunk/examples/portlets/jsphellouser)
14 years, 7 months