JBoss Portal SVN: r12277 - in branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal: wsrp/handler and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-11-10 08:37:35 -0500 (Mon, 10 Nov 2008)
New Revision: 12277
Added:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/handler/MockSOAPBody.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/handler/WSRPExtensionHandlerTestCase.java
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/handler/MockSOAPMessage.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/handler/WSRPExtensionHandler.java
Log:
- JBPORTAL-2233:
+ Re-wrote traversal logic of WSRPExtensionHandler to traverse the whole tree.
+ Added test case.
+ Removed dependency on DOMUtils.
Added: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/handler/MockSOAPBody.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/handler/MockSOAPBody.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/handler/MockSOAPBody.java 2008-11-10 13:37:35 UTC (rev 12277)
@@ -0,0 +1,57 @@
+/*
+* 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.jboss.portal.test.wsrp.handler;
+
+import org.jboss.util.xml.DOMUtils;
+import org.w3c.dom.Element;
+
+import javax.xml.soap.SOAPBody;
+import java.io.IOException;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class MockSOAPBody implements InvocationHandler
+{
+ Element body;
+
+ public MockSOAPBody(Element body)
+ {
+ this.body = body;
+ }
+
+ public static SOAPBody newInstance(String body) throws IOException
+ {
+ return (SOAPBody)Proxy.newProxyInstance(MockSOAPBody.class.getClassLoader(), new Class[]{SOAPBody.class},
+ new MockSOAPBody(DOMUtils.parse(body)));
+ }
+
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+ {
+ return method.invoke(body, args);
+ }
+}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/handler/MockSOAPMessage.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/handler/MockSOAPMessage.java 2008-11-07 23:01:47 UTC (rev 12276)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/handler/MockSOAPMessage.java 2008-11-10 13:37:35 UTC (rev 12277)
@@ -25,6 +25,7 @@
import javax.xml.soap.AttachmentPart;
import javax.xml.soap.MimeHeaders;
+import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
@@ -42,8 +43,8 @@
public class MockSOAPMessage extends SOAPMessage
{
MimeHeaders headers;
+ String messageBody;
-
public MockSOAPMessage()
{
headers = new MimeHeaders();
@@ -54,6 +55,24 @@
this.headers = headers;
}
+ public void setMessageBody(String messageBody)
+ {
+ this.messageBody = messageBody;
+ }
+
+ @Override
+ public SOAPBody getSOAPBody() throws SOAPException
+ {
+ try
+ {
+ return MockSOAPBody.newInstance(messageBody);
+ }
+ catch (IOException e)
+ {
+ throw new SOAPException(e);
+ }
+ }
+
public MimeHeaders getMimeHeaders()
{
return headers;
Added: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/handler/WSRPExtensionHandlerTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/handler/WSRPExtensionHandlerTestCase.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/handler/WSRPExtensionHandlerTestCase.java 2008-11-10 13:37:35 UTC (rev 12277)
@@ -0,0 +1,239 @@
+/*
+* 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.jboss.portal.test.wsrp.handler;
+
+import junit.framework.TestCase;
+import org.jboss.portal.wsrp.handler.WSRPExtensionHandler;
+
+import javax.xml.rpc.handler.HandlerInfo;
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPException;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class WSRPExtensionHandlerTestCase extends TestCase
+{
+ private WSRPExtensionHandler handler;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ handler = new WSRPExtensionHandler();
+
+ HandlerInfo info = new HandlerInfo();
+ Map<String, String> config = new HashMap<String, String>();
+ config.put("debug", "false");
+ config.put("removeExtensions", "true");
+ info.setHandlerConfig(config);
+ handler.init(info);
+ }
+
+ public void testRemoveExtensions() throws SOAPException
+ {
+ MockSOAPMessage message = new MockSOAPMessage();
+ message.setMessageBody("<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'\n" +
+ "\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'\n" +
+ "\txmlns:xsd='http://www.w3.org/2001/XMLSchema'\n" +
+ "\txmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>\n" +
+ "\t<env:Body>\n" +
+ "\t\t<ns0:getMarkup xmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t<ns0:registrationContext\n" +
+ "\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t<ns0:registrationHandle\n" +
+ "\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t17\n" +
+ "\t\t\t\t</ns0:registrationHandle>\n" +
+ "\t\t\t\t<ns0:registrationState\n" +
+ "\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types' />\n" +
+ "\t\t\t</ns0:registrationContext>\n" +
+ "\t\t\t<ns0:portletContext\n" +
+ "\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t<ns0:portletHandle\n" +
+ "\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t_18\n" +
+ "\t\t\t\t</ns0:portletHandle>\n" +
+ "\t\t\t\t<ns0:portletState\n" +
+ "\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types' />\n" +
+ "\t\t\t</ns0:portletContext>\n" +
+ "\t\t\t<ns0:runtimeContext\n" +
+ "\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t<ns0:userAuthentication xmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\twsrp:none\n" +
+ "\t\t\t\t</ns0:userAuthentication>\n" +
+ "\t\t\t\t<ns0:portletInstanceKey\n" +
+ "\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t949994222\n" +
+ "\t\t\t\t</ns0:portletInstanceKey>\n" +
+ "\t\t\t\t<ns0:namespacePrefix\n" +
+ "\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t__ns949994222_\n" +
+ "\t\t\t\t</ns0:namespacePrefix>\n" +
+ "\t\t\t</ns0:runtimeContext>\n" +
+ "\t\t\t<ns0:userContext\n" +
+ "\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t<ns0:userContextKey\n" +
+ "\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\twsrp:minimal\n" +
+ "\t\t\t\t</ns0:userContextKey>\n" +
+ "\t\t\t\t<ns0:profile\n" +
+ "\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types' />\n" +
+ "\t\t\t</ns0:userContext>\n" +
+ "\t\t\t<ns0:markupParams\n" +
+ "\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t<ns0:secureClientCommunication xmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\tfalse\n" +
+ "\t\t\t\t\t</ns0:secureClientCommunication>\n" +
+ "\t\t\t\t\t<ns0:locales\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\ten-US\n" +
+ "\t\t\t\t\t</ns0:locales>\n" +
+ "\t\t\t\t\t<ns0:mimeTypes\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\ttext/html\n" +
+ "\t\t\t\t\t</ns0:mimeTypes>\n" +
+ "\t\t\t\t\t<ns0:mimeTypes\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\ttext/xml\n" +
+ "\t\t\t\t\t</ns0:mimeTypes>\n" +
+ "\t\t\t\t\t<ns0:mimeTypes\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\ttext/vnd.oracle.mobilexml\n" +
+ "\t\t\t\t\t</ns0:mimeTypes>\n" +
+ "\t\t\t\t\t<ns0:mimeTypes\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\t*\n" +
+ "\t\t\t\t\t</ns0:mimeTypes>\n" +
+ "\t\t\t\t\t<ns0:mode\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\twsrp:view\n" +
+ "\t\t\t\t\t</ns0:mode>\n" +
+ "\t\t\t\t\t<ns0:windowState\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\twsrp:normal\n" +
+ "\t\t\t\t\t</ns0:windowState>\n" +
+ "\t\t\t\t\t<ns0:clientData\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\t<ns0:userAgent\n" +
+ "\t\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\t\tMozilla/5.0 (Windows; U; Windows NT 5.1;\n" +
+ "\t\t\t\t\t\t\ten-US; rv:1.9.0.3) Gecko/2008092417\n" +
+ "\t\t\t\t\t\t\tFirefox/3.0.3\n" +
+ "\t\t\t\t\t\t</ns0:userAgent>\n" +
+ "\t\t\t\t\t\t<ns0:extensions\n" +
+ "\t\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\t\t<ns1:GenericExtension\n" +
+ "\t\t\t\t\t\t\t\txmlns:ns1='http://xmlns.oracle.com/portal/wsrp/v1'>\n" +
+ "\t\t\t\t\t\t\t\t<ns0:NamedString name='CONNECTION'\n" +
+ "\t\t\t\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\t\t\t\t<ns0:value\n" +
+ "\t\t\t\t\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\t\t\t\t\tkeep-alive\n" +
+ "\t\t\t\t\t\t\t\t\t</ns0:value>\n" +
+ "\t\t\t\t\t\t\t\t</ns0:NamedString>\n" +
+ "\t\t\t\t\t\t\t\t<ns0:NamedString name='ACCEPT-ENCODING'\n" +
+ "\t\t\t\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\t\t\t\t<ns0:value xmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\t\t\t\t\tgzip,deflate\n" +
+ "\t\t\t\t\t\t\t\t\t\t</ns0:value>\n" +
+ "\t\t\t\t\t\t\t\t</ns0:NamedString>\n" +
+ "\t\t\t\t\t\t\t\t<ns0:NamedString name='KEEP-ALIVE'\n" +
+ "\t\t\t\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\t\t\t\t<ns0:value xmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\t\t\t\t\t300\n" +
+ "\t\t\t\t\t\t\t\t\t</ns0:value>\n" +
+ "\t\t\t\t\t\t\t\t</ns0:NamedString>\n" +
+ "\t\t\t\t\t\t\t\t<ns0:NamedString name='HOST'\n" +
+ "\t\t\t\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\t\t\t\t<ns0:value xmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\t\t\t\t\t127.0.0.1:8988\n" +
+ "\t\t\t\t\t\t\t\t\t</ns0:value>\n" +
+ "\t\t\t\t\t\t\t\t</ns0:NamedString>\n" +
+ "\t\t\t\t\t\t\t</ns1:GenericExtension>\n" +
+ "\t\t\t\t\t\t</ns0:extensions>\n" +
+ "\t\t\t\t\t</ns0:clientData>\n" +
+ "\t\t\t\t\t<ns0:markupCharacterSets\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\tUTF-8\n" +
+ "\t\t\t\t\t</ns0:markupCharacterSets>\n" +
+ "\t\t\t\t\t<ns0:validNewModes\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\twsrp:view\n" +
+ "\t\t\t\t\t</ns0:validNewModes>\n" +
+ "\t\t\t\t\t<ns0:validNewModes\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\turn:javax:portlet:mode:custo m:edit_defaults\n" +
+ "\t\t\t\t\t</ns0:validNewModes>\n" +
+ "\t\t\t\t\t<ns0:validNewModes\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\twsrp:edit\n" +
+ "\t\t\t\t\t</ns0:validNewModes>\n" +
+ "\t\t\t\t\t<ns0:validNewModes\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\twsrp:help\n" +
+ "\t\t\t\t\t</ns0:validNewModes>\n" +
+ "\t\t\t\t\t<ns0:validNewModes\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\turn:javax:portlet:mode:custo m:about\n" +
+ "\t\t\t\t\t</ns0:validNewModes>\n" +
+ "\t\t\t\t\t<ns0:validNewModes\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\turn:javax:portlet:mode:custo m:print\n" +
+ "\t\t\t\t\t</ns0:validNewModes>\n" +
+ "\t\t\t\t\t<ns0:validNewModes\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\turn:javax:portlet:mode:custo m:config\n" +
+ "\t\t\t\t\t</ns0:validNewModes>\n" +
+ "\t\t\t\t\t<ns0:validNewWindowStates\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\twsrp:normal\n" +
+ "\t\t\t\t\t</ns0:validNewWindowStates>\n" +
+ "\t\t\t\t\t<ns0:validNewWindowStates\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\twsrp:maximized\n" +
+ "\t\t\t\t\t</ns0:validNewWindowStates>\n" +
+ "\t\t\t\t\t<ns0:validNewWindowStates\n" +
+ "\t\t\t\t\t\txmlns:ns0='urn:oasis:names:tc:wsrp:v1:types'>\n" +
+ "\t\t\t\t\t\twsrp:minimized\n" +
+ "\t\t\t\t\t</ns0:validNewWindowStates>\n" +
+ "\t\t\t</ns0:markupParams>\n" +
+ "\t\t</ns0:getMarkup>\n" +
+ "\t</env:Body>\n" +
+ "</env:Envelope>");
+
+
+ SOAPMessageContext msgContext = MockSOAPMessageContext.createMessageContext(message, getClass().getClassLoader());
+
+ handler.handleRequest(msgContext);
+
+ SOAPBody body = msgContext.getMessage().getSOAPBody();
+ String asString = body.toString();
+ assertFalse(asString.contains("ns0:extensions"));
+ assertFalse(asString.contains("ns1:GenericExtensions"));
+ assertFalse(asString.contains("ACCEPT-ENCODING"));
+ }
+}
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/handler/WSRPExtensionHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/handler/WSRPExtensionHandler.java 2008-11-07 23:01:47 UTC (rev 12276)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/handler/WSRPExtensionHandler.java 2008-11-10 13:37:35 UTC (rev 12277)
@@ -23,23 +23,18 @@
package org.jboss.portal.wsrp.handler;
import org.jboss.logging.Logger;
-import org.jboss.util.xml.DOMUtils;
-import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
import javax.xml.namespace.QName;
import javax.xml.rpc.handler.GenericHandler;
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.MessageContext;
import javax.xml.rpc.handler.soap.SOAPMessageContext;
-import javax.xml.soap.Node;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPMessage;
-import java.util.Iterator;
-//$Id$
-
/**
- * JAX-RPC Handler that strips the SOAP Message of any WSRP extensions. Right now, only operates on response messages.
+ * JAX-RPC Handler that strips the SOAP Message of any WSRP extensions.
*
* @author <a href="mailto:Anil.Saldhana@jboss.org">Anil Saldhana</a>
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
@@ -93,31 +88,7 @@
if (removeExtensions)
{
SOAPBody soapBody = soapMessage.getSOAPBody();
- Element firstEl = DOMUtils.getFirstChildElement(soapBody);
- Iterator iter = DOMUtils.getChildElements(firstEl);
- while (iter.hasNext())
- {
- Element elt = (Element)iter.next();
- String nodeName = elt.getNodeName();
- if (EXTENSIONS.equals(nodeName))
- {
- removeChildrenOf(elt);
- }
- else
- {
- Iterator extensions = DOMUtils.getChildElements(elt, EXTENSIONS);
- if (extensions.hasNext())
- {
- log.debug("extensions exist on " + nodeName);
- Element exts = (Element)extensions.next();
- removeChildrenOf(exts);
- if (debug)
- {
- soapMessage.writeTo(System.out);
- }
- }
- }
- }
+ traverseAndRemoveExtensions(soapBody);
}
}
catch (Exception e)
@@ -126,27 +97,39 @@
}
}
- private void removeChildrenOf(Element element)
+ /**
+ * Remove extensions nodes recursively, depth-first.
+ *
+ * @param node
+ */
+ private void traverseAndRemoveExtensions(org.w3c.dom.Node node)
{
- Iterator children = DOMUtils.getChildElements(element);
- while (children.hasNext())
+ NodeList children = node.getChildNodes();
+ int childrenNb = children.getLength();
+ for (int i = 0; i < childrenNb; i++)
{
- Node node = (Node)children.next();
- element.removeChild(node);
- }
- }
+ org.w3c.dom.Node child = children.item(i);
- /*private boolean shouldRemoveWSRPExtensions(SOAPHeader soapHeader)
- {
- boolean result = false;
- if (soapHeader != null)
- {
- Iterator iter = DOMUtils.getChildElements(soapHeader, "jboss_wsrp_remove_extension");
- if (iter.hasNext())
+ // only process elements
+ if (org.w3c.dom.Node.ELEMENT_NODE == child.getNodeType())
{
- result = true;
+ String name = child.getLocalName();
+
+ // if we found an extension, remove it or continue
+ if (EXTENSIONS.equals(name))
+ {
+ if (debug)
+ {
+ log.debug("Extensions removed on " + name);
+ }
+ node.removeChild(child);
+ break;
+ }
+ else
+ {
+ traverseAndRemoveExtensions(child);
+ }
}
}
- return result;
- }*/
+ }
}
15 years, 6 months
JBoss Portal SVN: r12276 - branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-11-07 18:01:47 -0500 (Fri, 07 Nov 2008)
New Revision: 12276
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java
Log:
- JBPORTAL-2229: Check that portal dir exists in JBoss data dir, if not create it.
- JBPORTAL-2231: Updated schema version.
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java 2008-11-07 22:41:08 UTC (rev 12275)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java 2008-11-07 23:01:47 UTC (rev 12276)
@@ -73,13 +73,16 @@
private static DefaultSchemaResolver RESOLVER;
+ private static final String PRODUCER_NAMESPACE = "urn:jboss:portal:wsrp:producer:v2_7";
+ private static final String PRODUCER_XSD = "jboss-wsrp-producer_2_7.xsd";
+
static
{
RESOLVER = new DefaultSchemaResolver();
RESOLVER.setCacheResolvedSchemas(true);
RESOLVER.addSchemaLocation("http://www.w3.org/XML/1998/namespace", "xsd/xml.xsd");
RESOLVER.addSchemaLocation("urn:jboss:portal:wsrp:producer:v2_6", "xsd/jboss-wsrp-producer_2_6.xsd");
- RESOLVER.addSchemaLocation("urn:jboss:portal:wsrp:producer:v2_7", "xsd/jboss-wsrp-producer_2_7.xsd");
+ RESOLVER.addSchemaLocation(PRODUCER_NAMESPACE, "xsd/" + PRODUCER_XSD);
}
public String getConfigLocation()
@@ -111,8 +114,27 @@
{
throw new RuntimeException("Couldn't locate server data dir!", e);
}
- config = new File(dataDir, "portal/wsrp-producer-config.xml");
+ // if "portal" directory doesn't exist already in data, create it (JBPORTAL-2229)
+ File portalDir = new File(dataDir, "portal");
+ if (!portalDir.exists())
+ {
+ if (!portalDir.mkdir())
+ {
+ throw new RuntimeException("Couldn't create 'portal' directory in " + dataDir.getAbsolutePath());
+ }
+ }
+ else
+ {
+ if (!portalDir.isDirectory())
+ {
+ throw new RuntimeException("Was expecting a directory named 'portal' in " + dataDir.getAbsolutePath()
+ + ", not a simple file! Cannot continue.");
+ }
+ }
+
+ config = new File(portalDir, "wsrp-producer-config.xml");
+
reloadConfiguration();
}
@@ -129,7 +151,7 @@
if (config.exists())
{
log.debug("Configuration saved at " + config.getCanonicalPath()
- + " is not loading properly. Falling back to default configuration.");
+ + " is not loading properly. Falling back to default configuration.");
config.delete(); // delete improper config so that we retrieve the default configuration
loadConfigurationAt(getConfigLocationURL());
}
@@ -229,7 +251,7 @@
StringWriter xmlOutput = new StringWriter();
// get the XML Schema source
- InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("xsd/jboss-wsrp-producer_2_6.xsd");
+ InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("xsd/" + PRODUCER_XSD);
Reader xsReader = new InputStreamReader(is);
@@ -239,15 +261,15 @@
marshaller.setSchemaResolver(RESOLVER);
// we need to specify what elements are top most (roots) providing namespace URI, prefix and local name
- marshaller.addRootElement("urn:jboss:portal:wsrp:producer:v2_6", "", "producer-configuration");
+ marshaller.addRootElement(PRODUCER_NAMESPACE, "", "producer-configuration");
// declare default namespace
- marshaller.declareNamespace("wpc", "urn:jboss:portal:wsrp:producer:v2_6");
+ marshaller.declareNamespace("wpc", PRODUCER_NAMESPACE);
// add schema location by declaring xsi namespace and adding xsi:schemaLocation attribute
marshaller.declareNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
marshaller.addAttribute("xsi", "schemaLocation", "string",
- "urn:jboss:portal:wsrp:producer:v2_6 http://www.jboss.org/portal/xsd/jboss-wsrp-producer_2_6.xsd");
+ PRODUCER_NAMESPACE + " http://www.jboss.org/portal/xsd/" + PRODUCER_XSD);
// create an instance of Object Model Provider
ObjectModelProvider provider = new ProducerConfigurationProvider();
15 years, 6 months
JBoss Portal SVN: r12275 - branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-11-07 17:41:08 -0500 (Fri, 07 Nov 2008)
New Revision: 12275
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java
Log:
- JBPORTAL-2229: Check that portal dir exists in JBoss data dir, if not create it.
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java 2008-11-07 22:17:31 UTC (rev 12274)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java 2008-11-07 22:41:08 UTC (rev 12275)
@@ -108,8 +108,27 @@
{
throw new RuntimeException("Couldn't locate server data dir!", e);
}
- config = new File(dataDir, "portal/wsrp-producer-config.xml");
+ // if "portal" directory doesn't exist already in data, create it (JBPORTAL-2229)
+ File portalDir = new File(dataDir, "portal");
+ if (!portalDir.exists())
+ {
+ if (!portalDir.mkdir())
+ {
+ throw new RuntimeException("Couldn't create 'portal' directory in " + dataDir.getAbsolutePath());
+ }
+ }
+ else
+ {
+ if (!portalDir.isDirectory())
+ {
+ throw new RuntimeException("Was expecting a directory named 'portal' in " + dataDir.getAbsolutePath()
+ + ", not a simple file! Cannot continue.");
+ }
+ }
+
+ config = new File(portalDir, "wsrp-producer-config.xml");
+
reloadConfiguration();
}
@@ -126,7 +145,7 @@
if (config.exists())
{
log.debug("Configuration saved at " + config.getCanonicalPath()
- + " is not loading properly. Falling back to default configuration.");
+ + " is not loading properly. Falling back to default configuration.");
config.delete(); // delete improper config so that we retrieve the default configuration
loadConfigurationAt(getConfigLocationURL());
}
@@ -235,7 +254,7 @@
// add schema location by declaring xsi namespace and adding xsi:schemaLocation attribute
marshaller.declareNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
marshaller.addAttribute("xsi", "schemaLocation", "string",
- "urn:jboss:portal:wsrp:producer:v2_6 http://www.jboss.org/portal/xsd/jboss-wsrp-producer_2_6.xsd");
+ "urn:jboss:portal:wsrp:producer:v2_6 http://www.jboss.org/portal/xsd/jboss-wsrp-producer_2_6.xsd");
// create an instance of Object Model Provider
ObjectModelProvider provider = new ProducerConfigurationProvider();
15 years, 6 months
JBoss Portal SVN: r12274 - in branches/JBoss_Portal_Branch_2_6/core-wsrp/src: resources/portal-wsrp-admin-war/WEB-INF/classes and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-11-07 17:17:31 -0500 (Fri, 07 Nov 2008)
New Revision: 12274
Modified:
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties
Log:
- JBPORTAL-2230: Single quotes need to be escape in localized messages containing parameters.
Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2008-11-07 22:14:25 UTC (rev 12273)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2008-11-07 22:17:31 UTC (rev 12274)
@@ -235,7 +235,7 @@
{
RefreshResult result = consumer.refresh(true);
- String status = getLocalizationKeyFrom(result);
+ String statusMessage = getLocalizationKeyFrom(result);
if (result.hasIssues())
{
// create the expected registration info and make it available
@@ -243,7 +243,7 @@
expected.refresh(result.getServiceDescription(), consumer.getProducerId(), true, true, true);
setExpectedRegistrationInfo(expected);
- beanContext.createErrorMessage(status);
+ beanContext.createErrorMessage(statusMessage);
// refresh had issues, we should deactivate this consumer
registry.deactivateConsumerWith(consumer.getProducerId());
@@ -260,7 +260,7 @@
registry.deactivateConsumerWith(consumer.getProducerId());
}
- beanContext.createInfoMessage(status);
+ beanContext.createInfoMessage(statusMessage);
}
return result;
}
Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties 2008-11-07 22:14:25 UTC (rev 12273)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties 2008-11-07 22:17:31 UTC (rev 12274)
@@ -138,7 +138,7 @@
bean_support_cause = Cause:
# ConsumerBean
-bean_consumer_cannot_find_consumer = Couldn't find consumer ''{0}''!
+bean_consumer_cannot_find_consumer = Couldn''t find consumer ''{0}''!
bean_consumer_cannot_update_consumer = Couldn't update consumer!
bean_consumer_cannot_refresh_consumer = Couldn't refresh consumer!
bean_consumer_modify_reg_success = Successfully modified registration!
@@ -161,7 +161,7 @@
# ProducerBean
bean_producer_regpolicy_unset = RegistrationPolicy unset
-bean_producer_cannot_save = Couldn't save producer configuration. Cause: {0}
-bean_producer_cannot_reload = Couldn't reload producer configuration. Cause: {0}
+bean_producer_cannot_save = Couldn''t save producer configuration. Cause: {0}
+bean_producer_cannot_reload = Couldn''t reload producer configuration. Cause: {0}
bean_producer_save_success = Producer configuration successfully saved!
bean_producer_cancel_success = All modifications made to the producer configuration have been cancelled!
Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties 2008-11-07 22:14:25 UTC (rev 12273)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties 2008-11-07 22:17:31 UTC (rev 12274)
@@ -34,20 +34,20 @@
path_consumers_inactive = inactif
path_consumers_refreshNeeded = (rafra\u00eechissement requis)
confirm_delete_consumer_cancel=Annuler
-confirm_delete_consumer_message=Vous \u00eates sur le point d'effacer le concommateur ''{0}''!
+confirm_delete_consumer_message=Vous \u00eates sur le point d''effacer le concommateur ''{0}''!
confirm_delete_consumer_submit=Effacer consommateur
confirm_delete_consumer_title=Voulez-vous r\u00e9ellement effacer le consommateur ''{0}''?
confirm_detete_consumer_proceed=\u00cates-vous certains de vouloir proc\u00e9der?
confirm_delete_registration_cancel=Annuler
-confirm_delete_registration_message=Vous \u00eates sur le point d'effacer les informations locales d'enregistrement pour le consommateur ''{0}''! \n\
-Ceci n'est uniquement requis dans le cas o\u00f9 ce consommateur se serait enregistr\u00e9 aupr\u00e8s d'un producteur distant \n\
-qui aurait ensuite \u00e9t\u00e9 modifi\u00e9 pour ne plus requerir d'enregistrement. \n\
-N'effacez les informations locales d'enregistrement que si vous rencontrez des probl\u00e8mes, sp\u00e9cifiques \u00e0 cette \n\
-situation, avec le producteur distant. Effacer les donn\u00e9es d'enregistrement quand ce n'est pas requis peut entra\u00eener \n\
-l'incapacit\u00e9 future d'acc\u00e9der \u00e0 ce producteur.
+confirm_delete_registration_message=Vous \u00eates sur le point d'effacer les informations locales d''enregistrement pour le consommateur ''{0}''! \n\
+Ceci n''est uniquement requis dans le cas o\u00f9 ce consommateur se serait enregistr\u00e9 aupr\u00e8s d''un producteur distant \n\
+qui aurait ensuite \u00e9t\u00e9 modifi\u00e9 pour ne plus requ\u00e9rir d''enregistrement. \n\
+N''effacez les informations locales d''enregistrement que si vous rencontrez des probl\u00e8mes, sp\u00e9cifiques \u00e0 cette \n\
+situation, avec le producteur distant. Effacer les donn\u00e9es d'enregistrement quand ce n''est pas requis peut entra\u00eener \n\
+l''incapacit\u00e9 future d''acc\u00e9der \u00e0 ce producteur.
confirm_delete_registration_proceed=\u00cates-vous certains de vouloir proc\u00e9der?
confirm_delete_registration_submit=Effacer enregistrement
-confirm_delete_registration_title=Voulez-vous r\u00e9ellement effacer l'enregistrement du consommateur ''{0}''?
+confirm_delete_registration_title=Voulez-vous r\u00e9ellement effacer l''enregistrement du consommateur ''{0}''?
consumers_create_submit=Cr\u00e9er Consommateur
consumers_create_title=Cr\u00e9er un consommateur nomm\u00e9:
consumers_table_action_activate=Activer
@@ -89,12 +89,12 @@
edit_consumer_registration_no_props=Enregistrement indiqu\u00e9 sans besoin de propri\u00e9t\u00e9s d'enregistrement
edit_consumer_registration_update_props=Mettre les propri\u00e9t\u00e9s \u00e0 jour
bean_consumer_cannot_erase_reg=L'effacement de l'enregistrement n'a pu \u00eatre effectu\u00e9!
-bean_consumer_cannot_find_consumer=Le consommateur ''{0}'' n'a pu \u00eatre trouv\u00e9!
+bean_consumer_cannot_find_consumer=Le consommateur ''{0}'' n''a pu \u00eatre trouv\u00e9!
bean_consumer_cannot_modify_reg=La modification de l'enregistrement n'a pu \u00eatre effectu\u00e9e!
bean_consumer_cannot_refresh_consumer=Le rafra\u00eechissement du consommateur n'a pu \u00eatre effectu\u00e9!
bean_consumer_cannot_update_consumer=La mise \u00e0 jour du consommateur n'a pu \u00eatre effectu\u00e9e!
bean_consumer_invalid_modify=Tentative invalide de modification d'enregistrement sans modifications locales.
-bean_consumer_malformed_url=''{0}'' n'est pas une URL valide: {1}
+bean_consumer_malformed_url=''{0}'' n''est pas une URL valide: {1}
bean_consumer_modify_reg_success=Enregistrement modifi\u00e9!
bean_support_cause=Cause:
bean_support_unexpected_error=Une erreur inattendue s'est produite:
@@ -104,8 +104,8 @@
bean_producer_cannot_save=La sauvegarde de la configuration du producteur a \u00e9chou\u00e9. Cause: {0}
bean_producer_regpolicy_unset=RegistrationPolicy non sp\u00e9cifi\u00e9e
confirm_delete_reg_property_cancel=Annuler
-confirm_delete_reg_property_message=Vous \u00eates sur le point d'effacer la description de la propri\u00e9t\u00e9 d'enregistrement ''{0}''! \n\
-Cel\u00e0 va entra\u00eener l'invalidation des enregistrements des consommateurs qui devront alors modifier \n\
+confirm_delete_reg_property_message=Vous \u00eates sur le point d''effacer la description de la propri\u00e9t\u00e9 d'enregistrement ''{0}''! \n\
+Cel\u00e0 va entra\u00eener l''invalidation des enregistrements des consommateurs qui devront alors modifier \n\
leur information d'enregistrement.
confirm_delete_reg_property_submit=Effacer la propri\u00e9t\u00e9
confirm_delete_reg_property_title=Voulez-vous r\u00e9ellement effacer la description de la propri\u00e9t\u00e9 d'enregistrement ''{0}''?
15 years, 6 months
JBoss Portal SVN: r12273 - in branches/JBoss_Portal_Branch_2_7: core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes and 2 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-11-07 17:14:25 -0500 (Fri, 07 Nov 2008)
New Revision: 12273
Added:
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/test/faces/MessageFormatTestCase.java
Modified:
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource.properties
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_fr.properties
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java
Log:
- JBPORTAL-2230:
+ Wrong version of createErrorMessage was sometimes called.
+ Single quotes need to be escape in localized messages containing parameters (added test case showing the issue, even though it's not technically a Portal issue)
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2008-11-07 14:15:13 UTC (rev 12272)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2008-11-07 22:14:25 UTC (rev 12273)
@@ -515,7 +515,7 @@
}
catch (MalformedURLException e)
{
- beanContext.createErrorMessage(target, MALFORMED_URL, newValue, e.getLocalizedMessage());
+ beanContext.createTargetedErrorMessage(target, MALFORMED_URL, newValue, e.getLocalizedMessage());
}
}
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2008-11-07 14:15:13 UTC (rev 12272)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2008-11-07 22:14:25 UTC (rev 12273)
@@ -236,7 +236,7 @@
{
RefreshResult result = consumer.refresh(true);
- String status = getLocalizationKeyFrom(result);
+ String statusMessage = getLocalizationKeyFrom(result);
if (result.hasIssues())
{
// create the expected registration info and make it available
@@ -244,7 +244,7 @@
expected.refresh(result.getServiceDescription(), consumer.getProducerId(), true, true, true);
setExpectedRegistrationInfo(expected);
- beanContext.createErrorMessage(status);
+ beanContext.createErrorMessage(statusMessage);
// refresh had issues, we should deactivate this consumer
registry.deactivateConsumerWith(consumer.getProducerId());
@@ -261,7 +261,7 @@
registry.deactivateConsumerWith(consumer.getProducerId());
}
- beanContext.createInfoMessage(status);
+ beanContext.createInfoMessage(statusMessage);
}
return result;
}
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java 2008-11-07 14:15:13 UTC (rev 12272)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java 2008-11-07 22:14:25 UTC (rev 12273)
@@ -23,7 +23,6 @@
package org.jboss.portal.wsrp.admin.ui;
-import org.jboss.portal.faces.gui.BeanContext;
import org.jboss.portal.faces.gui.ManagedBean;
import org.jboss.portal.registration.RegistrationPolicy;
import org.jboss.portal.registration.policies.DefaultRegistrationPolicy;
@@ -183,7 +182,7 @@
catch (Exception e)
{
log.debug(e);
- beanContext.createErrorMessage(BeanContext.STATUS, "bean_producer_cannot_save", e.getLocalizedMessage());
+ beanContext.createErrorMessage("bean_producer_cannot_save", e.getLocalizedMessage());
}
return PRODUCER;
}
@@ -198,7 +197,7 @@
catch (Exception e)
{
log.debug(e);
- beanContext.createErrorMessage(BeanContext.STATUS, "bean_producer_cannot_reload", e.getLocalizedMessage());
+ beanContext.createErrorMessage("bean_producer_cannot_reload", e.getLocalizedMessage());
}
return PRODUCER;
}
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource.properties 2008-11-07 14:15:13 UTC (rev 12272)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource.properties 2008-11-07 22:14:25 UTC (rev 12273)
@@ -138,7 +138,7 @@
bean_support_cause = Cause:
# ConsumerBean
-bean_consumer_cannot_find_consumer = Couldn't find consumer ''{0}''!
+bean_consumer_cannot_find_consumer = Couldn''t find consumer ''{0}''!
bean_consumer_cannot_update_consumer = Couldn't update consumer!
bean_consumer_cannot_refresh_consumer = Couldn't refresh consumer!
bean_consumer_modify_reg_success = Successfully modified registration!
@@ -161,8 +161,8 @@
# ProducerBean
bean_producer_regpolicy_unset = RegistrationPolicy unset
-bean_producer_cannot_save = Couldn't save producer configuration. Cause: {0}
-bean_producer_cannot_reload = Couldn't reload producer configuration. Cause: {0}
+bean_producer_cannot_save = Couldn''t save producer configuration. Cause: {0}
+bean_producer_cannot_reload = Couldn''t reload producer configuration. Cause: {0}
bean_producer_save_success = Producer configuration successfully saved!
bean_producer_cancel_success = All modifications made to the producer configuration have been cancelled!
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_fr.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_fr.properties 2008-11-07 14:15:13 UTC (rev 12272)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_fr.properties 2008-11-07 22:14:25 UTC (rev 12273)
@@ -18,7 +18,7 @@
# 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. #
+# 02110-1301 USA, or see the FSF site: http://www.fsf.org. # `
################################################################################
# JBoss Portal display information
org.jboss.portal.object.name.WSRPConfigurationPortlet = Configuration WSRP
@@ -34,20 +34,20 @@
path_consumers_inactive = inactif
path_consumers_refreshNeeded = (rafra\u00eechissement requis)
confirm_delete_consumer_cancel=Annuler
-confirm_delete_consumer_message=Vous \u00eates sur le point d'effacer le concommateur ''{0}''!
+confirm_delete_consumer_message=Vous \u00eates sur le point d''effacer le concommateur ''{0}''!
confirm_delete_consumer_submit=Effacer consommateur
confirm_delete_consumer_title=Voulez-vous r\u00e9ellement effacer le consommateur ''{0}''?
confirm_detete_consumer_proceed=\u00cates-vous certains de vouloir proc\u00e9der?
confirm_delete_registration_cancel=Annuler
-confirm_delete_registration_message=Vous \u00eates sur le point d'effacer les informations locales d'enregistrement pour le consommateur ''{0}''! \n\
-Ceci n'est uniquement requis dans le cas o\u00f9 ce consommateur se serait enregistr\u00e9 aupr\u00e8s d'un producteur distant \n\
-qui aurait ensuite \u00e9t\u00e9 modifi\u00e9 pour ne plus requerir d'enregistrement. \n\
-N'effacez les informations locales d'enregistrement que si vous rencontrez des probl\u00e8mes, sp\u00e9cifiques \u00e0 cette \n\
-situation, avec le producteur distant. Effacer les donn\u00e9es d'enregistrement quand ce n'est pas requis peut entra\u00eener \n\
-l'incapacit\u00e9 future d'acc\u00e9der \u00e0 ce producteur.
+confirm_delete_registration_message=Vous \u00eates sur le point d''effacer les informations locales d''enregistrement pour le consommateur ''{0}''! \n\
+Ceci n''est uniquement requis dans le cas o\u00f9 ce consommateur se serait enregistr\u00e9 aupr\u00e8s d''un producteur distant \n\
+qui aurait ensuite \u00e9t\u00e9 modifi\u00e9 pour ne plus requerir d''enregistrement. \n\
+N''effacez les informations locales d''enregistrement que si vous rencontrez des probl\u00e8mes, sp\u00e9cifiques \u00e0 cette \n\
+situation, avec le producteur distant. Effacer les donn\u00e9es d''enregistrement quand ce n''est pas requis peut entra\u00eener \n\
+l''incapacit\u00e9 future d''acc\u00e9der \u00e0 ce producteur.
confirm_delete_registration_proceed=\u00cates-vous certains de vouloir proc\u00e9der?
confirm_delete_registration_submit=Effacer enregistrement
-confirm_delete_registration_title=Voulez-vous r\u00e9ellement effacer l'enregistrement du consommateur ''{0}''?
+confirm_delete_registration_title=Voulez-vous r\u00e9ellement effacer l''enregistrement du consommateur ''{0}''?
consumers_create_submit=Cr\u00e9er Consommateur
consumers_create_title=Cr\u00e9er un consommateur nomm\u00e9:
consumers_table_action_activate=Activer
@@ -89,12 +89,12 @@
edit_consumer_registration_no_props=Enregistrement indiqu\u00e9 sans besoin de propri\u00e9t\u00e9s d'enregistrement
edit_consumer_registration_update_props=Mettre les propri\u00e9t\u00e9s \u00e0 jour
bean_consumer_cannot_erase_reg=L'effacement de l'enregistrement n'a pu \u00eatre effectu\u00e9!
-bean_consumer_cannot_find_consumer=Le consommateur ''{0}'' n'a pu \u00eatre trouv\u00e9!
+bean_consumer_cannot_find_consumer=Le consommateur ''{0}'' n''a pu \u00eatre trouv\u00e9!
bean_consumer_cannot_modify_reg=La modification de l'enregistrement n'a pu \u00eatre effectu\u00e9e!
bean_consumer_cannot_refresh_consumer=Le rafra\u00eechissement du consommateur n'a pu \u00eatre effectu\u00e9!
bean_consumer_cannot_update_consumer=La mise \u00e0 jour du consommateur n'a pu \u00eatre effectu\u00e9e!
bean_consumer_invalid_modify=Tentative invalide de modification d'enregistrement sans modifications locales.
-bean_consumer_malformed_url=''{0}'' n'est pas une URL valide: {1}
+bean_consumer_malformed_url=''{0}'' n''est pas une URL valide: {1}
bean_consumer_modify_reg_success=Enregistrement modifi\u00e9!
bean_support_cause=Cause:
bean_support_unexpected_error=Une erreur inattendue s'est produite:
@@ -104,8 +104,8 @@
bean_producer_cannot_save=La sauvegarde de la configuration du producteur a \u00e9chou\u00e9. Cause: {0}
bean_producer_regpolicy_unset=RegistrationPolicy non sp\u00e9cifi\u00e9e
confirm_delete_reg_property_cancel=Annuler
-confirm_delete_reg_property_message=Vous \u00eates sur le point d'effacer la description de la propri\u00e9t\u00e9 d'enregistrement ''{0}''! \n\
-Cel\u00e0 va entra\u00eener l'invalidation des enregistrements des consommateurs qui devront alors modifier \n\
+confirm_delete_reg_property_message=Vous \u00eates sur le point d''effacer la description de la propri\u00e9t\u00e9 d''enregistrement ''{0}''! \n\
+Cel\u00e0 va entra\u00eener l''invalidation des enregistrements des consommateurs qui devront alors modifier \n\
leur information d'enregistrement.
confirm_delete_reg_property_submit=Effacer la propri\u00e9t\u00e9
confirm_delete_reg_property_title=Voulez-vous r\u00e9ellement effacer la description de la propri\u00e9t\u00e9 d'enregistrement ''{0}''?
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java 2008-11-07 14:15:13 UTC (rev 12272)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java 2008-11-07 22:14:25 UTC (rev 12273)
@@ -65,7 +65,7 @@
createLocalizedMessage(STATUS, message, getErrorSeverity(), params);
}
- protected void createErrorMessage(String target, String message, Object... params)
+ public void createTargetedErrorMessage(String target, String message, Object... params)
{
createLocalizedMessage(target, message, getErrorSeverity(), params);
}
Added: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/test/faces/MessageFormatTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/test/faces/MessageFormatTestCase.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/test/faces/MessageFormatTestCase.java 2008-11-07 22:14:25 UTC (rev 12273)
@@ -0,0 +1,51 @@
+/*
+* 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.jboss.portal.test.faces;
+
+import junit.framework.TestCase;
+
+import java.text.MessageFormat;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class MessageFormatTestCase extends TestCase
+{
+ public void testFormat()
+ {
+ String input = "''{0}'' is not a valid URL: {1}";
+ String output = "'foo' is not a valid URL: bar";
+ assertEquals(output, MessageFormat.format(input, new String[] {"foo", "bar"}));
+
+
+ // Don't forget to escape single quotes in localization files if there are parameters to be interpreted
+ input = "Couldn't reload producer configuration. Cause: {0}";
+ output = "Couldnt reload producer configuration. Cause: {0}";
+ assertEquals(output, MessageFormat.format(input, new String[]{"foo"}));
+
+ input = "Couldn''t reload producer configuration. Cause: {0}";
+ output = "Couldn't reload producer configuration. Cause: foo";
+ assertEquals(output, MessageFormat.format(input, new String[]{"foo"}));
+ }
+}
15 years, 6 months
JBoss Portal SVN: r12272 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-11-07 09:15:13 -0500 (Fri, 07 Nov 2008)
New Revision: 12272
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
Log:
dashboard config very slow speed8
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-11-07 13:45:45 UTC (rev 12271)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-11-07 14:15:13 UTC (rev 12272)
@@ -107,7 +107,7 @@
System.out.println("HOLA3"+selenium.getSelectedLabel(SEL_LAYOUT));
selenium.captureScreenshot("3x2.jpg");
- selenium.clickAt(SUB_LAYOUTSEL,"0, 0");
+ selenium.click("//input[@name='jbpnsabcsnpbj:_viewRoot:dashboardLayoutForm:j_id12']");
selenium.captureScreenshot("3x3.jpg");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.captureScreenshot("3x4.jpg");
15 years, 6 months
JBoss Portal SVN: r12271 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests: src/org/jboss/portal/test/selenium and 1 other directory.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-11-07 08:45:45 -0500 (Fri, 07 Nov 2008)
New Revision: 12271
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
Log:
dashboard config very slow speed7
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2008-11-07 12:22:15 UTC (rev 12270)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2008-11-07 13:45:45 UTC (rev 12271)
@@ -66,6 +66,7 @@
<arg value="44444" />
<arg value="-log" />
<arg value="selenium.log" />
+ <arg value="-debug" />
<arg value="-userExtensions" />
<arg value="${selsrv.dir}/user-extensions.js" />
</java>
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-11-07 12:22:15 UTC (rev 12270)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-11-07 13:45:45 UTC (rev 12271)
@@ -28,21 +28,21 @@
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
- selenium.setSpeed("0");
+ //selenium.setSpeed("0");
login("admin", "admin");
//selenium.setSpeed("10000");
}
@AfterMethod(groups = { "log" })
public void logoutAfterTest() {
- selenium.setSpeed("0");
+ //selenium.setSpeed("0");
logout();
}
@Test(enabled = true)
public void testCreatePage() {
- selenium.setSpeed("0");
+ //selenium.setSpeed("0");
selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CONFIGURE_DASHBOARD);
@@ -61,7 +61,7 @@
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testUpdateTheme() {
- selenium.setSpeed("10000");
+ //selenium.setSpeed("10000");
selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CONFIGURE_DASHBOARD);
@@ -69,16 +69,12 @@
selectIfNotSelected(SEL_PAGE,"DashTestPage");
- for (String s: selenium.getSelectOptions(SEL_THEME))
- System.out.println("LABEL!:"+s);
-
selenium.select(SEL_THEME, "label=renaissance");
- System.out.println("HOLA2"+selenium.getValue(SUB_LAYOUTSEL));
- System.out.println("HOLA2"+selenium.getXpathCount(SUB_LAYOUTSEL));
+ System.out.println("HOLA2"+selenium.getSelectedLabel(SEL_THEME));
selenium.click(SUB_THEMESEL);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+ System.out.println("HOLA2"+selenium.getSelectedLabel(SEL_THEME));
selenium.windowMaximize();
selenium.captureScreenshot("2x.jpg");
@@ -98,26 +94,24 @@
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testUpdateLayout() {
- selenium.setSpeed("10000");
+ //selenium.setSpeed("10000");
selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.windowMaximize();
selectIfNotSelected(SEL_PAGE,"DashTestPage");
- for (String s: selenium.getSelectOptions(SEL_LAYOUT))
- System.out.println("LABEL!:"+s);
+
selenium.captureScreenshot("3x1.jpg");
selenium.select(SEL_LAYOUT, "label=generic");
+ System.out.println("HOLA3"+selenium.getSelectedLabel(SEL_LAYOUT));
selenium.captureScreenshot("3x2.jpg");
-
- System.out.println("HOLA2"+selenium.getValue(SUB_LAYOUTSEL));
- System.out.println("HOLA2"+selenium.getXpathCount(SUB_LAYOUTSEL));
- selenium.click(SUB_LAYOUTSEL);
+
+ selenium.clickAt(SUB_LAYOUTSEL,"0, 0");
selenium.captureScreenshot("3x3.jpg");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.captureScreenshot("3x4.jpg");
-
+ System.out.println("HOLA3"+selenium.getSelectedLabel(SEL_LAYOUT));
selenium.captureScreenshot("3x.jpg");
selenium.click(LNK_DASHBOARD);
@@ -136,7 +130,7 @@
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testAddPortlet() {
- selenium.setSpeed("10000");
+ //selenium.setSpeed("10000");
selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
15 years, 6 months
JBoss Portal SVN: r12270 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-11-07 07:22:15 -0500 (Fri, 07 Nov 2008)
New Revision: 12270
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
Log:
dashboard config very slow speed5
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-11-07 12:20:48 UTC (rev 12269)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-11-07 12:22:15 UTC (rev 12270)
@@ -28,12 +28,15 @@
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
+ selenium.setSpeed("0");
login("admin", "admin");
//selenium.setSpeed("10000");
}
@AfterMethod(groups = { "log" })
public void logoutAfterTest() {
+ selenium.setSpeed("0");
+
logout();
}
15 years, 6 months
JBoss Portal SVN: r12269 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-11-07 07:20:48 -0500 (Fri, 07 Nov 2008)
New Revision: 12269
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
Log:
dashboard config very slow speed4
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-11-07 09:59:08 UTC (rev 12268)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-11-07 12:20:48 UTC (rev 12269)
@@ -29,7 +29,7 @@
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
login("admin", "admin");
- selenium.setSpeed("10000");
+ //selenium.setSpeed("10000");
}
@AfterMethod(groups = { "log" })
@@ -70,6 +70,9 @@
System.out.println("LABEL!:"+s);
selenium.select(SEL_THEME, "label=renaissance");
+
+ System.out.println("HOLA2"+selenium.getValue(SUB_LAYOUTSEL));
+ System.out.println("HOLA2"+selenium.getXpathCount(SUB_LAYOUTSEL));
selenium.click(SUB_THEMESEL);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -104,6 +107,9 @@
selenium.captureScreenshot("3x1.jpg");
selenium.select(SEL_LAYOUT, "label=generic");
selenium.captureScreenshot("3x2.jpg");
+
+ System.out.println("HOLA2"+selenium.getValue(SUB_LAYOUTSEL));
+ System.out.println("HOLA2"+selenium.getXpathCount(SUB_LAYOUTSEL));
selenium.click(SUB_LAYOUTSEL);
selenium.captureScreenshot("3x3.jpg");
selenium.waitForPageToLoad(PAGE_LOAD);
15 years, 6 months
JBoss Portal SVN: r12268 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-11-07 04:59:08 -0500 (Fri, 07 Nov 2008)
New Revision: 12268
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
Log:
dashboard config very slow speed4
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-11-07 09:41:06 UTC (rev 12267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-11-07 09:59:08 UTC (rev 12268)
@@ -29,7 +29,7 @@
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
login("admin", "admin");
- selenium.setSpeed("10");
+ selenium.setSpeed("10000");
}
@AfterMethod(groups = { "log" })
@@ -58,7 +58,7 @@
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testUpdateTheme() {
- selenium.setSpeed("10");
+ selenium.setSpeed("10000");
selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CONFIGURE_DASHBOARD);
@@ -92,7 +92,7 @@
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testUpdateLayout() {
- selenium.setSpeed("10");
+ selenium.setSpeed("10000");
selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CONFIGURE_DASHBOARD);
@@ -127,7 +127,7 @@
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testAddPortlet() {
- selenium.setSpeed("10");
+ selenium.setSpeed("10000");
selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
15 years, 6 months