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_...
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_...
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_...
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 />