[gatein-commits] gatein SVN: r5079 - in epp/examples/branches/EPP_5_1_Branch/portlets: idmhelloworld and 12 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Sat Nov 13 07:48:27 EST 2010


Author: thomas.heute at jboss.com
Date: 2010-11-13 07:48:27 -0500 (Sat, 13 Nov 2010)
New Revision: 5079

Added:
   epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/
   epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/pom.xml
   epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/
   epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/
   epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/java/
   epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/java/org/
   epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/java/org/gatein/
   epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/java/org/gatein/portal/
   epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/java/org/gatein/portal/samples/
   epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/java/org/gatein/portal/samples/api/
   epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/java/org/gatein/portal/samples/api/PRPPortlet.java
   epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/resources/
   epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/webapp/
   epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/webapp/WEB-INF/
   epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/webapp/WEB-INF/portlet.xml
   epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/webapp/WEB-INF/web.xml
Modified:
   epp/examples/branches/EPP_5_1_Branch/portlets/idmhelloworld/pom.xml
   epp/examples/branches/EPP_5_1_Branch/portlets/jsphellouser/pom.xml
   epp/examples/branches/EPP_5_1_Branch/portlets/pom.xml
Log:
Addind PRP API example


Modified: epp/examples/branches/EPP_5_1_Branch/portlets/idmhelloworld/pom.xml
===================================================================
--- epp/examples/branches/EPP_5_1_Branch/portlets/idmhelloworld/pom.xml	2010-11-12 23:59:48 UTC (rev 5078)
+++ epp/examples/branches/EPP_5_1_Branch/portlets/idmhelloworld/pom.xml	2010-11-13 12:48:27 UTC (rev 5079)
@@ -3,7 +3,7 @@
    <modelVersion>4.0.0</modelVersion>
 
    <groupId>org.gatein.portal.examples.portlets</groupId>
-   <version>1.0.0-GA-SNAPSHOT</version>
+   <version>1.0.1-GA-SNAPSHOT</version>
    <artifactId>gatein-idm-helloworld</artifactId>
 
    <packaging>war</packaging>

Modified: epp/examples/branches/EPP_5_1_Branch/portlets/jsphellouser/pom.xml
===================================================================
--- epp/examples/branches/EPP_5_1_Branch/portlets/jsphellouser/pom.xml	2010-11-12 23:59:48 UTC (rev 5078)
+++ epp/examples/branches/EPP_5_1_Branch/portlets/jsphellouser/pom.xml	2010-11-13 12:48:27 UTC (rev 5079)
@@ -2,7 +2,7 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
 
-   <groupId>org.gatein.portal.examples.ortlets</groupId>
+   <groupId>org.gatein.portal.examples.portlets</groupId>
    <version>1.0.1-GA-SNAPSHOT</version>
    <artifactId>gatein-jsp-hellouser</artifactId>
    <packaging>war</packaging>

Modified: epp/examples/branches/EPP_5_1_Branch/portlets/pom.xml
===================================================================
--- epp/examples/branches/EPP_5_1_Branch/portlets/pom.xml	2010-11-12 23:59:48 UTC (rev 5078)
+++ epp/examples/branches/EPP_5_1_Branch/portlets/pom.xml	2010-11-13 12:48:27 UTC (rev 5079)
@@ -13,6 +13,7 @@
       <module>jsfhellouser</module>
       <module>jsphellouser</module>
       <module>simplesthelloworld</module>
+      <module>prpapi</module>
    </modules>
 
 </project>

Added: epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/pom.xml
===================================================================
--- epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/pom.xml	                        (rev 0)
+++ epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/pom.xml	2010-11-13 12:48:27 UTC (rev 5079)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+
+   <groupId>org.gatein.portal.examples.portlets</groupId>
+   <version>1.0.0-GA-SNAPSHOT</version>
+   <artifactId>gatein-prp-api</artifactId>
+   <packaging>war</packaging>
+   <name>EPP Portlets Examples - Public Render Parameters API example Portlet</name>
+
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <configuration>
+               <source>1.5</source>
+               <target>1.5</target>
+            </configuration>
+         </plugin>
+      </plugins>
+   </build>
+
+   <dependencies>
+      <dependency>
+         <groupId>javax.portlet</groupId>
+         <artifactId>portlet-api</artifactId>
+         <scope>provided</scope>
+      </dependency>
+   </dependencies>
+</project>

Added: epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/java/org/gatein/portal/samples/api/PRPPortlet.java
===================================================================
--- epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/java/org/gatein/portal/samples/api/PRPPortlet.java	                        (rev 0)
+++ epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/java/org/gatein/portal/samples/api/PRPPortlet.java	2010-11-13 12:48:27 UTC (rev 5079)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.portal.samples.api;
+
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class PRPPortlet extends GenericPortlet
+{
+
+   @Override
+   protected void doView(RenderRequest req, RenderResponse resp) throws PortletException, IOException
+   {
+      resp.setContentType("text/html");
+      PrintWriter writer = resp.getWriter();
+
+      //
+      writer.println("Public Render Parameters<br/>");
+      writer.println("<table>");
+      for (Map.Entry<String, String[]> entry : req.getParameterMap().entrySet())
+      {
+         writer.print("<tr>");
+         writer.print("<td>");
+         writer.print(entry.getKey());
+         writer.print("</td>");
+         writer.print("<td>");
+         writer.print(entry.getValue()[0]);
+         writer.print("</td>");
+         writer.print("</tr>");
+      }
+      writer.println("</table>");
+
+      //
+      writer.close();
+   }
+}

Added: epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/webapp/WEB-INF/portlet.xml	                        (rev 0)
+++ epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/webapp/WEB-INF/portlet.xml	2010-11-13 12:48:27 UTC (rev 5079)
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) 2009 eXo Platform SAS.
+
+    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 version="1.0" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+ -->
+
+ <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="1.0">
+
+   <portlet>
+    <description xml:lang="EN">Public Render Parameter API Portlet</description>
+    <portlet-name>PRPAPIPortlet</portlet-name>
+    <display-name xml:lang="EN">Public Render Parameter API Portlet</display-name>
+    <portlet-class>org.gatein.portal.samples.api.PRPPortlet</portlet-class>
+
+    <supports>
+      <mime-type>text/html</mime-type>
+    </supports>
+
+    <portlet-info>
+      <title>PRP Portlet</title>
+      <short-title>PRP Portlet</short-title>
+      <keywords>Sample</keywords>
+    </portlet-info>
+
+     <supported-public-render-parameter>navigation_uri</supported-public-render-parameter>
+     <supported-public-render-parameter>page_name</supported-public-render-parameter>
+     <supported-public-render-parameter>site_type</supported-public-render-parameter>
+     <supported-public-render-parameter>site_name</supported-public-render-parameter>
+     <supported-public-render-parameter>window_width</supported-public-render-parameter>
+     <supported-public-render-parameter>window_height</supported-public-render-parameter>
+     <supported-public-render-parameter>window_show_info_bar</supported-public-render-parameter>
+
+  </portlet>
+
+  <public-render-parameter>
+     <identifier>navigation_uri</identifier>
+     <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:navigation_uri</qname>
+  </public-render-parameter>
+  <public-render-parameter>
+     <identifier>page_name</identifier>
+     <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:page_name</qname>
+  </public-render-parameter>
+  <public-render-parameter>
+     <identifier>site_type</identifier>
+     <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:site_type</qname>
+  </public-render-parameter>
+  <public-render-parameter>
+     <identifier>site_name</identifier>
+     <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:site_name</qname>
+  </public-render-parameter>
+  <public-render-parameter>
+     <identifier>window_width</identifier>
+     <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:window_width</qname>
+  </public-render-parameter>
+  <public-render-parameter>
+     <identifier>window_height</identifier>
+     <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:window_height</qname>
+  </public-render-parameter>
+  <public-render-parameter>
+     <identifier>window_show_info_bar</identifier>
+     <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:window_show_info_bar</qname>
+  </public-render-parameter>
+
+</portlet-app>

Added: epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/webapp/WEB-INF/web.xml
===================================================================
--- epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ epp/examples/branches/EPP_5_1_Branch/portlets/prpapi/src/main/webapp/WEB-INF/web.xml	2010-11-13 12:48:27 UTC (rev 5079)
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<web-app 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"
+        version="2.5">
+
+  <servlet>
+    <servlet-name>GateInServlet</servlet-name>
+    <servlet-class>org.gatein.wci.api.GateInServlet</servlet-class>
+    <load-on-startup>0</load-on-startup>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>GateInServlet</servlet-name>
+    <url-pattern>/gateinservlet</url-pattern>
+  </servlet-mapping>
+
+</web-app>



More information about the gatein-commits mailing list