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 2004/10/09 01:55:25 UTC

svn commit: rev 54134 - in portals/pluto/branches/pluto-1.1/portal/src/java/org/apache/pluto/driver: . config util

Author: ddewolf
Date: Fri Oct  8 16:55:24 2004
New Revision: 54134

Removed:
   portals/pluto/branches/pluto-1.1/portal/src/java/org/apache/pluto/driver/util/NameValuePairs.java
   portals/pluto/branches/pluto-1.1/portal/src/java/org/apache/pluto/driver/util/Parameters.java
   portals/pluto/branches/pluto-1.1/portal/src/java/org/apache/pluto/driver/util/Properties.java
Modified:
   portals/pluto/branches/pluto-1.1/portal/src/java/org/apache/pluto/driver/AttributeKeys.java
   portals/pluto/branches/pluto-1.1/portal/src/java/org/apache/pluto/driver/PortalStartupListener.java
   portals/pluto/branches/pluto-1.1/portal/src/java/org/apache/pluto/driver/config/DriverConfiguration.java
Log:
Unused class cleanup and javadocs.

Modified: portals/pluto/branches/pluto-1.1/portal/src/java/org/apache/pluto/driver/AttributeKeys.java
==============================================================================
--- portals/pluto/branches/pluto-1.1/portal/src/java/org/apache/pluto/driver/AttributeKeys.java	(original)
+++ portals/pluto/branches/pluto-1.1/portal/src/java/org/apache/pluto/driver/AttributeKeys.java	Fri Oct  8 16:55:24 2004
@@ -16,7 +16,8 @@
 package org.apache.pluto.driver;
 
 /**
- * <B>TODO</B>: Document
+ * Constants used as attribute keys.
+ *
  * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
  * @version 1.0
  * @since Sep 25, 2004

Modified: portals/pluto/branches/pluto-1.1/portal/src/java/org/apache/pluto/driver/PortalStartupListener.java
==============================================================================
--- portals/pluto/branches/pluto-1.1/portal/src/java/org/apache/pluto/driver/PortalStartupListener.java	(original)
+++ portals/pluto/branches/pluto-1.1/portal/src/java/org/apache/pluto/driver/PortalStartupListener.java	Fri Oct  8 16:55:24 2004
@@ -34,22 +34,43 @@
 import org.xml.sax.SAXException;
 
 /**
+ * Listener used to start up the Pluto Portal Driver upon
+ * startup of the servlet context in which it resides.
+ *
  * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
  * @version 1.0
  * @since Sep 22, 2004
  */
 public class PortalStartupListener implements ServletContextListener {
+    /** Internal Logger. */
     private static final Log LOG =
         LogFactory.getLog(PortalStartupListener.class);
 
+    /**  The location of the portal driver configuration. */
     private static final String CONFIG_FILE =
         "/WEB-INF/pluto-portal-driver-config.xml";
 
+    /** The KEY with which the container is bound to the context. */
     private static final String CONTAINER_KEY = AttributeKeys.PORTLET_CONTAINER;
 
+    /** The KEY with which the configuration is bound to the context. */
     private static final String CONFIG_KEY = AttributeKeys.DRIVER_CONFIG;
 
 
+    /**
+     * Receive the startup notification and subsequently start up
+     * the portal driver. The following are done in this order:
+     * <ol><li>Retrieve the Configuration File</li>
+     *     <li>Parse the Configuration File into Configuration Objects</li>
+     *     <li>Create a Portal Context</li>
+     *     <li>Create the ContainerServices implementation</li>
+     *     <li>Create the Portlet Container</li>
+     *     <li>Initialize the Container</li>
+     *     <li>Bind the configuration to the ServletContext</li>
+     *     <li>Bind the container to the ServletContext</li><ul>
+     *
+     * @param event the servlet context event.
+     */
     public void contextInitialized(ServletContextEvent event) {
         ServletContext ctx = event.getServletContext();
         try {
@@ -117,6 +138,12 @@
         }
     }
 
+    /**
+     * Recieve notification that the context is being shut down
+     * and subsequently destroy the container.
+     *
+     * @param event the destrubtion even.t
+     */
     public void contextDestroyed(ServletContextEvent event) {
         ServletContext ctx = event.getServletContext();
         PortletContainer container =
@@ -130,7 +157,5 @@
             ctx.removeAttribute(CONTAINER_KEY);
         }
     }
-
-
 }
 

Modified: portals/pluto/branches/pluto-1.1/portal/src/java/org/apache/pluto/driver/config/DriverConfiguration.java
==============================================================================
--- portals/pluto/branches/pluto-1.1/portal/src/java/org/apache/pluto/driver/config/DriverConfiguration.java	(original)
+++ portals/pluto/branches/pluto-1.1/portal/src/java/org/apache/pluto/driver/config/DriverConfiguration.java	Fri Oct  8 16:55:24 2004
@@ -23,83 +23,155 @@
 import org.apache.commons.logging.LogFactory;
 
 /**
- * Encapsulation of Configuration Info
+ * Encapsulation of the Pluto Driver Configuration Info.
+ *
  * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
  * @version 1.0
  * @since Sep 23, 2004
  */
 public class DriverConfiguration {
+    /** Internal Logger. */
     private static final Log LOG =
         LogFactory.getLog(DriverConfiguration.class);
 
+    /** The name of the portal. */
     private String portalName;
+
+    /** The Version of the Portal. */
     private String portalVersion;
+
+    /** The name of the container wrapped by this portal. */
     private String containerName;
 
+    /** The portlet modes we will support. */
     private Collection supportedPortletModes;
+
+    /** The window states we will support. */
     private Collection supportedWindowStates;
 
+    /** The portlet applications registered with us. */
     private Map portletApplications;
+
+    /** Encapsulation of render configuration data. */
     private RenderConfig renderConfig;
 
+    /**
+     * Default Constructor.
+     */
     public DriverConfiguration() {
         this.supportedWindowStates = new ArrayList();
         this.supportedPortletModes = new ArrayList();
         this.portletApplications = new java.util.HashMap();
     }
 
+    /**
+     * Standard Getter.
+     * @return the name of the portal.
+     */
     public String getPortalName() {
         return portalName;
     }
 
+    /**
+     * Standard Getter.
+     * @param portalName the name of the portal.
+     */
     public void setPortalName(String portalName) {
         this.portalName = portalName;
     }
 
+    /**
+     * Standard Getter.
+     * @return the portal version.
+     */
     public String getPortalVersion() {
         return portalVersion;
     }
 
+    /**
+     * Standard Setter.
+     * @param portalVersion the portal version.
+     */
     public void setPortalVersion(String portalVersion) {
         this.portalVersion = portalVersion;
     }
 
+    /**
+     * Standard Getter.
+     * @return the name of the container.
+     */
     public String getContainerName() {
         return containerName;
     }
 
+    /**
+     * Standard Setter.
+     * @param containerName the name of the container.
+     */
     public void setContainerName(String containerName) {
         this.containerName = containerName;
     }
 
+    /**
+     * Standard Getter.
+     * @return the names of the supported portlet modes.
+     */
     public Collection getSupportedPortletModes() {
         return supportedPortletModes;
     }
 
+    /**
+     * Standard Setter.
+     * @param supportedPortletModes the names of the supported portlet modes.
+     */
     public void setSupportedPortletModes(Collection supportedPortletModes) {
         this.supportedPortletModes = supportedPortletModes;
     }
 
+    /**
+     * Add the named supported portlet mode to the list of supported modes.
+     * @param mode a supported mode.
+     */
     public void addSupportedPortletMode(String mode) {
         supportedPortletModes.add(mode);
     }
 
+    /**
+     * Standard Getter.
+     * @return the names of the supported window states.
+     */
     public Collection getSupportedWindowStates() {
         return supportedWindowStates;
     }
 
+    /**
+     * Standard Setter.
+     * @param supportedWindowStates the names of the supported window states.
+     */
     public void setSupportedWindowStates(Collection supportedWindowStates) {
         this.supportedWindowStates = supportedWindowStates;
     }
 
+    /**
+     * Add the named supported window state to the list of supported states.
+     * @param state the name of the supported state.
+     */
     public void addSupportedWindowState(String state) {
         this.supportedWindowStates.add(state);
     }
 
+    /**
+     * Standard Getter.
+     * @return the configuration data of all configured portlet applications.
+     */
     public Collection getPortletApplications() {
         return portletApplications.values();
     }
 
+    /**
+     * Add a porltet applicaiton conofiguration to this list of portlet apps.
+     * @param app portlet application coniguration data.
+     */
     public void addPortletApp(PortletApplicationConfig app) {
         if (LOG.isDebugEnabled()) {
             LOG.debug(
@@ -109,10 +181,20 @@
         portletApplications.put(app.getContextPath(), app);
     }
 
+    /**
+     * Retrieve the portlet application with the given id.
+     * @param id the id of the portlet application.
+     * @return the portlet application configuration data.
+     */
     public PortletApplicationConfig getPortletApp(String id) {
         return (PortletApplicationConfig) portletApplications.get(id);
     }
 
+    /**
+     * Retrieve the window configuration associated with the given id.
+     * @param id the id of the portlet window.
+     * @return the portlet window configuration data.
+     */
     public PortletWindowConfig getPortletWindowConfig(String id) {
         if (id == null) {
             return null;
@@ -130,14 +212,27 @@
         return app.getPortlet(portlet);
     }
 
+    /**
+     * Standard Getter.
+     * @return the render configuration.
+     */
     public RenderConfig getRenderConfig() {
         return renderConfig;
     }
 
+    /**
+     * Standard Setter.
+     * @param renderConfig the render configuration.
+     */
     public void setRenderConfig(RenderConfig renderConfig) {
         this.renderConfig = renderConfig;
     }
 
+    /**
+     * Retrieve the id of the context from the portlet id.
+     * @param portletId the id of the portlet.
+     * @return the context, derived from the portlet id.
+     */
     private String getContextFromPortletId(String portletId) {
         int idx = portletId.indexOf(".");
         if (idx < 0) {
@@ -146,6 +241,11 @@
         return portletId.substring(0, idx);
     }
 
+    /**
+     *  Retreive the porlet name from the given portletId.
+     * @param portletId the portlet id.
+     * @return the name of the portlet.
+     */
     private String getPortletNameFromPortletId(String portletId) {
         int idx = portletId.indexOf(".");
         if (idx < 0) {