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 es...@apache.org on 2007/12/29 18:32:18 UTC

svn commit: r607450 [19/36] - in /portals/pluto/trunk: ./ assembly/src/main/assembly/ assembly/src/main/resources/ maven-pluto-plugin/ maven-pluto-plugin/src/main/java/org/apache/pluto/maven/ pluto-ant-tasks/ pluto-ant-tasks/src/assemble/ pluto-ant-tas...

Modified: portals/pluto/trunk/pluto-descriptor-impl/src/test/java/org/apache/pluto/descriptors/services/castor/WebAppDescriptorServiceImplTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-descriptor-impl/src/test/java/org/apache/pluto/descriptors/services/castor/WebAppDescriptorServiceImplTest.java?rev=607450&r1=607449&r2=607450&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-descriptor-impl/src/test/java/org/apache/pluto/descriptors/services/castor/WebAppDescriptorServiceImplTest.java (original)
+++ portals/pluto/trunk/pluto-descriptor-impl/src/test/java/org/apache/pluto/descriptors/services/castor/WebAppDescriptorServiceImplTest.java Sat Dec 29 09:31:56 2007
@@ -1,326 +1,326 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You 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.descriptors.services.castor;
-
-import junit.framework.TestCase;
-import junit.framework.Assert;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.IOException;
-
-import org.apache.pluto.descriptors.servlet.WebAppDD;
-
-/**
- *
- */
-public class WebAppDescriptorServiceImplTest extends TestCase {
-
-    private StringBuffer xmlBegin = new StringBuffer();
-    private StringBuffer xmlEnd = new StringBuffer();
-
-    private StringBuffer icon = new StringBuffer();
-    private StringBuffer misc = new StringBuffer();
-    private StringBuffer ctxParams = new StringBuffer();
-    private StringBuffer sessionConfig = new StringBuffer();
-    private StringBuffer filters = new StringBuffer();
-    private StringBuffer listeners = new StringBuffer();
-    private StringBuffer servlets = new StringBuffer();
-    private StringBuffer filterMappings = new StringBuffer();
-    private StringBuffer servletMappings = new StringBuffer();
-    private StringBuffer mimeMappings = new StringBuffer();
-    private StringBuffer welcomeFiles = new StringBuffer();
-    private StringBuffer errorPage = new StringBuffer();
-    private StringBuffer taglib = new StringBuffer();
-    private StringBuffer resourceRef = new StringBuffer();
-    private StringBuffer securityConstraint = new StringBuffer();
-    private StringBuffer loginConfig = new StringBuffer();
-    private StringBuffer securityRole = new StringBuffer();
-    private StringBuffer envEntry = new StringBuffer();
-    private StringBuffer ejbRef = new StringBuffer();
-
-    WebAppDescriptorServiceImpl impl = new WebAppDescriptorServiceImpl();
-
-    public void setUp() {
-        xmlBegin.append("" +
-                "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" +
-                "<web-app xmlns=\"http://java.sun.com/xml/ns/j2ee\"\n" +
-                "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
-                "    xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd\"\n" +
-                "    version=\"2.4\">\n" );
-        icon.append("" +
-                "  <icon>\n" +
-                "      <large-icon>/icon/large.gif</large-icon>\n" +
-                "      <small-icon>/icon/small.gif</small-icon>\n" +
-                "  </icon>\n" );
-        misc.append(""+
-                "  <display-name>Test Web XML</display-name>\n" +
-                "  <description>This is a test web.xml file.</description>\n" +
-                "  <distributable/>\n" );
-        ctxParams.append(""+
-                "  <context-param>\n" +
-                "      <description>Test Parameter 1</description>\n" +
-                "      <param-name>TestParam1</param-name>\n" +
-                "      <param-value>TestParam1Value</param-value>\n" +
-                "  </context-param>\n" +
-                "  <context-param>\n" +
-                "      <description>Test Parameter 2</description>\n" +
-                "      <param-name>TestParam2</param-name>\n" +
-                "      <param-value>TestParam2Value</param-value>\n" +
-                "  </context-param>\n" );
-        filters.append(""+
-                "  <filter>\n" +
-                "      <icon>\n" +
-                "          <large-icon>/icon/large.gif</large-icon>\n" +
-                "          <small-icon>/icon/small.gif</small-icon>\n" +
-                "      </icon>\n" +
-                "      <description>Test Description</description>\n" +
-                "      <display-name>TestName</display-name>\n" +
-                "      <filter-class>org.apache.pluto.test.TestMe</filter-class>\n" +
-                "      <filter-name>test</filter-name>\n" +
-                "      <init-param>\n" +
-                "          <param-name>Test</param-name>\n" +
-                "          <param-value>true</param-value>\n" +
-                "      </init-param>\n" +
-                "      <init-param>\n" +
-                "          <param-name>Test2</param-name>\n" +
-                "          <param-value>true</param-value>\n" +
-                "      </init-param>\n" +
-                "  </filter>\n" );
-        listeners.append("" +
-                "  <listener>\n" +
-                "      <listener-class>org.apache.pluto.test.TestListener</listener-class>\n" +
-                "  </listener>\n" +
-                "  <listener>\n" +
-                "      <listener-class>org.apache.pluto.test.AnotherListener</listener-class>\n" +
-                "  </listener>\n" );
-        servlets.append(""+
-                "  <servlet>\n" +
-                "      <servlet-name>default</servlet-name>\n" +
-                "      <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>\n" +
-                "      <init-param>\n" +
-                "          <param-name>debug</param-name>\n" +
-                "          <param-value>0</param-value>\n" +
-                "      </init-param>\n" +
-                "      <init-param>\n" +
-                "          <param-name>listings</param-name>\n" +
-                "          <param-value>true</param-value>\n" +
-                "      </init-param>\n" +
-                "      <load-on-startup>1</load-on-startup>\n" +
-                "  </servlet>\n" +
-                "  <servlet>\n" +
-                "      <servlet-name>jsp</servlet-name>\n" +
-                "      <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>\n" +
-                "      <init-param>\n" +
-                "          <param-name>fork</param-name>\n" +
-                "          <param-value>false</param-value>\n" +
-                "      </init-param>\n" +
-                "      <init-param>\n" +
-                "          <param-name>xpoweredBy</param-name>\n" +
-                "          <param-value>false</param-value>\n" +
-                "      </init-param>\n" +
-                "      <load-on-startup>3</load-on-startup>\n" +
-                "      <security-role-ref>\n" +
-                "        <role-name>plutoTestRole</role-name>\n" +
-                "        <role-link>tomcat</role-link>\n" +
-                "        <description>tomcat</description>\n" +
-                "      </security-role-ref>\n" +
-                "  </servlet>\n" );
-        filterMappings.append(""+
-                "  <filter-mapping>\n" +
-                "      <filter-name>test</filter-name>\n" +
-                "      <url-pattern>/test/*</url-pattern>\n" +
-                "      <url-pattern>/some/*</url-pattern>\n" +
-                "      <dispatcher>INCLUDE</dispatcher>\n" +
-                "      <dispatcher>FORWARD</dispatcher>\n" +
-                "  </filter-mapping>\n" +
-                "  <filter-mapping>\n" +
-                "    <filter-name>test</filter-name>\n" +
-                "    <servlet-name>jsp</servlet-name>\n" +
-                "    <dispatcher>INCLUDE</dispatcher>\n" +
-                "  </filter-mapping>\n" );
-        servletMappings.append(""+
-                "    <servlet-mapping>\n" +
-                "        <servlet-name>default</servlet-name>\n" +
-                "        <url-pattern>/</url-pattern>\n" +
-                "    </servlet-mapping>\n" +
-                "    <servlet-mapping>\n" +
-                "        <servlet-name>jsp</servlet-name>\n" +
-                "        <url-pattern>*.jsp</url-pattern>\n" +
-                "    </servlet-mapping>\n" +
-                "    <servlet-mapping>\n" +
-                "        <servlet-name>jsp</servlet-name>\n" +
-                "        <url-pattern>*.jspx</url-pattern>\n" +
-                "    </servlet-mapping>\n" );
-        sessionConfig.append(""+
-                "    <session-config>\n" +
-                "        <session-timeout>30</session-timeout>\n" +
-                "    </session-config>\n" );
-        mimeMappings.append("" +
-                "    <mime-mapping>\n" +
-                "        <extension>abs</extension>\n" +
-                "        <mime-type>audio/x-mpeg</mime-type>\n" +
-                "    </mime-mapping>\n" +
-                "    <mime-mapping>\n" +
-                "        <extension>ai</extension>\n" +
-                "        <mime-type>application/postscript</mime-type>\n" +
-                "    </mime-mapping>\n" );
-        welcomeFiles.append(""+
-                "    <welcome-file-list>\n" +
-                "        <welcome-file>index.html</welcome-file>\n" +
-                "        <welcome-file>index.htm</welcome-file>\n" +
-                "        <welcome-file>index.jsp</welcome-file>\n" +
-                "    </welcome-file-list>\n" );
-        this.errorPage.append(""+
-                "    <error-page>\n" +
-                "        <error-code>400</error-code>\n" +
-                "        <location>/400.html</location>\n" +
-                "    </error-page>\n" +
-                "    <error-page>\n" +
-                "        <exception-type>java.io.IOException</exception-type>\n" +
-                "        <location>/error/io.html</location>\n" +
-                "    </error-page>\n" );
-        this.taglib.append(""+
-                "    <taglib>\n" +
-                "        <taglib-location>/WEB-INF/test.tld</taglib-location>\n" +
-                "        <taglib-uri>test</taglib-uri>\n" +
-                "    </taglib>\n" );
-        this.resourceRef.append(""+
-                "    <resource-ref>\n" +
-                "        <description>Test Resource</description>\n" +
-                "        <res-auth>CONTIANER</res-auth>\n" +
-                "        <res-ref-name>RefName</res-ref-name>\n" +
-                "        <res-sharing-scope>Scope</res-sharing-scope>\n" +
-                "        <res-type>java.lang.String</res-type>\n" +
-                "    </resource-ref>\n" +
-                "    <resource-ref>\n" +
-                "        <description>Test Resource</description>\n" +
-                "        <res-auth>CONTIANER</res-auth>\n" +
-                "        <res-ref-name>RefName2</res-ref-name>\n" +
-                "        <res-sharing-scope>Scope</res-sharing-scope>\n" +
-                "        <res-type>java.lang.String</res-type>\n" +
-                "    </resource-ref>\n" );
-        this.securityConstraint.append(""+
-                "    <security-constraint>\n" +
-                "        <auth-constraint>\n" +
-                "            <description>Test Role</description>\n" +
-                "            <role-name>TestRole</role-name>\n" +
-                "        </auth-constraint>\n" +
-                "        <display-name>Test Constraint</display-name>\n" +
-                "        <user-data-constraint>\n" +
-                "            <description>CONFIDENTIAL</description>\n" +
-                "            <transport-guarantee>CONFIDENTIAL</transport-guarantee>\n" +
-                "        </user-data-constraint>\n" +
-                "        <web-resource-collection>\n" +
-                "            <description>TestCollection</description>\n" +
-                "            <http-method>GET</http-method>\n" +
-                "            <http-method>POST</http-method>\n" +
-                "            <url-pattern>/test/*</url-pattern>\n" +
-                "            <url-pattern>/secure/*</url-pattern>\n" +
-                "            <web-resource-name>secured</web-resource-name>\n" +
-                "        </web-resource-collection>\n" +
-                "    </security-constraint>\n" );
-        this.loginConfig.append(""+
-                "    <login-config>\n" +
-                "        <auth-method>FORM</auth-method>\n" +
-                "        <form-login-config>\n" +
-                "            <form-login-page>/login.jsp</form-login-page>\n" +
-                "            <form-error-page>/login.jsp?error=true</form-error-page>\n" +
-                "        </form-login-config>\n" +
-                "        <realm-name>BASIC</realm-name>\n" +
-                "    </login-config>\n" );
-         this.securityRole.append(""+
-                "    <security-role>\n" +
-                "        <description>A Test Role</description>\n" +
-                "        <role-name>TestRole</role-name>\n" +
-                "    </security-role>\n" +
-                "    <security-role>\n" +
-                "        <description>Another Role</description>\n" +
-                "        <role-name>AnotherRole</role-name>\n" +
-                "    </security-role>\n" );
-        this.envEntry.append(""+
-                "    <env-entry>\n" +
-                "        <description>Test Environment Entry</description>\n" +
-                "        <env-entry-name>Test</env-entry-name>\n" +
-                "        <env-entry-type>java.lang.String</env-entry-type>\n" +
-                "        <env-entry-value>TestValue</env-entry-value>\n" +
-                "    </env-entry>\n" +
-                "    <env-entry>\n" +
-                "        <description>Another Environment Entry</description>\n" +
-                "        <env-entry-name>Another</env-entry-name>\n" +
-                "        <env-entry-type>java.lang.String</env-entry-type>\n" +
-                "        <env-entry-value>AnotherValue</env-entry-value>\n" +
-                "    </env-entry>\n" );
-        this.ejbRef.append(""+
-                "    <ejb-ref>\n" +
-                "        <description>Test EJB</description>\n" +
-                "        <ejb-link>test</ejb-link>\n" +
-                "        <home>testHomeInterface</home>\n" +
-                "        <remote>testRemoteInterface</remote>\n" +
-                "        <ejb-ref-name>test</ejb-ref-name>\n" +
-                "        <ejb-ref-type>org.apache.pluto.test.ejb.TestEJB</ejb-ref-type>\n" +
-                "    </ejb-ref>\n" );
-        this.xmlEnd.append("</web-app>");
-
-    }
-
-    public void tearDown() {
-
-    }
-
-
-    public void testReadFullDescriptor()
-    throws IOException {
-        StringBuffer xml = new StringBuffer()
-        .append(xmlBegin).append(icon).append(misc)
-        .append(ctxParams).append(sessionConfig).append(filters)
-        .append(listeners).append(servlets).append(filterMappings)
-        .append(servletMappings).append(mimeMappings).append(welcomeFiles)
-        .append(errorPage).append(taglib).append(resourceRef)
-        .append(securityConstraint).append(loginConfig)
-        .append(securityRole).append(envEntry).append(ejbRef)
-        .append(xmlEnd);
-
-        InputStream in = new ByteArrayInputStream(xml.toString().getBytes());
-
-        WebAppDD dd = impl.read(in);
-
-        Assert.assertEquals("DisplayName not as expected", "Test Web XML", dd.getDisplayName());
-        Assert.assertEquals("Description does not match", "This is a test web.xml file.", dd.getDescription());
-        //Assert.assertTrue("Distributable not set", dd.isDistributable());
-
-        assertEquals("Context Parameters not as expected", 2, dd.getContextParams().size());
-        assertEquals("Filters not as expected", 1, dd.getFilters().size());
-        assertEquals("Filter Mappings not as expected", 2, dd.getFilterMappings().size());
-        assertEquals("Listeners not as expected", 2, dd.getListeners().size());
-        assertEquals("Servlets not as expected", 2, dd.getServlets().size());
-        assertEquals("Servlet Mappings not as expected.", 3, dd.getServletMappings().size());
-    }
-
-    public void testReadNullDescriptor() throws IOException {
-        Assert.assertNull("Null descriptor did not return null", impl.read(null));
-    }
-
-    public void testReadPartialDescriptor() {
-
-    }
-
-    public void testReadOutOfOrderDescriptor() {
-
-    }
-
-}
+ * 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.descriptors.services.castor;
+
+import junit.framework.TestCase;
+import junit.framework.Assert;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.io.IOException;
+
+import org.apache.pluto.descriptors.servlet.WebAppDD;
+
+/**
+ *
+ */
+public class WebAppDescriptorServiceImplTest extends TestCase {
+
+    private StringBuffer xmlBegin = new StringBuffer();
+    private StringBuffer xmlEnd = new StringBuffer();
+
+    private StringBuffer icon = new StringBuffer();
+    private StringBuffer misc = new StringBuffer();
+    private StringBuffer ctxParams = new StringBuffer();
+    private StringBuffer sessionConfig = new StringBuffer();
+    private StringBuffer filters = new StringBuffer();
+    private StringBuffer listeners = new StringBuffer();
+    private StringBuffer servlets = new StringBuffer();
+    private StringBuffer filterMappings = new StringBuffer();
+    private StringBuffer servletMappings = new StringBuffer();
+    private StringBuffer mimeMappings = new StringBuffer();
+    private StringBuffer welcomeFiles = new StringBuffer();
+    private StringBuffer errorPage = new StringBuffer();
+    private StringBuffer taglib = new StringBuffer();
+    private StringBuffer resourceRef = new StringBuffer();
+    private StringBuffer securityConstraint = new StringBuffer();
+    private StringBuffer loginConfig = new StringBuffer();
+    private StringBuffer securityRole = new StringBuffer();
+    private StringBuffer envEntry = new StringBuffer();
+    private StringBuffer ejbRef = new StringBuffer();
+
+    WebAppDescriptorServiceImpl impl = new WebAppDescriptorServiceImpl();
+
+    public void setUp() {
+        xmlBegin.append("" +
+                "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" +
+                "<web-app xmlns=\"http://java.sun.com/xml/ns/j2ee\"\n" +
+                "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
+                "    xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd\"\n" +
+                "    version=\"2.4\">\n" );
+        icon.append("" +
+                "  <icon>\n" +
+                "      <large-icon>/icon/large.gif</large-icon>\n" +
+                "      <small-icon>/icon/small.gif</small-icon>\n" +
+                "  </icon>\n" );
+        misc.append(""+
+                "  <display-name>Test Web XML</display-name>\n" +
+                "  <description>This is a test web.xml file.</description>\n" +
+                "  <distributable/>\n" );
+        ctxParams.append(""+
+                "  <context-param>\n" +
+                "      <description>Test Parameter 1</description>\n" +
+                "      <param-name>TestParam1</param-name>\n" +
+                "      <param-value>TestParam1Value</param-value>\n" +
+                "  </context-param>\n" +
+                "  <context-param>\n" +
+                "      <description>Test Parameter 2</description>\n" +
+                "      <param-name>TestParam2</param-name>\n" +
+                "      <param-value>TestParam2Value</param-value>\n" +
+                "  </context-param>\n" );
+        filters.append(""+
+                "  <filter>\n" +
+                "      <icon>\n" +
+                "          <large-icon>/icon/large.gif</large-icon>\n" +
+                "          <small-icon>/icon/small.gif</small-icon>\n" +
+                "      </icon>\n" +
+                "      <description>Test Description</description>\n" +
+                "      <display-name>TestName</display-name>\n" +
+                "      <filter-class>org.apache.pluto.test.TestMe</filter-class>\n" +
+                "      <filter-name>test</filter-name>\n" +
+                "      <init-param>\n" +
+                "          <param-name>Test</param-name>\n" +
+                "          <param-value>true</param-value>\n" +
+                "      </init-param>\n" +
+                "      <init-param>\n" +
+                "          <param-name>Test2</param-name>\n" +
+                "          <param-value>true</param-value>\n" +
+                "      </init-param>\n" +
+                "  </filter>\n" );
+        listeners.append("" +
+                "  <listener>\n" +
+                "      <listener-class>org.apache.pluto.test.TestListener</listener-class>\n" +
+                "  </listener>\n" +
+                "  <listener>\n" +
+                "      <listener-class>org.apache.pluto.test.AnotherListener</listener-class>\n" +
+                "  </listener>\n" );
+        servlets.append(""+
+                "  <servlet>\n" +
+                "      <servlet-name>default</servlet-name>\n" +
+                "      <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>\n" +
+                "      <init-param>\n" +
+                "          <param-name>debug</param-name>\n" +
+                "          <param-value>0</param-value>\n" +
+                "      </init-param>\n" +
+                "      <init-param>\n" +
+                "          <param-name>listings</param-name>\n" +
+                "          <param-value>true</param-value>\n" +
+                "      </init-param>\n" +
+                "      <load-on-startup>1</load-on-startup>\n" +
+                "  </servlet>\n" +
+                "  <servlet>\n" +
+                "      <servlet-name>jsp</servlet-name>\n" +
+                "      <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>\n" +
+                "      <init-param>\n" +
+                "          <param-name>fork</param-name>\n" +
+                "          <param-value>false</param-value>\n" +
+                "      </init-param>\n" +
+                "      <init-param>\n" +
+                "          <param-name>xpoweredBy</param-name>\n" +
+                "          <param-value>false</param-value>\n" +
+                "      </init-param>\n" +
+                "      <load-on-startup>3</load-on-startup>\n" +
+                "      <security-role-ref>\n" +
+                "        <role-name>plutoTestRole</role-name>\n" +
+                "        <role-link>tomcat</role-link>\n" +
+                "        <description>tomcat</description>\n" +
+                "      </security-role-ref>\n" +
+                "  </servlet>\n" );
+        filterMappings.append(""+
+                "  <filter-mapping>\n" +
+                "      <filter-name>test</filter-name>\n" +
+                "      <url-pattern>/test/*</url-pattern>\n" +
+                "      <url-pattern>/some/*</url-pattern>\n" +
+                "      <dispatcher>INCLUDE</dispatcher>\n" +
+                "      <dispatcher>FORWARD</dispatcher>\n" +
+                "  </filter-mapping>\n" +
+                "  <filter-mapping>\n" +
+                "    <filter-name>test</filter-name>\n" +
+                "    <servlet-name>jsp</servlet-name>\n" +
+                "    <dispatcher>INCLUDE</dispatcher>\n" +
+                "  </filter-mapping>\n" );
+        servletMappings.append(""+
+                "    <servlet-mapping>\n" +
+                "        <servlet-name>default</servlet-name>\n" +
+                "        <url-pattern>/</url-pattern>\n" +
+                "    </servlet-mapping>\n" +
+                "    <servlet-mapping>\n" +
+                "        <servlet-name>jsp</servlet-name>\n" +
+                "        <url-pattern>*.jsp</url-pattern>\n" +
+                "    </servlet-mapping>\n" +
+                "    <servlet-mapping>\n" +
+                "        <servlet-name>jsp</servlet-name>\n" +
+                "        <url-pattern>*.jspx</url-pattern>\n" +
+                "    </servlet-mapping>\n" );
+        sessionConfig.append(""+
+                "    <session-config>\n" +
+                "        <session-timeout>30</session-timeout>\n" +
+                "    </session-config>\n" );
+        mimeMappings.append("" +
+                "    <mime-mapping>\n" +
+                "        <extension>abs</extension>\n" +
+                "        <mime-type>audio/x-mpeg</mime-type>\n" +
+                "    </mime-mapping>\n" +
+                "    <mime-mapping>\n" +
+                "        <extension>ai</extension>\n" +
+                "        <mime-type>application/postscript</mime-type>\n" +
+                "    </mime-mapping>\n" );
+        welcomeFiles.append(""+
+                "    <welcome-file-list>\n" +
+                "        <welcome-file>index.html</welcome-file>\n" +
+                "        <welcome-file>index.htm</welcome-file>\n" +
+                "        <welcome-file>index.jsp</welcome-file>\n" +
+                "    </welcome-file-list>\n" );
+        this.errorPage.append(""+
+                "    <error-page>\n" +
+                "        <error-code>400</error-code>\n" +
+                "        <location>/400.html</location>\n" +
+                "    </error-page>\n" +
+                "    <error-page>\n" +
+                "        <exception-type>java.io.IOException</exception-type>\n" +
+                "        <location>/error/io.html</location>\n" +
+                "    </error-page>\n" );
+        this.taglib.append(""+
+                "    <taglib>\n" +
+                "        <taglib-location>/WEB-INF/test.tld</taglib-location>\n" +
+                "        <taglib-uri>test</taglib-uri>\n" +
+                "    </taglib>\n" );
+        this.resourceRef.append(""+
+                "    <resource-ref>\n" +
+                "        <description>Test Resource</description>\n" +
+                "        <res-auth>CONTIANER</res-auth>\n" +
+                "        <res-ref-name>RefName</res-ref-name>\n" +
+                "        <res-sharing-scope>Scope</res-sharing-scope>\n" +
+                "        <res-type>java.lang.String</res-type>\n" +
+                "    </resource-ref>\n" +
+                "    <resource-ref>\n" +
+                "        <description>Test Resource</description>\n" +
+                "        <res-auth>CONTIANER</res-auth>\n" +
+                "        <res-ref-name>RefName2</res-ref-name>\n" +
+                "        <res-sharing-scope>Scope</res-sharing-scope>\n" +
+                "        <res-type>java.lang.String</res-type>\n" +
+                "    </resource-ref>\n" );
+        this.securityConstraint.append(""+
+                "    <security-constraint>\n" +
+                "        <auth-constraint>\n" +
+                "            <description>Test Role</description>\n" +
+                "            <role-name>TestRole</role-name>\n" +
+                "        </auth-constraint>\n" +
+                "        <display-name>Test Constraint</display-name>\n" +
+                "        <user-data-constraint>\n" +
+                "            <description>CONFIDENTIAL</description>\n" +
+                "            <transport-guarantee>CONFIDENTIAL</transport-guarantee>\n" +
+                "        </user-data-constraint>\n" +
+                "        <web-resource-collection>\n" +
+                "            <description>TestCollection</description>\n" +
+                "            <http-method>GET</http-method>\n" +
+                "            <http-method>POST</http-method>\n" +
+                "            <url-pattern>/test/*</url-pattern>\n" +
+                "            <url-pattern>/secure/*</url-pattern>\n" +
+                "            <web-resource-name>secured</web-resource-name>\n" +
+                "        </web-resource-collection>\n" +
+                "    </security-constraint>\n" );
+        this.loginConfig.append(""+
+                "    <login-config>\n" +
+                "        <auth-method>FORM</auth-method>\n" +
+                "        <form-login-config>\n" +
+                "            <form-login-page>/login.jsp</form-login-page>\n" +
+                "            <form-error-page>/login.jsp?error=true</form-error-page>\n" +
+                "        </form-login-config>\n" +
+                "        <realm-name>BASIC</realm-name>\n" +
+                "    </login-config>\n" );
+         this.securityRole.append(""+
+                "    <security-role>\n" +
+                "        <description>A Test Role</description>\n" +
+                "        <role-name>TestRole</role-name>\n" +
+                "    </security-role>\n" +
+                "    <security-role>\n" +
+                "        <description>Another Role</description>\n" +
+                "        <role-name>AnotherRole</role-name>\n" +
+                "    </security-role>\n" );
+        this.envEntry.append(""+
+                "    <env-entry>\n" +
+                "        <description>Test Environment Entry</description>\n" +
+                "        <env-entry-name>Test</env-entry-name>\n" +
+                "        <env-entry-type>java.lang.String</env-entry-type>\n" +
+                "        <env-entry-value>TestValue</env-entry-value>\n" +
+                "    </env-entry>\n" +
+                "    <env-entry>\n" +
+                "        <description>Another Environment Entry</description>\n" +
+                "        <env-entry-name>Another</env-entry-name>\n" +
+                "        <env-entry-type>java.lang.String</env-entry-type>\n" +
+                "        <env-entry-value>AnotherValue</env-entry-value>\n" +
+                "    </env-entry>\n" );
+        this.ejbRef.append(""+
+                "    <ejb-ref>\n" +
+                "        <description>Test EJB</description>\n" +
+                "        <ejb-link>test</ejb-link>\n" +
+                "        <home>testHomeInterface</home>\n" +
+                "        <remote>testRemoteInterface</remote>\n" +
+                "        <ejb-ref-name>test</ejb-ref-name>\n" +
+                "        <ejb-ref-type>org.apache.pluto.test.ejb.TestEJB</ejb-ref-type>\n" +
+                "    </ejb-ref>\n" );
+        this.xmlEnd.append("</web-app>");
+
+    }
+
+    public void tearDown() {
+
+    }
+
+
+    public void testReadFullDescriptor()
+    throws IOException {
+        StringBuffer xml = new StringBuffer()
+        .append(xmlBegin).append(icon).append(misc)
+        .append(ctxParams).append(sessionConfig).append(filters)
+        .append(listeners).append(servlets).append(filterMappings)
+        .append(servletMappings).append(mimeMappings).append(welcomeFiles)
+        .append(errorPage).append(taglib).append(resourceRef)
+        .append(securityConstraint).append(loginConfig)
+        .append(securityRole).append(envEntry).append(ejbRef)
+        .append(xmlEnd);
+
+        InputStream in = new ByteArrayInputStream(xml.toString().getBytes());
+
+        WebAppDD dd = impl.read(in);
+
+        Assert.assertEquals("DisplayName not as expected", "Test Web XML", dd.getDisplayName());
+        Assert.assertEquals("Description does not match", "This is a test web.xml file.", dd.getDescription());
+        //Assert.assertTrue("Distributable not set", dd.isDistributable());
+
+        assertEquals("Context Parameters not as expected", 2, dd.getContextParams().size());
+        assertEquals("Filters not as expected", 1, dd.getFilters().size());
+        assertEquals("Filter Mappings not as expected", 2, dd.getFilterMappings().size());
+        assertEquals("Listeners not as expected", 2, dd.getListeners().size());
+        assertEquals("Servlets not as expected", 2, dd.getServlets().size());
+        assertEquals("Servlet Mappings not as expected.", 3, dd.getServletMappings().size());
+    }
+
+    public void testReadNullDescriptor() throws IOException {
+        Assert.assertNull("Null descriptor did not return null", impl.read(null));
+    }
+
+    public void testReadPartialDescriptor() {
+
+    }
+
+    public void testReadOutOfOrderDescriptor() {
+
+    }
+
+}

Propchange: portals/pluto/trunk/pluto-descriptor-impl/src/test/java/org/apache/pluto/descriptors/services/castor/WebAppDescriptorServiceImplTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 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?rev=607450&r1=607449&r2=607450&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/AdminConfigurationImpl.java (original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/AdminConfigurationImpl.java Sat Dec 29 09:31:56 2007
@@ -1,60 +1,60 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You 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;
-
-/**
- *
- * @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;
-    }
-
-
-}
+ * 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;
+
+/**
+ *
+ * @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;
+    }
+
+
+}

Propchange: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/AdminConfigurationImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 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?rev=607450&r1=607449&r2=607450&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/DriverConfigurationImpl.java (original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/DriverConfigurationImpl.java Sat Dec 29 09:31:56 2007
@@ -1,202 +1,202 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You 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 java.util.Collection;
-
-import javax.servlet.ServletContext;
-
-import org.apache.pluto.driver.config.DriverConfiguration;
-import org.apache.pluto.driver.services.portal.PageConfig;
-import org.apache.pluto.driver.services.portal.PropertyConfigService;
-import org.apache.pluto.driver.services.portal.RenderConfigService;
-import org.apache.pluto.driver.services.portal.SupportedModesService;
-import org.apache.pluto.driver.services.portal.SupportedWindowStateService;
-import org.apache.pluto.driver.url.PortalURLParser;
-import org.apache.pluto.spi.PortalCallbackService;
-import org.apache.pluto.spi.optional.PortletPreferencesService;
-
-/**
- * Encapsulation of the Pluto Driver ResourceConfig.
- *
- * @version 1.0
- * @since Sep 23, 2004
- */
-public class DriverConfigurationImpl
-    implements DriverConfiguration {
-
-    private PortalURLParser portalUrlParser;
-    private PropertyConfigService propertyService;
-    private RenderConfigService renderService;
-    private SupportedModesService supportedModesService;
-    private SupportedWindowStateService supportedWindowStateService;
-
-    // Container Services
-    private PortalCallbackService portalCallbackService;
-    private PortletPreferencesService portletPreferencesService;
-
-    public DriverConfigurationImpl(PortalURLParser portalUrlParser,
-                                   PropertyConfigService propertyService,
-                                   RenderConfigService renderService,
-                                   SupportedModesService supportedModesService,
-                                   SupportedWindowStateService supportedWindowStateService,
-                                   PortalCallbackService portalCallback) {
-
-        this.portalUrlParser = portalUrlParser;
-        this.propertyService = propertyService;
-        this.renderService = renderService;
-        this.portalCallbackService = portalCallback;
-        this.supportedModesService = supportedModesService;
-        this.supportedWindowStateService = supportedWindowStateService;
-    }
-
-    /**
-     * 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 render configuration.
-     */
-    public Collection getPages() {
-        return renderService.getPages();
-    }
-
-    public PageConfig getPageConfig(String pageId) {
-        return renderService.getPage(pageId);
-    }
-
-    public boolean isPortletModeSupportedByPortal(String mode) {
-        return supportedModesService.isPortletModeSupportedByPortal(mode);
-    }
-
-    public boolean isPortletModeSupportedByPortlet(String portletId, String mode) {
-        return supportedModesService.isPortletModeSupportedByPortlet(portletId, mode);
-    }
-
-    public boolean isPortletModeSupported(String portletId, String mode) {
-        return supportedModesService.isPortletModeSupported(portletId, mode);
-    }
-
-    public void init(ServletContext context) {
-        this.propertyService.init(context);
-        this.renderService.init(context);
-        this.supportedModesService.init(context);
-        this.supportedWindowStateService.init(context);
-    }
-
-    public void destroy() {
-        if(propertyService != null)
-            propertyService.destroy();
-
-        if(renderService != null)
-            renderService.destroy();
-
-        if (supportedModesService != null)
-            supportedModesService.destroy();
-
-        if (supportedWindowStateService != null)
-            supportedWindowStateService.destroy();
-    }
-
-//
-// Portal Driver Services
-//
-
-    public PortalURLParser getPortalUrlParser() {
-        return portalUrlParser;
-    }
-
-    public void setPortalUrlParser(PortalURLParser portalUrlParser) {
-        this.portalUrlParser = portalUrlParser;
-    }
-
-//
-// 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;
-    }
-
-    public boolean isWindowStateSupported(String portletId, String windowState)
-    {
-        return supportedWindowStateService.isWindowStateSupported(portletId, windowState);
-    }
-
-    public boolean isWindowStateSupportedByPortal(String windowState)
-    {
-        return supportedWindowStateService.isWindowStateSupportedByPortal(windowState);
-    }
-
-    public boolean isWindowStateSupportedByPortlet(String portletId, String windowState)
-    {
-        return supportedWindowStateService.isWindowStateSupportedByPortlet(portletId, windowState);
-    }
-    
-    public RenderConfigService getRenderConfigService(){
-    	return renderService;
-    }
-}
-
+ * 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 java.util.Collection;
+
+import javax.servlet.ServletContext;
+
+import org.apache.pluto.driver.config.DriverConfiguration;
+import org.apache.pluto.driver.services.portal.PageConfig;
+import org.apache.pluto.driver.services.portal.PropertyConfigService;
+import org.apache.pluto.driver.services.portal.RenderConfigService;
+import org.apache.pluto.driver.services.portal.SupportedModesService;
+import org.apache.pluto.driver.services.portal.SupportedWindowStateService;
+import org.apache.pluto.driver.url.PortalURLParser;
+import org.apache.pluto.spi.PortalCallbackService;
+import org.apache.pluto.spi.optional.PortletPreferencesService;
+
+/**
+ * Encapsulation of the Pluto Driver ResourceConfig.
+ *
+ * @version 1.0
+ * @since Sep 23, 2004
+ */
+public class DriverConfigurationImpl
+    implements DriverConfiguration {
+
+    private PortalURLParser portalUrlParser;
+    private PropertyConfigService propertyService;
+    private RenderConfigService renderService;
+    private SupportedModesService supportedModesService;
+    private SupportedWindowStateService supportedWindowStateService;
+
+    // Container Services
+    private PortalCallbackService portalCallbackService;
+    private PortletPreferencesService portletPreferencesService;
+
+    public DriverConfigurationImpl(PortalURLParser portalUrlParser,
+                                   PropertyConfigService propertyService,
+                                   RenderConfigService renderService,
+                                   SupportedModesService supportedModesService,
+                                   SupportedWindowStateService supportedWindowStateService,
+                                   PortalCallbackService portalCallback) {
+
+        this.portalUrlParser = portalUrlParser;
+        this.propertyService = propertyService;
+        this.renderService = renderService;
+        this.portalCallbackService = portalCallback;
+        this.supportedModesService = supportedModesService;
+        this.supportedWindowStateService = supportedWindowStateService;
+    }
+
+    /**
+     * 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 render configuration.
+     */
+    public Collection getPages() {
+        return renderService.getPages();
+    }
+
+    public PageConfig getPageConfig(String pageId) {
+        return renderService.getPage(pageId);
+    }
+
+    public boolean isPortletModeSupportedByPortal(String mode) {
+        return supportedModesService.isPortletModeSupportedByPortal(mode);
+    }
+
+    public boolean isPortletModeSupportedByPortlet(String portletId, String mode) {
+        return supportedModesService.isPortletModeSupportedByPortlet(portletId, mode);
+    }
+
+    public boolean isPortletModeSupported(String portletId, String mode) {
+        return supportedModesService.isPortletModeSupported(portletId, mode);
+    }
+
+    public void init(ServletContext context) {
+        this.propertyService.init(context);
+        this.renderService.init(context);
+        this.supportedModesService.init(context);
+        this.supportedWindowStateService.init(context);
+    }
+
+    public void destroy() {
+        if(propertyService != null)
+            propertyService.destroy();
+
+        if(renderService != null)
+            renderService.destroy();
+
+        if (supportedModesService != null)
+            supportedModesService.destroy();
+
+        if (supportedWindowStateService != null)
+            supportedWindowStateService.destroy();
+    }
+
+//
+// Portal Driver Services
+//
+
+    public PortalURLParser getPortalUrlParser() {
+        return portalUrlParser;
+    }
+
+    public void setPortalUrlParser(PortalURLParser portalUrlParser) {
+        this.portalUrlParser = portalUrlParser;
+    }
+
+//
+// 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;
+    }
+
+    public boolean isWindowStateSupported(String portletId, String windowState)
+    {
+        return supportedWindowStateService.isWindowStateSupported(portletId, windowState);
+    }
+
+    public boolean isWindowStateSupportedByPortal(String windowState)
+    {
+        return supportedWindowStateService.isWindowStateSupportedByPortal(windowState);
+    }
+
+    public boolean isWindowStateSupportedByPortlet(String portletId, String windowState)
+    {
+        return supportedWindowStateService.isWindowStateSupportedByPortlet(portletId, windowState);
+    }
+    
+    public RenderConfigService getRenderConfigService(){
+    	return renderService;
+    }
+}
+

Propchange: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/DriverConfigurationImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 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?rev=607450&r1=607449&r2=607450&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java (original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java Sat Dec 29 09:31:56 2007
@@ -1,112 +1,112 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.portlet.PortalContext;
-
-import org.apache.pluto.OptionalContainerServices;
-import org.apache.pluto.RequiredContainerServices;
-import org.apache.pluto.driver.config.DriverConfiguration;
-import org.apache.pluto.spi.PortalCallbackService;
-import org.apache.pluto.spi.optional.PortalAdministrationService;
-import org.apache.pluto.spi.optional.PortletEnvironmentService;
-import org.apache.pluto.spi.optional.PortletInfoService;
-import org.apache.pluto.spi.optional.PortletInvokerService;
-import org.apache.pluto.spi.optional.PortletPreferencesService;
-import org.apache.pluto.spi.optional.PortletRegistryService;
-import org.apache.pluto.spi.optional.UserInfoService;
-
-/**
- * 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.
- * @version 1.0
- * @since Sep 21, 2004
- */
-public class ContainerServicesImpl
-    implements RequiredContainerServices, OptionalContainerServices {
-
-
-    private final PortalContextImpl context;
-    private final 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();
-    }
-
-
-    /**
-     * Returns null to use pluto's default
-     * @return
-     */
-    public PortletRegistryService getPortletRegistryService() {
-        return null;
-    }
-
-    public PortletEnvironmentService getPortletEnvironmentService() {
-        return null;
-    }
-
-    public PortletInvokerService getPortletInvokerService() {
-        return null;
-    }
-
-    public PortletInfoService getPortletInfoService() {
-        return null;
-    }
-
-    public PortalAdministrationService getPortalAdministrationService() {
-        return null;
-    }
-
-    public UserInfoService getUserInfoService() {
-        return null;
-    }
-}
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.portlet.PortalContext;
+
+import org.apache.pluto.OptionalContainerServices;
+import org.apache.pluto.RequiredContainerServices;
+import org.apache.pluto.driver.config.DriverConfiguration;
+import org.apache.pluto.spi.PortalCallbackService;
+import org.apache.pluto.spi.optional.PortalAdministrationService;
+import org.apache.pluto.spi.optional.PortletEnvironmentService;
+import org.apache.pluto.spi.optional.PortletInfoService;
+import org.apache.pluto.spi.optional.PortletInvokerService;
+import org.apache.pluto.spi.optional.PortletPreferencesService;
+import org.apache.pluto.spi.optional.PortletRegistryService;
+import org.apache.pluto.spi.optional.UserInfoService;
+
+/**
+ * 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.
+ * @version 1.0
+ * @since Sep 21, 2004
+ */
+public class ContainerServicesImpl
+    implements RequiredContainerServices, OptionalContainerServices {
+
+
+    private final PortalContextImpl context;
+    private final 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();
+    }
+
+
+    /**
+     * Returns null to use pluto's default
+     * @return
+     */
+    public PortletRegistryService getPortletRegistryService() {
+        return null;
+    }
+
+    public PortletEnvironmentService getPortletEnvironmentService() {
+        return null;
+    }
+
+    public PortletInvokerService getPortletInvokerService() {
+        return null;
+    }
+
+    public PortletInfoService getPortletInfoService() {
+        return null;
+    }
+
+    public PortalAdministrationService getPortalAdministrationService() {
+        return null;
+    }
+
+    public UserInfoService getUserInfoService() {
+        return null;
+    }
+}
+

Propchange: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 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?rev=607450&r1=607449&r2=607450&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalCallbackServiceImpl.java (original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalCallbackServiceImpl.java Sat Dec 29 09:31:56 2007
@@ -1,91 +1,91 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You 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.Collections;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.pluto.PortletWindow;
-import org.apache.pluto.driver.AttributeKeys;
-import org.apache.pluto.spi.PortalCallbackService;
-import org.apache.pluto.spi.PortletURLProvider;
-import org.apache.pluto.spi.ResourceURLProvider;
-
-/**
- * @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.
-    }
-}
-
+ * 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.Collections;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.pluto.PortletWindow;
+import org.apache.pluto.driver.AttributeKeys;
+import org.apache.pluto.spi.PortalCallbackService;
+import org.apache.pluto.spi.PortletURLProvider;
+import org.apache.pluto.spi.ResourceURLProvider;
+
+/**
+ * @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.
+    }
+}
+

Propchange: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalCallbackServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 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?rev=607450&r1=607449&r2=607450&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalContextImpl.java (original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalContextImpl.java Sat Dec 29 09:31:56 2007
@@ -1,166 +1,166 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You 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;
-    }
-
-}
+ * 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;
+    }
+
+}

Propchange: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalContextImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 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?rev=607450&r1=607449&r2=607450&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java (original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java Sat Dec 29 09:31:56 2007
@@ -1,94 +1,94 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.portlet.PortletSecurityException;
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.pluto.PortletWindow;
-import org.apache.pluto.driver.url.PortalURLParameter;
-import org.apache.pluto.driver.url.PortalURL;
-import org.apache.pluto.driver.core.PortalRequestContext;
-import org.apache.pluto.spi.PortletURLProvider;
-
-/**
- *
- */
-public class PortletURLProviderImpl implements PortletURLProvider {
-
-    private PortalURL url;
-    private String window;
-
-    public PortletURLProviderImpl(HttpServletRequest request,
-                                  PortletWindow internalPortletWindow) {
-        PortalRequestContext ctx = (PortalRequestContext)
-            request.getAttribute(PortalRequestContext.REQUEST_KEY);
-        url = ctx.createPortalURL();
-
-        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() throws PortletSecurityException {
-        throw new PortletSecurityException("No Supported");
-    }
-
-    public boolean isSecureSupported() {
-        return false;
-    }
-
-    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();
-    }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.portlet.PortletSecurityException;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.pluto.PortletWindow;
+import org.apache.pluto.driver.url.PortalURLParameter;
+import org.apache.pluto.driver.url.PortalURL;
+import org.apache.pluto.driver.core.PortalRequestContext;
+import org.apache.pluto.spi.PortletURLProvider;
+
+/**
+ *
+ */
+public class PortletURLProviderImpl implements PortletURLProvider {
+
+    private PortalURL url;
+    private String window;
+
+    public PortletURLProviderImpl(HttpServletRequest request,
+                                  PortletWindow internalPortletWindow) {
+        PortalRequestContext ctx = (PortalRequestContext)
+            request.getAttribute(PortalRequestContext.REQUEST_KEY);
+        url = ctx.createPortalURL();
+
+        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() throws PortletSecurityException {
+        throw new PortletSecurityException("No Supported");
+    }
+
+    public boolean isSecureSupported() {
+        return false;
+    }
+
+    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();
+    }
+
+}

Propchange: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native