gatein SVN: r4018 - in components/wsrp/trunk/wsrp-producer-war: src/test/assembly and 6 other directories.
by do-not-reply@jboss.org
Author: mvanco(a)redhat.com
Date: 2010-09-01 12:54:26 -0400 (Wed, 01 Sep 2010)
New Revision: 4018
Added:
components/wsrp/trunk/wsrp-producer-war/src/test/assembly/test-prp-portlet.xml
components/wsrp/trunk/wsrp-producer-war/src/test/assembly/test-testobject-jar.xml
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/PRPConsumerPortlet.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/PRPGeneratorPortlet.java
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/WEB-INF/
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/WEB-INF/portlet.xml
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/WEB-INF/web.xml
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/view_consumer.jsp
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/view_generator.jsp
Modified:
components/wsrp/trunk/wsrp-producer-war/pom.xml
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/EventConsumerPortlet.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/EventGeneratorPortlet.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/EventObjectConsumerPortlet.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/EventObjectGeneratorPortlet.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/PortletModesPortlet.java
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-events-portlet-war/WEB-INF/portlet.xml
components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-portletmodes-portlet-war/WEB-INF/portlet.xml
Log:
WSRP2 Sample portlets
- edited formatting and headers of java files
- added new sample test portlet - public render parameter
- added descriptor for creating separate jar archive with TestObject (this archive should be put at consumer side when testing events with complex types - more info will be at GTNWSRP-67)
Modified: components/wsrp/trunk/wsrp-producer-war/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/pom.xml 2010-09-01 15:59:20 UTC (rev 4017)
+++ components/wsrp/trunk/wsrp-producer-war/pom.xml 2010-09-01 16:54:26 UTC (rev 4018)
@@ -179,6 +179,8 @@
<descriptor>src/test/assembly/test-eventswithobject-portlet.xml</descriptor>
<descriptor>src/test/assembly/test-events-portlet.xml</descriptor>
<descriptor>src/test/assembly/test-portletmodes-portlet.xml</descriptor>
+ <descriptor>src/test/assembly/test-prp-portlet.xml</descriptor>
+ <descriptor>src/test/assembly/test-testobject-jar.xml</descriptor>
</descriptors>
</configuration>
<executions>
Added: components/wsrp/trunk/wsrp-producer-war/src/test/assembly/test-prp-portlet.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/assembly/test-prp-portlet.xml (rev 0)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/assembly/test-prp-portlet.xml 2010-09-01 16:54:26 UTC (rev 4018)
@@ -0,0 +1,25 @@
+<assembly>
+ <id>prp-portlet</id>
+ <formats>
+ <format>war</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <!-- Test Classes -->
+ <fileSet>
+ <directory>target/test-classes</directory>
+ <outputDirectory>WEB-INF/classes</outputDirectory>
+ <includes>
+ <include>org/gatein/wsrp/portlet/PRP*.class</include>
+ </includes>
+ </fileSet>
+ <!-- Fileset for the sar strucuture -->
+ <fileSet>
+ <directory>src/test/test-portlets/test-prp-portlet-war</directory>
+ <outputDirectory></outputDirectory>
+ </fileSet>
+ </fileSets>
+
+</assembly>
+
Added: components/wsrp/trunk/wsrp-producer-war/src/test/assembly/test-testobject-jar.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/assembly/test-testobject-jar.xml (rev 0)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/assembly/test-testobject-jar.xml 2010-09-01 16:54:26 UTC (rev 4018)
@@ -0,0 +1,20 @@
+<assembly>
+ <id>events-testobject</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <!-- Test Object Class -->
+ <fileSet>
+ <directory>target/test-classes</directory>
+ <outputDirectory></outputDirectory>
+ <includes>
+ <include>org/gatein/wsrp/portlet/utils/TestObject.class</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+
+</assembly>
+
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/EventConsumerPortlet.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/EventConsumerPortlet.java 2010-09-01 15:59:20 UTC (rev 4017)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/EventConsumerPortlet.java 2010-09-01 16:54:26 UTC (rev 4018)
@@ -33,26 +33,27 @@
import javax.portlet.RenderResponse;
/**
- * EventConsumer Portlet Class
+ * @author <a href="mailto:mvanco@redhat.com">Michal Vanco</a>
+ * @version $Revision$
*/
-public class EventConsumerPortlet extends GenericPortlet
+public class EventConsumerPortlet extends GenericPortlet
{
- @Override
- public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
- {
- response.setContentType("text/html");
- String param = request.getParameter("parameter-event");
- request.setAttribute("parameter", param);
- PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/view_consumer.jsp");
- dispatcher.include(request, response);
- }
+ @Override
+ public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
+ {
+ response.setContentType("text/html");
+ String param = request.getParameter("parameter-event");
+ request.setAttribute("parameter", param);
+ PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/view_consumer.jsp");
+ dispatcher.include(request, response);
+ }
- @Override
- public void processEvent(EventRequest request, EventResponse response) throws PortletException, IOException
- {
- String param = (String) request.getEvent().getValue();
- response.setRenderParameter("parameter-event", param);
- }
+ @Override
+ public void processEvent(EventRequest request, EventResponse response) throws PortletException, IOException
+ {
+ String param = (String) request.getEvent().getValue();
+ response.setRenderParameter("parameter-event", param);
+ }
}
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/EventGeneratorPortlet.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/EventGeneratorPortlet.java 2010-09-01 15:59:20 UTC (rev 4017)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/EventGeneratorPortlet.java 2010-09-01 16:54:26 UTC (rev 4018)
@@ -34,23 +34,24 @@
import javax.xml.namespace.QName;
/**
- * EventGenerator Portlet Class
+ * @author <a href="mailto:mvanco@redhat.com">Michal Vanco</a>
+ * @version $Revision$
*/
-public class EventGeneratorPortlet extends GenericPortlet
+public class EventGeneratorPortlet extends GenericPortlet
{
- @Override
- public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
- {
- response.setContentType("text/html");
- PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/view_generator.jsp");
- dispatcher.include(request, response);
- }
+ @Override
+ public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
+ {
+ response.setContentType("text/html");
+ PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/view_generator.jsp");
+ dispatcher.include(request, response);
+ }
- @Override
- public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException
- {
- String param = request.getParameter("parameter");
- response.setEvent(new QName("urn:jboss:gatein:samples:event", "eventsample"), param);
- }
+ @Override
+ public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException
+ {
+ String param = request.getParameter("parameter");
+ response.setEvent(new QName("urn:jboss:gatein:samples:event", "eventsample"), param);
+ }
}
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/EventObjectConsumerPortlet.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/EventObjectConsumerPortlet.java 2010-09-01 15:59:20 UTC (rev 4017)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/EventObjectConsumerPortlet.java 2010-09-01 16:54:26 UTC (rev 4018)
@@ -37,32 +37,33 @@
import org.gatein.wsrp.portlet.utils.TestObject;
/**
- * EventObjectConsumer Portlet Class
+ * @author <a href="mailto:mvanco@redhat.com">Michal Vanco</a>
+ * @version $Revision$
*/
-public class EventObjectConsumerPortlet extends GenericPortlet
+public class EventObjectConsumerPortlet extends GenericPortlet
{
- @Override
- public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
- {
- response.setContentType("text/html");
- TestObject object = (TestObject) request.getPortletSession().getAttribute("object");
- request.setAttribute("object", object);
- PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/view_consumer.jsp");
- dispatcher.include(request, response);
- }
+ @Override
+ public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
+ {
+ response.setContentType("text/html");
+ TestObject object = (TestObject) request.getPortletSession().getAttribute("object");
+ request.setAttribute("object", object);
+ PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/view_consumer.jsp");
+ dispatcher.include(request, response);
+ }
- @Override
- public void processEvent(EventRequest request, EventResponse response) throws PortletException, IOException
- {
- TestObject object = (TestObject) request.getEvent().getValue();
- request.getPortletSession().setAttribute("object", object);
- }
+ @Override
+ public void processEvent(EventRequest request, EventResponse response) throws PortletException, IOException
+ {
+ TestObject object = (TestObject) request.getEvent().getValue();
+ request.getPortletSession().setAttribute("object", object);
+ }
- @Override
- public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException
- {
- request.getPortletSession().removeAttribute("object");
- }
+ @Override
+ public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException
+ {
+ request.getPortletSession().removeAttribute("object");
+ }
}
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/EventObjectGeneratorPortlet.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/EventObjectGeneratorPortlet.java 2010-09-01 15:59:20 UTC (rev 4017)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/EventObjectGeneratorPortlet.java 2010-09-01 16:54:26 UTC (rev 4018)
@@ -38,49 +38,51 @@
import org.gatein.wsrp.portlet.utils.TestObject;
/**
- * EventObjectGenerator Portlet Class
+ * @author <a href="mailto:mvanco@redhat.com">Michal Vanco</a>
+ * @version $Revision$
*/
-public class EventObjectGeneratorPortlet extends GenericPortlet
+public class EventObjectGeneratorPortlet extends GenericPortlet
{
-
- private List<TestObject> objects;
-
- @Override
- public void init() throws PortletException
- {
- super.init();
- objects = new ArrayList<TestObject>();
- objects.add(new TestObject("Prabhat", "Jha", "pjha", 654321, "pjha(a)redhat.com"));
- objects.add(new TestObject("Michal", "Vanco", "mvanco", 123456, "mvanco(a)redhat.com"));
- objects.add(new TestObject("Marek", "Posolda", "mposolda", 112233, "mposolda(a)redhat.com"));
- objects.add(new TestObject("Viliam", "Rockai", "vrockai", 223311, "vrockai(a)redhat.com"));
- }
-
- public TestObject getTestObjectByUserName(String username)
- {
- for (TestObject object : objects)
- {
- if (object.getUsername().equals(username))
- {
- return object;
- }
- }
- return null;
- }
- @Override
- public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
- {
- response.setContentType("text/html");
- request.setAttribute("objects", objects);
- PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/view_generator.jsp");
- dispatcher.include(request, response);
- }
+ private List<TestObject> objects;
- @Override
- public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException
- {
- String username = request.getParameter("username");
- response.setEvent(new QName("urn:jboss:gatein:samples:event:object", "eventObject"), getTestObjectByUserName(username));
- }
+ @Override
+ public void init() throws PortletException
+ {
+ super.init();
+ objects = new ArrayList<TestObject>();
+ objects.add(new TestObject("Prabhat", "Jha", "pjha", 654321, "pjha(a)redhat.com"));
+ objects.add(new TestObject("Michal", "Vanco", "mvanco", 123456, "mvanco(a)redhat.com"));
+ objects.add(new TestObject("Marek", "Posolda", "mposolda", 112233, "mposolda(a)redhat.com"));
+ objects.add(new TestObject("Viliam", "Rockai", "vrockai", 223311, "vrockai(a)redhat.com"));
+ }
+
+ public TestObject getTestObjectByUserName(String username)
+ {
+ for (TestObject object : objects)
+ {
+ if (object.getUsername().equals(username))
+ {
+ return object;
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
+ {
+ response.setContentType("text/html");
+ request.setAttribute("objects", objects);
+ PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/view_generator.jsp");
+ dispatcher.include(request, response);
+ }
+
+ @Override
+ public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException
+ {
+ String username = request.getParameter("username");
+ response.setEvent(new QName("urn:jboss:gatein:samples:event:object", "eventObject"),
+ getTestObjectByUserName(username));
+ }
}
Added: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/PRPConsumerPortlet.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/PRPConsumerPortlet.java (rev 0)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/PRPConsumerPortlet.java 2010-09-01 16:54:26 UTC (rev 4018)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2010, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.gatein.wsrp.portlet;
+
+import java.io.IOException;
+
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:mvanco@redhat.com">Michal Vanco</a>
+ * @version $Revision$
+ */
+public class PRPConsumerPortlet extends GenericPortlet
+{
+
+ @Override
+ public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
+ {
+ response.setContentType("text/html");
+ String param = request.getParameter("parameter");
+ request.setAttribute("parameter", param);
+ PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/view_consumer.jsp");
+ dispatcher.include(request, response);
+ }
+}
Added: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/PRPGeneratorPortlet.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/PRPGeneratorPortlet.java (rev 0)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/PRPGeneratorPortlet.java 2010-09-01 16:54:26 UTC (rev 4018)
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2010, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.gatein.wsrp.portlet;
+
+import java.io.IOException;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:mvanco@redhat.com">Michal Vanco</a>
+ * @version $Revision$
+ */
+public class PRPGeneratorPortlet extends GenericPortlet
+{
+
+ @Override
+ public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
+ {
+ response.setContentType("text/html");
+ PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/view_generator.jsp");
+ dispatcher.include(request, response);
+ }
+
+ @Override
+ public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException
+ {
+ String param = request.getParameter("parameter");
+ response.setRenderParameter("parameter", param);
+ }
+
+}
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/PortletModesPortlet.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/PortletModesPortlet.java 2010-09-01 15:59:20 UTC (rev 4017)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/portlet/PortletModesPortlet.java 2010-09-01 16:54:26 UTC (rev 4018)
@@ -32,40 +32,41 @@
import javax.portlet.RenderResponse;
/**
- * PortletModes Class
+ * @author <a href="mailto:mvanco@redhat.com">Michal Vanco</a>
+ * @version $Revision$
*/
-public class PortletModesPortlet extends GenericPortlet
+public class PortletModesPortlet extends GenericPortlet
{
- @Override
- public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
- {
- response.setContentType("text/html");
- PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/view.jsp");
- dispatcher.include(request, response);
- }
+ @Override
+ public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
+ {
+ response.setContentType("text/html");
+ PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/view.jsp");
+ dispatcher.include(request, response);
+ }
- @Override
- public void doHelp(RenderRequest request, RenderResponse response) throws PortletException, IOException
- {
- response.setContentType("text/html");
- PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/help.jsp");
- dispatcher.include(request, response);
- }
+ @Override
+ public void doHelp(RenderRequest request, RenderResponse response) throws PortletException, IOException
+ {
+ response.setContentType("text/html");
+ PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/help.jsp");
+ dispatcher.include(request, response);
+ }
- @Override
- public void doEdit(RenderRequest request, RenderResponse response) throws PortletException, IOException
- {
- response.setContentType("text/html");
- PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/edit.jsp");
- dispatcher.include(request, response);
- }
+ @Override
+ public void doEdit(RenderRequest request, RenderResponse response) throws PortletException, IOException
+ {
+ response.setContentType("text/html");
+ PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/edit.jsp");
+ dispatcher.include(request, response);
+ }
- @RenderMode(name = "TEST_MODE")
- public void doTestMode(RenderRequest request, RenderResponse response) throws PortletException, IOException
- {
- response.setContentType("text/html");
- PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/test_mode.jsp");
- dispatcher.include(request, response);
- }
+ @RenderMode(name = "TEST_MODE")
+ public void doTestMode(RenderRequest request, RenderResponse response) throws PortletException, IOException
+ {
+ response.setContentType("text/html");
+ PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/test_mode.jsp");
+ dispatcher.include(request, response);
+ }
}
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-events-portlet-war/WEB-INF/portlet.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-events-portlet-war/WEB-INF/portlet.xml 2010-09-01 15:59:20 UTC (rev 4017)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-events-portlet-war/WEB-INF/portlet.xml 2010-09-01 16:54:26 UTC (rev 4018)
@@ -1,24 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~ ~ Copyright 2007, Red Hat Middleware,
- LLC, and individual ~ ~ contributors as indicated by the @authors tag.
- See the ~ ~ copyright.txt in the distribution for a full listing of ~
- ~ individual contributors. ~ ~ ~ ~ This is free software; you can
- redistribute it and/or modify it ~ ~ under the terms of the GNU Lesser
- General Public License as ~ ~ published by the Free Software
- Foundation; either version 2.1 of ~ ~ the License, or (at your option)
- any later version. ~ ~ ~ ~ This software is distributed in the hope
- that it will be useful, ~ ~ but WITHOUT ANY WARRANTY; without even the
- implied warranty of ~ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR
- PURPOSE. See the GNU ~ ~ Lesser General Public License for more
- details. ~ ~ ~ ~ You should have received a copy of the GNU Lesser
- General Public ~ ~ License along with this software; if not, write to
- the Free ~ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- Boston, MA ~ ~ 02110-1301 USA, or see the FSF site:
- http://www.fsf.org. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
+<!--
+ ~ JBoss, a division of Red Hat
+ ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
<portlet-app xmlns='http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd'
@@ -29,17 +31,17 @@
<display-name>Event Generator</display-name>
<portlet-class>org.gatein.wsrp.portlet.EventGeneratorPortlet</portlet-class>
<expiration-cache>0</expiration-cache>
-
+
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>
-
+
<portlet-info>
<title>Event Generator sample</title>
<short-title>Event Generator sample</short-title>
</portlet-info>
-
+
<supported-publishing-event>
<qname xmlns:gtn="urn:jboss:gatein:samples:event">gtn:eventsample</qname>
</supported-publishing-event>
@@ -51,17 +53,17 @@
<display-name>Event Consumer</display-name>
<portlet-class>org.gatein.wsrp.portlet.EventConsumerPortlet</portlet-class>
<expiration-cache>0</expiration-cache>
-
+
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>
-
+
<portlet-info>
<title>Event Consumer sample</title>
<short-title>Event Consumer sample</short-title>
</portlet-info>
-
+
<supported-processing-event>
<qname xmlns:gtn="urn:jboss:gatein:samples:event">gtn:eventsample</qname>
</supported-processing-event>
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-portletmodes-portlet-war/WEB-INF/portlet.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-portletmodes-portlet-war/WEB-INF/portlet.xml 2010-09-01 15:59:20 UTC (rev 4017)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-portletmodes-portlet-war/WEB-INF/portlet.xml 2010-09-01 16:54:26 UTC (rev 4018)
@@ -1,24 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
- <!--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~ ~ Copyright 2007, Red Hat Middleware,
- LLC, and individual ~ ~ contributors as indicated by the @authors tag.
- See the ~ ~ copyright.txt in the distribution for a full listing of ~
- ~ individual contributors. ~ ~ ~ ~ This is free software; you can
- redistribute it and/or modify it ~ ~ under the terms of the GNU Lesser
- General Public License as ~ ~ published by the Free Software
- Foundation; either version 2.1 of ~ ~ the License, or (at your option)
- any later version. ~ ~ ~ ~ This software is distributed in the hope
- that it will be useful, ~ ~ but WITHOUT ANY WARRANTY; without even the
- implied warranty of ~ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR
- PURPOSE. See the GNU ~ ~ Lesser General Public License for more
- details. ~ ~ ~ ~ You should have received a copy of the GNU Lesser
- General Public ~ ~ License along with this software; if not, write to
- the Free ~ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- Boston, MA ~ ~ 02110-1301 USA, or see the FSF site:
- http://www.fsf.org. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- -->
+<!--
+ ~ JBoss, a division of Red Hat
+ ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
<portlet-app xmlns='http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd'
Added: components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/WEB-INF/portlet.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/WEB-INF/portlet.xml (rev 0)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/WEB-INF/portlet.xml 2010-09-01 16:54:26 UTC (rev 4018)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ JBoss, a division of Red Hat
+ ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+<portlet-app xmlns='http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xsi:schemaLocation='http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd'
+ version='2.0'>
+ <portlet>
+ <description>PRP Generator</description>
+ <portlet-name>PRP Generator</portlet-name>
+ <display-name>PRP Generator</display-name>
+ <portlet-class>org.gatein.wsrp.portlet.PRPGeneratorPortlet</portlet-class>
+ <expiration-cache>0</expiration-cache>
+
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+
+ <portlet-info>
+ <title>PRP Generator sample</title>
+ <short-title>PRP Generator sample</short-title>
+ </portlet-info>
+
+ <supported-public-render-parameter>parameter</supported-public-render-parameter>
+ </portlet>
+
+ <portlet>
+ <description>PRP Consumer</description>
+ <portlet-name>PRP Consumer</portlet-name>
+ <display-name>PRP Consumer</display-name>
+ <portlet-class>org.gatein.wsrp.portlet.PRPConsumerPortlet</portlet-class>
+ <expiration-cache>0</expiration-cache>
+
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+
+ <portlet-info>
+ <title>PRP Consumer sample</title>
+ <short-title>PRP Consumer sample</short-title>
+ </portlet-info>
+
+ <supported-public-render-parameter>parameter</supported-public-render-parameter>
+ </portlet>
+
+ <public-render-parameter>
+ <identifier>parameter</identifier>
+ <qname xmlns:gtn="urn:jboss:gatein:samples:parameter">gtn:parameter</qname>
+ </public-render-parameter>
+
+ <!-- Make these portlets remotable -->
+ <container-runtime-option>
+ <name>org.gatein.pc.remotable</name>
+ <value>true</value>
+ </container-runtime-option>
+
+</portlet-app>
Added: components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/WEB-INF/web.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/WEB-INF/web.xml (rev 0)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/WEB-INF/web.xml 2010-09-01 16:54:26 UTC (rev 4018)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2007, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<web-app version="2.4"
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+</web-app>
\ No newline at end of file
Added: components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/view_consumer.jsp
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/view_consumer.jsp (rev 0)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/view_consumer.jsp 2010-09-01 16:54:26 UTC (rev 4018)
@@ -0,0 +1,16 @@
+<%@page contentType="text/html"%>
+<%@page pageEncoding="UTF-8"%>
+<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
+<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
+<portlet:defineObjects/>
+<br />
+<c:choose>
+ <c:when test='${empty parameter}'>
+ Please fill in your name at PRP Generator portlet to see if Public Render Parameter works.<br />
+ </c:when>
+ <c:otherwise>
+ <h1>Welcome ${parameter}!</h1>
+ Thanks for submiting your name, if you can see your name above -> PRP works properly.<br />
+ </c:otherwise>
+</c:choose>
+<br />
\ No newline at end of file
Added: components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/view_generator.jsp
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/view_generator.jsp (rev 0)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/test-portlets/test-prp-portlet-war/view_generator.jsp 2010-09-01 16:54:26 UTC (rev 4018)
@@ -0,0 +1,13 @@
+<%@page contentType="text/html"%>
+<%@page pageEncoding="UTF-8"%>
+<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
+<portlet:defineObjects/>
+<br />
+<h1>Hello!</h1>
+This is sample portlet to verify public render parameters.<br />
+Please type in your name and submit. <br /><br />
+<portlet:actionURL name="submit" var="submit" />
+<form method="post" action="${submit}">
+Your name: <input type="text" name="parameter"/> <input type="submit" value="Submit">
+</form>
+<br />
14 years, 3 months
gatein SVN: r4017 - exo/portal/branches/3.1.x.
by do-not-reply@jboss.org
Author: aheritier
Date: 2010-09-01 11:59:20 -0400 (Wed, 01 Sep 2010)
New Revision: 4017
Modified:
exo/portal/branches/3.1.x/README.txt
Log:
EXOGTN-60 : Update README
Modified: exo/portal/branches/3.1.x/README.txt
===================================================================
--- exo/portal/branches/3.1.x/README.txt 2010-09-01 15:36:34 UTC (rev 4016)
+++ exo/portal/branches/3.1.x/README.txt 2010-09-01 15:59:20 UTC (rev 4017)
@@ -53,6 +53,13 @@
** Creates a JBossAS delivery in packaging/pkg/target/jboss/
*****************
+* DOCUMENTATIONS:
+*****************
+
+Per default GateIn documentations are generated in the build process.
+To deactivate them either add -DskipDocs or -P-docs in the command line.
+
+*****************
* STARTING:
*****************
* On Tomcat: go to the tomcat directory (or unzip the archive in your favorite location) and execute 'bin/gatein.sh start' ('bin/gatein.bat start' on Windows)
14 years, 3 months
gatein SVN: r4016 - in exo/portal/branches/3.1.x: docs and 1 other directory.
by do-not-reply@jboss.org
Author: aheritier
Date: 2010-09-01 11:36:34 -0400 (Wed, 01 Sep 2010)
New Revision: 4016
Modified:
exo/portal/branches/3.1.x/docs/pom.xml
exo/portal/branches/3.1.x/pom.xml
Log:
EXOGTN-60 : All docs are generated by default. Add -DskipDocs to bypass them
Modified: exo/portal/branches/3.1.x/docs/pom.xml
===================================================================
--- exo/portal/branches/3.1.x/docs/pom.xml 2010-09-01 15:22:50 UTC (rev 4015)
+++ exo/portal/branches/3.1.x/docs/pom.xml 2010-09-01 15:36:34 UTC (rev 4016)
@@ -77,7 +77,6 @@
<stylesheetResource>classpath://xslt/org/gatein/pdf.xsl</stylesheetResource>
<finalName>${pom.name}.pdf</finalName>
</format>
- <!--
<format>
<formatName>html</formatName>
<stylesheetResource>classpath:/xslt/org/gatein/xhtml.xsl</stylesheetResource>
@@ -93,7 +92,6 @@
<stylesheetResource>classpath:/xslt/org/gatein/eclipse.xsl</stylesheetResource>
<finalName>index.html</finalName>
</format>
- -->
</formats>
<options>
Modified: exo/portal/branches/3.1.x/pom.xml
===================================================================
--- exo/portal/branches/3.1.x/pom.xml 2010-09-01 15:22:50 UTC (rev 4015)
+++ exo/portal/branches/3.1.x/pom.xml 2010-09-01 15:36:34 UTC (rev 4016)
@@ -100,7 +100,6 @@
<module>starter</module>
<module>packaging</module>
<module>testsuite</module>
- <module>docs</module>
</modules>
<dependencyManagement>
@@ -796,6 +795,18 @@
<profiles>
<profile>
+ <id>docs</id>
+ <activation>
+ <property>
+ <name>!skipDocs</name>
+ </property>
+ </activation>
+ <modules>
+ <module>docs</module>
+ </modules>
+ </profile>
+
+ <profile>
<id>stable</id>
<properties>
<org.exoplatform.kernel.version>2.2.3-GA</org.exoplatform.kernel.version>
14 years, 3 months
gatein SVN: r4015 - exo/portal/branches/3.1.x/docs.
by do-not-reply@jboss.org
Author: aheritier
Date: 2010-09-01 11:22:50 -0400 (Wed, 01 Sep 2010)
New Revision: 4015
Modified:
exo/portal/branches/3.1.x/docs/pom.xml
Log:
EXOGTN-60 : We use only PDF
Modified: exo/portal/branches/3.1.x/docs/pom.xml
===================================================================
--- exo/portal/branches/3.1.x/docs/pom.xml 2010-09-01 15:04:32 UTC (rev 4014)
+++ exo/portal/branches/3.1.x/docs/pom.xml 2010-09-01 15:22:50 UTC (rev 4015)
@@ -72,27 +72,30 @@
<directory>src/main/css</directory>
</cssResource>-->
<formats>
- <format>
- <formatName>pdf</formatName>
- <stylesheetResource>classpath://xslt/org/gatein/pdf.xsl</stylesheetResource>
- <finalName>${pom.name}.pdf</finalName>
- </format>
- <format>
- <formatName>html</formatName>
- <stylesheetResource>classpath:/xslt/org/gatein/xhtml.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- <format>
- <formatName>html_single</formatName>
- <stylesheetResource>classpath:/xslt/org/gatein/xhtml-single.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- <format>
- <formatName>eclipse</formatName>
- <stylesheetResource>classpath:/xslt/org/gatein/eclipse.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>classpath://xslt/org/gatein/pdf.xsl</stylesheetResource>
+ <finalName>${pom.name}.pdf</finalName>
+ </format>
+ <!--
+ <format>
+ <formatName>html</formatName>
+ <stylesheetResource>classpath:/xslt/org/gatein/xhtml.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ <format>
+ <formatName>html_single</formatName>
+ <stylesheetResource>classpath:/xslt/org/gatein/xhtml-single.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ <format>
+ <formatName>eclipse</formatName>
+ <stylesheetResource>classpath:/xslt/org/gatein/eclipse.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ -->
</formats>
+
<options>
<xincludeSupported>true</xincludeSupported>
<xmlTransformerType>saxon</xmlTransformerType>
@@ -108,4 +111,5 @@
<properties>
<translation>en-US</translation>
</properties>
+
</project>
14 years, 3 months
gatein SVN: r4014 - in exo/portal/branches/3.1.x: docs/user-guide and 1 other directory.
by do-not-reply@jboss.org
Author: aheritier
Date: 2010-09-01 11:04:32 -0400 (Wed, 01 Sep 2010)
New Revision: 4014
Modified:
exo/portal/branches/3.1.x/docs/user-guide/pom.xml
exo/portal/branches/3.1.x/pom.xml
Log:
EXOGTN-60 : Include docs in reactor
Modified: exo/portal/branches/3.1.x/docs/user-guide/pom.xml
===================================================================
--- exo/portal/branches/3.1.x/docs/user-guide/pom.xml 2010-09-01 14:05:33 UTC (rev 4013)
+++ exo/portal/branches/3.1.x/docs/user-guide/pom.xml 2010-09-01 15:04:32 UTC (rev 4014)
@@ -25,7 +25,6 @@
<modelVersion>4.0.0</modelVersion>
- <!-- FIXME parent not in sync with current hierarchy -->
<parent>
<groupId>org.gatein.doc</groupId>
<artifactId>docs-aggregator</artifactId>
Modified: exo/portal/branches/3.1.x/pom.xml
===================================================================
--- exo/portal/branches/3.1.x/pom.xml 2010-09-01 14:05:33 UTC (rev 4013)
+++ exo/portal/branches/3.1.x/pom.xml 2010-09-01 15:04:32 UTC (rev 4014)
@@ -100,7 +100,8 @@
<module>starter</module>
<module>packaging</module>
<module>testsuite</module>
- </modules>
+ <module>docs</module>
+ </modules>
<dependencyManagement>
<dependencies>
14 years, 3 months
gatein SVN: r4013 - portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-09-01 10:05:33 -0400 (Wed, 01 Sep 2010)
New Revision: 4013
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java
Log:
minor
Modified: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java 2010-09-01 14:04:51 UTC (rev 4012)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java 2010-09-01 14:05:33 UTC (rev 4013)
@@ -33,10 +33,6 @@
/**
* The implementation of the routing algorithm.
- * It should but does not yet implement:
- * - check JAX-RS algorithm (compare)
- * - should somehow validate regular expression
- * - nice to have '*' equivalent to {path:.*}
*
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
14 years, 3 months
gatein SVN: r4012 - in portal/branches/navcontroller/component/web/controller/src: test/java/org/exoplatform/web/controller/router and 1 other directory.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-09-01 10:04:51 -0400 (Wed, 01 Sep 2010)
New Revision: 4012
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestRender.java
Log:
update controller uri rendering
Modified: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java 2010-09-01 13:54:55 UTC (rev 4011)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java 2010-09-01 14:04:51 UTC (rev 4012)
@@ -63,6 +63,9 @@
this.routeParameters = new HashMap<QualifiedName, String[]>();
}
+ /**
+ * todo: a version that does not string concatenation but instead a buffer
+ */
String render(String controllerId, Map<QualifiedName, String[]> blah)
{
if (controllerRef != null && controllerRef.equals(controllerId))
@@ -75,7 +78,7 @@
return null;
}
}
- return "";
+ return "/";
}
else
{
@@ -84,13 +87,13 @@
String b = a.getValue().render(controllerId, blah);
if (b != null)
{
- if (b.length() > 0)
+ if (b.length() > 1)
{
- return a.getKey() + "/" + b;
+ return "/" + a.getKey() + b;
}
else
{
- return a.getKey();
+ return "/" + a.getKey();
}
}
}
@@ -128,13 +131,13 @@
String bilto = a.render(controllerId, blah);
if (bilto != null)
{
- if (bilto.length() > 0)
+ if (bilto.length() > 1)
{
- return sb + "/" + bilto;
+ return "/" + sb + bilto;
}
else
{
- return sb.toString();
+ return "/" + sb.toString();
}
}
}
Modified: portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java 2010-09-01 13:54:55 UTC (rev 4011)
+++ portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java 2010-09-01 14:04:51 UTC (rev 4012)
@@ -64,7 +64,7 @@
//
assertProcessResponse("site", expectedParameters, router.process(new ControllerContext("/private/classic")));
- assertEquals("private/classic", router.render("site", expectedParameters));
+ assertEquals("/private/classic", router.render("site", expectedParameters));
}
public void testPrivateClassicSlash() throws Exception
@@ -77,7 +77,7 @@
//
assertProcessResponse("site", expectedParameters, router.process(new ControllerContext("/private/classic/")));
- assertEquals("private/classic", router.render("site", expectedParameters));
+ assertEquals("/private/classic", router.render("site", expectedParameters));
}
public void testPrivateClassicHome() throws Exception
@@ -89,6 +89,6 @@
//
assertProcessResponse("site", expectedParameters, router.process(new ControllerContext("/private/classic/home")));
- assertEquals("private/classic/home", router.render("site", expectedParameters));
+ assertEquals("/private/classic/home", router.render("site", expectedParameters));
}
}
Modified: portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestRender.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestRender.java 2010-09-01 13:54:55 UTC (rev 4011)
+++ portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestRender.java 2010-09-01 14:04:51 UTC (rev 4012)
@@ -39,7 +39,7 @@
Router router = new Router(routerMD);
//
- assertEquals("", router.render("ref1", Collections.<QualifiedName, String[]>emptyMap()));
+ assertEquals("/", router.render("ref1", Collections.<QualifiedName, String[]>emptyMap()));
}
public void testA() throws Exception
@@ -49,7 +49,7 @@
Router router = new Router(routerMD);
//
- assertEquals("a", router.render("ref1", Collections.<QualifiedName, String[]>emptyMap()));
+ assertEquals("/a", router.render("ref1", Collections.<QualifiedName, String[]>emptyMap()));
}
public void testAB() throws Exception
@@ -59,7 +59,7 @@
Router router = new Router( routerMD);
//
- assertEquals("a/b", router.render("ref1", Collections.<QualifiedName, String[]>emptyMap()));
+ assertEquals("/a/b", router.render("ref1", Collections.<QualifiedName, String[]>emptyMap()));
}
public void testParameter() throws Exception
@@ -69,7 +69,7 @@
Router router = new Router(routerMD);
//
- assertEquals("a", router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"})));
+ assertEquals("/a", router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"})));
}
public void testWildcardPattern() throws Exception
@@ -79,13 +79,13 @@
Router router = new Router(routerMD);
//
- assertEquals("", router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{""})));
+ assertEquals("/", router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{""})));
//
- assertEquals("a", router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"})));
+ assertEquals("/a", router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"})));
//
- assertEquals("a/b", router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a/b"})));
+ assertEquals("/a/b", router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a/b"})));
}
public void testSimplePattern() throws Exception
@@ -95,7 +95,7 @@
Router router = new Router(routerMD);
//
- assertEquals("a", router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"})));
+ assertEquals("/a", router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"})));
//
assertNull(router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"ab"})));
@@ -109,9 +109,9 @@
Router router = new Router(routerMD);
//
- assertEquals("a", router.render("ref1", Collections.<QualifiedName, String[]>emptyMap()));
+ assertEquals("/a", router.render("ref1", Collections.<QualifiedName, String[]>emptyMap()));
//
- assertEquals("a/b", router.render("ref2", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"})));
+ assertEquals("/a/b", router.render("ref2", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"})));
}
}
14 years, 3 months
gatein SVN: r4011 - in portal/branches/navcontroller/component/web/controller/src: main/java/org/exoplatform/web/controller/router and 1 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-09-01 09:54:55 -0400 (Wed, 01 Sep 2010)
New Revision: 4011
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/controller.xml
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/AbstractTestController.java
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestMatch.java
Log:
update controller parsing
Modified: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/controller.xml
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/controller.xml 2010-09-01 13:40:23 UTC (rev 4010)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/controller.xml 2010-09-01 13:54:55 UTC (rev 4011)
@@ -1,24 +1,35 @@
<router>
- <route match="/private/{gtn:sitename}" to="SiteController">
+ <route match="/private/{gtn:sitename}">
+ <parameter name="gtn:controller" value="site"/>
<parameter name="gtn:sitetype" value="portal"/>
</route>
- <route match="/groups/{gtn:sitename}" to="SiteController">
+ <route match="/groups/{gtn:sitename}">
+ <parameter name="gtn:controller" value="site"/>
<parameter name="gtn:sitetype" value="group"/>
</route>
- <route match="/users/{gtn:sitename}" to="SiteController">
+ <route match="/users/{gtn:sitename}">
+ <parameter name="gtn:controller" value="site"/>
<parameter name="gtn:sitetype" value="user"/>
</route>
+ <route match="/toto">
+ <route match="/titi"/>
+ </route>
+
<route match="/" to="foo"/>
<route match="/public" to="foo"/>
- <route match="/download" to="DownloadController"/>
+ <route match="/download">
+ <parameter name="gtn:controller" value="download"/>
+ </route>
- <route match="/upload" to="UploadController"/>
+ <route match="/upload">
+ <parameter name="gtn:controller" value="upload"/>
+ </route>
</router>
Modified: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java 2010-09-01 13:40:23 UTC (rev 4010)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java 2010-09-01 13:54:55 UTC (rev 4011)
@@ -146,89 +146,109 @@
{
String path = context.getPath();
- // Remove any leading '/'
- while (path.length() > 0 && path.charAt(0) == '/')
+ // Anything that does not begin with '/' returns null
+ if (path.length() > 0 && path.charAt(0) == '/')
{
- path = path.substring(1);
- }
-
- //
- if (path.isEmpty())
- {
- if (controllerRef != null)
+ // The '/' means the current controller if any, otherwise it may be processed by the pattern matching
+ if (path.length() == 1)
{
- return new ProcessResponse(controllerRef, context.getPath(), context.getParameters());
+ if (controllerRef != null)
+ {
+ return new ProcessResponse(controllerRef, context.getPath(), context.getParameters());
+ }
}
- }
- else
- {
- int pos = path.indexOf('/');
- String segment;
- if (pos == -1)
- {
- segment = path;
- }
else
{
- segment = path.substring(0, pos);
- }
- Route route = simpleRoutes.get(segment);
- if (route != null)
- {
- Map<QualifiedName, String[]> parameters = context.getParameters();
- if (route.routeParameters.size() > 0)
+ // Find the next '/' for determining the segment and next path
+ int pos = path.indexOf('/', 1);
+ if (pos == -1)
{
- parameters = new HashMap<QualifiedName, String[]>(parameters);
- // julien : do a safe put all here on String[]
- parameters.putAll(route.routeParameters);
+ pos = path.length();
}
- ControllerContext nextContext = new ControllerContext(
- path.substring(segment.length()),
- parameters
- );
- ProcessResponse response = route.route(nextContext);
- if (response != null)
+
+ String segment = path.substring(1, pos);
+
+ // Try to find a route for the segment
+ Route route = simpleRoutes.get(segment);
+ if (route != null)
{
- return response;
- }
- }
- }
+ Map<QualifiedName, String[]> parameters = context.getParameters();
- // Try to find a pattern matching route
- for (PatternRoute route : patternRoutes)
- {
- Matcher matcher = route.pattern.matcher(path);
+ // Update parameters
+ if (route.routeParameters.size() > 0)
+ {
+ parameters = new HashMap<QualifiedName, String[]>(parameters);
+ // julien : do a safe put all here on String[]
+ parameters.putAll(route.routeParameters);
+ }
- boolean matched = false;
- if (matcher.find())
- {
- int end = matcher.end();
- if (end >= path.length())
- {
- matched = true;
+ // Determine next path
+ String nextPath;
+ if (pos == path.length())
+ {
+ nextPath = "/";
+ }
+ else
+ {
+ nextPath = path.substring(pos);
+ }
+
+ // Build next controller context
+ ControllerContext nextContext = new ControllerContext(nextPath, parameters);
+
+ // Delegate the process to the next route
+ ProcessResponse response = route.route(nextContext);
+
+ // If we do have a response we return it
+ if (response != null)
+ {
+ return response;
+ }
}
- else if (path.charAt(end) == '/')
- {
- matched = true;
- }
}
- // We match
- if (matched)
+ // Try to find a pattern matching route
+ for (PatternRoute route : patternRoutes)
{
- Map<QualifiedName, String[]> parameters = new HashMap<QualifiedName, String[]>(context.getParameters());
- // julien : do a safe put all here on String[]
- parameters.putAll(route.routeParameters);
- int group = 1;
- for (QualifiedName parameterName : route.parameterNames)
+ Matcher matcher = route.pattern.matcher(path.substring(1));
+
+ // We match
+ if (matcher.find())
{
- parameters.put(parameterName, new String[]{matcher.group(group++)});
+ // Update parameters
+ Map<QualifiedName, String[]> parameters = new HashMap<QualifiedName, String[]>(context.getParameters());
+ // julien : do a safe put all here on String[]
+ parameters.putAll(route.routeParameters);
+ int group = 1;
+ for (QualifiedName parameterName : route.parameterNames)
+ {
+ parameters.put(parameterName, new String[]{matcher.group(group++)});
+ }
+
+ // Build next controller context
+ int nextPos = matcher.end() + 1;
+ String nextPath;
+ if (path.length() == nextPos)
+ {
+ nextPath = "/";
+ }
+ else
+ {
+ nextPath = path.substring(nextPos);
+ }
+
+ //
+ ControllerContext nextContext = new ControllerContext(nextPath, parameters);
+
+ // Delegate to next route
+ ProcessResponse response = route.route(nextContext);
+
+ // If we do have a response we return it
+ if (response != null)
+ {
+ return response;
+ }
}
- ControllerContext nextContext = new ControllerContext(
- path.substring(matcher.end()),
- parameters
- );
- return route.route(nextContext);
}
}
Modified: portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/AbstractTestController.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/AbstractTestController.java 2010-09-01 13:40:23 UTC (rev 4010)
+++ portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/AbstractTestController.java 2010-09-01 13:54:55 UTC (rev 4011)
@@ -38,7 +38,7 @@
public void assertProcessResponse(String controllerId, String path, Map<QualifiedName, String[]> parameters, ControllerResponse response)
{
- assertNotNull(response);
+ assertNotNull("Was not expecting a null response", response);
assertEquals(ProcessResponse.class, response.getClass());
assertEquals(controllerId, ((ProcessResponse)response).getControllerId());
// todo check path and define semantic
Modified: portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestMatch.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestMatch.java 2010-09-01 13:40:23 UTC (rev 4010)
+++ portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestMatch.java 2010-09-01 13:54:55 UTC (rev 4011)
@@ -40,7 +40,7 @@
Router router = new Router(routerMD);
//
- assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("")));
+ assertNull(router.process(new ControllerContext("")));
//
assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("/")));
@@ -62,10 +62,10 @@
assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("/a")));
//
- assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("a")));
+ assertNull(router.process(new ControllerContext("a")));
//
- assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("a/")));
+ assertNull(router.process(new ControllerContext("a/")));
//
assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("/a/")));
@@ -93,7 +93,7 @@
Router router = new Router( routerMD);
//
- assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("a/b")));
+ assertNull(router.process(new ControllerContext("a/b")));
//
assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("/a/b")));
@@ -102,7 +102,7 @@
assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("/a/b/")));
//
- assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("a/b/")));
+ assertNull(router.process(new ControllerContext("a/b/")));
//
assertNull(router.process(new ControllerContext("")));
@@ -141,7 +141,7 @@
assertProcessResponse("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"}), router.process(new ControllerContext("/a")));
//
- assertProcessResponse("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"}), router.process(new ControllerContext("a")));
+ assertNull(router.process(new ControllerContext("a")));
//
assertProcessResponse("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a/b"}), router.process(new ControllerContext("/a/b")));
@@ -157,7 +157,7 @@
assertProcessResponse("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"}), router.process(new ControllerContext("/a")));
//
- assertProcessResponse("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"}), router.process(new ControllerContext("a")));
+ assertNull(router.process(new ControllerContext("a")));
//
assertNull(router.process(new ControllerContext("/ab")));
@@ -174,7 +174,7 @@
Router router = new Router(routerMD);
//
- assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("a")));
+ assertNull(router.process(new ControllerContext("a")));
//
assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("/a")));
14 years, 3 months
gatein SVN: r4010 - portal/branches.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-09-01 09:40:23 -0400 (Wed, 01 Sep 2010)
New Revision: 4010
Removed:
portal/branches/branched-r3845/
Log:
Remove branch that was merged to trunk
14 years, 3 months
gatein SVN: r4008 - epp/portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: mstruk
Date: 2010-09-01 08:57:15 -0400 (Wed, 01 Sep 2010)
New Revision: 4008
Modified:
epp/portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_07_003_CheckDisplayLanguageOfPortalInPublicMode.html
Log:
JBEPP-403: Locale is not set correctly in login form when login failed
- Fixed Selenium test POR_07_003_CheckDisplayLanguageOfPortalInPublicMode
Modified: epp/portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_07_003_CheckDisplayLanguageOfPortalInPublicMode.html
===================================================================
--- epp/portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_07_003_CheckDisplayLanguageOfPortalInPublicMode.html 2010-09-01 12:20:28 UTC (rev 4007)
+++ epp/portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_07_003_CheckDisplayLanguageOfPortalInPublicMode.html 2010-09-01 12:57:15 UTC (rev 4008)
@@ -58,12 +58,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>xpath=//div[@id='UITabContent']//div[2]/a</td>
+ <td>xpath=//div[@id='UITabContent']//div[3]/a</td>
<td></td>
</tr>
<tr>
<td>clickAt</td>
- <td>xpath=//div[@id='UITabContent']//div[2]/a</td>
+ <td>xpath=//div[@id='UITabContent']//div[3]/a</td>
<td>1,1</td>
</tr>
<tr>
@@ -113,12 +113,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>xpath=//div[@id='UITabContent']//div[5]/a</td>
+ <td>xpath=//div[@id='UITabContent']//div[3]/a</td>
<td></td>
</tr>
<tr>
<td>clickAt</td>
- <td>xpath=//div[@id='UITabContent']//div[5]/a</td>
+ <td>xpath=//div[@id='UITabContent']//div[3]/a</td>
<td>1,1</td>
</tr>
<tr>
14 years, 3 months