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 2006/09/04 04:16:31 UTC

svn commit: r439904 - in /portals/pluto/trunk: pluto-descriptor-impl/ pluto-portal-driver-impl/ pluto-portal-driver-impl/src/ pluto-portal-driver-impl/src/main/ pluto-portal-driver-impl/src/main/java/ pluto-portal-driver-impl/src/main/java/org/ pluto-p...

Author: ddewolf
Date: Sun Sep  3 19:16:29 2006
New Revision: 439904

URL: http://svn.apache.org/viewvc?view=rev&rev=439904
Log:
Addingin driver impl

Added:
    portals/pluto/trunk/pluto-portal-driver-impl/
    portals/pluto/trunk/pluto-portal-driver-impl/pluto-portal-driver-impl.iml
    portals/pluto/trunk/pluto-portal-driver-impl/pom.xml
    portals/pluto/trunk/pluto-portal-driver-impl/src/
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/AdminConfigurationImpl.java
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/DriverConfigurationImpl.java
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalCallbackServiceImpl.java
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalContextImpl.java
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PortletRegistryServiceImpl.java
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PropertyConfigServiceImpl.java
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfig.java
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfigReader.java
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/package.html
Modified:
    portals/pluto/trunk/pluto-descriptor-impl/pom.xml

Modified: portals/pluto/trunk/pluto-descriptor-impl/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-descriptor-impl/pom.xml?view=diff&rev=439904&r1=439903&r2=439904
==============================================================================
--- portals/pluto/trunk/pluto-descriptor-impl/pom.xml (original)
+++ portals/pluto/trunk/pluto-descriptor-impl/pom.xml Sun Sep  3 19:16:29 2006
@@ -46,12 +46,14 @@
       <artifactId>pluto-descriptor-api</artifactId>
       <version>${pom.version}</version>
     </dependency>
+
     <dependency>
       <groupId>castor</groupId>
       <artifactId>castor</artifactId>
       <version>${castor.version}</version>
       <scope>compile</scope>
     </dependency>
+      
     <dependency>
       <groupId>xerces</groupId>
       <artifactId>xercesImpl</artifactId>

Added: portals/pluto/trunk/pluto-portal-driver-impl/pluto-portal-driver-impl.iml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/pluto-portal-driver-impl.iml?view=auto&rev=439904
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/pluto-portal-driver-impl.iml (added)
+++ portals/pluto/trunk/pluto-portal-driver-impl/pluto-portal-driver-impl.iml Sun Sep  3 19:16:29 2006
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="false" type="JAVA_MODULE">
+  <component name="ModuleRootManager" />
+  <component name="NewModuleRootManager">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <exclude-output />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="pluto-descriptor-api" />
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/taglibs/standard/1.0.4/standard-1.0.4.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module" module-name="pluto-container" />
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/javax/servlet/jstl/1.1.2/jstl-1.1.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module" module-name="pluto-portal-driver" />
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/commons-collections/commons-collections/3.1/commons-collections-3.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/xalan/xalan/2.6.0/xalan-2.6.0.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/xerces/xmlParserAPIs/2.6.2/xmlParserAPIs-2.6.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/commons-beanutils/commons-beanutils/1.6/commons-beanutils-1.6.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/javax/portlet/portlet-api/1.0/portlet-api-1.0.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/castor/castor/0.9.6/castor-0.9.6.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/commons-digester/commons-digester/1.7/commons-digester-1.7.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module" module-name="pluto-descriptor-impl" />
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/org/springframework/spring-aop/2.0-m2/spring-aop-2.0-m2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/org/springframework/spring-web/2.0-m2/spring-web-2.0-m2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/org/springframework/spring-core/2.0-m2/spring-core-2.0-m2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/org/springframework/spring-context/2.0-m2/spring-context-2.0-m2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar:///Users/ddewolf/.m2/repository/org/springframework/spring-beans/2.0-m2/spring-beans-2.0-m2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntryProperties />
+  </component>
+</module>
+

Added: portals/pluto/trunk/pluto-portal-driver-impl/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/pom.xml?view=auto&rev=439904
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/pom.xml (added)
+++ portals/pluto/trunk/pluto-portal-driver-impl/pom.xml Sun Sep  3 19:16:29 2006
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005-2006 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.
+-->
+<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">
+
+    <parent>
+        <groupId>org.apache.pluto</groupId>
+        <artifactId>pluto</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>pluto-portal-driver-impl</artifactId>
+    <packaging>jar</packaging>
+    <name>Pluto Portal Driver Implementation Classes</name>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.pluto</groupId>
+            <artifactId>pluto-container</artifactId>
+            <version>${pom.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.pluto</groupId>
+            <artifactId>pluto-portal-driver</artifactId>
+            <version>${pom.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging-api</artifactId>
+            <version>${commons-logging.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+            <version>${commons-logging.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-digester</groupId>
+            <artifactId>commons-digester</artifactId>
+            <version>${commons-digester.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.portlet</groupId>
+            <artifactId>portlet-api</artifactId>
+            <version>${portlet-api.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>${servlet-api.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>jstl</artifactId>
+            <version>${jstl.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>taglibs</groupId>
+            <artifactId>standard</artifactId>
+            <version>${taglibs.standard.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-core</artifactId>
+            <version>${springframework.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-beans</artifactId>
+            <version>${springframework.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+            <version>${springframework.version}</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <descriptor>src/assemble/bin.xml</descriptor>
+                    <finalName>pluto-portal-${pom.version}</finalName>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-site-plugin</artifactId>
+                <configuration>
+                    <resourcesDirectory>${basedir}/../pluto-site/src/site/resources</resourcesDirectory>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+
+
+

Added: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/AdminConfigurationImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/AdminConfigurationImpl.java?view=auto&rev=439904
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/AdminConfigurationImpl.java (added)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/AdminConfigurationImpl.java Sun Sep  3 19:16:29 2006
@@ -0,0 +1,60 @@
+/*
+ * 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.config.impl;
+
+import org.apache.pluto.driver.services.portal.admin.RenderConfigAdminService;
+import org.apache.pluto.driver.services.portal.admin.PortletRegistryAdminService;
+import org.apache.pluto.driver.config.AdminConfiguration;
+
+import javax.servlet.ServletContext;
+
+/**
+ *
+ * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:
+ * @version 1.0
+ * @since Nov 30, 2005
+ */
+public class AdminConfigurationImpl implements AdminConfiguration {
+
+    private PortletRegistryAdminService portletRegistryAdminService;
+    private RenderConfigAdminService renderConfigAdminService;
+
+    public void init(ServletContext context) {
+        
+    }
+
+    public void destroy() {
+
+    }
+
+    public PortletRegistryAdminService getPortletRegistryAdminService() {
+        return portletRegistryAdminService;
+    }
+
+    public void setPortletRegistryAdminService(PortletRegistryAdminService portletRegistryAdminService) {
+        this.portletRegistryAdminService = portletRegistryAdminService;
+    }
+
+    public RenderConfigAdminService getRenderConfigAdminService() {
+        return renderConfigAdminService;
+    }
+
+    public void setRenderConfigAdminService(RenderConfigAdminService renderConfigAdminService) {
+        this.renderConfigAdminService = renderConfigAdminService;
+    }
+
+
+}

Added: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/DriverConfigurationImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/DriverConfigurationImpl.java?view=auto&rev=439904
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/DriverConfigurationImpl.java (added)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/DriverConfigurationImpl.java Sun Sep  3 19:16:29 2006
@@ -0,0 +1,174 @@
+/*
+ * 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.config.impl;
+
+import org.apache.pluto.driver.services.portal.PortletApplicationConfig;
+import org.apache.pluto.driver.services.portal.PortletWindowConfig;
+import org.apache.pluto.driver.services.portal.PageConfig;
+import org.apache.pluto.driver.services.portal.PortletRegistryService;
+import org.apache.pluto.driver.services.portal.PropertyConfigService;
+import org.apache.pluto.driver.services.portal.RenderConfigService;
+import org.apache.pluto.driver.config.DriverConfiguration;
+import org.apache.pluto.spi.PortalCallbackService;
+import org.apache.pluto.spi.optional.PortletPreferencesService;
+
+import javax.servlet.ServletContext;
+import java.util.Collection;
+
+/**
+ * Encapsulation of the Pluto Driver ResourceConfig.
+ *
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Sep 23, 2004
+ */
+public class DriverConfigurationImpl
+    implements DriverConfiguration {
+
+    private PropertyConfigService propertyService;
+    private PortletRegistryService registryService;
+    private RenderConfigService renderService;
+
+    // Container Services
+    private PortalCallbackService portalCallbackService;
+    private PortletPreferencesService portletPreferencesService;
+
+    public DriverConfigurationImpl(PropertyConfigService propertyService,
+                                   PortletRegistryService registryService,
+                                   RenderConfigService renderService,
+                                   PortalCallbackService portalCallback) {
+        this.propertyService = propertyService;
+        this.registryService = registryService;
+        this.renderService = renderService;
+        this.portalCallbackService = portalCallback;
+    }
+
+    /**
+     * Standard Getter.
+     * @return the name of the portal.
+     */
+    public String getPortalName() {
+        return propertyService.getPortalName();
+    }
+
+    /**
+     * Standard Getter.
+     * @return the portal version.
+     */
+    public String getPortalVersion() {
+        return propertyService.getPortalVersion();
+    }
+
+    /**
+     * Standard Getter.
+     * @return the name of the container.
+     */
+    public String getContainerName() {
+        return propertyService.getContainerName();
+    }
+
+    /**
+     * Standard Getter.
+     * @return the names of the supported portlet modes.
+     */
+    public Collection getSupportedPortletModes() {
+        return propertyService.getSupportedPortletModes();
+    }
+
+    /**
+     * Standard Getter.
+     * @return the names of the supported window states.
+     */
+    public Collection getSupportedWindowStates() {
+        return propertyService.getSupportedWindowStates();
+    }
+
+    /**
+     * Standard Getter.
+     * @return the configuration data of all configured portlet applications.
+     */
+    public Collection getPortletApplications() {
+        return registryService.getPortletApplications();
+    }
+
+   /**
+     * 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 registryService.getPortletApplication(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) {
+        return registryService.getPortlet(id);
+    }
+
+    /**
+     * Standard Getter.
+     * @return the render configuration.
+     */
+    public Collection getPages() {
+        return renderService.getPages();
+    }
+
+    public PageConfig getPageConfig(String pageId) {
+        return renderService.getPage(pageId);
+    }
+
+    public void init(ServletContext context) {
+        this.propertyService.init(context);
+        this.registryService.init(context);
+        this.renderService.init(context);
+    }
+
+    public void destroy() {
+        if(propertyService != null)
+            propertyService.destroy();
+
+        if(registryService != null)
+            registryService.destroy();
+
+        if(renderService != null)
+            renderService.destroy();
+    }
+
+
+//
+// Container Services
+//
+    public PortalCallbackService getPortalCallbackService() {
+        return portalCallbackService;
+    }
+
+    public void setPortalCallbackService(PortalCallbackService portalCallbackService) {
+        this.portalCallbackService = portalCallbackService;
+    }
+
+    public PortletPreferencesService getPortletPreferencesService() {
+        return portletPreferencesService;
+    }
+
+    public void setPortletPreferencesService(PortletPreferencesService portletPreferencesService) {
+        this.portletPreferencesService = portletPreferencesService;
+    }
+}
+

Added: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java?view=auto&rev=439904
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java (added)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java Sun Sep  3 19:16:29 2006
@@ -0,0 +1,88 @@
+/*
+ * 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.services.container;
+
+import org.apache.pluto.OptionalContainerServices;
+import org.apache.pluto.RequiredContainerServices;
+import org.apache.pluto.internal.InternalPortletWindow;
+import org.apache.pluto.driver.config.DriverConfiguration;
+import org.apache.pluto.spi.PortalCallbackService;
+import org.apache.pluto.spi.optional.PortletPreferencesService;
+import org.apache.pluto.spi.optional.PortletEnvironmentService;
+import org.apache.pluto.spi.optional.PortletInvokerService;
+
+import javax.portlet.PortalContext;
+
+/**
+ * The Portal Driver's <code>PortletContainerServices</code> implementation. The
+ * <code>PortletContainerServices</code> interface is the main integration point
+ * between the pluto container and the surrounding portal.
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Sep 21, 2004
+ */
+public class ContainerServicesImpl
+implements RequiredContainerServices, OptionalContainerServices {
+
+
+    private PortalContextImpl context;
+    private DriverConfiguration driverConfig;
+
+
+    /**
+     * Default Constructor.
+     */
+    public ContainerServicesImpl(PortalContextImpl context,
+                                 DriverConfiguration driverConfig) {
+        this.context = context;
+        this.driverConfig = driverConfig;
+    }
+
+    /**
+     * Standard Getter.
+     * @return the portal context for the portal which we service.
+     */
+    public PortalContext getPortalContext() {
+        return context;
+    }
+
+    /**
+     * The PortletPreferencesService provides access to the portal's
+     * PortletPreference persistence mechanism.
+     * @return a PortletPreferencesService instance.
+     */
+    public PortletPreferencesService getPortletPreferencesService() {
+        return driverConfig.getPortletPreferencesService();
+    }
+
+    /**
+     * The PortalCallbackService allows the container to communicate
+     * actions back to the portal.
+     * @return a PortalCallbackService implementation.
+     */
+    public PortalCallbackService getPortalCallbackService() {
+        return driverConfig.getPortalCallbackService();
+    }
+
+    public PortletEnvironmentService getPortletEnvironmentService() {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public PortletInvokerService getPortletInvokerService(InternalPortletWindow window) {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+}
+

Added: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalCallbackServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalCallbackServiceImpl.java?view=auto&rev=439904
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalCallbackServiceImpl.java (added)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalCallbackServiceImpl.java Sun Sep  3 19:16:29 2006
@@ -0,0 +1,93 @@
+/*
+ * 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.services.container;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.pluto.PortletWindow;
+import org.apache.pluto.driver.AttributeKeys;
+import org.apache.pluto.driver.core.ResourceURLProviderImpl;
+import org.apache.pluto.spi.PortalCallbackService;
+import org.apache.pluto.spi.PortletURLProvider;
+import org.apache.pluto.spi.ResourceURLProvider;
+
+import java.util.Map;
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
+ * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>
+ * @version 1.0
+ * @since Sep 22, 2004
+ */
+public class PortalCallbackServiceImpl implements PortalCallbackService {
+
+	// Constructor -------------------------------------------------------------
+	
+	/**
+	 * Default no-arg constructor.
+	 */
+    public PortalCallbackServiceImpl() {
+    	// Do nothing.
+    }
+    
+    
+    // PortalCallbackService Impl ----------------------------------------------
+    
+    /**
+     * Method invoked by the container when the portlet sets its title. This
+     * method binds the dynamic portlet title to the servlet request for later
+     * use.
+     */
+    public void setTitle(HttpServletRequest request,
+                         PortletWindow portletWindow,
+                         String title) {
+        request.setAttribute(AttributeKeys.PORTLET_TITLE, title);
+    }
+
+    public PortletURLProvider getPortletURLProvider(
+    		HttpServletRequest request,
+    		PortletWindow portletWindow) {
+        return new PortletURLProviderImpl(request, portletWindow);
+    }
+
+    public ResourceURLProvider getResourceURLProvider(
+    		HttpServletRequest request,
+    		PortletWindow portletWindow) {
+        return new ResourceURLProviderImpl(request, portletWindow);
+    }
+
+    public Map getRequestProperties(HttpServletRequest request,
+                                    PortletWindow portletWindow) {
+    	// TODO: currently this method returns an empty map.
+        return Collections.EMPTY_MAP;
+    }
+
+    public void setResponseProperty(HttpServletRequest request,
+                                    PortletWindow portletWindow,
+                                    String property,
+                                    String value) {
+    	// TODO: currently this method does nothing.
+    }
+
+    public void addResponseProperty(HttpServletRequest request,
+                                    PortletWindow portletWindow,
+                                    String property,
+                                    String value) {
+    	// TODO: currently this method does nothing.
+    }
+}
+

Added: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalContextImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalContextImpl.java?view=auto&rev=439904
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalContextImpl.java (added)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalContextImpl.java Sun Sep  3 19:16:29 2006
@@ -0,0 +1,165 @@
+/*
+ * 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.services.container;
+
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Vector;
+
+import javax.portlet.PortalContext;
+import javax.portlet.PortletMode;
+import javax.portlet.WindowState;
+
+import org.apache.pluto.driver.config.DriverConfiguration;
+
+/**
+ * <code>PortalContext</code> implementation for the Pluto Portal Driver.
+ */
+public class PortalContextImpl implements PortalContext {
+
+    /**
+     * The <code>DriverConfigurationImpl</code> from which this
+     * <code>PortalContext</code> recieves it's configuration information.
+     */
+    private DriverConfiguration config;
+
+    /**
+     * Portal information.
+     */
+    private String info = null;
+
+    /**
+     * Portal Properties
+     */
+    private HashMap properties = new HashMap();
+
+    /**
+     * Supported PortletModes.
+     */
+    private Vector portletModes;
+
+    /**
+     * Supported WindowStates.
+     */
+    private Vector windowStates;
+
+
+    /**
+     * Default Constructor.
+     * @param config
+     */
+    public PortalContextImpl(DriverConfiguration config) {
+        this.config = config;
+        reset();
+    }
+
+    /**
+     * Get a dynamic portal property.
+     * @param name
+     * @return the property value associated with the given key.
+     * @throws IllegalArgumentException if the specified name is null.
+     */
+    public String getProperty(String name) {
+        if (name == null) {
+            throw new IllegalArgumentException("Property name == null");
+        }
+
+        return (String) properties.get(name);
+    }
+
+
+    /**
+     * Get an enumeration containing all names of the portal properties.
+     * @return an enumeration of all keys to which properties are bound.
+     */
+    public Enumeration getPropertyNames() {
+        Vector names = new Vector(properties.keySet());
+        return names.elements();
+    }
+
+
+    /**
+     * Get an enumeration of all <code>PortletMode</code>s supported by this
+     * portal.
+     * @return enumeration of all supported portlet modes.
+     */
+    public Enumeration getSupportedPortletModes() {
+        if (portletModes == null) {
+            portletModes = new Vector();
+            Enumeration enumeration = new Vector(config.getSupportedPortletModes()).elements();
+            while (enumeration.hasMoreElements()) {
+                portletModes.add(
+                    new PortletMode(enumeration.nextElement().toString()));
+            }
+        }
+        return portletModes.elements();
+    }
+
+    /**
+     * Get an enumeration of all <code>WindowState</code>s supported by this
+     * portal.
+     * @return an enumeration of all supported window states.
+     */
+    public Enumeration getSupportedWindowStates() {
+        if (windowStates == null) {
+            windowStates = new Vector();
+            Enumeration enumeration = new Vector(config.getSupportedWindowStates()).elements();
+            while (enumeration.hasMoreElements()) {
+                windowStates.add(
+                    new WindowState(enumeration.nextElement().toString()));
+            }
+        }
+        return windowStates.elements();
+    }
+
+    /**
+     * Get the portal info for this portal.
+     * @return the portal information for this context.
+     */
+    public String getPortalInfo() {
+        if(info == null) {
+            info = config.getPortalName() + "/" + config.getPortalVersion();
+        }
+        return info;
+    }
+
+
+    // additional methods.
+    // methods used container internally to set
+
+    public void setProperty(String name, String value) {
+        if (name == null) {
+            throw new IllegalArgumentException("Property name == null");
+        }
+
+        properties.put(name, value);
+    }
+
+
+    /**
+     * reset all values to default portlet modes and window states; delete all
+     * properties and set the given portlet information as portlet info string.
+     */
+    public void reset() {
+        info = null;
+        properties.clear();
+    }
+
+    public DriverConfiguration getDriverConfiguration() {
+        return config;
+    }
+
+}

Added: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java?view=auto&rev=439904
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java (added)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java Sun Sep  3 19:16:29 2006
@@ -0,0 +1,87 @@
+/*
+ * 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.services.container;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.portlet.PortletMode;
+import javax.portlet.WindowState;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.pluto.PortletWindow;
+import org.apache.pluto.driver.url.PortalURL;
+import org.apache.pluto.driver.url.PortalURLFactory;
+import org.apache.pluto.driver.url.PortalURLParameter;
+import org.apache.pluto.spi.PortletURLProvider;
+
+/**
+ * 
+ * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>
+ * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
+ */
+public class PortletURLProviderImpl implements PortletURLProvider {
+
+    private PortalURL url;
+    private String window;
+
+    public PortletURLProviderImpl(HttpServletRequest request,
+                                  PortletWindow internalPortletWindow) {
+        url = PortalURLFactory.getFactory().createPortalURL(request);
+        this.window = internalPortletWindow.getId().getStringId();
+    }
+
+    public void setPortletMode(PortletMode mode) {
+        url.setPortletMode(window, mode);
+    }
+
+    public void setWindowState(WindowState state) {
+        url.setWindowState(window, state);
+    }
+
+    public void setAction(boolean action) {
+        if (action) {
+            url.setActionWindow(window);
+        } else {
+            url.setActionWindow(null);
+        }
+    }
+
+    public void setSecure() {
+        //url.setSecure(true);
+    }
+
+    public void clearParameters() {
+        url.clearParameters(window);
+    }
+
+    public void setParameters(Map parameters) {
+        Iterator it = parameters.entrySet().iterator();
+        while (it.hasNext()) {
+            Map.Entry entry = (Map.Entry) it.next();
+            PortalURLParameter param = new PortalURLParameter(
+            		window,
+            		(String) entry.getKey(),
+            		(String[]) entry.getValue());
+            url.addParameter(param);
+        }
+    }
+
+    public String toString() {
+        return url.toString();
+    }
+
+}

Added: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PortletRegistryServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PortletRegistryServiceImpl.java?view=auto&rev=439904
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PortletRegistryServiceImpl.java (added)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PortletRegistryServiceImpl.java Sun Sep  3 19:16:29 2006
@@ -0,0 +1,156 @@
+/*
+ * 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.services.impl.resource;
+
+import org.apache.pluto.driver.config.DriverConfigurationException;
+import org.apache.pluto.driver.services.portal.*;
+import org.apache.pluto.driver.services.portal.admin.PortletRegistryAdminService;
+import org.apache.pluto.driver.services.portal.admin.DriverAdministrationException;
+import org.apache.pluto.descriptors.portlet.PortletAppDD;
+import org.apache.pluto.descriptors.portlet.PortletDD;
+import org.apache.pluto.internal.PortletDescriptorRegistry;
+import org.apache.pluto.PortletContainerException;
+
+import javax.servlet.ServletContext;
+import java.util.Set;
+import java.util.Iterator;
+import java.io.InputStream;
+
+/**
+ * Implementation of <code>PortletRegistryService</code> and
+ * <code>PortletRegistryAdminService</code>.
+ *
+ * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
+ * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>
+ * @since Aug 10, 2005
+ */
+public class PortletRegistryServiceImpl
+implements PortletRegistryService, PortletRegistryAdminService {
+
+    private ResourceConfig config;
+    private ServletContext servletContext;
+    
+    
+    // Constructor -------------------------------------------------------------
+    
+    /**
+     * Default no-arg constructor.
+     */
+    public PortletRegistryServiceImpl() {
+        // Do nothing.
+    }
+    
+    
+    // DriverConfigurationService Impl -----------------------------------------
+    
+    /**
+     * Initialization Lifecycle Method
+     * @param servletContext  the servlet context.
+     */
+    public void init(ServletContext servletContext)
+    throws DriverConfigurationException {
+        try {
+            this.servletContext = servletContext;
+            InputStream in = servletContext.getResourceAsStream(
+            		ResourceConfigReader.CONFIG_FILE);
+            this.config = ResourceConfigReader.getFactory().parse(in);
+        } catch (Exception ex) {
+            throw new DriverConfigurationException(ex);
+        }
+    }
+
+    public void destroy() throws DriverConfigurationException {
+        config = null;
+        servletContext = null;
+    }
+    
+    
+    // PortletRegistryService Impl ---------------------------------------------
+    
+    public Set getPortletApplications() {
+        return config.getPortletApplications();
+    }
+
+    public PortletApplicationConfig getPortletApplication(String id) {
+        return config.getPortletApp(id);
+    }
+
+    public PortletWindowConfig getPortlet(String id) {
+        return config.getPortletWindowConfig(id);
+    }
+    
+    
+    // PortletRegistryAdminService Impl ----------------------------------------
+    
+    public void addPortletApplication(String contextPath)
+    throws DriverAdministrationException {
+        if (contextPath == null) {
+            throw new IllegalArgumentException(
+            		"Portlet application context path cannot be null.");
+        }
+        try {
+            PortletApplicationConfig portletAppConfig =
+            		new PortletApplicationConfig();
+            portletAppConfig.setContextPath(contextPath);
+
+            ServletContext portletAppServletContext = servletContext.getContext(contextPath);
+            if (portletAppServletContext == null) {
+                throw new DriverAdministrationException(
+                		"Unable to locate servlet context: " + contextPath
+                		+ ": ensure that crossContext support is enabled "
+                		+ "and the portlet application has been deployed.");
+            }
+
+            PortletAppDD portletAppDD = getPortletDescriptor(
+            		portletAppServletContext);
+            if (portletAppDD == null) {
+            	throw new DriverAdministrationException(
+            			"Unable to retrieve portlet application descriptor from "
+            			+ contextPath + ": ensure that the portlet application "
+            			+ "has been deployed.");
+            }
+            for (Iterator it = portletAppDD.getPortlets().iterator();
+            		it.hasNext(); ) {
+                PortletDD portletDD = (PortletDD) it.next();
+                PortletWindowConfig portletWindowConfig = new PortletWindowConfig();
+                portletWindowConfig.setContextPath(contextPath);
+                portletWindowConfig.setPortletName(portletDD.getPortletName());
+                portletAppConfig.addPortlet(portletWindowConfig);
+            }
+            config.addPortletApp(portletAppConfig);
+            
+        } catch (PortletContainerException ex) {
+            throw new DriverAdministrationException(
+            		"Unable to add portlet application from " + contextPath, ex);
+        }
+    }
+    
+    /**
+     * FIXME: do we really need this public method?
+     */
+    public PortletWindowConfig getPortletWindowConfig(String id) {
+        return config.getPortletWindowConfig(id);
+    }
+    
+    
+    // Private Methods ---------------------------------------------------------
+    
+    private PortletAppDD getPortletDescriptor(ServletContext context)
+    throws PortletContainerException {
+        return PortletDescriptorRegistry.getRegistry().getPortletAppDD(context);
+    }
+    
+}

Added: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PropertyConfigServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PropertyConfigServiceImpl.java?view=auto&rev=439904
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PropertyConfigServiceImpl.java (added)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PropertyConfigServiceImpl.java Sun Sep  3 19:16:29 2006
@@ -0,0 +1,87 @@
+/*
+ * 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.services.impl.resource;
+
+import org.apache.pluto.driver.config.DriverConfigurationException;
+import org.apache.pluto.driver.services.portal.*;
+
+import javax.servlet.ServletContext;
+import java.util.Set;
+import java.io.InputStream;
+
+/**
+ * Default implementation of all of the portal Services.
+ * Utilizes resource configuration from
+ * <code>pluto-portal-driver-config.xml</code>
+ *
+ * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
+ * @since Aug 10, 2005
+ */
+public class PropertyConfigServiceImpl implements
+    PropertyConfigService {
+
+    private ResourceConfig config;
+
+    public PropertyConfigServiceImpl() {
+        
+    }
+
+    /**
+     * Initialization Lifecycle Method
+     * @param ctx
+     */
+    public void init(ServletContext ctx) {
+        try {
+            InputStream in = ctx.getResourceAsStream(ResourceConfigReader.CONFIG_FILE);
+            config = ResourceConfigReader.getFactory().parse(in);
+        }
+        catch(Exception e) {
+            throw new DriverConfigurationException(e);
+        }
+    }
+
+    /**
+     * Shutdown the ResourceService.
+     */
+    public void destroy() {
+        config = null;
+    }
+
+
+    public String getPortalName() {
+        return config.getPortalName();
+    }
+
+    public String getPortalVersion() {
+        return config.getPortalVersion();
+    }
+
+    public String getContainerName() {
+        return config.getContainerName();
+    }
+
+    public Set getSupportedPortletModes() {
+        return config.getSupportedPortletModes();
+    }
+
+    public Set getSupportedWindowStates() {
+        return config.getSupportedWindowStates();
+    }
+
+    public Set getPortletApplications() {
+        return config.getPortletApplications();
+    }
+}

Added: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java?view=auto&rev=439904
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java (added)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java Sun Sep  3 19:16:29 2006
@@ -0,0 +1,117 @@
+/*
+ * 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.services.impl.resource;
+
+import org.apache.pluto.driver.config.DriverConfigurationException;
+import org.apache.pluto.driver.services.portal.*;
+import org.apache.pluto.driver.services.portal.admin.RenderConfigAdminService;
+
+import javax.servlet.ServletContext;
+import java.util.List;
+import java.util.Set;
+import java.io.InputStream;
+
+/**
+ * Default implementation of all of the portal Services.
+ * Utilizes resource configuration from
+ * <code>pluto-portal-driver-config.xml</code>
+ *
+ * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
+ * @since Aug 10, 2005
+ */
+public class RenderConfigServiceImpl
+    implements RenderConfigService, RenderConfigAdminService {
+
+
+    private ResourceConfig config;
+
+//
+// Lifecycle Methods
+//
+    /**
+     * Initialization Lifecycle Method
+     * @param ctx
+     */
+    public void init(ServletContext ctx) {
+        try {
+            InputStream in = ctx.getResourceAsStream(ResourceConfigReader.CONFIG_FILE);
+            config = ResourceConfigReader.getFactory().parse(in);
+        }
+        catch(Exception e) {
+            throw new DriverConfigurationException(e);
+        }
+    }
+
+    /**
+     * Shutdown the ResourceService.
+     */
+    public void destroy() {
+        config = null;
+    }
+
+
+    public String getPortalName() {
+        return config.getPortalName();
+    }
+
+    public String getPortalVersion() {
+        return config.getPortalVersion();
+    }
+
+    public String getContainerName() {
+        return config.getContainerName();
+    }
+
+    public Set getSupportedPortletModes() {
+        return config.getSupportedPortletModes();
+    }
+
+    public Set getSupportedWindowStates() {
+        return config.getSupportedWindowStates();
+    }
+
+    public Set getPortletApplications() {
+        return config.getPortletApplications();
+    }
+
+    public PortletApplicationConfig getPortletApplication(String id) {
+        return config.getPortletApp(id);
+    }
+
+    public PortletWindowConfig getPortletWindowConfig(String id) {
+        return config.getPortletWindowConfig(id);
+    }
+
+    public PortletWindowConfig getPortlet(String id) {
+        return config.getPortletWindowConfig(id);
+    }
+
+    public List getPages() {
+        return config.getRenderConfig().getPages();
+    }
+
+    public PageConfig getDefaultPage() {
+        return config.getRenderConfig().getPageConfig(null);
+    }
+
+    public PageConfig getPage(String id) {
+        return config.getRenderConfig().getPageConfig(id);
+    }
+
+    public void addPage(PageConfig pageConfig) {
+        config.getRenderConfig().addPage(pageConfig);
+    }
+}

Added: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfig.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfig.java?view=auto&rev=439904
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfig.java (added)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfig.java Sun Sep  3 19:16:29 2006
@@ -0,0 +1,259 @@
+/*
+ * 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.services.impl.resource;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.pluto.driver.services.portal.PortletApplicationConfig;
+import org.apache.pluto.driver.services.portal.PortletWindowConfig;
+import org.apache.pluto.driver.services.portal.RenderConfig;
+
+import java.util.*;
+
+/**
+ * Encapsulation of the Pluto Driver ResourceConfig Info.
+ *
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Sep 23, 2004
+ */
+public class ResourceConfig {
+
+    /** Internal Logger. */
+    private static final Log LOG =
+        LogFactory.getLog(ResourceConfig.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 Set supportedPortletModes;
+
+    /** The window states we will support. */
+    private Set supportedWindowStates;
+
+    /** The portlet applications registered with us. */
+    private Map portletApplications;
+
+    /** Encapsulation of render configuration data. */
+    private RenderConfig renderConfig;
+
+    /**
+     * Default Constructor.
+     */
+    public ResourceConfig() {
+        this.supportedWindowStates = new HashSet();
+        this.supportedPortletModes = new HashSet();
+        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 Set getSupportedPortletModes() {
+        return supportedPortletModes;
+    }
+
+    /**
+     * Standard Setter.
+     * @param supportedPortletModes the names of the supported portlet modes.
+     */
+    public void setSupportedPortletModes(Set 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 Set getSupportedWindowStates() {
+        return supportedWindowStates;
+    }
+
+    /**
+     * Standard Setter.
+     * @param supportedWindowStates the names of the supported window states.
+     */
+    public void setSupportedWindowStates(Set 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 Set getPortletApplications() {
+        return new HashSet(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(
+                " - - Adding PortletApp ResourceConfig for: " +
+                app.getContextPath());
+        }
+        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;
+        }
+        String context = getContextFromPortletId(id);
+        String portlet = getPortletNameFromPortletId(id);
+
+        PortletApplicationConfig app = getPortletApp(context);
+        if (app == null) {
+            if (LOG.isErrorEnabled()) {
+                LOG.error("Portlet Application '" + context + "' not found.");
+            }
+            return null;
+        }
+        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) {
+            return null;
+        }
+        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) {
+            return null;
+        }
+        return portletId.substring(idx + 1);
+    }
+}
+

Added: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfigReader.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfigReader.java?view=auto&rev=439904
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfigReader.java (added)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfigReader.java Sun Sep  3 19:16:29 2006
@@ -0,0 +1,157 @@
+/*
+ * 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.services.impl.resource;
+
+import org.apache.commons.digester.Digester;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.pluto.driver.services.portal.PortletApplicationConfig;
+import org.apache.pluto.driver.services.portal.PortletWindowConfig;
+import org.apache.pluto.driver.services.portal.PageConfig;
+import org.apache.pluto.driver.services.portal.RenderConfig;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Sep 23, 2004
+ */
+public class ResourceConfigReader {
+
+    private static final Log LOG = LogFactory.getLog(
+        ResourceConfigReader.class
+    );
+
+    public static final String CONFIG_FILE =
+        "/WEB-INF/pluto-portal-driver-config.xml";
+
+
+    private static ResourceConfigReader factory;
+
+    public static ResourceConfigReader getFactory() {
+        if (factory == null) {
+            factory = new ResourceConfigReader();
+        }
+        return factory;
+    }
+
+    private Digester digester;
+
+    private ResourceConfigReader() {
+        digester = new Digester();
+        // digester.setLogger(LOG);  // Too many log messages.
+        digester.setClassLoader(Thread.currentThread().getContextClassLoader());
+        init();
+    }
+
+    public ResourceConfig parse(InputStream in)
+        throws IOException, SAXException {
+        return (ResourceConfig) digester.parse(in);
+    }
+
+// Digester Setup
+
+    private void init() {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Setting up digester...");
+        }
+        digester.addObjectCreate(
+            "pluto-portal-driver",
+            ResourceConfig.class
+        );
+        digester.addBeanPropertySetter(
+            "pluto-portal-driver/portal-name",
+            "portalName"
+        );
+        digester.addBeanPropertySetter(
+            "pluto-portal-driver/portal-version",
+            "portalVersion"
+        );
+        digester.addBeanPropertySetter(
+            "pluto-portal-driver/container-name",
+            "containerName"
+        );
+
+        digester.addCallMethod(
+            "pluto-portal-driver/supports/portlet-mode",
+            "addSupportedPortletMode", 0
+        );
+        digester.addCallMethod(
+            "pluto-portal-driver/supports/window-state",
+            "addSupportedWindowState", 0
+        );
+
+        digester.addObjectCreate(
+            "pluto-portal-driver/portlet-app",
+            PortletApplicationConfig.class
+        );
+        digester.addBeanPropertySetter(
+            "pluto-portal-driver/portlet-app/context-path", "contextPath"
+        );
+
+        digester.addObjectCreate(
+            "pluto-portal-driver/portlet-app/portlets/portlet",
+            PortletWindowConfig.class
+        );
+        digester.addSetProperties(
+            "pluto-portal-driver/portlet-app/portlets/portlet", "name",
+            "portletName"
+        );
+        digester.addSetNext(
+            "pluto-portal-driver/portlet-app/portlets/portlet",
+            "addPortlet"
+        );
+        digester.addSetNext("pluto-portal-driver/portlet-app", "addPortletApp");
+
+        digester.addObjectCreate(
+            "pluto-portal-driver/render-config",
+            RenderConfig.class
+        );
+        digester.addSetProperties(
+            "pluto-portal-driver/render-config",
+            "default", "defaultPageId"
+        );
+        digester.addObjectCreate(
+            "pluto-portal-driver/render-config/page",
+            PageConfig.class
+        );
+        digester.addSetProperties("pluto-portal-driver/render-config/page");
+        digester.addCallMethod(
+            "pluto-portal-driver/render-config/page/portlet", "addPortlet", 2
+        );
+        digester.addCallParam(
+            "pluto-portal-driver/render-config/page/portlet",
+            0, "context"
+        );
+        digester.addCallParam(
+            "pluto-portal-driver/render-config/page/portlet",
+            1, "name"
+        );
+        digester.addSetNext(
+            "pluto-portal-driver/render-config/page",
+            "addPage"
+        );
+        digester.addSetNext(
+            "pluto-portal-driver/render-config",
+            "setRenderConfig"
+        );
+    }
+
+}
+

Added: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/package.html
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/package.html?view=auto&rev=439904
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/package.html (added)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/package.html Sun Sep  3 19:16:29 2006
@@ -0,0 +1,22 @@
+<!--
+Copyright 2005-2006 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.
+-->
+<html>
+<body>
+Service implementations which utilizing context resources
+to perform their work.
+</body>
+</html>
\ No newline at end of file