portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddew...@apache.org
Subject svn commit: r356940 - in /portals/pluto/trunk: ./ pluto-ant-tasks/ pluto-ant-tasks/src/main/java/org/apache/pluto/ant/ pluto-container/ pluto-container/src/main/java/org/apache/pluto/core/ pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors...
Date Wed, 14 Dec 2005 23:49:19 GMT
Author: ddewolf
Date: Wed Dec 14 15:49:05 2005
New Revision: 356940

URL: http://svn.apache.org/viewcvs?rev=356940&view=rev
Log:
Tck Servlet updates; fixing preferences in descriptor service

Added:
    portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/TomcatCrossContextGenerator.java
Modified:
    portals/pluto/trunk/pluto-ant-tasks/pom.xml
    portals/pluto/trunk/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/AssembleTask.java
    portals/pluto/trunk/pluto-container/pom.xml
    portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletEntity.java
    portals/pluto/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletPreferenceDD.java
    portals/pluto/trunk/pluto-descriptor-impl/src/resources/xml/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml
    portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TckDriverServlet.java
    portals/pluto/trunk/pluto-taglib/pom.xml
    portals/pluto/trunk/pom.xml

Modified: portals/pluto/trunk/pluto-ant-tasks/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-ant-tasks/pom.xml?rev=356940&r1=356939&r2=356940&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-ant-tasks/pom.xml (original)
+++ portals/pluto/trunk/pluto-ant-tasks/pom.xml Wed Dec 14 15:49:05 2005
@@ -4,10 +4,7 @@
   <artifactId>pluto-ant-tasks</artifactId> 
   <packaging>jar</packaging>
   <name>Pluto Ant Tasks</name> 
-  <description>
-    The Pluto Ant Tasks are used to assemble, deploy, and publish
-	portlets to the Pluto Portal Driver.
-  </description>
+  <description>The Pluto Ant Tasks are used to assemble, deploy, and publish portlets
to the Pluto Portal Driver.</description>
 
   <parent>
     <groupId>org.apache.pluto</groupId>

Modified: portals/pluto/trunk/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/AssembleTask.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/AssembleTask.java?rev=356940&r1=356939&r2=356940&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/AssembleTask.java
(original)
+++ portals/pluto/trunk/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/AssembleTask.java
Wed Dec 14 15:49:05 2005
@@ -42,6 +42,8 @@
     private File webapp;
 
     public File getPortletxml() {
+        if(webapp != null)
+            return new File(webapp, "WEB-INF/portlet.xml");
         return portletxml;
     }
 
@@ -50,6 +52,8 @@
     }
 
     public File getWebxml() {
+        if(webapp != null)
+            return new File(webapp, "WEB-INF/web.xml");
         return webxml;
     }
 
@@ -60,7 +64,7 @@
     public File getDestfile() {
         if(destfile != null)
             return destfile;
-        return webxml;
+        return getWebxml();
     }
 
     public void setDestfile(File destfile) {

Modified: portals/pluto/trunk/pluto-container/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-container/pom.xml?rev=356940&r1=356939&r2=356940&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/pom.xml (original)
+++ portals/pluto/trunk/pluto-container/pom.xml Wed Dec 14 15:49:05 2005
@@ -5,11 +5,7 @@
   <packaging>jar</packaging>
   <name>Pluto Portlet Container</name>
   <url>http://portals.apache.org/pluto</url>
-  <description>
-  The Pluto Portlet Container is the reference implementation of the
-  Java Portlet Specification.  The container aims to be lightweight,
-  flexible, and easy to embed.
-  </description>
+  <description>The pluto portlet container.</description>
   <parent>
     <groupId>org.apache.pluto</groupId>
 	<artifactId>pluto</artifactId>

Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletEntity.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletEntity.java?rev=356940&r1=356939&r2=356940&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletEntity.java
(original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletEntity.java
Wed Dec 14 15:49:05 2005
@@ -71,8 +71,9 @@
                 Iterator pds = ppdd.getPortletPreferences().iterator();
                 for(int i=0;pds.hasNext();i++) {
                     PortletPreferenceDD pd = (PortletPreferenceDD)pds.next();
+                    String[] values = (String[]) pd.getValues().toArray(new String[pd.getValues().size()]);
                     prefs[i] = new PortletPreferenceImpl(
-                        pd.getName(), new String[] { pd.getValue()}
+                        pd.getName(), values
                     );
                 }
             }

Modified: portals/pluto/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletPreferenceDD.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletPreferenceDD.java?rev=356940&r1=356939&r2=356940&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletPreferenceDD.java
(original)
+++ portals/pluto/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletPreferenceDD.java
Wed Dec 14 15:49:05 2005
@@ -15,6 +15,9 @@
  */
 package org.apache.pluto.descriptors.portlet;
 
+import java.util.Collection;
+import java.util.List;
+
 /**
  * <B>TODO:</B> Document
  *
@@ -24,7 +27,7 @@
 public class PortletPreferenceDD {
 
     private String name;
-    private String value;
+    private List values;
 
     public String getName() {
         return name;
@@ -34,11 +37,11 @@
         this.name = name;
     }
 
-    public String getValue() {
-        return value;
+    public List getValues() {
+        return values;
     }
 
-    public void setValue(String value) {
-        this.value = value;
+    public void setValues(List values) {
+        this.values = values;
     }
 }

Modified: portals/pluto/trunk/pluto-descriptor-impl/src/resources/xml/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-descriptor-impl/src/resources/xml/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml?rev=356940&r1=356939&r2=356940&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-descriptor-impl/src/resources/xml/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml
(original)
+++ portals/pluto/trunk/pluto-descriptor-impl/src/resources/xml/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml
Wed Dec 14 15:49:05 2005
@@ -121,7 +121,7 @@
     <field name="Name">
       <bind-xml name="name" node="element"/>
     </field>
-    <field name="Value">
+    <field name="Values" type="java.lang.String" collection="arraylist">
       <bind-xml name="value" node="element"/>
     </field>
   </class>

Modified: portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TckDriverServlet.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TckDriverServlet.java?rev=356940&r1=356939&r2=356940&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TckDriverServlet.java
(original)
+++ portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TckDriverServlet.java
Wed Dec 14 15:49:05 2005
@@ -85,6 +85,10 @@
         String[] portletNames = request.getParameterValues("portletName");
         String pageName = request.getParameter("pageName");
         if(pageName == null) {
+
+            AdminConfiguration adminConfig = (AdminConfiguration)getServletContext()
+                    .getAttribute(AttributeKeys.DRIVER_ADMIN_CONFIG);
+
             pageName = new java.text.DecimalFormat("TCK00000").format(pageCounter++);
             PageConfig config = new PageConfig();
             config.setName(pageName);
@@ -94,10 +98,9 @@
                 String context = "/"+portletNames[i].substring(0, idx);
                 String portletName = portletNames[i].substring(idx + 1, portletNames[i].length());
                 config.addPortlet(context, portletName);
+                adminConfig.getPortletRegistryAdminService().addPortletApplication(context);
             }
 
-            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.");

Modified: portals/pluto/trunk/pluto-taglib/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-taglib/pom.xml?rev=356940&r1=356939&r2=356940&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-taglib/pom.xml (original)
+++ portals/pluto/trunk/pluto-taglib/pom.xml Wed Dec 14 15:49:05 2005
@@ -4,9 +4,7 @@
   <artifactId>pluto-taglib</artifactId>
   <packaging>jar</packaging>
   <name>Pluto Portlet Tag Library</name>
-  <description>
-  Pluto's Java Portlet Specification Tag Library implementation
-  </description>
+  <description>Pluto's Java Portlet Specification Tag Library implementation</description>
   <parent>
     <groupId>org.apache.pluto</groupId>
 	<artifactId>pluto</artifactId>

Added: portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/TomcatCrossContextGenerator.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/TomcatCrossContextGenerator.java?rev=356940&view=auto
==============================================================================
--- portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/TomcatCrossContextGenerator.java
(added)
+++ portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/TomcatCrossContextGenerator.java
Wed Dec 14 15:49:05 2005
@@ -0,0 +1,64 @@
+/*
+ * 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.util.install.file;
+
+import java.io.*;
+
+/**
+ * TODO JavaDoc
+ *
+ * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:
+ * @version 1.0
+ * @since Dec 11, 2005
+ */
+public class TomcatCrossContextGenerator {
+
+    public static void main(String[] args) throws IOException {
+
+        File tomcatHome = new File(args[0]);
+        File webapps = new File(tomcatHome, "webapps");
+        File conf = new File(tomcatHome, "conf/Catalina/localhost");
+
+        File[] files = webapps.listFiles(new PortletFileNameFilter());
+        for(int i=0;i<files.length;i++) {
+            String fileName = files[i].getName();
+            String contextPath = fileName.substring(0, fileName.indexOf(".war"));
+
+            StringBuffer contents = new StringBuffer();
+            contents.append("<Context ")
+                    .append("path=\"").append(contextPath).append("\" ")
+                    .append("docBase=\"").append(fileName).append("\" ")
+                    .append("crossContext=\"true\">").append("</Context>");
+            File confFile = new File(conf, contextPath+".xml");
+            System.out.println("Writing file: "+confFile.getAbsolutePath());
+            PrintWriter out = new PrintWriter(new FileWriter(confFile));
+            out.println(contents.toString());
+            out.flush();
+            out.close();
+        }
+    }
+
+    public static class PortletFileNameFilter implements FilenameFilter {
+        public boolean accept(File dir, String name) {
+            if(name.startsWith("portlet") && name.endsWith(".war")) {
+                return true;
+            }
+            return false;
+        }
+    }
+
+
+}

Modified: portals/pluto/trunk/pom.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pom.xml?rev=356940&r1=356939&r2=356940&view=diff
==============================================================================
--- portals/pluto/trunk/pom.xml (original)
+++ portals/pluto/trunk/pom.xml Wed Dec 14 15:49:05 2005
@@ -8,17 +8,8 @@
   <packaging>pom</packaging>
   <name>Apache Pluto</name>
   <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
-    the Portlet API which are similar to the Servlet API. A portlet container
-    provides a runtime environment for portlets implemented according to the
-    Portlet API. In this environment portlets can be instantiated, used and
-    finally destroyed. The portlet container is not a stand-alone container like
-    the servlet container; instead it is implemented as a thin layer on top of
-    the servlet container and reuses the functionality provided by the servlet
-    container.
-  </description>
+  <!-- Due to a bug in maven 2.0, the description must not container any line breaks or
tabs -->
+  <description>Pluto is the Reference Implementation of the Java Portlet Specfication.</description>
   <url>http://portals.apache.org/pluto</url>
 
   <issueManagement>



Mime
View raw message