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/03/14 23:13:22 UTC

svn commit: r157475 - in portals/pluto/trunk: ./ deploy/src/java/org/apache/pluto/driver/deploy/ deploy/src/java/org/apache/pluto/driver/deploy/impl/ descriptors/src/conf/org/apache/pluto/descriptors/portlet/ descriptors/src/conf/org/apache/pluto/descriptors/servlet/ descriptors/src/java/org/apache/pluto/descriptors/portlet/ descriptors/src/java/org/apache/pluto/descriptors/servlet/ portal/ testsuite/

Author: ddewolf
Date: Mon Mar 14 14:13:18 2005
New Revision: 157475

URL: http://svn.apache.org/viewcvs?view=rev&rev=157475
Log:
Deployer Updates:
-- Removing bug causing Reordering of Servlets and Mappings
-- Removing bug causing Reordering of Portlets
-- Removing bug causing Registrar Service from being invoked
-- Allowing the registration of multiple registrars
-- Adding a registrar to update the contexts.txt file

Added:
    portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/impl/
    portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/impl/ContextRegistryRegistrarService.java
    portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/impl/PortletEntityRegistryRegistrarService.java
Modified:
    portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/CLI.java
    portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/Deploy.java
    portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/PortalRegistrarService.java
    portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/portlet/castor-portlet-xml-mapping.xml
    portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/servlet/castor-web-xml-mapping.xml
    portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java
    portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletDD.java
    portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/FilterMappingDD.java
    portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/WebAppDD.java
    portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/WebResourceCollectionDD.java
    portals/pluto/trunk/maven.xml
    portals/pluto/trunk/portal/pluto-driver.iml
    portals/pluto/trunk/portals-pluto.ipr
    portals/pluto/trunk/testsuite/testsuite.iml

Modified: portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/CLI.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/CLI.java?view=diff&r1=157474&r2=157475
==============================================================================
--- portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/CLI.java (original)
+++ portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/CLI.java Mon Mar 14 14:13:18 2005
@@ -17,11 +17,14 @@
 package org.apache.pluto.driver.deploy;
 
 import java.io.File;
+import java.util.ArrayList;
 
 import org.apache.pluto.descriptors.services.PortletAppDescriptorService;
 import org.apache.pluto.descriptors.services.WebAppDescriptorService;
 import org.apache.pluto.descriptors.services.impl.FilePortletAppDescriptorServiceImpl;
 import org.apache.pluto.descriptors.services.impl.FileWebAppDescriptorServiceImpl;
+import org.apache.pluto.driver.deploy.impl.PortletEntityRegistryRegistrarService;
+import org.apache.pluto.driver.deploy.impl.ContextRegistryRegistrarService;
 
 public class CLI {
 
@@ -63,8 +66,8 @@
      * @return an instance of the Deployer.
      */
     private static Deploy createDeployer(CLIArgs args) {
+        ArrayList registrars = new ArrayList();
         PortletApplicationExploder exploder = null;
-        PortalRegistrarServiceImpl registrarImpl = null;
         WebAppDescriptorService webAppDescriptorService = null;
         PortletAppDescriptorService portletAppDescriptorService = null;
 
@@ -74,7 +77,8 @@
         }
 
         if(args.portalApplication!=null) {
-            registrarImpl = new PortalRegistrarServiceImpl(args.portalApplication);
+            registrars.add(new PortletEntityRegistryRegistrarService(args.portalApplication));
+            registrars.add(new ContextRegistryRegistrarService(args.portalApplication));
         }
         if(args.debug) {
             System.out.println("<VERBOSE> Portal WebApp: "+ args.portalApplication.getAbsolutePath());
@@ -99,7 +103,7 @@
         Deploy deploy = new Deploy(webAppDescriptorService, portletAppDescriptorService);
         deploy.setDebug(args.debug);
         deploy.setExploder(exploder);
-        deploy.setRegistrar(registrarImpl);
+        deploy.setRegistrars(registrars);
         return deploy;
     }
 
@@ -173,6 +177,9 @@
         return result;
     }
 
+    /**
+     * Print command usage information.
+     */
     private static void printUsage() {
         String sep = System.getProperty("line.separator");
         StringBuffer sb = new StringBuffer(sep);
@@ -188,10 +195,16 @@
         System.out.println(sb);
     }
 
+    /**
+     * Print version informaiton.
+     */
     private static void printVersion() {
         System.out.println("Apache Pluto Deploy / 1.0");
     }
 
+    /**
+     * Parged and converted Command Line arguments.
+     */
     static class CLIArgs {
         private File portletApplication;
         private File portalApplication;

Modified: portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/Deploy.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/Deploy.java?view=diff&r1=157474&r2=157475
==============================================================================
--- portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/Deploy.java (original)
+++ portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/Deploy.java Mon Mar 14 14:13:18 2005
@@ -25,6 +25,7 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.ArrayList;
 
 import org.apache.pluto.descriptors.common.InitParamDD;
 import org.apache.pluto.descriptors.common.SecurityRoleRefDD;
@@ -36,6 +37,7 @@
 import org.apache.pluto.descriptors.servlet.ServletDD;
 import org.apache.pluto.descriptors.servlet.ServletMappingDD;
 import org.apache.pluto.descriptors.servlet.WebAppDD;
+import org.apache.pluto.driver.deploy.impl.PortletEntityRegistryRegistrarService;
 
 public class Deploy {
 
@@ -49,7 +51,7 @@
     // Private Services we use internally but don't
     // want to expose to the rest of the work - yet.
     private PortletApplicationExploder exploder;
-    private PortalRegistrarServiceImpl registrarImpl;
+    private List registrars = new ArrayList();
 
     private boolean debug = false;
 
@@ -98,12 +100,16 @@
         this.exploder = exploder;
     }
 
-    PortalRegistrarServiceImpl getRegistrar() {
-        return registrarImpl;
+    List getRegistrars() {
+        return registrars;
     }
 
-    void setRegistrar(PortalRegistrarServiceImpl registrarImpl) {
-        this.registrarImpl = registrarImpl;
+    void setRegistrars(List registrars) {
+        this.registrars = registrars;
+    }
+
+    void addRegistrar(PortalRegistrarService registrar) {
+        this.registrars.add(registrar);
     }
 
     public boolean isDebug() {
@@ -114,6 +120,26 @@
         this.debug = debug;
     }
 
+    /**
+     * Deploy the war file at the given location
+     * utilizing the preconfigured resources.
+     *
+     * @param warFile
+     * @throws IOException
+     */
+    public void deploy(File warFile) throws IOException {
+        if(exploder != null) {
+            exploder.explode(warFile);
+        }
+        updateDescriptors();
+        Iterator it = registrars.iterator();
+        PortalRegistrarService registrar = null;
+        while(it.hasNext()) {
+            registrar = (PortalRegistrarService)it.next();
+            registrar.register(portletAppDescriptorService);
+        }
+    }
+
     public void updateDescriptors()
         throws IOException {
         PortletAppDD portletApp = portletAppDescriptorService.read();
@@ -123,7 +149,6 @@
         PortletDD portlet;
         while (portlets.hasNext()) {
             portlet = (PortletDD) portlets.next();
-
             createServlet(webApp, portlet);
             createServletMapping(webApp, portlet);
         }
@@ -131,31 +156,7 @@
         this.webAppDescriptorService.write(webApp);
     }
 
-    public static void copy(String from, String to) throws IOException {
-        File f = new File(to);
-        f.getParentFile().mkdirs();
-
-        byte[] buffer = new byte[1024];
-        int length = 0;
-        InputStream fis = new FileInputStream(from);
-        FileOutputStream fos = new FileOutputStream(f);
 
-        while ((length = fis.read(buffer)) >= 0) {
-            fos.write(buffer, 0, length);
-        }
-        fos.close();
-    }
-
-    public void deploy(File warFile) throws IOException {
-        if(exploder != null) {
-            exploder.explode(warFile);
-        }
-        updateDescriptors();
-        File portalWebApp = null;
-        if(portalWebApp != null) {
-            registrarImpl.register(portletAppDescriptorService);
-        }
-    }
 
 
     private void createServlet(WebAppDD webApp, PortletDD portlet) {
@@ -276,7 +277,4 @@
             webApp.getServletMappings().add(servletMapping);
         }
     }
-
-
-
 }

Modified: portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/PortalRegistrarService.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/PortalRegistrarService.java?view=diff&r1=157474&r2=157475
==============================================================================
--- portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/PortalRegistrarService.java (original)
+++ portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/PortalRegistrarService.java Mon Mar 14 14:13:18 2005
@@ -16,6 +16,8 @@
 
 package org.apache.pluto.driver.deploy;
 
+import java.io.IOException;
+
 import org.apache.pluto.descriptors.services.PortletAppDescriptorService;
 
 /**
@@ -32,5 +34,6 @@
      * Register the application defined by the service.
      * @param service
      */
-    void register(PortletAppDescriptorService service);
+    void register(PortletAppDescriptorService service)
+        throws IOException;
 }

Added: portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/impl/ContextRegistryRegistrarService.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/impl/ContextRegistryRegistrarService.java?view=auto&rev=157475
==============================================================================
--- portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/impl/ContextRegistryRegistrarService.java (added)
+++ portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/impl/ContextRegistryRegistrarService.java Mon Mar 14 14:13:18 2005
@@ -0,0 +1,65 @@
+/*
+ * Copyright 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.deploy.impl;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+import org.apache.pluto.driver.deploy.PortalRegistrarService;
+import org.apache.pluto.descriptors.services.PortletAppDescriptorService;
+
+/**
+ * Registrar service which adds the application context to the
+ * registry file.
+ *
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Mar 11, 2005
+ */
+public class ContextRegistryRegistrarService implements PortalRegistrarService {
+
+    public static final String CONTEXT_FILE = "WEB-INF/data/portletcontexts.txt";
+
+    private File webAppDir;
+
+    public ContextRegistryRegistrarService(File webAppDir) {
+        this.webAppDir = webAppDir;
+    }
+
+    public void register(PortletAppDescriptorService service)
+        throws IOException {
+        System.out.println("<VERBOSE> Registering Applicaiton Context");
+        File file = new File(webAppDir, CONTEXT_FILE);
+        RandomAccessFile ras = new RandomAccessFile(file, "rw");
+
+        long length = ras.length();
+        byte[] contentByte = new byte[(int) length];
+        ras.read(contentByte);
+        String contents = new String(contentByte);
+        long pos = contents.lastIndexOf("/"+service.getContextPath());
+        if(pos > -1) {
+            System.out.println("<VERBOSE> Found previous context registration; Registration aborted.");
+            ras.close();
+            return;
+        }
+        ras.seek(length);
+        ras.writeBytes("/"+service.getContextPath());
+        ras.writeBytes("\n");
+        ras.close();
+    }
+}
+

Added: portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/impl/PortletEntityRegistryRegistrarService.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/impl/PortletEntityRegistryRegistrarService.java?view=auto&rev=157475
==============================================================================
--- portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/impl/PortletEntityRegistryRegistrarService.java (added)
+++ portals/pluto/trunk/deploy/src/java/org/apache/pluto/driver/deploy/impl/PortletEntityRegistryRegistrarService.java Mon Mar 14 14:13:18 2005
@@ -0,0 +1,95 @@
+/*
+ * Copyright 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.deploy.impl;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.util.Iterator;
+
+import org.apache.pluto.descriptors.portlet.PortletAppDD;
+import org.apache.pluto.descriptors.portlet.PortletDD;
+import org.apache.pluto.descriptors.services.PortletAppDescriptorService;
+import org.apache.pluto.driver.deploy.PortalRegistrarService;
+
+/**
+ * Service Implementation used by the command line deployer
+ * to register portlet applications with the Portal.
+ *
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Mar 6, 2005
+ */
+public class PortletEntityRegistryRegistrarService
+ implements PortalRegistrarService {
+
+    private static final String REGISTRY_FILE =
+        "WEB-INF/data/portletentityregistry.xml";
+
+    private File portalRoot;
+
+    /**
+     * Default Constructor wich provides the root of
+     * the portal application.
+     *
+     * @param portalRoot
+     */
+    public PortletEntityRegistryRegistrarService(File portalRoot) {
+        this.portalRoot = portalRoot;
+    }
+
+    /**
+     * Register the portlet application represented by the
+     * descriptor service provided.
+     * @param service service used to obtain desc info.
+     */
+    public void register(PortletAppDescriptorService service)
+    throws IOException {
+        System.out.println("<VERBOSE> Registering application '"+service.getContextPath()+"'");
+
+        File file = new File(portalRoot, REGISTRY_FILE);
+        RandomAccessFile ras = new RandomAccessFile(file, "rw");
+        long length = ras.length();
+        byte[] contentByte = new byte[(int) length];
+        ras.read(contentByte);
+        String contentString = new String(contentByte);
+        long pos = contentString.indexOf("<definition-id>"+service.getContextPath()+"</definition-id>");
+        if(pos > 0) {
+            System.out.println("<VERBOSE> Found previous entity registery; Registration Aborted.");
+            ras.close();
+            return;
+        }
+        pos = contentString.lastIndexOf("</portlet-entity-registry>");
+        ras.seek(pos);
+        ras.writeBytes("    <application id=\"" + service.getContextPath() + "\">\n");
+        ras.writeBytes("        <definition-id>" + service.getContextPath() + "</definition-id>\n");
+
+        PortletAppDD app = service.read();
+        PortletDD p;
+        Iterator i = app.getPortlets().iterator();
+        while(i.hasNext()) {
+            p = (PortletDD)i.next();
+            ras.writeBytes("        <portlet id=\"" + p.getPortletName() + "\">\n");
+            ras.writeBytes("            <definition-id>" + service.getContextPath()
+                               + "." + p.getPortletName() + "</definition-id>\n");
+            ras.writeBytes("        </portlet>\n");
+        }
+        ras.writeBytes("    </application>\n");
+        ras.writeBytes("</portlet-entity-registry>\n");
+        ras.close();
+    }
+}
+

Modified: portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/portlet/castor-portlet-xml-mapping.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/portlet/castor-portlet-xml-mapping.xml?view=diff&r1=157474&r2=157475
==============================================================================
--- portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/portlet/castor-portlet-xml-mapping.xml (original)
+++ portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/portlet/castor-portlet-xml-mapping.xml Mon Mar 14 14:13:18 2005
@@ -27,7 +27,7 @@
     <map-to xml="portlet-app"/>
     <field name="Portlets"
            type="org.apache.pluto.descriptors.portlet.PortletDD"
-           collection="set">
+           collection="arraylist">
       <bind-xml name="portlet" node="element"/>
     </field>
   </class>

Modified: portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/servlet/castor-web-xml-mapping.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/servlet/castor-web-xml-mapping.xml?view=diff&r1=157474&r2=157475
==============================================================================
--- portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/servlet/castor-web-xml-mapping.xml (original)
+++ portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/servlet/castor-web-xml-mapping.xml Mon Mar 14 14:13:18 2005
@@ -67,37 +67,37 @@
 
     <field name="ContextParams"
            type="org.apache.pluto.descriptors.common.InitParamDD"
-           collection="set">
+           collection="arraylist">
       <bind-xml name="context-param" node="element"/>
     </field>
 
     <field name="Filters"
            type="org.apache.pluto.descriptors.servlet.FilterDD"
-           collection="set">
+           collection="arraylist">
       <bind-xml name="filter" node="element"/>
     </field>
 
     <field name="Listeners"
         type="org.apache.pluto.descriptors.servlet.ListenerDD"
-        collection="set">
+        collection="arraylist">
         <bind-xml name="listener" node="element"/>
     </field>
 
     <field name="Servlets"
            type="org.apache.pluto.descriptors.servlet.ServletDD"
-           collection="set">
+           collection="arraylist">
       <bind-xml name="servlet" node="element"/>
     </field>
 
     <field name="FilterMappings"
            type="org.apache.pluto.descriptors.servlet.FilterMappingDD"
-           collection="set">
+           collection="arraylist">
       <bind-xml name="filter-mapping" node="element"/>
     </field>
 
     <field name="ServletMappings"
         type="org.apache.pluto.descriptors.servlet.ServletMappingDD"
-        collection="set">
+        collection="arraylist">
         <bind-xml name="servlet-mapping" node="element"/>
     </field>
 
@@ -108,7 +108,7 @@
 
     <field name="MimeMappings"
            type="org.apache.pluto.descriptors.servlet.MimeMappingDD"
-           collection="set">
+           collection="arraylist">
       <bind-xml name="mime-mapping" node="element"/>
     </field>
 
@@ -119,25 +119,25 @@
 
     <field name="ErrorPages"
            type="org.apache.pluto.descriptors.servlet.ErrorPageDD"
-           collection="set">
+           collection="arraylist">
         <bind-xml name="error-page" node="element"/>
     </field>
 
     <field name="Taglibs"
            type="org.apache.pluto.descriptors.servlet.TaglibDD"
-           collection="set">
+           collection="arraylist">
       <bind-xml name="taglib" node="element"/>
     </field>
 
     <field name="ResourceRefs"
            type="org.apache.pluto.descriptors.servlet.ResourceRefDD"
-           collection="set">
+           collection="arraylist">
       <bind-xml name="resource-ref" node="element"/>
     </field>
 
     <field name="SecurityConstraints"
            type="org.apache.pluto.descriptors.servlet.SecurityConstraintDD"
-           collection="set">
+           collection="arraylist">
       <bind-xml name="security-constraint" node="element"/>
     </field>
 
@@ -148,19 +148,19 @@
 
     <field name="SecurityRoles"
            type="org.apache.pluto.descriptors.servlet.SecurityRoleDD"
-           collection="set">
+           collection="arraylist">
         <bind-xml name="security-role" node="element"/>
     </field>
 
     <field name="envEntrys"
            type="org.apache.pluto.descriptors.servlet.EnvEntryDD"
-           collection="set">
+           collection="arraylist">
       <bind-xml name="env-entry" node="element"/>    
     </field>
       
     <field name="ejbRefs"
            type="org.apache.pluto.descriptors.servlet.EjbRefDD"
-           collection="set">
+           collection="arraylist">
       <bind-xml name="ejb-ref" node="element"/>
     </field>
   </class>
@@ -206,11 +206,11 @@
     </field>
 
     <field name="UrlPatterns" type="java.lang.String"
-           collection="set">
+           collection="arraylist">
         <bind-xml name="url-pattern" node="element"/>
     </field>
     <field name="Dispatchers" type="java.lang.String"
-           collection="set">
+           collection="arraylist">
         <bind-xml name="dispatcher" node="element"/>
     </field>
   </class>
@@ -295,10 +295,10 @@
     <class name="org.apache.pluto.descriptors.servlet.WebResourceCollectionDD">
         <field name="description" type="java.lang.String"/>
         <field name="webResourceName" type="java.lang.String"/>
-        <field name="httpMethods" type="java.lang.String" collection="set">
+        <field name="httpMethods" type="java.lang.String" collection="arraylist">
           <bind-xml name="http-method" node="element"/>
         </field>
-        <field name="urlPatterns" type="java.lang.String" collection="set">
+        <field name="urlPatterns" type="java.lang.String" collection="arraylist">
             <bind-xml name="url-pattern" node="element"/>
         </field>
     </class>

Modified: portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java?view=diff&r1=157474&r2=157475
==============================================================================
--- portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java (original)
+++ portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java Mon Mar 14 14:13:18 2005
@@ -15,8 +15,8 @@
  */
 package org.apache.pluto.descriptors.portlet;
 
-import java.util.HashSet;
-import java.util.Set;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * Portlet Application Configuration.
@@ -28,7 +28,7 @@
 public class PortletAppDD {
 
     /** The defined portlets within the system. */
-    private Set portlets = new HashSet();
+    private List portlets = new ArrayList();
 
     /**
      * Default Constructor.
@@ -40,7 +40,7 @@
      * Retrieve the portlets which exist within this application.
      * @return
      */
-    public Set getPortlets() {
+    public List getPortlets() {
         return portlets;
     }
 
@@ -48,7 +48,7 @@
      * Set the portlets that exist within this application.
      * @param portlets
      */
-    public void setPortlets(Set portlets) {
+    public void setPortlets(List portlets) {
         this.portlets = portlets;
     }
 

Modified: portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletDD.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletDD.java?view=diff&r1=157474&r2=157475
==============================================================================
--- portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletDD.java (original)
+++ portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletDD.java Mon Mar 14 14:13:18 2005
@@ -16,6 +16,7 @@
 package org.apache.pluto.descriptors.portlet;
 
 import java.util.List;
+import java.util.ArrayList;
 
 /**
  * Bare bones implementation of the Portlet descriptor.
@@ -35,7 +36,7 @@
     private String portletClass;
 
     /** All security role references. */
-    private List securityRoleRefs;
+    private List securityRoleRefs = new ArrayList();
 
     /**
      * Default Constructor.

Modified: portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/FilterMappingDD.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/FilterMappingDD.java?view=diff&r1=157474&r2=157475
==============================================================================
--- portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/FilterMappingDD.java (original)
+++ portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/FilterMappingDD.java Mon Mar 14 14:13:18 2005
@@ -15,21 +15,21 @@
  */
 package org.apache.pluto.descriptors.servlet;
 
-import java.util.Set;
+import java.util.List;
 
 /**
  * FilterMapping configuration as contained within the
  * web.xml Deployment Descriptor.
  * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
- * @version $Id:$
+ * @version $Id$
  * @since Feb 28, 2005
  */
 public class FilterMappingDD {
 
     private String filterName;
     private String servletName;
-    private Set urlPattern;
-    private Set dispatchers;
+    private List urlPattern;
+    private List dispatchers;
 
     public FilterMappingDD() {
 
@@ -43,11 +43,11 @@
         this.filterName = filterName;
     }
 
-    public Set getUrlPatterns() {
+    public List getUrlPatterns() {
         return urlPattern;
     }
 
-    public void setUrlPatterns(Set urlPattern) {
+    public void setUrlPatterns(List urlPattern) {
         this.urlPattern = urlPattern;
     }
 
@@ -59,11 +59,11 @@
         this.servletName = servletName;
     }
 
-    public Set getDispatchers() {
+    public List getDispatchers() {
         return dispatchers;
     }
 
-    public void setDispatchers(Set dispatchers) {
+    public void setDispatchers(List dispatchers) {
         this.dispatchers = dispatchers;
     }
 

Modified: portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/WebAppDD.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/WebAppDD.java?view=diff&r1=157474&r2=157475
==============================================================================
--- portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/WebAppDD.java (original)
+++ portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/WebAppDD.java Mon Mar 14 14:13:18 2005
@@ -15,9 +15,9 @@
  */
 package org.apache.pluto.descriptors.servlet;
 
-import java.util.HashSet;
+import java.util.ArrayList;
 import java.util.Iterator;
-import java.util.Set;
+import java.util.List;
 
 import org.apache.pluto.descriptors.common.IconDD;
 
@@ -35,23 +35,23 @@
     private String displayName;
     private String description;
     private boolean distributable;
-    private Set contextParams;
-    private Set filters;
-    private Set filterMappings;
-    private Set listeners;
-    private Set servlets;
-    private Set servletMappings;
+    private List contextParams = new ArrayList();
+    private List filters = new ArrayList();
+    private List filterMappings = new ArrayList();
+    private List listeners = new ArrayList();
+    private List servlets = new ArrayList();
+    private List servletMappings = new ArrayList();
     private SessionConfigDD sessionConfig;
-    private Set mimeMappings;
-    private WelcomeFileListDD welcomeFileSet;
-    private Set errorPages;
-    private Set taglibs;
-    private Set resourceRefs;
-    private Set securityConstraints;
+    private List mimeMappings = new ArrayList();
+    private WelcomeFileListDD welcomeFileList;
+    private List errorPages = new ArrayList();
+    private List taglibs = new ArrayList();
+    private List resourceRefs = new ArrayList();
+    private List securityConstraints = new ArrayList();
     private LoginConfigDD loginConfig;
-    private Set securityRoles;
-    private Set envEntrys;
-    private Set ejbRefs;
+    private List securityRoles = new ArrayList();
+    private List envEntrys = new ArrayList();
+    private List ejbRefs = new ArrayList();
 
     public WebAppDD() {
 
@@ -97,51 +97,51 @@
      * Retrieve the context parameters.
      * @return InitParamDD instances.
      */
-    public Set getContextParams() {
+    public List getContextParams() {
         return contextParams;
     }
 
-    public void setContextParams(Set contextParams) {
+    public void setContextParams(List contextParams) {
         this.contextParams = contextParams;
     }
 
-    public Set getFilters() {
+    public List getFilters() {
         return filters;
     }
 
-    public void setFilters(Set filters) {
+    public void setFilters(List filters) {
         this.filters = filters;
     }
 
-    public Set getFilterMappings() {
+    public List getFilterMappings() {
         return filterMappings;
     }
 
-    public void setFilterMappings(Set filterMappings) {
+    public void setFilterMappings(List filterMappings) {
         this.filterMappings = filterMappings;
     }
 
-    public Set getListeners() {
+    public List getListeners() {
         return listeners;
     }
 
-    public void setListeners(Set listeners) {
+    public void setListeners(List listeners) {
         this.listeners = listeners;
     }
 
-    public Set getServlets() {
+    public List getServlets() {
         return servlets;
     }
 
-    public void setServlets(Set servlets) {
+    public void setServlets(List servlets) {
         this.servlets = servlets;
     }
 
-    public Set getServletMappings() {
+    public List getServletMappings() {
         return servletMappings;
     }
 
-    public void setServletMappings(Set servletMappings) {
+    public void setServletMappings(List servletMappings) {
         this.servletMappings = servletMappings;
     }
 
@@ -153,51 +153,51 @@
         this.sessionConfig = sessionConfig;
     }
 
-    public Set getMimeMappings() {
+    public List getMimeMappings() {
         return mimeMappings;
     }
 
-    public void setMimeMappings(Set mimeMappings) {
+    public void setMimeMappings(List mimeMappings) {
         this.mimeMappings = mimeMappings;
     }
 
     public WelcomeFileListDD getWelcomeFileList() {
-        return welcomeFileSet;
+        return welcomeFileList;
     }
 
-    public void setWelcomeFileList(WelcomeFileListDD welcomeFileSet) {
-        this.welcomeFileSet = welcomeFileSet;
+    public void setWelcomeFileList(WelcomeFileListDD welcomeFileList) {
+        this.welcomeFileList = welcomeFileList;
     }
 
-    public Set getErrorPages() {
+    public List getErrorPages() {
         return errorPages;
     }
 
-    public void setErrorPages(Set errorPages) {
+    public void setErrorPages(List errorPages) {
         this.errorPages = errorPages;
     }
 
-    public Set getTaglibs() {
+    public List getTaglibs() {
         return taglibs;
     }
 
-    public void setTaglibs(Set taglibs) {
+    public void setTaglibs(List taglibs) {
         this.taglibs = taglibs;
     }
 
-    public Set getResourceRefs() {
+    public List getResourceRefs() {
         return resourceRefs;
     }
 
-    public void setResourceRefs(Set resourceRefs) {
+    public void setResourceRefs(List resourceRefs) {
         this.resourceRefs = resourceRefs;
     }
 
-    public Set getSecurityConstraints() {
+    public List getSecurityConstraints() {
         return securityConstraints;
     }
 
-    public void setSecurityConstraints(Set securityConstraints) {
+    public void setSecurityConstraints(List securityConstraints) {
         this.securityConstraints = securityConstraints;
     }
 
@@ -209,34 +209,34 @@
         this.loginConfig = loginConfig;
     }
 
-    public Set getSecurityRoles() {
+    public List getSecurityRoles() {
         return securityRoles;
     }
 
-    public void setSecurityRoles(Set securityRoles) {
+    public void setSecurityRoles(List securityRoles) {
         this.securityRoles = securityRoles;
     }
 
-    public Set getEnvEntrys() {
+    public List getEnvEntrys() {
         return envEntrys;
     }
 
-    public void setEnvEntrys(Set envEntrys) {
+    public void setEnvEntrys(List envEntrys) {
         this.envEntrys = envEntrys;
     }
 
-    public Set getEjbRefs() {
+    public List getEjbRefs() {
         return ejbRefs;
     }
 
-    public void setEjbRefs(Set ejbRefs) {
+    public void setEjbRefs(List ejbRefs) {
         this.ejbRefs = ejbRefs;
     }
 
 // Helpers
 
     public ServletDD getServlet(String name) {
-        HashSet set = new HashSet(servlets);
+        ArrayList set = new ArrayList(servlets);
         Iterator it = set.iterator();
         ServletDD dd;
         while(name!=null && it.hasNext()) {
@@ -249,7 +249,7 @@
     }
 
     public ServletMappingDD getServletMapping(String uri) {
-        HashSet set = new HashSet(servletMappings);
+        ArrayList set = new ArrayList(servletMappings);
         Iterator it = set.iterator();
         ServletMappingDD dd;
         while(uri!=null && it.hasNext()) {

Modified: portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/WebResourceCollectionDD.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/WebResourceCollectionDD.java?view=diff&r1=157474&r2=157475
==============================================================================
--- portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/WebResourceCollectionDD.java (original)
+++ portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/WebResourceCollectionDD.java Mon Mar 14 14:13:18 2005
@@ -15,20 +15,22 @@
  */
 package org.apache.pluto.descriptors.servlet;
 
-import java.util.Set;
+import java.util.List;
+import java.util.ArrayList;
 
 /**
- * <B>TODO</B>: Document
+ * Web Resource Collection configuration.
+ * 
  * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
- * @version $Id:$
+ * @version $Id$
  * @since Mar 4, 2005
  */
 public class WebResourceCollectionDD {
 
     private String webResourceName;
     private String description;
-    private Set httpMethods;
-    private Set urlPatterns;
+    private List httpMethods = new ArrayList();
+    private List urlPatterns = new ArrayList();
 
     public WebResourceCollectionDD() {
 
@@ -50,19 +52,19 @@
         this.description = description;
     }
 
-    public Set getHttpMethods() {
+    public List getHttpMethods() {
         return httpMethods;
     }
 
-    public void setHttpMethods(Set httpMethods) {
+    public void setHttpMethods(List httpMethods) {
         this.httpMethods = httpMethods;
     }
 
-    public Set getUrlPatterns() {
+    public List getUrlPatterns() {
         return urlPatterns;
     }
 
-    public void setUrlPatterns(Set urlPatterns) {
+    public void setUrlPatterns(List urlPatterns) {
         this.urlPatterns = urlPatterns;
     }
 

Modified: portals/pluto/trunk/maven.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/maven.xml?view=diff&r1=157474&r2=157475
==============================================================================
--- portals/pluto/trunk/maven.xml (original)
+++ portals/pluto/trunk/maven.xml Mon Mar 14 14:13:18 2005
@@ -23,6 +23,10 @@
     <attainGoal name="faq"/>
   </preGoal>
 
+  <preGoal name="clean">
+    <attainGoal name="multiproject:clean"/>
+  </preGoal>
+
   <preGoal name="fullDeployment">
     <attainGoal name="multiproject:install"/>
   </preGoal>

Modified: portals/pluto/trunk/portal/pluto-driver.iml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/portal/pluto-driver.iml?view=diff&r1=157474&r2=157475
==============================================================================
--- portals/pluto/trunk/portal/pluto-driver.iml (original)
+++ portals/pluto/trunk/portal/pluto-driver.iml Mon Mar 14 14:13:18 2005
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<module version="4" relativePaths="true" type="J2EE_WEB_MODULE" j2ee-integration="Tomcat Server">
+<module version="4" relativePaths="true" type="J2EE_WEB_MODULE" j2ee-integration="Generic Application Server">
   <component name="ModuleRootManager" />
   <component name="NewModuleRootManager">
     <output url="file://$MODULE_DIR$/target/pluto-driver/WEB-INF/classes" />
@@ -21,7 +21,6 @@
     <orderEntry type="module" module-name="descriptors" />
     <orderEntry type="library" name="commons-cli-1.0" level="application" />
     <orderEntry type="library" name="portlet-api-1.0" level="application" />
-    <orderEntry type="library" name="[portals-pluto] Tomcat" level="application_server_libraries" />
     <orderEntryProperties />
   </component>
   <component name="WebModuleBuildComponent">

Modified: portals/pluto/trunk/portals-pluto.ipr
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/portals-pluto.ipr?view=diff&r1=157474&r2=157475
==============================================================================
--- portals/pluto/trunk/portals-pluto.ipr (original)
+++ portals/pluto/trunk/portals-pluto.ipr Mon Mar 14 14:13:18 2005
@@ -167,6 +167,7 @@
     <modules>
       <module fileurl="file://$PROJECT_DIR$/deploy/deploy.iml" filepath="$PROJECT_DIR$/deploy/deploy.iml" />
       <module fileurl="file://$PROJECT_DIR$/descriptors/descriptors.iml" filepath="$PROJECT_DIR$/descriptors/descriptors.iml" />
+      <module fileurl="file://$PROJECT_DIR$/inspector/inspector.iml" filepath="$PROJECT_DIR$/inspector/inspector.iml" />
       <module fileurl="file://$PROJECT_DIR$/container/pluto-core.iml" filepath="$PROJECT_DIR$/container/pluto-core.iml" />
       <module fileurl="file://$PROJECT_DIR$/portal/pluto-driver.iml" filepath="$PROJECT_DIR$/portal/pluto-driver.iml" />
       <module fileurl="file://$PROJECT_DIR$/testsuite/testsuite.iml" filepath="$PROJECT_DIR$/testsuite/testsuite.iml" />

Modified: portals/pluto/trunk/testsuite/testsuite.iml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/testsuite/testsuite.iml?view=diff&r1=157474&r2=157475
==============================================================================
--- portals/pluto/trunk/testsuite/testsuite.iml (original)
+++ portals/pluto/trunk/testsuite/testsuite.iml Mon Mar 14 14:13:18 2005
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<module version="4" relativePaths="true" type="J2EE_WEB_MODULE" j2ee-integration="Tomcat Server">
+<module version="4" relativePaths="true" type="J2EE_WEB_MODULE" j2ee-integration="Generic Application Server">
   <component name="ModuleRootManager" />
   <component name="NewModuleRootManager">
     <output url="file://$MODULE_DIR$/target/testsuite/WEB-INF/classes" />
@@ -17,7 +17,6 @@
     <orderEntry type="library" name="jstl-standard-1.0.4" level="application" />
     <orderEntry type="library" name="jstl-1.0.2" level="application" />
     <orderEntry type="library" name="commons-digester-1.5" level="application" />
-    <orderEntry type="library" name="[portals-pluto] Tomcat" level="application_server_libraries" />
     <orderEntryProperties />
   </component>
   <component name="WebModuleBuildComponent">