You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by dd...@apache.org on 2005/12/11 21:53:45 UTC

svn commit: r356016 - in /portals/pluto/trunk: ./ maven-pluto-plugin/ maven-pluto-plugin/src/main/java/org/apache/pluto/maven/ pluto-ant-tasks/ pluto-container/ pluto-derby/ pluto-descriptor-api/ pluto-descriptor-impl/ pluto-optional-services/ pluto-po...

Author: ddewolf
Date: Sun Dec 11 12:53:35 2005
New Revision: 356016

URL: http://svn.apache.org/viewcvs?rev=356016&view=rev
Log:
Moving on from alpha release;  Adding the TCK Driver to begin TCK testing

Added:
    portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TckServlet.java
Modified:
    portals/pluto/trunk/maven-pluto-plugin/pom.xml
    portals/pluto/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallationDependency.java
    portals/pluto/trunk/pluto-ant-tasks/pom.xml
    portals/pluto/trunk/pluto-container/pom.xml
    portals/pluto/trunk/pluto-derby/pom.xml
    portals/pluto/trunk/pluto-descriptor-api/pom.xml
    portals/pluto/trunk/pluto-descriptor-impl/pom.xml
    portals/pluto/trunk/pluto-optional-services/pom.xml
    portals/pluto/trunk/pluto-portal-driver/pom.xml
    portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/RenderConfigAdminService.java
    portals/pluto/trunk/pluto-portal/pom.xml
    portals/pluto/trunk/pluto-site/pom.xml
    portals/pluto/trunk/pluto-taglib/pom.xml
    portals/pluto/trunk/pluto-testsuite/pom.xml
    portals/pluto/trunk/pluto-util/pom.xml
    portals/pluto/trunk/pom.xml

Modified: portals/pluto/trunk/maven-pluto-plugin/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/maven-pluto-plugin/pom.xml?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- portals/pluto/trunk/maven-pluto-plugin/pom.xml (original)
+++ portals/pluto/trunk/maven-pluto-plugin/pom.xml Sun Dec 11 12:53:35 2005
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.apache.pluto</groupId>
 	<artifactId>pluto</artifactId>
-	<version>1.1.0-alpha1</version>
+	<version>1.1.0-SNAPSHOT</version>
   </parent>
   <name>Maven Pluto Installer Plugin</name> 
    <dependencies>

Modified: portals/pluto/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallationDependency.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallationDependency.java?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- portals/pluto/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallationDependency.java (original)
+++ portals/pluto/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallationDependency.java Sun Dec 11 12:53:35 2005
@@ -14,22 +14,22 @@
         new InstallationDependency("javax.portlet", "portlet-api", "1.0");
 
     public static final InstallationDependency  DESCRIPTOR_API =
-        new InstallationDependency("org.apache.pluto", "pluto-descriptor-api", "1.1.0-alpha1");
+        new InstallationDependency("org.apache.pluto", "pluto-descriptor-api", "1.1.0-SNAPSHOT");
 
     public static final InstallationDependency  DESCRIPTOR_IMPL =
-            new InstallationDependency("org.apache.pluto", "pluto-descriptor-impl", "1.1.0-alpha1");
+            new InstallationDependency("org.apache.pluto", "pluto-descriptor-impl", "1.1.0-SNAPSHOT");
 
     public static final InstallationDependency  CONTAINER =
-            new InstallationDependency("org.apache.pluto", "pluto-container", "1.1.0-alpha1");
+            new InstallationDependency("org.apache.pluto", "pluto-container", "1.1.0-SNAPSHOT");
 
     public static final InstallationDependency  TAGLIB =
-            new InstallationDependency("org.apache.pluto", "pluto-taglib", "1.1.0-alpha1");
+            new InstallationDependency("org.apache.pluto", "pluto-taglib", "1.1.0-SNAPSHOT");
 
     public static final InstallationDependency  PORTAL =
-            new InstallationDependency("org.apache.pluto", "pluto-portal", "1.1.0-alpha1", "war");
+            new InstallationDependency("org.apache.pluto", "pluto-portal", "1.1.0-SNAPSHOT", "war");
 
     public static final InstallationDependency  TESTSUITE =
-            new InstallationDependency("org.apache.pluto", "pluto-testsuite", "1.1.0-alpha1", "war");
+            new InstallationDependency("org.apache.pluto", "pluto-testsuite", "1.1.0-SNAPSHOT", "war");
 
     public static final InstallationDependency  CASTOR =
             new InstallationDependency("castor", "castor", "0.9.6");

Modified: portals/pluto/trunk/pluto-ant-tasks/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-ant-tasks/pom.xml?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-ant-tasks/pom.xml (original)
+++ portals/pluto/trunk/pluto-ant-tasks/pom.xml Sun Dec 11 12:53:35 2005
@@ -12,7 +12,7 @@
   <parent>
     <groupId>org.apache.pluto</groupId>
 	<artifactId>pluto</artifactId>
-	<version>1.1.0-alpha1</version>
+	<version>1.1.0-SNAPSHOT</version>
   </parent>
 
    <dependencies>

Modified: portals/pluto/trunk/pluto-container/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-container/pom.xml?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/pom.xml (original)
+++ portals/pluto/trunk/pluto-container/pom.xml Sun Dec 11 12:53:35 2005
@@ -13,7 +13,7 @@
   <parent>
     <groupId>org.apache.pluto</groupId>
 	<artifactId>pluto</artifactId>
-	<version>1.1.0-alpha1</version>
+	<version>1.1.0-SNAPSHOT</version>
   </parent>
   <dependencies>
 

Modified: portals/pluto/trunk/pluto-derby/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-derby/pom.xml?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-derby/pom.xml (original)
+++ portals/pluto/trunk/pluto-derby/pom.xml Sun Dec 11 12:53:35 2005
@@ -13,7 +13,7 @@
   <parent>
     <groupId>org.apache.pluto</groupId>
 	<artifactId>pluto</artifactId>
-	<version>1.1.0-alpha1</version>
+	<version>1.1.0-SNAPSHOT</version>
   </parent>
   <dependencies>
     <dependency>

Modified: portals/pluto/trunk/pluto-descriptor-api/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-descriptor-api/pom.xml?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-descriptor-api/pom.xml (original)
+++ portals/pluto/trunk/pluto-descriptor-api/pom.xml Sun Dec 11 12:53:35 2005
@@ -8,7 +8,7 @@
   <parent>
     <groupId>org.apache.pluto</groupId>
 	<artifactId>pluto</artifactId>
-	<version>1.1.0-alpha1</version>
+	<version>1.1.0-SNAPSHOT</version>
   </parent>
   <dependencies>
     <dependency>

Modified: portals/pluto/trunk/pluto-descriptor-impl/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-descriptor-impl/pom.xml?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-descriptor-impl/pom.xml (original)
+++ portals/pluto/trunk/pluto-descriptor-impl/pom.xml Sun Dec 11 12:53:35 2005
@@ -11,7 +11,7 @@
   <parent>
     <groupId>org.apache.pluto</groupId>
     <artifactId>pluto</artifactId>
-    <version>1.1.0-alpha1</version>
+    <version>1.1.0-SNAPSHOT</version>
   </parent>
   
   <build>

Modified: portals/pluto/trunk/pluto-optional-services/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-optional-services/pom.xml?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-optional-services/pom.xml (original)
+++ portals/pluto/trunk/pluto-optional-services/pom.xml Sun Dec 11 12:53:35 2005
@@ -11,7 +11,7 @@
   <parent>
     <groupId>org.apache.pluto</groupId>
     <artifactId>pluto</artifactId>
-    <version>1.1.0-alpha1</version>
+    <version>1.1.0-SNAPSHOT</version>
   </parent>
   <dependencies>
     <dependency>

Modified: portals/pluto/trunk/pluto-portal-driver/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal-driver/pom.xml?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver/pom.xml (original)
+++ portals/pluto/trunk/pluto-portal-driver/pom.xml Sun Dec 11 12:53:35 2005
@@ -11,7 +11,7 @@
   <parent>
     <groupId>org.apache.pluto</groupId>
     <artifactId>pluto</artifactId>
-    <version>1.1.0-alpha1</version>
+    <version>1.1.0-SNAPSHOT</version>
   </parent>
   <dependencies>
     <dependency>

Added: portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TckServlet.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TckServlet.java?rev=356016&view=auto
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TckServlet.java (added)
+++ portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TckServlet.java Sun Dec 11 12:53:35 2005
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2003,2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.driver;
+
+import org.apache.pluto.PortletContainer;
+import org.apache.pluto.driver.services.portal.PageConfig;
+import org.apache.pluto.driver.services.portal.PortletWindowConfig;
+import org.apache.pluto.driver.config.AdminConfiguration;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import java.util.ArrayList;
+import java.text.NumberFormat;
+import java.io.IOException;
+
+/**
+ * TCK Driver Servlet
+ *
+ * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:
+ * @version 1.0
+ * @since Dec 11, 2005
+ */
+public class TckServlet extends PortalDriverServlet {
+
+    private int pageCounter = 0;
+
+    private String portalDriver = "/portal/";
+
+    public String getServletInfo() {
+        return "Pluto TCK Driver Servlet";
+    }
+
+    public void init() {
+        ServletContext servletContext = getServletContext();
+        container = (PortletContainer) servletContext.getAttribute(
+                AttributeKeys.PORTLET_CONTAINER);
+    }
+
+    public void doGet(HttpServletRequest request, HttpServletResponse response)
+    throws IOException, ServletException {
+
+        // If portletNames are defined, the driver is attempting to
+        //   create a new page.  This page must be setup and then
+        //   redirected to the actual page.
+        String[] portletNames = request.getParameterValues("portletName");
+        if(portletNames != null && portletNames.length < 0) {
+            doSetup(request, response);
+            return;
+        }
+
+        super.doGet(request, response);
+    }
+
+    public void doPost(HttpServletRequest req, HttpServletResponse response)
+    throws IOException, ServletException {
+        super.doGet(req, response);
+    }
+
+    public void doSetup(HttpServletRequest request, HttpServletResponse response)
+    throws IOException, ServletException {
+        String[] portletNames = request.getParameterValues("portletName");
+        String pageName = request.getParameter("pageName");
+        if(pageName == null) {
+            pageName = new java.text.DecimalFormat("TCK00000").format(pageCounter);
+            PageConfig config = new PageConfig();
+            config.setName(pageName);
+            config.setUri("/WEB-INF/fragments/portlet.jsp");
+            for(int i = 0;i < portletNames.length; i++) {
+                int idx = portletNames[i].indexOf("/");
+                String context = portletNames[i].substring(0, idx);
+                String portletName = portletNames[i].substring(idx, portletNames.length);
+                config.addPortlet(context, portletName);
+            }
+
+            AdminConfiguration adminConfig = (AdminConfiguration)getServletContext()
+                .getAttribute(AttributeKeys.DRIVER_ADMIN_CONFIG);
+
+            if(adminConfig == null) {
+                throw new ServletException("Invalid Configuration.  An AdminConfiguration must be specified to run the TCK.");
+            }
+            adminConfig.getRenderConfigAdminService().addPage(config);
+        }
+
+        // The other possibility would be to redirect to the actual portal.
+        // I'm not sure which is better at this point.
+        response.sendRedirect(request.getContextPath()+request.getRequestURL()+"/"+pageName);
+    }
+}

Modified: portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/RenderConfigAdminService.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/RenderConfigAdminService.java?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/RenderConfigAdminService.java (original)
+++ portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/RenderConfigAdminService.java Sun Dec 11 12:53:35 2005
@@ -1,12 +1,17 @@
 package org.apache.pluto.driver.services.portal.admin;
 
+import org.apache.pluto.driver.services.portal.PageConfig;
+
 /**
- * TODO JavaDoc
+ *
  *
  * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:
  * @version 1.0
  * @since Nov 30, 2005
  */
 public interface RenderConfigAdminService {
-    
+
+    public void addPage(PageConfig config);
+
+
 }

Modified: portals/pluto/trunk/pluto-portal/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal/pom.xml?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal/pom.xml (original)
+++ portals/pluto/trunk/pluto-portal/pom.xml Sun Dec 11 12:53:35 2005
@@ -8,7 +8,7 @@
   <parent>
     <groupId>org.apache.pluto</groupId>
 	<artifactId>pluto</artifactId>
-	<version>1.1.0-alpha1</version>
+	<version>1.1.0-SNAPSHOT</version>
   </parent>
   <dependencies>
     <dependency>

Modified: portals/pluto/trunk/pluto-site/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-site/pom.xml?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-site/pom.xml (original)
+++ portals/pluto/trunk/pluto-site/pom.xml Sun Dec 11 12:53:35 2005
@@ -3,7 +3,7 @@
   <parent>
     <artifactId>pluto</artifactId>
     <groupId>org.apache.pluto</groupId>
-    <version>1.1.0-alpha1</version>
+    <version>1.1.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>pluto-site</artifactId>

Modified: portals/pluto/trunk/pluto-taglib/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-taglib/pom.xml?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-taglib/pom.xml (original)
+++ portals/pluto/trunk/pluto-taglib/pom.xml Sun Dec 11 12:53:35 2005
@@ -10,7 +10,7 @@
   <parent>
     <groupId>org.apache.pluto</groupId>
 	<artifactId>pluto</artifactId>
-	<version>1.1.0-alpha1</version>
+	<version>1.1.0-SNAPSHOT</version>
   </parent>
   <dependencies>
 	<dependency>

Modified: portals/pluto/trunk/pluto-testsuite/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-testsuite/pom.xml?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-testsuite/pom.xml (original)
+++ portals/pluto/trunk/pluto-testsuite/pom.xml Sun Dec 11 12:53:35 2005
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.apache.pluto</groupId>
     <artifactId>pluto</artifactId>
-    <version>1.1.0-alpha1</version>
+    <version>1.1.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.pluto</groupId>

Modified: portals/pluto/trunk/pluto-util/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-util/pom.xml?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-util/pom.xml (original)
+++ portals/pluto/trunk/pluto-util/pom.xml Sun Dec 11 12:53:35 2005
@@ -3,7 +3,7 @@
   <parent>
     <artifactId>pluto</artifactId>
     <groupId>org.apache.pluto</groupId>
-    <version>1.1.0-alpha1</version>
+    <version>1.1.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>pluto-util</artifactId>

Modified: portals/pluto/trunk/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pom.xml?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- portals/pluto/trunk/pom.xml (original)
+++ portals/pluto/trunk/pom.xml Sun Dec 11 12:53:35 2005
@@ -7,7 +7,7 @@
   <artifactId>pluto</artifactId>
   <packaging>pom</packaging>
   <name>Apache Pluto</name>
-  <version>1.1.0-alpha1</version>
+  <version>1.1.0-SNAPSHOT</version>
   <description>
     Pluto is the Reference Implementation of the Java Portlet Specfication.
     Portlets are designed to run in the context of a portal. They are written to
@@ -207,7 +207,6 @@
       <id>m1</id>
       <name>Maven 1 Repository</name>
       <url>scp://cvs.apache.org/www/cvs.apache.org/repository</url>
-      <layout>legacy</layout>
     </repository>
 
   <!--