gatein SVN: r4391 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-09-27 03:25:55 -0400 (Mon, 27 Sep 2010)
New Revision: 4391
Modified:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_14_01_045_CheckWhenUserDoesNotHaveRightToEditPage.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_PRL_03_04_005_CheckExistingOfPagesInDeletedGroup.html
Log:
TestVN-356:Clean and Improve existing Selenium for GateIn
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_14_01_045_CheckWhenUserDoesNotHaveRightToEditPage.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_14_01_045_CheckWhenUserDoesNotHaveRightToEditPage.html 2010-09-27 07:01:34 UTC (rev 4390)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_14_01_045_CheckWhenUserDoesNotHaveRightToEditPage.html 2010-09-27 07:25:55 UTC (rev 4391)
@@ -143,12 +143,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[3]/div/div/div[1]/div/div/div/div/div/div/div/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[3]/div/div/div[1]/div/div/div/div/div/div/div/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
<td></td>
</tr>
<tr>
@@ -592,6 +592,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAndWait</td>
<td>link=Sign out</td>
<td></td>
@@ -737,6 +742,26 @@
<td></td>
</tr>
<tr>
+ <td>waitForTextPresent</td>
+ <td>No result found.</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>No result found.</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[5]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[5]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
<td>echo</td>
<td>-- Delete user--</td>
<td></td>
@@ -793,15 +818,20 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[4]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[5]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[4]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[5]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAndWait</td>
<td>link=Sign out</td>
<td></td>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_PRL_03_04_005_CheckExistingOfPagesInDeletedGroup.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_PRL_03_04_005_CheckExistingOfPagesInDeletedGroup.html 2010-09-27 07:01:34 UTC (rev 4390)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_PRL_03_04_005_CheckExistingOfPagesInDeletedGroup.html 2010-09-27 07:25:55 UTC (rev 4391)
@@ -53,81 +53,6 @@
</tr>
<tr>
<td>echo</td>
- <td>-- Go to Group and user management--</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForElementPresent</td>
- <td>link=Users and groups management</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>link=Users and groups management</td>
- <td></td>
-</tr>
-<tr>
- <td>echo</td>
- <td>-- Choose User and group management --</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForElementPresent</td>
- <td>//div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[2]/div[1]</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>//div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[2]/div[1]</td>
- <td></td>
-</tr>
-<tr>
- <td>echo</td>
- <td>-- Add new group--</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForElementPresent</td>
- <td>//div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/a[3]</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>//div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/a[3]</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForElementPresent</td>
- <td>groupName</td>
- <td></td>
-</tr>
-<tr>
- <td>type</td>
- <td>groupName</td>
- <td>Test_PRL_03_04_005</td>
-</tr>
-<tr>
- <td>type</td>
- <td>label</td>
- <td>Test_PRL_03_04_005</td>
-</tr>
-<tr>
- <td>type</td>
- <td>description</td>
- <td>Test_PRL_03_04_005</td>
-</tr>
-<tr>
- <td>waitForElementPresent</td>
- <td>link=Save</td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>link=Save</td>
- <td></td>
-</tr>
-<tr>
- <td>echo</td>
<td>-- Add new user--</td>
<td></td>
</tr>
@@ -233,6 +158,81 @@
</tr>
<tr>
<td>echo</td>
+ <td>-- Go to Group and user management--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Users and groups management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Users and groups management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Choose User and group management --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[2]/div[1]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[2]/div[1]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Add new group--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/a[3]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/a[3]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>groupName</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>groupName</td>
+ <td>Test_PRL_03_04_005</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>label</td>
+ <td>Test_PRL_03_04_005</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>description</td>
+ <td>Test_PRL_03_04_005</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
<td>-- Add user into group--</td>
<td></td>
</tr>
13 years, 7 months
gatein SVN: r4390 - exo/portal/branches/3.1.x/portlet/exoadmin/src/main/webapp/WEB-INF.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2010-09-27 03:01:34 -0400 (Mon, 27 Sep 2010)
New Revision: 4390
Modified:
exo/portal/branches/3.1.x/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml
Log:
EXOGTN-69 Remove the wrong configuration for supported locale
Modified: exo/portal/branches/3.1.x/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- exo/portal/branches/3.1.x/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml 2010-09-27 06:50:49 UTC (rev 4389)
+++ exo/portal/branches/3.1.x/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml 2010-09-27 07:01:34 UTC (rev 4390)
@@ -235,7 +235,7 @@
<mime-type>text/html</mime-type>
<portlet-mode>help</portlet-mode>
</supports>
- <supported-locale>en,fr,vi,ar</supported-locale>
+ <supported-locale>en</supported-locale>
<resource-bundle>locale.portlet.exoadmin.AdminToolbarPortlet</resource-bundle>
<portlet-info>
<title>Administration Toolbar Portlet</title>
13 years, 7 months
gatein SVN: r4389 - portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: vuthelinh
Date: 2010-09-27 02:50:49 -0400 (Mon, 27 Sep 2010)
New Revision: 4389
Modified:
portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java
Log:
add ContextMenu
Modified: portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java 2010-09-27 06:22:01 UTC (rev 4388)
+++ portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java 2010-09-27 06:50:49 UTC (rev 4389)
@@ -194,7 +194,7 @@
sb.append("(selenium.isTextPresent(\"");
sb.append(param2);
sb.append("\"));\n");
- } else if (param1.equals("click") || param1.equals("mouseDown") || param1.equals("doubleClick") || param1.equals("mouseDownRight")|| param1.equals("mouseUp")
+ } else if (param1.equals("click") ||param1.equals("contextMenu") || param1.equals("mouseDown") || param1.equals("doubleClick") || param1.equals("mouseDownRight")|| param1.equals("mouseUp")
|| param1.equals("open") || param1.equals("selectFrame") || param1.equals("selectWindow")) {
sb.append("selenium.");
sb.append(param1);
13 years, 7 months
gatein SVN: r4388 - exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/jcr.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2010-09-27 02:22:01 -0400 (Mon, 27 Sep 2010)
New Revision: 4388
Modified:
exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/jcr/jcr-configuration.xml
Log:
EXOGTN-85 Remove organization-nodetypes.xml value from jcr-configuration.xml
Modified: exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/jcr/jcr-configuration.xml
===================================================================
--- exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/jcr/jcr-configuration.xml 2010-09-26 17:48:41 UTC (rev 4387)
+++ exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/jcr/jcr-configuration.xml 2010-09-27 06:22:01 UTC (rev 4388)
@@ -113,7 +113,6 @@
<name>autoCreatedInNewRepository</name>
<description>Node types configuration file</description>
<value>jar:/conf/ext-nodetypes-config.xml</value>
- <value>jar:/conf/organization-nodetypes.xml</value>
<value>jar:/conf/gatein-nodetypes.xml</value>
<value>jar:/conf/mop-nodetypes.xml</value>
<value>jar:/conf/application-nodetypes.xml</value>
13 years, 7 months
gatein SVN: r4387 - components/pc/trunk/samples/src/main/java/org/gatein/pc/samples/shoppingcart.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-09-26 13:48:41 -0400 (Sun, 26 Sep 2010)
New Revision: 4387
Modified:
components/pc/trunk/samples/src/main/java/org/gatein/pc/samples/shoppingcart/CartEvent.java
Log:
- Added default, no-arg constructor so that the event can be marshalled properly.
Modified: components/pc/trunk/samples/src/main/java/org/gatein/pc/samples/shoppingcart/CartEvent.java
===================================================================
--- components/pc/trunk/samples/src/main/java/org/gatein/pc/samples/shoppingcart/CartEvent.java 2010-09-26 17:03:35 UTC (rev 4386)
+++ components/pc/trunk/samples/src/main/java/org/gatein/pc/samples/shoppingcart/CartEvent.java 2010-09-26 17:48:41 UTC (rev 4387)
@@ -38,6 +38,10 @@
public static final QName QNAME = new QName("urn:jboss:portal:samples:event", "CartEvent");
+ public CartEvent()
+ {
+ }
+
public CartEvent(String id)
{
this.id = id;
@@ -47,4 +51,9 @@
{
return id;
}
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
}
13 years, 7 months
gatein SVN: r4386 - in components/pc/trunk/samples/src/main/artifacts: shoppingcart-portlet-war/WEB-INF and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-09-26 13:03:35 -0400 (Sun, 26 Sep 2010)
New Revision: 4386
Modified:
components/pc/trunk/samples/src/main/artifacts/eventdebug-portlet-war/WEB-INF/portlet.xml
components/pc/trunk/samples/src/main/artifacts/shoppingcart-portlet-war/WEB-INF/portlet.xml
Log:
- Made remotable.
Modified: components/pc/trunk/samples/src/main/artifacts/eventdebug-portlet-war/WEB-INF/portlet.xml
===================================================================
--- components/pc/trunk/samples/src/main/artifacts/eventdebug-portlet-war/WEB-INF/portlet.xml 2010-09-24 17:56:39 UTC (rev 4385)
+++ components/pc/trunk/samples/src/main/artifacts/eventdebug-portlet-war/WEB-INF/portlet.xml 2010-09-26 17:03:35 UTC (rev 4386)
@@ -51,46 +51,46 @@
</portlet>
<portlet>
- <description>Event Portlet B</description>
- <portlet-name>portletB</portlet-name>
- <display-name>Debug Portlet B</display-name>
- <portlet-class>org.gatein.pc.samples.eventdebug.EventPortletB</portlet-class>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>VIEW</portlet-mode>
- </supports>
- <portlet-info>
- <title>Debug Event B</title>
- <keywords>sample,event</keywords>
- </portlet-info>
- <supported-publishing-event>
- <qname xmlns:jbp='urn:jboss:portal:samples:eventa'>jbp:EventA</qname>
- </supported-publishing-event>
- <supported-processing-event>
- <qname xmlns:jbp='urn:jboss:portal:samples:eventb'>jbp:EventB</qname>
- </supported-processing-event>
- </portlet>
+ <description>Event Portlet B</description>
+ <portlet-name>portletB</portlet-name>
+ <display-name>Debug Portlet B</display-name>
+ <portlet-class>org.gatein.pc.samples.eventdebug.EventPortletB</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Debug Event B</title>
+ <keywords>sample,event</keywords>
+ </portlet-info>
+ <supported-publishing-event>
+ <qname xmlns:jbp='urn:jboss:portal:samples:eventa'>jbp:EventA</qname>
+ </supported-publishing-event>
+ <supported-processing-event>
+ <qname xmlns:jbp='urn:jboss:portal:samples:eventb'>jbp:EventB</qname>
+ </supported-processing-event>
+ </portlet>
<portlet>
- <description>Event Portlet C</description>
- <portlet-name>portletC</portlet-name>
- <display-name>Debug Portlet C</display-name>
- <portlet-class>org.gatein.pc.samples.eventdebug.EventPortletC</portlet-class>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>VIEW</portlet-mode>
- </supports>
- <portlet-info>
- <title>Debug Event C</title>
- <keywords>sample,event</keywords>
- </portlet-info>
- <supported-publishing-event>
- <qname xmlns:jbp='urn:jboss:portal:samples:eventb'>jbp:EventB</qname>
- </supported-publishing-event>
- <supported-processing-event>
- <qname xmlns:jbp='urn:jboss:portal:samples:eventb'>jbp:EventB</qname>
- </supported-processing-event>
- </portlet>
+ <description>Event Portlet C</description>
+ <portlet-name>portletC</portlet-name>
+ <display-name>Debug Portlet C</display-name>
+ <portlet-class>org.gatein.pc.samples.eventdebug.EventPortletC</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Debug Event C</title>
+ <keywords>sample,event</keywords>
+ </portlet-info>
+ <supported-publishing-event>
+ <qname xmlns:jbp='urn:jboss:portal:samples:eventb'>jbp:EventB</qname>
+ </supported-publishing-event>
+ <supported-processing-event>
+ <qname xmlns:jbp='urn:jboss:portal:samples:eventb'>jbp:EventB</qname>
+ </supported-processing-event>
+ </portlet>
<event-definition>
<qname xmlns:jbp='urn:jboss:portal:samples:eventa'>jbp:EventA</qname>
@@ -104,5 +104,10 @@
<qname xmlns:jbp='urn:jboss:portal:samples:eventc'>jbp:EventC</qname>
<value-type>org.gatein.pc.samples.eventdebug.EventC</value-type>
</event-definition>
+
+ <container-runtime-option>
+ <name>org.gatein.pc.remotable</name>
+ <value>true</value>
+ </container-runtime-option>
</portlet-app>
Modified: components/pc/trunk/samples/src/main/artifacts/shoppingcart-portlet-war/WEB-INF/portlet.xml
===================================================================
--- components/pc/trunk/samples/src/main/artifacts/shoppingcart-portlet-war/WEB-INF/portlet.xml 2010-09-24 17:56:39 UTC (rev 4385)
+++ components/pc/trunk/samples/src/main/artifacts/shoppingcart-portlet-war/WEB-INF/portlet.xml 2010-09-26 17:03:35 UTC (rev 4386)
@@ -66,5 +66,10 @@
<qname xmlns:jbp='urn:jboss:portal:samples:event'>jbp:CartEvent</qname>
<value-type>org.gatein.pc.samples.shoppingcart.CartEvent</value-type>
</event-definition>
+
+ <container-runtime-option>
+ <name>org.gatein.pc.remotable</name>
+ <value>true</value>
+ </container-runtime-option>
</portlet-app>
13 years, 7 months
gatein SVN: r4385 - in components/wsrp/trunk: producer/src/main/java/org/gatein/exports/impl and 1 other directories.
by do-not-reply@jboss.org
Author: mwringe
Date: 2010-09-24 13:56:39 -0400 (Fri, 24 Sep 2010)
New Revision: 4385
Added:
components/wsrp/trunk/producer/src/main/java/org/gatein/exports/ExportException.java
components/wsrp/trunk/producer/src/main/java/org/gatein/exports/OperationFailedException.java
components/wsrp/trunk/producer/src/main/java/org/gatein/exports/OperationNotSupportedException.java
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/exports/ExportManager.java
components/wsrp/trunk/producer/src/main/java/org/gatein/exports/ExportPersistenceManager.java
components/wsrp/trunk/producer/src/main/java/org/gatein/exports/impl/ExportManagerImpl.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/support/TestMockExportPersistenceManager.java
Log:
GTNWSRP-64: finish removing wsrp 2.0 specific classes from the export manager interfaces.
Added: components/wsrp/trunk/producer/src/main/java/org/gatein/exports/ExportException.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/exports/ExportException.java (rev 0)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/exports/ExportException.java 2010-09-24 17:56:39 UTC (rev 4385)
@@ -0,0 +1,50 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.exports;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class ExportException extends Exception
+{
+ public ExportException()
+ {
+ }
+
+ public ExportException(String message)
+ {
+ super(message);
+ }
+
+ public ExportException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public ExportException(Throwable cause)
+ {
+ super(cause);
+ }
+}
+
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/exports/ExportManager.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/exports/ExportManager.java 2010-09-24 14:22:28 UTC (rev 4384)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/exports/ExportManager.java 2010-09-24 17:56:39 UTC (rev 4385)
@@ -24,8 +24,6 @@
import org.gatein.exports.data.ExportContext;
import org.gatein.exports.data.ExportPortletData;
-import org.oasis.wsrp.v2.OperationFailed;
-import org.oasis.wsrp.v2.OperationNotSupported;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
@@ -44,17 +42,17 @@
ExportContext createExportContext(boolean exportByValueRequired, long currentTime, long terminationTime, long refreshDuration) throws UnsupportedEncodingException;
- ExportContext createExportContext(byte[] bytes) throws OperationFailed;
+ ExportContext createExportContext(byte[] bytes) throws OperationFailedException;
ExportPortletData createExportPortletData(ExportContext exportContextData, String portletHandle, byte[] portletState) throws UnsupportedEncodingException;
- ExportPortletData createExportPortletData(ExportContext exportContext, long currentime, long terminationTime, long refreshDuration, byte[] bytes) throws OperationFailed;
+ ExportPortletData createExportPortletData(ExportContext exportContext, long currentime, long terminationTime, long refreshDuration, byte[] bytes) throws OperationFailedException;
byte[] encodeExportPortletData(ExportContext exportContextData, ExportPortletData exportPortletData) throws UnsupportedEncodingException, IOException;
byte[] encodeExportContextData(ExportContext exportContextData) throws UnsupportedEncodingException, IOException;
- ExportContext setExportLifetime(byte[] exportContextBytes, long currentTime, long terminationTime, long refreshDuration) throws OperationFailed, OperationNotSupported;
+ ExportContext setExportLifetime(byte[] exportContextBytes, long currentTime, long terminationTime, long refreshDuration) throws OperationFailedException, OperationNotSupportedException;
void releaseExport(byte[] bytes) throws IOException;
}
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/exports/ExportPersistenceManager.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/exports/ExportPersistenceManager.java 2010-09-24 14:22:28 UTC (rev 4384)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/exports/ExportPersistenceManager.java 2010-09-24 17:56:39 UTC (rev 4385)
@@ -27,7 +27,6 @@
import org.gatein.exports.data.ExportContext;
import org.gatein.exports.data.ExportPortletData;
-import org.oasis.wsrp.v2.Lifetime;
/**
* @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
Added: components/wsrp/trunk/producer/src/main/java/org/gatein/exports/OperationFailedException.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/exports/OperationFailedException.java (rev 0)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/exports/OperationFailedException.java 2010-09-24 17:56:39 UTC (rev 4385)
@@ -0,0 +1,37 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.exports;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class OperationFailedException extends ExportException
+{
+
+ public OperationFailedException(String message)
+ {
+ super(message);
+ }
+}
+
Added: components/wsrp/trunk/producer/src/main/java/org/gatein/exports/OperationNotSupportedException.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/exports/OperationNotSupportedException.java (rev 0)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/exports/OperationNotSupportedException.java 2010-09-24 17:56:39 UTC (rev 4385)
@@ -0,0 +1,37 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.exports;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class OperationNotSupportedException extends ExportException
+{
+
+ public OperationNotSupportedException(String message)
+ {
+ super(message);
+ }
+}
+
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/exports/impl/ExportManagerImpl.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/exports/impl/ExportManagerImpl.java 2010-09-24 14:22:28 UTC (rev 4384)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/exports/impl/ExportManagerImpl.java 2010-09-24 17:56:39 UTC (rev 4385)
@@ -24,12 +24,12 @@
import org.gatein.exports.ExportManager;
import org.gatein.exports.ExportPersistenceManager;
+import org.gatein.exports.OperationFailedException;
+import org.gatein.exports.OperationNotSupportedException;
import org.gatein.exports.data.ExportContext;
import org.gatein.exports.data.ExportData;
import org.gatein.exports.data.ExportPortletData;
import org.gatein.wsrp.WSRPExceptionFactory;
-import org.oasis.wsrp.v2.OperationFailed;
-import org.oasis.wsrp.v2.OperationNotSupported;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
@@ -81,7 +81,7 @@
this.preferExportByValue = preferExportByValue;
}
- public ExportContext createExportContext(byte[] bytes) throws OperationFailed
+ public ExportContext createExportContext(byte[] bytes) throws OperationFailedException
{
try
{
@@ -99,16 +99,16 @@
}
else
{
- throw WSRPExceptionFactory.createWSException(OperationFailed.class, "Byte array format not compatible.", null);
+ throw new OperationFailedException("Byte array format not compatible");
}
}
catch (UnsupportedEncodingException e)
{
- throw WSRPExceptionFactory.createWSException(OperationFailed.class, "Could not decode the byte array.", e);
+ throw new OperationFailedException("Could not decode the byte array.");
}
catch (IOException e)
{
- throw WSRPExceptionFactory.createWSException(OperationFailed.class, "Could not decode the byte array.", e);
+ throw new OperationFailedException("Could not decode the byte array.");
}
}
@@ -118,7 +118,7 @@
return new ExportPortletData(portletHandle, portletState);
}
- public ExportPortletData createExportPortletData(ExportContext exportContextData, long currentTime, long terminationTime, long refreshDuration, byte[] bytes) throws OperationFailed
+ public ExportPortletData createExportPortletData(ExportContext exportContextData, long currentTime, long terminationTime, long refreshDuration, byte[] bytes) throws OperationFailedException
{
try
{
@@ -131,16 +131,16 @@
}
else
{
- throw WSRPExceptionFactory.createWSException(OperationFailed.class, "Bytes array format not compatible", null);
+ throw new OperationFailedException("Bytes array format not compatible");
}
}
catch (UnsupportedEncodingException e)
{
- throw WSRPExceptionFactory.createWSException(OperationFailed.class, "Could not decode the byte array.", e);
+ throw new OperationFailedException("Could not decode the byte array.");
}
catch (IOException e)
{
- throw WSRPExceptionFactory.createWSException(OperationFailed.class, "Could not decode the byte array.", e);
+ throw new OperationFailedException("Could not decode the byte array.");
}
}
@@ -170,11 +170,11 @@
}
}
- public ExportContext setExportLifetime(byte[] exportContextBytes, long currentTime, long terminationTime, long refreshDuration) throws OperationFailed, OperationNotSupported
+ public ExportContext setExportLifetime(byte[] exportContextBytes, long currentTime, long terminationTime, long refreshDuration) throws OperationNotSupportedException, OperationFailedException
{
if (getPersistenceManager() == null)
{
- WSRPExceptionFactory.throwWSException(OperationNotSupported.class, "The producer only supports export by value. Cannot call setExportLifetime on this producer", null);
+ throw new OperationNotSupportedException("The producer only supports export by value. Cannot call setExportLifetime on this producer");
}
try
@@ -189,7 +189,7 @@
if (exportContext.isExportByValue())
{
- WSRPExceptionFactory.throwWSException(OperationFailed.class, "Cannot set the lifetime for an export that was exported by value.", null);
+ throw new OperationFailedException("Cannot set the lifetime for an export that was exported by value.");
}
exportContext.setCurrentTime(currentTime);
@@ -201,12 +201,12 @@
}
else
{
- throw WSRPExceptionFactory.createWSException(OperationFailed.class, "Byte array format not recognized.", null);
+ throw new OperationFailedException("Byte array format not recognized.");
}
}
catch (IOException e)
{
- throw WSRPExceptionFactory.createWSException(OperationFailed.class, "Could not decode the byte array.", e);
+ throw new OperationFailedException("Could not decode the byte array.");
}
}
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/support/TestMockExportPersistenceManager.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/support/TestMockExportPersistenceManager.java 2010-09-24 14:22:28 UTC (rev 4384)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/support/TestMockExportPersistenceManager.java 2010-09-24 17:56:39 UTC (rev 4385)
@@ -22,13 +22,10 @@
*/
package org.gatein.wsrp.support;
-import org.gatein.common.NotYetImplemented;
import org.gatein.exports.ExportPersistenceManager;
import org.gatein.exports.data.ExportContext;
import org.gatein.exports.data.ExportPortletData;
import org.gatein.exports.data.PersistedExportData;
-import org.oasis.wsrp.v2.Lifetime;
-
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
13 years, 7 months
gatein SVN: r4384 - in portal/branches/wci: component/web/security/src/main/java/org/exoplatform/web/login and 2 other directories.
by do-not-reply@jboss.org
Author: alain_defrance
Date: 2010-09-24 10:22:28 -0400 (Fri, 24 Sep 2010)
New Revision: 4384
Modified:
portal/branches/wci/component/web/security/pom.xml
portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java
portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/Credentials.java
portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java
portal/branches/wci/web/portal/src/main/webapp/WEB-INF/conf/common/autologin-configuration.xml
Log:
WCI login feature in progress
Modified: portal/branches/wci/component/web/security/pom.xml
===================================================================
--- portal/branches/wci/component/web/security/pom.xml 2010-09-24 14:16:26 UTC (rev 4383)
+++ portal/branches/wci/component/web/security/pom.xml 2010-09-24 14:22:28 UTC (rev 4384)
@@ -63,5 +63,9 @@
<artifactId>jboss-as-tomcat</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-wci</artifactId>
+ </dependency>
</dependencies>
</project>
Modified: portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java
===================================================================
--- portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java 2010-09-24 14:16:26 UTC (rev 4383)
+++ portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java 2010-09-24 14:22:28 UTC (rev 4384)
@@ -24,9 +24,11 @@
import org.exoplatform.web.security.Credentials;
import org.exoplatform.web.security.security.AbstractTokenService;
import org.exoplatform.web.security.security.CookieTokenService;
-import org.exoplatform.web.security.security.TransientTokenService;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
+import org.gatein.wci.authentication.GenericAuthentication;
+import org.gatein.wci.authentication.TicketService;
+import org.gatein.wci.authentication.WCICredentials;
import java.io.IOException;
@@ -110,13 +112,13 @@
else
{
// We create a temporary token just for the login time
- TransientTokenService tokenService = AbstractTokenService.getInstance(TransientTokenService.class);
- String token = tokenService.createToken(credentials);
+ TicketService ticketService = GenericAuthentication.TICKET_SERVICE;
+ String ticket = ticketService.createTicket(new WCICredentials(credentials.getUsername(), credentials.getPassword()));
req.getSession().removeAttribute(InitiateLoginServlet.CREDENTIALS);
// Send authentication request
log.debug("Login initiated with credentials in session, performing authentication");
- sendAuth(resp, credentials.getUsername(), token);
+ sendAuth(resp, credentials.getUsername(), ticket);
}
}
Modified: portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/Credentials.java
===================================================================
--- portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/Credentials.java 2010-09-24 14:16:26 UTC (rev 4383)
+++ portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/Credentials.java 2010-09-24 14:22:28 UTC (rev 4384)
@@ -19,6 +19,8 @@
package org.exoplatform.web.security;
+import org.gatein.wci.authentication.WCICredentials;
+
import java.io.Serializable;
/**
@@ -59,6 +61,15 @@
this.password = password;
}
+ public Credentials(WCICredentials wciCredentials)
+ {
+ if (wciCredentials == null) {
+ throw new IllegalArgumentException("wciCredentials is null");
+ }
+ this.username = wciCredentials.getUsername();
+ this.password = wciCredentials.getPassword();
+ }
+
/**
* Returns the username.
*
Modified: portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java
===================================================================
--- portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java 2010-09-24 14:16:26 UTC (rev 4383)
+++ portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java 2010-09-24 14:22:28 UTC (rev 4384)
@@ -25,7 +25,8 @@
import org.exoplatform.services.security.jaas.AbstractLoginModule;
import org.exoplatform.web.login.InitiateLoginServlet;
import org.exoplatform.web.security.security.CookieTokenService;
-import org.exoplatform.web.security.security.TransientTokenService;
+import org.gatein.wci.authentication.GenericAuthentication;
+import org.gatein.wci.authentication.WCICredentials;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.NameCallback;
@@ -99,42 +100,49 @@
callbackHandler.handle(callbacks);
String password = new String(((PasswordCallback)callbacks[1]).getPassword());
- ExoContainer container = getContainer();
- Object o =
- ((TransientTokenService)container.getComponentInstanceOfType(TransientTokenService.class)).validateToken(
- password, true);
- if (o == null)
- o =
+ GenericAuthentication authentication = new GenericAuthentication();
+ WCICredentials wciCredentials = authentication
+ .login(((NameCallback)callbacks[0]).getName(), password.toCharArray());
+ Credentials c = null;
+ if (wciCredentials != null)
+ {
+ c = new Credentials(wciCredentials);
+ }
+ else
+ {
+ ExoContainer container = getContainer();
+ Object o =
((CookieTokenService)container.getComponentInstanceOfType(CookieTokenService.class)).validateToken(
- password, false);
- //
+ password, false);
- // For clustered config check credentials stored and propagated in session. This won't work in tomcat because
- // of lack of JACC PolicyContext so the code must be a bit defensive
- if (o == null && getContextMethod != null && password.startsWith(InitiateLoginServlet.COOKIE_NAME))
- {
- HttpServletRequest request;
- try
+ //
+ // For clustered config check credentials stored and propagated in session. This won't work in tomcat because
+ // of lack of JACC PolicyContext so the code must be a bit defensive
+ if (o == null && getContextMethod != null && password.startsWith(InitiateLoginServlet.COOKIE_NAME))
{
- request = (HttpServletRequest)getContextMethod.invoke(null, "javax.servlet.http.HttpServletRequest");
- o = request.getSession().getAttribute(AUTHENTICATED_CREDENTIALS);
+ HttpServletRequest request;
+ try
+ {
+ request = (HttpServletRequest)getContextMethod.invoke(null, "javax.servlet.http.HttpServletRequest");
+ o = request.getSession().getAttribute(AUTHENTICATED_CREDENTIALS);
+ }
+ catch(Throwable e)
+ {
+ log.error(this,e);
+ log.error("LoginModule error. Turn off session credentials checking with proper configuration option of " +
+ "LoginModule set to false");
+ }
+
}
- catch(Throwable e)
- {
- log.error(this,e);
- log.error("LoginModule error. Turn off session credentials checking with proper configuration option of " +
- "LoginModule set to false");
- }
-
+ if (o instanceof Credentials) {
+ c = (Credentials) o;
+ }
}
- if (o instanceof Credentials)
+ if (c != null)
{
- Credentials wc = (Credentials)o;
-
- // Set shared state
- sharedState.put("javax.security.auth.login.name", wc.getUsername());
- sharedState.put("javax.security.auth.login.password", wc.getPassword());
+ sharedState.put("javax.security.auth.login.name", c.getUsername());
+ sharedState.put("javax.security.auth.login.password", c.getPassword());
}
return true;
}
Modified: portal/branches/wci/web/portal/src/main/webapp/WEB-INF/conf/common/autologin-configuration.xml
===================================================================
--- portal/branches/wci/web/portal/src/main/webapp/WEB-INF/conf/common/autologin-configuration.xml 2010-09-24 14:16:26 UTC (rev 4383)
+++ portal/branches/wci/web/portal/src/main/webapp/WEB-INF/conf/common/autologin-configuration.xml 2010-09-24 14:22:28 UTC (rev 4384)
@@ -39,7 +39,7 @@
</init-params>
</component>
- <component>
+ <!--<component>
<key>org.exoplatform.web.security.security.TransientTokenService</key>
<type>org.exoplatform.web.security.security.TransientTokenService</type>
<init-params>
@@ -50,7 +50,7 @@
<value>MINUTE</value>
</values-param>
</init-params>
- </component>
+ </component>-->
<external-component-plugins>
<target-component>org.exoplatform.commons.chromattic.ChromatticManager</target-component>
13 years, 7 months
gatein SVN: r4383 - components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication.
by do-not-reply@jboss.org
Author: alain_defrance
Date: 2010-09-24 10:16:26 -0400 (Fri, 24 Sep 2010)
New Revision: 4383
Modified:
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AbstractAuthentication.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Authentication.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationListener.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthentication.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Ticket.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/TicketService.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/WCICredentials.java
Log:
login feature in progress
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AbstractAuthentication.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AbstractAuthentication.java 2010-09-24 12:37:38 UTC (rev 4382)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AbstractAuthentication.java 2010-09-24 14:16:26 UTC (rev 4383)
@@ -26,31 +26,41 @@
* @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
* @version $Revision$
*/
-public abstract class AbstractAuthentication implements Authentication {
- protected enum EventType {
+public abstract class AbstractAuthentication implements Authentication
+{
+ protected enum EventType
+ {
LOGIN, LOGOUT
}
private List<AuthenticationListener> authenticationListeners = new ArrayList<AuthenticationListener>();
- public void addAuthenticationListener(AuthenticationListener listener) {
+ public void addAuthenticationListener(AuthenticationListener listener)
+ {
authenticationListeners.add(listener);
}
- protected List<AuthenticationListener> getAuthenticationListeners() {
+ protected List<AuthenticationListener> getAuthenticationListeners()
+ {
return authenticationListeners;
}
- protected void fireEvent(EventType type, AuthenticationEvent ae) {
+ protected void fireEvent(EventType type, AuthenticationEvent ae)
+ {
String methodName = String.format(
"on%1%2",
type.toString().substring(0, 1).toUpperCase(),
type.toString().substring(1)
);
- for (AuthenticationListener currentListener : authenticationListeners) {
- try {
+ for (AuthenticationListener currentListener : authenticationListeners)
+ {
+ try
+ {
currentListener.getClass().getMethod(methodName, AuthenticationEvent.class).invoke(currentListener, ae);
- } catch (Exception ignore) {}
+ }
+ catch (Exception ignore)
+ {
+ }
}
}
}
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Authentication.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Authentication.java 2010-09-24 12:37:38 UTC (rev 4382)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Authentication.java 2010-09-24 14:16:26 UTC (rev 4383)
@@ -23,7 +23,8 @@
* @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
* @version $Revision$
*/
-public interface Authentication {
+public interface Authentication
+{
public WCICredentials login(String login, char[] password);
public void logout();
public void addAuthenticationListener(AuthenticationListener listener);
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java 2010-09-24 12:37:38 UTC (rev 4382)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java 2010-09-24 14:16:26 UTC (rev 4383)
@@ -23,5 +23,32 @@
* @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
* @version $Revision$
*/
-public interface AuthenticationEvent {
+public class AuthenticationEvent
+{
+ private String username;
+ private char[] password;
+
+ public AuthenticationEvent(String username, char[] password)
+ {
+ if (username == null)
+ {
+ throw new IllegalArgumentException("username is null");
+ }
+ if (password == null)
+ {
+ throw new IllegalArgumentException("password is null");
+ }
+ this.username = username;
+ this.password = password;
+ }
+
+ public String getUsername()
+ {
+ return username;
+ }
+
+ public char[] getPassword()
+ {
+ return password;
+ }
}
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationListener.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationListener.java 2010-09-24 12:37:38 UTC (rev 4382)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationListener.java 2010-09-24 14:16:26 UTC (rev 4383)
@@ -23,7 +23,8 @@
* @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
* @version $Revision$
*/
-public interface AuthenticationListener {
+public interface AuthenticationListener
+{
void onLogin(AuthenticationEvent ae);
void onLogout(AuthenticationEvent ae);
}
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthentication.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthentication.java 2010-09-24 12:37:38 UTC (rev 4382)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthentication.java 2010-09-24 14:16:26 UTC (rev 4383)
@@ -23,16 +23,19 @@
* @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
* @version $Revision$
*/
-public class GenericAuthentication extends AbstractAuthentication {
+public class GenericAuthentication extends AbstractAuthentication
+{
public static final TicketService TICKET_SERVICE = new TicketService();
- public WCICredentials login(String login, char[] password) {
+ public WCICredentials login(String login, char[] password)
+ {
WCICredentials credentials = TICKET_SERVICE.validateToken(new String(password), true);
- fireEvent(EventType.LOGIN, null); // TODO : create parameter
+ fireEvent(EventType.LOGIN, new AuthenticationEvent(login, password));
return credentials;
}
- public void logout() {
- fireEvent(EventType.LOGOUT, null); // TODO : create parameter
+ public void logout()
+ {
+ fireEvent(EventType.LOGOUT, new AuthenticationEvent("", new char[1]));
}
}
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Ticket.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Ticket.java 2010-09-24 12:37:38 UTC (rev 4382)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Ticket.java 2010-09-24 14:16:26 UTC (rev 4383)
@@ -23,7 +23,8 @@
* @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
* @version $Revision$
*/
-public class Ticket {
+public class Ticket
+{
//public static String EXPIRE_MILI = "expirationMilis";
//public static String USERNAME = "userName"
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/TicketService.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/TicketService.java 2010-09-24 12:37:38 UTC (rev 4382)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/TicketService.java 2010-09-24 14:16:26 UTC (rev 4383)
@@ -26,7 +26,8 @@
* @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
* @version $Revision$
*/
-public class TicketService {
+public class TicketService
+{
protected long validityMillis = 1000 * 60; // TODO : Init from confguration
@@ -34,7 +35,7 @@
protected final Random random = new Random();
- public String createToken(WCICredentials credentials)
+ public String createTicket(WCICredentials credentials)
{
if (validityMillis < 0)
{
@@ -92,6 +93,6 @@
}
private String nextTicketId() {
- return "ticket" + random.nextInt(); // TODO : maybe change this token from configuration
+ return "wci-ticket-" + random.nextInt();
}
}
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/WCICredentials.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/WCICredentials.java 2010-09-24 12:37:38 UTC (rev 4382)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/WCICredentials.java 2010-09-24 14:16:26 UTC (rev 4383)
@@ -25,7 +25,8 @@
* @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
* @version $Revision$
*/
-public class WCICredentials implements Serializable {
+public class WCICredentials implements Serializable
+{
/** . */
private final String username;
13 years, 7 months
gatein SVN: r4382 - in portal/branches/wci: packaging/jboss-as/ear and 1 other directories.
by do-not-reply@jboss.org
Author: alain_defrance
Date: 2010-09-24 08:37:38 -0400 (Fri, 24 Sep 2010)
New Revision: 4382
Modified:
portal/branches/wci/packaging/jboss-as/ear/pom.xml
portal/branches/wci/packaging/module/src/main/javascript/portal.packaging.module.js
portal/branches/wci/pom.xml
Log:
Change WCI version for the WCI login feature
Modified: portal/branches/wci/packaging/jboss-as/ear/pom.xml
===================================================================
--- portal/branches/wci/packaging/jboss-as/ear/pom.xml 2010-09-24 11:17:22 UTC (rev 4381)
+++ portal/branches/wci/packaging/jboss-as/ear/pom.xml 2010-09-24 12:37:38 UTC (rev 4382)
@@ -291,7 +291,7 @@
</dependency>
<dependency>
<groupId>org.gatein.wci</groupId>
- <artifactId>wci-tomcat</artifactId>
+ <artifactId>wci-tomcat6</artifactId>
</dependency>
<dependency>
<groupId>org.gatein.pc</groupId>
Modified: portal/branches/wci/packaging/module/src/main/javascript/portal.packaging.module.js
===================================================================
--- portal/branches/wci/packaging/module/src/main/javascript/portal.packaging.module.js 2010-09-24 11:17:22 UTC (rev 4381)
+++ portal/branches/wci/packaging/module/src/main/javascript/portal.packaging.module.js 2010-09-24 12:37:38 UTC (rev 4382)
@@ -70,7 +70,7 @@
addDependency(new Project("org.gatein.pc", "pc-controller", "jar", pcVersion)).
addDependency(new Project("org.gatein.pc", "pc-federation", "jar", pcVersion)).
addDependency(new Project("org.gatein.wci", "wci-wci", "jar", wciVersion)).
- addDependency(new Project("org.gatein.wci", "wci-tomcat", "jar", wciVersion)).
+ addDependency(new Project("org.gatein.wci", "wci-tomcat6", "jar", wciVersion)).
addDependency(new Project("org.gatein.wci", "wci-exo", "jar", wciVersion)).
addDependency(new Project("org.gatein.common", "common-common", "jar", commonVersion)).
addDependency(new Project("log4j", "log4j", "jar", "1.2.14")).
Modified: portal/branches/wci/pom.xml
===================================================================
--- portal/branches/wci/pom.xml 2010-09-24 11:17:22 UTC (rev 4381)
+++ portal/branches/wci/pom.xml 2010-09-24 12:37:38 UTC (rev 4382)
@@ -45,7 +45,7 @@
<org.shindig.version>1.0-r790473-Patch02</org.shindig.version>
<nl.captcha.simplecaptcha.version>1.1.1-GA-Patch01</nl.captcha.simplecaptcha.version>
<org.gatein.common.version>2.0.3-GA</org.gatein.common.version>
- <org.gatein.wci.version>2.0.2-GA</org.gatein.wci.version>
+ <org.gatein.wci.version>2.1.0-Alpha01-SNAPSHOT</org.gatein.wci.version>
<org.gatein.pc.version>2.2.0-Beta03</org.gatein.pc.version>
<org.picketlink.idm>1.1.5.GA</org.picketlink.idm>
<org.gatein.wsrp.version>2.0.0-Alpha02</org.gatein.wsrp.version>
@@ -288,7 +288,7 @@
</dependency>
<dependency>
<groupId>org.gatein.wci</groupId>
- <artifactId>wci-tomcat</artifactId>
+ <artifactId>wci-tomcat6</artifactId>
<version>${org.gatein.wci.version}</version>
</dependency>
<dependency>
13 years, 7 months