You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by dd...@apache.org on 2005/03/08 16:59:30 UTC
svn commit: r156536 [1/2] - in portals/pluto/trunk/descriptors: ./ src/
src/conf/ src/conf/org/ src/conf/org/apache/ src/conf/org/apache/pluto/
src/conf/org/apache/pluto/descriptors/
src/conf/org/apache/pluto/descriptors/portlet/
src/conf/org/apache/pluto/descriptors/servlet/ src/java/ src/java/org/
src/java/org/apache/ src/java/org/apache/pluto/
src/java/org/apache/pluto/descriptors/
src/java/org/apache/pluto/descriptors/common/
src/java/org/apache/pluto/descriptors/portlet/
src/java/org/apache/pluto/descriptors/services/
src/java/org/apache/pluto/descriptors/services/impl/
src/java/org/apache/pluto/descriptors/servlet/ src/test/ src/test/org/
src/test/org/apache/ src/test/org/apache/pluto/
src/test/org/apache/pluto/descriptors/
src/test/org/apache/pluto/descriptors/portlet/
src/test/org/apache/pluto/descriptors/servlet/
Author: ddewolf
Date: Tue Mar 8 07:59:17 2005
New Revision: 156536
URL: http://svn.apache.org/viewcvs?view=rev&rev=156536
Log:
Adding New Descriptors SubProject:
-- provides standard bean based config information for web.xml and portlet.xml files
-- provides service interface for reading and writing web.xml and portlet.xml
-- Used in the new deployer to prevent element stripping
-- Currently uses castor but sheilds implementation details from client
-- packaged as a stand alone jar and depended upon by the portalImpl.
Added:
portals/pluto/trunk/descriptors/
portals/pluto/trunk/descriptors/descriptors.iml
portals/pluto/trunk/descriptors/project.xml
portals/pluto/trunk/descriptors/src/
portals/pluto/trunk/descriptors/src/conf/
portals/pluto/trunk/descriptors/src/conf/org/
portals/pluto/trunk/descriptors/src/conf/org/apache/
portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/
portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/
portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/portlet/
portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/portlet/castor-portlet-xml-mapping.xml
portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/portlet/portlet.xml
portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/servlet/
portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/servlet/castor-web-xml-mapping.xml
portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/servlet/web.xml
portals/pluto/trunk/descriptors/src/java/
portals/pluto/trunk/descriptors/src/java/org/
portals/pluto/trunk/descriptors/src/java/org/apache/
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/common/
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/common/IconDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/common/InitParamDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/common/SecurityRoleRefDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/Constants.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/PortletAppDescriptorService.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/WebAppDescriptorService.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/AbstractCastorDescriptorService.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/AbstractPortletAppDescriptorService.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/AbstractWebAppDescriptorService.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/ContextPortletAppDescriptorServiceImpl.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/ContextWebAppDescriptorServiceImpl.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/FilePortletAppDescriptorServiceImpl.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/FileWebAppDescriptorServiceImpl.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/StreamPortletAppDescriptorServiceImpl.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/AuthConstraintDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/EjbRefDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/EnvEntryDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/ErrorPageDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/FilterDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/FilterMappingDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/FormLoginConfigDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/ListenerDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/LoadOnStartupDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/LoginConfigDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/MimeMappingDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/ResourceRefDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/SecurityConstraintDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/SecurityRoleDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/ServletDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/ServletMappingDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/SessionConfigDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/TaglibDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/UserDataConstraintDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/WebAppDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/WebResourceCollectionDD.java
portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/servlet/WelcomeFileListDD.java
portals/pluto/trunk/descriptors/src/test/
portals/pluto/trunk/descriptors/src/test/org/
portals/pluto/trunk/descriptors/src/test/org/apache/
portals/pluto/trunk/descriptors/src/test/org/apache/pluto/
portals/pluto/trunk/descriptors/src/test/org/apache/pluto/descriptors/
portals/pluto/trunk/descriptors/src/test/org/apache/pluto/descriptors/portlet/
portals/pluto/trunk/descriptors/src/test/org/apache/pluto/descriptors/portlet/CastorMappingTest.java
portals/pluto/trunk/descriptors/src/test/org/apache/pluto/descriptors/servlet/
portals/pluto/trunk/descriptors/src/test/org/apache/pluto/descriptors/servlet/CastorMappingTest.java
Added: portals/pluto/trunk/descriptors/descriptors.iml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/descriptors.iml?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/descriptors.iml (added)
+++ portals/pluto/trunk/descriptors/descriptors.iml Tue Mar 8 07:59:17 2005
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+ <component name="ModuleRootManager" />
+ <component name="NewModuleRootManager">
+ <output url="file://$MODULE_DIR$/target/classes" />
+ <exclude-output />
+ <exclude-exploded />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/conf" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
+ <excludeFolder url="file://$MODULE_DIR$/target" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" name="junit-3.8.1" level="application" />
+ <orderEntry type="library" name="castor-0.9.5" level="application" />
+ <orderEntry type="library" name="xerces.2.4.0" level="application" />
+ <orderEntry type="library" name="servlet-api-2.3" level="application" />
+ <orderEntryProperties />
+ </component>
+</module>
+
Added: portals/pluto/trunk/descriptors/project.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/project.xml?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/project.xml (added)
+++ portals/pluto/trunk/descriptors/project.xml Tue Mar 8 07:59:17 2005
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<project>
+ <extend>${basedir}/../project.xml</extend>
+ <name>Pluto Descriptor Libraries</name>
+ <id>pluto-descriptors</id>
+
+ <organization>
+ <logo>/../../images/apache-portals.gif</logo>
+ </organization>
+ <logo>/../../images/pluto.png</logo>
+
+ <shortDescription>Libraries for read, writing and representing web.xml and portlet.xml descriptors.</shortDescription>
+
+ <description>
+ An object model representing the web.xml and portlet.xml
+ deployment descriptors. Services for reading and writing
+ these entities.
+ </description>
+
+ <dependencies>
+ <dependency>
+ <id>castor</id>
+ <version>0.9.5.3</version>
+ <properties>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <id>servletapi</id>
+ <version>2.3</version>
+ <properties>
+ <war.bundle>false</war.bundle>
+ </properties>
+ </dependency>
+ </dependencies>
+
+ <build>
+
+ <nagEmailAddress>pluto-dev@jakarta.apache.org</nagEmailAddress>
+
+ <sourceDirectory>src/java</sourceDirectory>
+ <aspectSourceDirectory/>
+
+ <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
+
+ <unitTest>
+ <includes>
+ <include>**/*Test.java</include>
+ </includes>
+ <resource>
+ <directory>${basedir}/src/resources</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </resource>
+
+ <resource>
+ <directory>${basedir}/src/test</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </resource>
+ </unitTest>
+
+ <integrationUnitTestSourceDirectory>src/rttest</integrationUnitTestSourceDirectory>
+
+ <integrationUnitTest>
+ <includes>
+ <include>**/*Test.java</include>
+ </includes>
+ </integrationUnitTest>
+
+
+ <resources>
+ <resource>
+ <directory>src/conf</directory>
+ <includes>
+ <include>**/*.properties</include>
+ <include>**/*.xml</include>
+ </includes>
+ </resource>
+ </resources>
+ <jars/>
+ </build>
+
+</project>
Added: portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/portlet/castor-portlet-xml-mapping.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/portlet/castor-portlet-xml-mapping.xml?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/portlet/castor-portlet-xml-mapping.xml (added)
+++ portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/portlet/castor-portlet-xml-mapping.xml Tue Mar 8 07:59:17 2005
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Object Mapping DTD Version 1.0//EN"
+ "http://castor.exolab.org/mapping.dtd">
+<!--
+ 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.
+-->
+<mapping>
+ <description>Portlet Deployment Descriptor Mapping</description>
+
+ <!--
+ Bare Bones for now!
+ -->
+
+ <class name="org.apache.pluto.descriptors.portlet.PortletAppDD">
+ <map-to xml="portlet-app"/>
+ <field name="Portlets"
+ type="org.apache.pluto.descriptors.portlet.PortletDD"
+ collection="set">
+ <bind-xml name="portlet" node="element"/>
+ </field>
+ </class>
+
+ <class name="org.apache.pluto.descriptors.portlet.PortletDD">
+ <field name="PortletName">
+ <bind-xml name="portlet-name" node="element"/>
+ </field>
+
+ <field name="PortletClass">
+ <bind-xml name="portlet-class" node="element"/>
+ </field>
+
+ <field name="SecurityRoleRefs"
+ type="org.apache.pluto.descriptors.common.SecurityRoleRefDD"
+ collection="arraylist">
+ <bind-xml name="security-role-ref" node="element"/>
+ </field>
+ </class>
+
+
+</mapping>
+
Added: portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/portlet/portlet.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/portlet/portlet.xml?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/portlet/portlet.xml (added)
+++ portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/portlet/portlet.xml Tue Mar 8 07:59:17 2005
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<portlet-app
+ xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+ version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd
+ http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+ <portlet>
+ <description>TestSuiteDescription</description>
+ <portlet-name>TestPortlet1</portlet-name>
+ <display-name>Test Portlet #1</display-name>
+
+ <portlet-class>org.apache.pluto.portalImpl.portlet.TestPortlet</portlet-class>
+
+ <init-param>
+ <name>config</name>
+ <value>/WEB-INF/testsuite-config.xml</value>
+ </init-param>
+
+ <init-param>
+ <name>dummyName</name>
+ <value>dummyValue</value>
+ </init-param>
+
+ <expiration-cache>-1</expiration-cache>
+
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
+ <portlet-mode>HELP</portlet-mode>
+ </supports>
+
+ <supported-locale>en</supported-locale>
+ <supported-locale>de</supported-locale>
+
+ <portlet-info>
+ <title>Test Portlet #1</title>
+ <short-title>Test #1</short-title>
+ <keywords>Test,Testing</keywords>
+ </portlet-info>
+ <portlet-preferences>
+ <preference>
+ <name>dummyName</name>
+ <value>dummyValue</value>
+ <read-only>false</read-only>
+ </preference>
+ <preference>
+ <name>dummyName2</name>
+ <value>dummyValue2</value>
+ </preference>
+ <preference>
+ <name>readonly</name>
+ <value>readonly</value>
+ <read-only>true</read-only>
+ </preference>
+ <preferences-validator>org.apache.pluto.core.impl.PreferencesValidatorImpl</preferences-validator>
+ </portlet-preferences>
+ <security-role-ref>
+ <role-name>plutoTestRole</role-name>
+ <role-link>tomcat</role-link>
+ </security-role-ref>
+ </portlet>
+
+ <portlet>
+ <description>TestSuiteDescription</description>
+ <portlet-name>TestPortlet2</portlet-name>
+ <display-name>Test Portlet #2</display-name>
+ <portlet-class>org.apache.pluto.portalImpl.portlet.TestPortlet</portlet-class>
+
+ <init-param>
+ <name>config</name>
+ <value>/WEB-INF/testsuite-2-config.xml</value>
+ </init-param>
+ <init-param>
+ <name>dummyName</name>
+ <value>dummyValue</value>
+ </init-param>
+
+ <expiration-cache>-1</expiration-cache>
+
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
+ <portlet-mode>HELP</portlet-mode>
+ </supports>
+
+ <supported-locale>en</supported-locale>
+ <supported-locale>de</supported-locale>
+ <resource-bundle>TestPortlet</resource-bundle>
+
+ <portlet-preferences >
+ <preference>
+ <name>dummyName</name>
+ <value>dummyValue</value>
+ <read-only>false</read-only>
+ </preference>
+ <preference>
+ <name>dummyName2</name>
+ <value>dummyValue2</value>
+ </preference>
+ <preference>
+ <name>readonly</name>
+ <value>readonly</value>
+ <read-only>true</read-only>
+ </preference>
+ <preferences-validator>org.apache.pluto.core.impl.PreferencesValidatorImpl</preferences-validator>
+ </portlet-preferences>
+ <security-role-ref>
+ <role-name>plutoTestRole</role-name>
+ <role-link>tomcat</role-link>
+ </security-role-ref>
+ </portlet>
+ </portlet-app>
Added: portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/servlet/castor-web-xml-mapping.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/servlet/castor-web-xml-mapping.xml?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/servlet/castor-web-xml-mapping.xml (added)
+++ portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/servlet/castor-web-xml-mapping.xml Tue Mar 8 07:59:17 2005
@@ -0,0 +1,323 @@
+<?xml version="1.0"?>
+<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Object Mapping DTD Version 1.0//EN"
+ "http://castor.exolab.org/mapping.dtd">
+<!--
+ 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.
+-->
+<mapping>
+ <description>Servlet Deployment Descriptor Mapping</description>
+
+ <!--
+ The Root WebApplication Element
+ This element should map each and every one of the possible 2.4
+ elments in order.
+ + icon,
+ + display-name
+ + description
+ + distributable
+ + context-param
+ + filter
+ + filter-mapping
+ + listener
+ + servlet
+ + servlet-mapping
+ + session-config
+ + mime-mapping
+ + welcome-file-list?,
+ + error-page
+ + taglib
+ + resource-env-ref
+ + resource-ref
+ + security-constraint
+ + login-config
+ + security-role
+ + env-entry
+ + ejb-ref
+ + ejb-local-ref
+ -->
+ <class name="org.apache.pluto.descriptors.servlet.WebAppDD">
+ <map-to xml="web-app"/>
+
+ <field name="Icon"
+ type="org.apache.pluto.descriptors.common.IconDD"/>
+
+ <field name="DisplayName">
+ <bind-xml name="display-name" node="element"/>
+ </field>
+
+ <field name="Description">
+ <bind-xml name="description" node="element"/>
+ </field>
+
+ <field name="Distributable" get-method="isDistributable">
+ <bind-xml name="distributable" node="element"/>
+ </field>
+
+ <field name="ContextParams"
+ type="org.apache.pluto.descriptors.common.InitParamDD"
+ collection="set">
+ <bind-xml name="context-param" node="element"/>
+ </field>
+
+ <field name="Filters"
+ type="org.apache.pluto.descriptors.servlet.FilterDD"
+ collection="set">
+ <bind-xml name="filter" node="element"/>
+ </field>
+
+ <field name="Listeners"
+ type="org.apache.pluto.descriptors.servlet.ListenerDD"
+ collection="set">
+ <bind-xml name="listener" node="element"/>
+ </field>
+
+ <field name="Servlets"
+ type="org.apache.pluto.descriptors.servlet.ServletDD"
+ collection="set">
+ <bind-xml name="servlet" node="element"/>
+ </field>
+
+ <field name="FilterMappings"
+ type="org.apache.pluto.descriptors.servlet.FilterMappingDD"
+ collection="set">
+ <bind-xml name="filter-mapping" node="element"/>
+ </field>
+
+ <field name="ServletMappings"
+ type="org.apache.pluto.descriptors.servlet.ServletMappingDD"
+ collection="set">
+ <bind-xml name="servlet-mapping" node="element"/>
+ </field>
+
+ <field name="SessionConfig"
+ type="org.apache.pluto.descriptors.servlet.SessionConfigDD">
+ <bind-xml name="session-config" node="element"/>
+ </field>
+
+ <field name="MimeMappings"
+ type="org.apache.pluto.descriptors.servlet.MimeMappingDD"
+ collection="set">
+ <bind-xml name="mime-mapping" node="element"/>
+ </field>
+
+ <field name="WelcomeFileList"
+ type="org.apache.pluto.descriptors.servlet.WelcomeFileListDD">
+ <bind-xml name="welcome-file-list" node="element"/>
+ </field>
+
+ <field name="ErrorPages"
+ type="org.apache.pluto.descriptors.servlet.ErrorPageDD"
+ collection="set">
+ <bind-xml name="error-page" node="element"/>
+ </field>
+
+ <field name="Taglibs"
+ type="org.apache.pluto.descriptors.servlet.TaglibDD"
+ collection="set">
+ <bind-xml name="taglib" node="element"/>
+ </field>
+
+ <field name="ResourceRefs"
+ type="org.apache.pluto.descriptors.servlet.ResourceRefDD"
+ collection="set">
+ <bind-xml name="resource-ref" node="element"/>
+ </field>
+
+ <field name="SecurityConstraints"
+ type="org.apache.pluto.descriptors.servlet.SecurityConstraintDD"
+ collection="set">
+ <bind-xml name="security-constraint" node="element"/>
+ </field>
+
+ <field name="LoginConfig"
+ type="org.apache.pluto.descriptors.servlet.LoginConfigDD">
+ <bind-xml name="login-config" node="element"/>
+ </field>
+
+ <field name="SecurityRoles"
+ type="org.apache.pluto.descriptors.servlet.SecurityRoleDD"
+ collection="set">
+ <bind-xml name="security-role" node="element"/>
+ </field>
+
+ <field name="envEntrys"
+ type="org.apache.pluto.descriptors.servlet.EnvEntryDD"
+ collection="set">
+ <bind-xml name="env-entry" node="element"/>
+ </field>
+
+ <field name="ejbRefs"
+ type="org.apache.pluto.descriptors.servlet.EjbRefDD"
+ collection="set">
+ <bind-xml name="ejb-ref" node="element"/>
+ </field>
+ </class>
+
+ <!--
+ Filter DDuration
+ + filter
+ + filter-mapping
+ -->
+ <class name="org.apache.pluto.descriptors.servlet.FilterDD">
+ <field name="Icon" type="org.apache.pluto.descriptors.common.IconDD"/>
+
+ <field name="FilterName">
+ <bind-xml name="filter-name" node="element"/>
+ </field>
+
+ <field name="DisplayName">
+ <bind-xml name="display-name" node="element"/>
+ </field>
+
+ <field name="Description">
+ <bind-xml name="description" node="element"/>
+ </field>
+
+ <field name="FilterClass">
+ <bind-xml name="filter-class" node="element"/>
+ </field>
+
+ <field name="InitParams"
+ type="org.apache.pluto.descriptors.common.InitParamDD"
+ collection="arraylist">
+ <bind-xml name="init-param"/>
+ </field>
+ </class>
+ <class name="org.apache.pluto.descriptors.servlet.FilterMappingDD">
+
+ <field name="FilterName">
+ <bind-xml name="filter-name" node="element"/>
+ </field>
+
+ <field name="ServletName">
+ <bind-xml name="servlet-name" node="element"/>
+ </field>
+
+ <field name="UrlPatterns" type="java.lang.String"
+ collection="set">
+ <bind-xml name="url-pattern" node="element"/>
+ </field>
+ <field name="Dispatchers" type="java.lang.String"
+ collection="set">
+ <bind-xml name="dispatcher" node="element"/>
+ </field>
+ </class>
+
+
+ <!--
+ Servlet DDuration
+ -->
+
+ <class name="org.apache.pluto.descriptors.servlet.ServletDD">
+ <field name="Icon" type="org.apache.pluto.descriptors.common.IconDD"/>
+
+ <field name="ServletName">
+ <bind-xml name="servlet-name" node="element"/>
+ </field>
+
+ <field name="DisplayName">
+ <bind-xml name="display-name" node="element"/>
+ </field>
+
+ <field name="Description">
+ <bind-xml name="description" node="element"/>
+ </field>
+
+ <field name="ServletClass">
+ <bind-xml name="servlet-class" node="element"/>
+ </field>
+
+ <field name="JspFile">
+ <bind-xml name="jsp-file" node="element"/>
+ </field>
+
+ <field name="InitParams"
+ type="org.apache.pluto.descriptors.common.InitParamDD"
+ collection="arraylist">
+ <bind-xml name="init-param"/>
+ </field>
+
+ <field name="LoadOnStartup"
+ type="org.apache.pluto.descriptors.servlet.LoadOnStartupDD">
+ <bind-xml name="load-on-startup" node="element"/>
+ </field>
+
+ <field name="SecurityRoleRefs"
+ type="org.apache.pluto.descriptors.common.SecurityRoleRefDD"
+ collection="arraylist">
+ <bind-xml name="security-role-ref" node="element"/>
+ </field>
+ </class>
+
+ <class name="org.apache.pluto.descriptors.servlet.SessionConfigDD">
+ <field name="SessionTimeout" type="int">
+ <bind-xml name="session-timeout" node="element"/>
+ </field>
+ </class>
+
+ <class name="org.apache.pluto.descriptors.servlet.WelcomeFileListDD">
+ <field name="WelcomeFiles"
+ type="java.lang.String"
+ collection="arraylist">
+ <bind-xml name="welcome-file" node="element"/>
+ </field>
+ </class>
+
+ <!--
+ Security Constraint
+ + SecurityConstraint
+ + WebResourceCollection
+ -->
+ <class name="org.apache.pluto.descriptors.servlet.SecurityConstraintDD">
+ <field name="DisplayName" type="java.lang.String"/>
+ <field name="WebResourceCollections"
+ type="org.apache.pluto.descriptors.servlet.WebResourceCollectionDD"
+ collection="arraylist">
+ <bind-xml name="web-resource-collection" node="element"/>
+ </field>
+ <field name="AuthConstraint"
+ type="org.apache.pluto.descriptors.servlet.AuthConstraintDD"/>
+ <field name="UserDataConstraint"
+ type="org.apache.pluto.descriptors.servlet.UserDataConstraintDD"/>
+ </class>
+ <class name="org.apache.pluto.descriptors.servlet.WebResourceCollectionDD">
+ <field name="description" type="java.lang.String"/>
+ <field name="webResourceName" type="java.lang.String"/>
+ <field name="httpMethods" type="java.lang.String" collection="set">
+ <bind-xml name="http-method" node="element"/>
+ </field>
+ <field name="urlPatterns" type="java.lang.String" collection="set">
+ <bind-xml name="url-pattern" node="element"/>
+ </field>
+ </class>
+
+ <class name="org.apache.pluto.descriptors.servlet.LoginConfigDD">
+ <field name="AuthMethod" type="java.lang.String"/>
+ <field name="FormLoginConfig"
+ type="org.apache.pluto.descriptors.servlet.FormLoginConfigDD">
+ <bind-xml name="form-login-config" node="element"/>
+ </field>
+ <field name="RealmName" type="java.lang.String"/>
+ </class>
+
+ <class name="org.apache.pluto.descriptors.servlet.LoadOnStartupDD">
+ <field name="Priority" type="int">
+ <bind-xml name="load-on-startup" node="text"/>
+ </field>
+ </class>
+
+
+</mapping>
+
Added: portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/servlet/web.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/servlet/web.xml?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/servlet/web.xml (added)
+++ portals/pluto/trunk/descriptors/src/conf/org/apache/pluto/descriptors/servlet/web.xml Tue Mar 8 07:59:17 2005
@@ -0,0 +1,793 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+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.
+-->
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <icon>
+ <large-icon>/icon/large.gif</large-icon>
+ <small-icon>/icon/small.gif</small-icon>
+ </icon>
+ <display-name>Test Web XML</display-name>
+ <description>This is a test web.xml file.</description>
+
+ <distributable/>
+
+ <context-param>
+ <description>Test Parameter 1</description>
+ <param-name>TestParam1</param-name>
+ <param-value>TestParam2</param-value>
+ </context-param>
+
+ <context-param>
+ <description>Test Parameter 1</description>
+ <param-name>TestParam1</param-name>
+ <param-value>TestParam2</param-value>
+ </context-param>
+
+ <filter>
+ <icon>
+ <large-icon>/icon/large.gif</large-icon>
+ <small-icon>icon/small.gif</small-icon>
+ </icon>
+ <description>Test Description</description>
+ <display-name>TestName</display-name>
+ <filter-class>org.apache.pluto.test.TestMe</filter-class>
+ <filter-name>test</filter-name>
+ <init-param>
+ <param-name>Test</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>Test2</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ </filter>
+
+ <listener>
+ <listener-class>org.apache.pluto.test.TestListener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>default</servlet-name>
+ <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
+ <init-param>
+ <param-name>debug</param-name>
+ <param-value>0</param-value>
+ </init-param>
+ <init-param>
+ <param-name>listings</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet>
+ <servlet-name>jsp</servlet-name>
+ <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
+ <init-param>
+ <param-name>fork</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <init-param>
+ <param-name>xpoweredBy</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <load-on-startup>3</load-on-startup>
+ <security-role-ref>
+ <role-name>plutoTestRole</role-name>
+ <role-link>tomcat</role-link>
+ </security-role-ref>
+ </servlet>
+
+ <filter-mapping>
+ <filter-name>test</filter-name>
+ <url-pattern>/test/*</url-pattern>
+ <url-pattern>/some/*</url-pattern>
+ <dispatcher>INCLUDE</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>test</filter-name>
+ <servlet-name>jsp</servlet-name>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+
+ <!-- The mapping for the default servlet -->
+ <servlet-mapping>
+ <servlet-name>default</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+
+ <!-- The mapping for the JSP servlet -->
+ <servlet-mapping>
+ <servlet-name>jsp</servlet-name>
+ <url-pattern>*.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>jsp</servlet-name>
+ <url-pattern>*.jspx</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+
+
+ <mime-mapping>
+ <extension>abs</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ai</extension>
+ <mime-type>application/postscript</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>aif</extension>
+ <mime-type>audio/x-aiff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>aifc</extension>
+ <mime-type>audio/x-aiff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>aiff</extension>
+ <mime-type>audio/x-aiff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>aim</extension>
+ <mime-type>application/x-aim</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>art</extension>
+ <mime-type>image/x-jg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>asf</extension>
+ <mime-type>video/x-ms-asf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>asx</extension>
+ <mime-type>video/x-ms-asf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>au</extension>
+ <mime-type>audio/basic</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>avi</extension>
+ <mime-type>video/x-msvideo</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>avx</extension>
+ <mime-type>video/x-rad-screenplay</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>bcpio</extension>
+ <mime-type>application/x-bcpio</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>bin</extension>
+ <mime-type>application/octet-stream</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>bmp</extension>
+ <mime-type>image/bmp</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>body</extension>
+ <mime-type>text/html</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>cdf</extension>
+ <mime-type>application/x-cdf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>cer</extension>
+ <mime-type>application/x-x509-ca-cert</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>class</extension>
+ <mime-type>application/java</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>cpio</extension>
+ <mime-type>application/x-cpio</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>csh</extension>
+ <mime-type>application/x-csh</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>css</extension>
+ <mime-type>text/css</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>dib</extension>
+ <mime-type>image/bmp</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>doc</extension>
+ <mime-type>application/msword</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>dtd</extension>
+ <mime-type>text/plain</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>dv</extension>
+ <mime-type>video/x-dv</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>dvi</extension>
+ <mime-type>application/x-dvi</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>eps</extension>
+ <mime-type>application/postscript</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>etx</extension>
+ <mime-type>text/x-setext</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>exe</extension>
+ <mime-type>application/octet-stream</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>gif</extension>
+ <mime-type>image/gif</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>gtar</extension>
+ <mime-type>application/x-gtar</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>gz</extension>
+ <mime-type>application/x-gzip</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>hdf</extension>
+ <mime-type>application/x-hdf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>hqx</extension>
+ <mime-type>application/mac-binhex40</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>htc</extension>
+ <mime-type>text/x-component</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>htm</extension>
+ <mime-type>text/html</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>html</extension>
+ <mime-type>text/html</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>hqx</extension>
+ <mime-type>application/mac-binhex40</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ief</extension>
+ <mime-type>image/ief</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jad</extension>
+ <mime-type>text/vnd.sun.j2me.app-descriptor</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jar</extension>
+ <mime-type>application/java-archive</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>java</extension>
+ <mime-type>text/plain</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jnlp</extension>
+ <mime-type>application/x-java-jnlp-file</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jpe</extension>
+ <mime-type>image/jpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jpeg</extension>
+ <mime-type>image/jpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jpg</extension>
+ <mime-type>image/jpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>js</extension>
+ <mime-type>text/javascript</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jsf</extension>
+ <mime-type>text/plain</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jspf</extension>
+ <mime-type>text/plain</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>kar</extension>
+ <mime-type>audio/x-midi</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>latex</extension>
+ <mime-type>application/x-latex</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>m3u</extension>
+ <mime-type>audio/x-mpegurl</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mac</extension>
+ <mime-type>image/x-macpaint</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>man</extension>
+ <mime-type>application/x-troff-man</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>me</extension>
+ <mime-type>application/x-troff-me</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mid</extension>
+ <mime-type>audio/x-midi</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>midi</extension>
+ <mime-type>audio/x-midi</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mif</extension>
+ <mime-type>application/x-mif</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mov</extension>
+ <mime-type>video/quicktime</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>movie</extension>
+ <mime-type>video/x-sgi-movie</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mp1</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mp2</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mp3</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpa</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpe</extension>
+ <mime-type>video/mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpeg</extension>
+ <mime-type>video/mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpega</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpg</extension>
+ <mime-type>video/mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpv2</extension>
+ <mime-type>video/mpeg2</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ms</extension>
+ <mime-type>application/x-wais-source</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>nc</extension>
+ <mime-type>application/x-netcdf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>oda</extension>
+ <mime-type>application/oda</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pbm</extension>
+ <mime-type>image/x-portable-bitmap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pct</extension>
+ <mime-type>image/pict</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pdf</extension>
+ <mime-type>application/pdf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pgm</extension>
+ <mime-type>image/x-portable-graymap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pic</extension>
+ <mime-type>image/pict</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pict</extension>
+ <mime-type>image/pict</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pls</extension>
+ <mime-type>audio/x-scpls</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>png</extension>
+ <mime-type>image/png</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pnm</extension>
+ <mime-type>image/x-portable-anymap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pnt</extension>
+ <mime-type>image/x-macpaint</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ppm</extension>
+ <mime-type>image/x-portable-pixmap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ppt</extension>
+ <mime-type>application/powerpoint</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ps</extension>
+ <mime-type>application/postscript</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>psd</extension>
+ <mime-type>image/x-photoshop</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>qt</extension>
+ <mime-type>video/quicktime</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>qti</extension>
+ <mime-type>image/x-quicktime</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>qtif</extension>
+ <mime-type>image/x-quicktime</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ras</extension>
+ <mime-type>image/x-cmu-raster</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>rgb</extension>
+ <mime-type>image/x-rgb</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>rm</extension>
+ <mime-type>application/vnd.rn-realmedia</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>roff</extension>
+ <mime-type>application/x-troff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>rtf</extension>
+ <mime-type>application/rtf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>rtx</extension>
+ <mime-type>text/richtext</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>sh</extension>
+ <mime-type>application/x-sh</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>shar</extension>
+ <mime-type>application/x-shar</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>smf</extension>
+ <mime-type>audio/x-midi</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>sit</extension>
+ <mime-type>application/x-stuffit</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>snd</extension>
+ <mime-type>audio/basic</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>src</extension>
+ <mime-type>application/x-wais-source</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>sv4cpio</extension>
+ <mime-type>application/x-sv4cpio</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>sv4crc</extension>
+ <mime-type>application/x-sv4crc</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>swf</extension>
+ <mime-type>application/x-shockwave-flash</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>t</extension>
+ <mime-type>application/x-troff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tar</extension>
+ <mime-type>application/x-tar</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tcl</extension>
+ <mime-type>application/x-tcl</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tex</extension>
+ <mime-type>application/x-tex</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>texi</extension>
+ <mime-type>application/x-texinfo</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>texinfo</extension>
+ <mime-type>application/x-texinfo</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tif</extension>
+ <mime-type>image/tiff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tiff</extension>
+ <mime-type>image/tiff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tr</extension>
+ <mime-type>application/x-troff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tsv</extension>
+ <mime-type>text/tab-separated-values</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>txt</extension>
+ <mime-type>text/plain</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ulw</extension>
+ <mime-type>audio/basic</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ustar</extension>
+ <mime-type>application/x-ustar</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xbm</extension>
+ <mime-type>image/x-xbitmap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xht</extension>
+ <mime-type>application/xhtml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xhtml</extension>
+ <mime-type>application/xhtml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xml</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xpm</extension>
+ <mime-type>image/x-xpixmap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xsl</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xwd</extension>
+ <mime-type>image/x-xwindowdump</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>wav</extension>
+ <mime-type>audio/x-wav</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>svg</extension>
+ <mime-type>image/svg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>svgz</extension>
+ <mime-type>image/svg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>vsd</extension>
+ <mime-type>application/x-visio</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- Wireless Bitmap -->
+ <extension>wbmp</extension>
+ <mime-type>image/vnd.wap.wbmp</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- WML Source -->
+ <extension>wml</extension>
+ <mime-type>text/vnd.wap.wml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- Compiled WML -->
+ <extension>wmlc</extension>
+ <mime-type>application/vnd.wap.wmlc</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- WML Script Source -->
+ <extension>wmls</extension>
+ <mime-type>text/vnd.wap.wmlscript</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- Compiled WML Script -->
+ <extension>wmlscriptc</extension>
+ <mime-type>application/vnd.wap.wmlscriptc</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>wrl</extension>
+ <mime-type>x-world/x-vrml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>Z</extension>
+ <mime-type>application/x-compress</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>z</extension>
+ <mime-type>application/x-compress</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>zip</extension>
+ <mime-type>application/zip</mime-type>
+ </mime-mapping>
+
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+
+ <error-page>
+ <error-code>400</error-code>
+ <location>/400.html</location>
+ </error-page>
+ <error-page>
+ <exception-type>java.io.IOException</exception-type>
+ <location>/error/io.html</location>
+ </error-page>
+
+ <taglib>
+ <taglib-location>/WEB-INF/test.tld</taglib-location>
+ <taglib-uri>test</taglib-uri>
+ </taglib>
+
+ <resource-ref>
+ <description>Test Resource</description>
+ <res-auth>CONTIANER</res-auth>
+ <res-ref-name>RefName</res-ref-name>
+ <res-sharing-scope>Scope</res-sharing-scope>
+ <res-type>java.lang.String</res-type>
+ </resource-ref>
+
+ <resource-ref>
+ <description>Test Resource</description>
+ <res-auth>CONTIANER</res-auth>
+ <res-ref-name>RefName2</res-ref-name>
+ <res-sharing-scope>Scope</res-sharing-scope>
+ <res-type>java.lang.String</res-type>
+ </resource-ref>
+
+ <security-constraint>
+ <auth-constraint>
+ <description>Test Role</description>
+ <role-name>TestRole</role-name>
+ </auth-constraint>
+ <display-name>Test Constraint</display-name>
+ <user-data-constraint>
+ <description>CONFIDENTIAL</description>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ <web-resource-collection>
+ <description>TestCollection</description>
+ <http-method>GET</http-method>
+ <http-method>POST</http-method>
+ <url-pattern>/test/*</url-pattern>
+ <url-pattern>/secure/*</url-pattern>
+ <web-resource-name>secured</web-resource-name>
+ </web-resource-collection>
+ </security-constraint>
+
+ <login-config>
+ <auth-method>FORM</auth-method>
+ <form-login-config>
+ <form-login-page>/login.jsp</form-login-page>
+ <form-error-page>/login.jsp?error=true</form-error-page>
+ </form-login-config>
+ <realm-name>BASIC</realm-name>
+ </login-config>
+
+ <security-role>
+ <description>A Test Role</description>
+ <role-name>TestRole</role-name>
+ </security-role>
+
+ <security-role>
+ <description>Another Role</description>
+ <role-name>AnotherRole</role-name>
+ </security-role>
+
+ <env-entry>
+ <description>Test Environment Entry</description>
+ <env-entry-name>Test</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>TestValue</env-entry-value>
+ </env-entry>
+
+ <env-entry>
+ <description>Another Environment Entry</description>
+ <env-entry-name>Another</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>AnotherValue</env-entry-value>
+ </env-entry>
+
+ <ejb-ref>
+ <description>Test EJB</description>
+ <ejb-link>test</ejb-link>
+ <home>testHomeInterface</home>
+ <remote>testRemoteInterface</remote>
+ <ejb-ref-name>test</ejb-ref-name>
+ <ejb-ref-type>org.apache.pluto.test.ejb.TestEJB</ejb-ref-type>
+ </ejb-ref>
+
+
+</web-app>
Added: portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/common/IconDD.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/common/IconDD.java?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/common/IconDD.java (added)
+++ portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/common/IconDD.java Tue Mar 8 07:59:17 2005
@@ -0,0 +1,50 @@
+/*
+ * 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.descriptors.common;
+
+/**
+ * <B>TODO</B>: Document
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Feb 28, 2005
+ */
+public class IconDD{
+
+ private String largeIcon;
+ private String smallIcon;
+
+ public IconDD() {
+
+ }
+
+ public String getLargeIcon() {
+ return largeIcon;
+ }
+
+ public void setLargeIcon(String largeIcon) {
+ this.largeIcon = largeIcon;
+ }
+
+ public String getSmallIcon() {
+ return smallIcon;
+ }
+
+ public void setSmallIcon(String smallIcon) {
+ this.smallIcon = smallIcon;
+ }
+
+}
+
Added: portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/common/InitParamDD.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/common/InitParamDD.java?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/common/InitParamDD.java (added)
+++ portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/common/InitParamDD.java Tue Mar 8 07:59:17 2005
@@ -0,0 +1,59 @@
+/*
+ * 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.descriptors.common;
+
+/**
+ * <B>TODO</B>: Document
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Feb 28, 2005
+ */
+public class InitParamDD {
+
+ private String paramName;
+ private String paramValue;
+ private String description;
+
+ public InitParamDD() {
+
+ }
+
+ public String getParamName() {
+ return paramName;
+ }
+
+ public void setParamName(String paramName) {
+ this.paramName = paramName;
+ }
+
+ public String getParamValue() {
+ return paramValue;
+ }
+
+ public void setParamValue(String paramValue) {
+ this.paramValue = paramValue;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+}
+
Added: portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/common/SecurityRoleRefDD.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/common/SecurityRoleRefDD.java?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/common/SecurityRoleRefDD.java (added)
+++ portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/common/SecurityRoleRefDD.java Tue Mar 8 07:59:17 2005
@@ -0,0 +1,59 @@
+/*
+ * 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.descriptors.common;
+
+/**
+ * <B>TODO</B>: Document
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Feb 28, 2005
+ */
+public class SecurityRoleRefDD {
+
+ private String roleName;
+ private String roleLink;
+ private String description;
+
+ public SecurityRoleRefDD() {
+
+ }
+
+ public String getRoleName() {
+ return roleName;
+ }
+
+ public void setRoleName(String roleName) {
+ this.roleName = roleName;
+ }
+
+ public String getRoleLink() {
+ return roleLink;
+ }
+
+ public void setRoleLink(String roleLink) {
+ this.roleLink = roleLink;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+}
+
Added: portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java (added)
+++ portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java Tue Mar 8 07:59:17 2005
@@ -0,0 +1,45 @@
+/*
+ * 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.descriptors.portlet;
+
+import java.util.Set;
+import java.util.Collections;
+import java.util.HashSet;
+
+/**
+ *
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Mar 6, 2005
+ */
+public class PortletAppDD {
+
+ private Set portlets = new HashSet();
+
+ public PortletAppDD() {
+ }
+
+ public Set getPortlets() {
+ return portlets;
+ }
+
+ public void setPortlets(Set portlets) {
+ this.portlets = portlets;
+ }
+
+
+}
+
Added: portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletDD.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletDD.java?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletDD.java (added)
+++ portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/portlet/PortletDD.java Tue Mar 8 07:59:17 2005
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.descriptors.portlet;
+
+import java.util.Map;
+import java.util.List;
+
+/**
+ * Bare bones implementation of the Portlet descriptor.
+ * Eventually this should be flushed out :), but for the sake
+ * of timing I'll be lazy for now.
+ *
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Mar 6, 2005
+ */
+public class PortletDD {
+
+ private String portletName;
+ private String portletClass;
+ private List securityRoleRefs;
+
+ public PortletDD() {
+
+ }
+
+ public String getPortletName() {
+ return portletName;
+ }
+
+ public void setPortletName(String portletName) {
+ this.portletName = portletName;
+ }
+
+ public String getPortletClass() {
+ return portletClass;
+ }
+
+ public void setPortletClass(String portletClass) {
+ this.portletClass = portletClass;
+ }
+
+ public List getSecurityRoleRefs() {
+ return securityRoleRefs;
+ }
+
+ public void setSecurityRoleRefs(List securityRoleRefs) {
+ this.securityRoleRefs = securityRoleRefs;
+ }
+
+}
+
Added: portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/Constants.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/Constants.java?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/Constants.java (added)
+++ portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/Constants.java Tue Mar 8 07:59:17 2005
@@ -0,0 +1,37 @@
+/*
+ * 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.descriptors.services;
+
+/**
+ *
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Mar 7, 2005
+ */
+public class Constants {
+
+ public static final String WEB_XML_PUBLIC_ID = "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN";
+ public static final String WEB_XML_DTD = "http://java.sun.com/dtd/web-app_2_3.dtd";
+
+ public static final String PORLTET_XML_PUBLIC_ID = "-//Sun Microsystems, Inc.//DTD PortletApplication 1.0//EN";
+ public static final String PORTLET_XML_DTD = "http://java.sun.com/dtd/portlet-app_1_0.dtd";
+
+ private Constants() {
+
+ }
+
+}
+
Added: portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/PortletAppDescriptorService.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/PortletAppDescriptorService.java?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/PortletAppDescriptorService.java (added)
+++ portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/PortletAppDescriptorService.java Tue Mar 8 07:59:17 2005
@@ -0,0 +1,36 @@
+/*
+ * 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.descriptors.services;
+
+import java.io.IOException;
+
+import org.apache.pluto.descriptors.portlet.PortletAppDD;
+
+/**
+ *
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Mar 6, 2005
+ */
+public interface PortletAppDescriptorService {
+
+ String getContextPath();
+
+ PortletAppDD read() throws IOException;
+
+ void write(PortletAppDD pd) throws IOException;
+}
Added: portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/WebAppDescriptorService.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/WebAppDescriptorService.java?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/WebAppDescriptorService.java (added)
+++ portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/WebAppDescriptorService.java Tue Mar 8 07:59:17 2005
@@ -0,0 +1,37 @@
+/*
+ * 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.descriptors.services;
+
+import java.io.IOException;
+
+import org.apache.pluto.descriptors.servlet.WebAppDD;
+
+/**
+ * WebApplication configuration as contained
+ * within the web.xml Deployment Descriptor.
+ *
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Feb 28, 2005
+ */
+public interface WebAppDescriptorService {
+
+ String getContextPath();
+
+ WebAppDD read() throws IOException;
+
+ void write(WebAppDD dd) throws IOException;
+}
Added: portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/AbstractCastorDescriptorService.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/AbstractCastorDescriptorService.java?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/AbstractCastorDescriptorService.java (added)
+++ portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/AbstractCastorDescriptorService.java Tue Mar 8 07:59:17 2005
@@ -0,0 +1,130 @@
+/*
+ * 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.descriptors.services.impl;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.OutputStream;
+
+import org.exolab.castor.mapping.Mapping;
+import org.exolab.castor.mapping.MappingException;
+import org.exolab.castor.xml.Unmarshaller;
+import org.exolab.castor.xml.Marshaller;
+import org.apache.xml.serialize.OutputFormat;
+import org.apache.xml.serialize.XMLSerializer;
+
+/**
+ * Abstract deployment descriptor support class.
+ * This Base class provides support for reading
+ * and writing deployment descriptors using Castor.
+ *
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Mar 5, 2005
+ */
+abstract class AbstractCastorDescriptorService {
+
+ private String contextPath;
+
+ /**
+ * Default Constructor.
+ */
+ protected AbstractCastorDescriptorService(String contextPath) {
+ this.contextPath = contextPath;
+ }
+
+ public String getContextPath() {
+ return contextPath;
+ }
+
+
+ /**
+ * Read the and convert the descriptor into it's Object graph.
+ * @return
+ * @throws IOException
+ */
+ protected Object readInternal() throws IOException {
+ Object object = null;
+ InputStream is = getInputStream();
+ try {
+ Mapping mapping = getCastorMapping();
+ Unmarshaller unmarshaller = new Unmarshaller(mapping);
+ unmarshaller.setIgnoreExtraElements(getIgnoreExtraElements());
+ if(is!=null) {
+ InputStreamReader in = new InputStreamReader(is);
+ object = unmarshaller.unmarshal(in);
+ }
+ }
+ catch(Exception me) {
+ me.printStackTrace();
+ throw new IOException(me.getMessage());
+ }
+ finally {
+ if(is != null) {
+ is.close();
+ }
+ }
+ return object;
+ }
+
+ /**
+ * Write the object graph to it's descriptor.
+ * @param object
+ * @throws IOException
+ */
+ protected void writeInternal(Object object) throws IOException {
+ OutputFormat of = new OutputFormat();
+ of.setIndenting(true);
+ of.setIndent(2);
+ of.setLineWidth(600);
+ of.setDoctype(getPublicId(), getDTDUri());
+
+ OutputStreamWriter writer =
+ new OutputStreamWriter(getOutputStream());
+ XMLSerializer serializer = new XMLSerializer(writer, of);
+
+ try {
+ Marshaller marshaller =
+ new Marshaller(serializer.asDocumentHandler());
+ marshaller.setMapping(getCastorMapping());
+ marshaller.marshal(object);
+ } catch(IOException io) {
+ throw io;
+ } catch (Exception e) {
+ throw new IOException(e.getMessage());
+ }
+ finally {
+ writer.flush();
+ writer.close();
+ }
+ }
+
+ protected boolean getIgnoreExtraElements() {
+ return false;
+ }
+
+ protected abstract Mapping getCastorMapping() throws IOException, MappingException;
+ protected abstract InputStream getInputStream() throws IOException;
+ protected abstract OutputStream getOutputStream() throws IOException;
+
+ protected abstract String getPublicId();
+ protected abstract String getDTDUri();
+
+
+}
+
Added: portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/AbstractPortletAppDescriptorService.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/AbstractPortletAppDescriptorService.java?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/AbstractPortletAppDescriptorService.java (added)
+++ portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/AbstractPortletAppDescriptorService.java Tue Mar 8 07:59:17 2005
@@ -0,0 +1,152 @@
+/*
+ * 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.descriptors.services.impl;
+
+import java.net.URL;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.BufferedReader;
+
+import org.exolab.castor.mapping.Mapping;
+import org.exolab.castor.mapping.MappingException;
+import org.apache.pluto.descriptors.services.PortletAppDescriptorService;
+import org.apache.pluto.descriptors.services.Constants;
+import org.apache.pluto.descriptors.portlet.PortletAppDD;
+
+/**
+ * Abstract Implementation of the Web Application Deployment
+ * Descriptor service. Provides default implementation of
+ * the service; requiring only that subclasses provide the
+ * input streams to/from the actual descriptor.
+ *
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Mar 5, 2005
+ */
+public abstract class AbstractPortletAppDescriptorService
+ extends AbstractCastorDescriptorService
+ implements PortletAppDescriptorService {
+
+ public static final String PORTLET_XML_MAPPING =
+ "castor-portlet-xml-mapping.xml";
+
+ /**
+ * Flag to determine if an empty deployment descriptor
+ * should be created (in memory) if the actual descriptor
+ * does not exist.
+ */
+ private boolean create;
+
+ /**
+ * Default Constructor.
+ */
+ protected AbstractPortletAppDescriptorService(String contextPath) {
+ super(contextPath);
+ this.create = true;
+ }
+
+ /**
+ * Secondary Constructor. Create an instance
+ * and specify whether or not a default/empty instance
+ * should be returned if no descriptor is available.
+ * @param create
+ */
+ protected AbstractPortletAppDescriptorService(String contextPath, boolean create) {
+ super(contextPath);
+ this.create = create;
+ }
+
+ /**
+ * Read the Web Application Deployment Descriptor.
+ *
+ * @return WebAppDD instance representing the descriptor.
+ * @throws java.io.IOException
+ */
+ public PortletAppDD read() throws IOException {
+ PortletAppDD portlet =
+ (PortletAppDD) readInternal();
+ if(portlet == null && create) {
+ portlet = new PortletAppDD();
+ }
+ return portlet;
+ }
+
+ /**
+ * Write the deployment descriptor.
+ * @param portlet
+ * @throws java.io.IOException
+ */
+ public void write(PortletAppDD portlet) throws IOException {
+ writeInternal(portlet);
+ }
+
+ /**
+ * Retrieve the Web Application Deployment
+ * descriptor's public Id.
+ * @return
+ */
+ protected String getPublicId() {
+ return Constants.PORLTET_XML_PUBLIC_ID;
+ }
+
+ /**
+ * Retrieve the Web Application Deployment
+ * descriptor's DTD uri.
+ * @return
+ */
+ protected String getDTDUri() {
+ return Constants.PORTLET_XML_DTD;
+ }
+
+ /**
+ * Read and Retrieve the Web Application's Castor Mapping
+ * resource.
+ *
+ * @return
+ * @throws java.io.IOException
+ * @throws org.exolab.castor.mapping.MappingException
+ */
+ protected Mapping getCastorMapping()
+ throws IOException, MappingException {
+ URL url = PortletAppDD.class.getResource(PORTLET_XML_MAPPING);
+ //dump(url);
+ Mapping mapping = new Mapping();
+ mapping.loadMapping(url);
+ return mapping;
+ }
+
+ protected boolean getIgnoreExtraElements() {
+ return true;
+ }
+
+ private void dump(URL url) {
+ try {
+ InputStream is = url.openStream();
+ BufferedReader in = new BufferedReader(new InputStreamReader(is));
+ String s;
+ while( (s = in.readLine())!=null) {
+ System.out.println(s);
+ }
+ }
+ catch(IOException io) {
+ io.printStackTrace();
+ }
+ }
+
+}
+
Added: portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/AbstractWebAppDescriptorService.java
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/AbstractWebAppDescriptorService.java?view=auto&rev=156536
==============================================================================
--- portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/AbstractWebAppDescriptorService.java (added)
+++ portals/pluto/trunk/descriptors/src/java/org/apache/pluto/descriptors/services/impl/AbstractWebAppDescriptorService.java Tue Mar 8 07:59:17 2005
@@ -0,0 +1,129 @@
+/*
+ * 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.descriptors.services.impl;
+
+import java.net.URL;
+import java.io.IOException;
+
+import org.exolab.castor.mapping.Mapping;
+import org.exolab.castor.mapping.MappingException;
+import org.apache.pluto.descriptors.servlet.WebAppDD;
+import org.apache.pluto.descriptors.services.WebAppDescriptorService;
+import org.apache.pluto.descriptors.services.Constants;
+
+/**
+ * Abstract Implementation of the Web Application Deployment
+ * Descriptor service. Provides default implementation of
+ * the service; requiring only that subclasses provide the
+ * input streams to/from the actual descriptor.
+ *
+ * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ * @version 1.0
+ * @since Mar 5, 2005
+ */
+public abstract class AbstractWebAppDescriptorService
+ extends AbstractCastorDescriptorService
+ implements WebAppDescriptorService {
+
+ public static final String WEB_XML_MAPPING = "castor-web-xml-mapping.xml";
+
+ /**
+ * Flag to determine if an empty deployment descriptor
+ * should be created (in memory) if the actual descriptor
+ * does not exist.
+ */
+ private boolean create;
+
+ /**
+ * Default Constructor.
+ */
+ protected AbstractWebAppDescriptorService(String contextPath) {
+ super(contextPath);
+ this.create = true;
+ }
+
+ /**
+ * Secondary Constructor. Create an instance
+ * and specify whether or not a default/empty instance
+ * should be returned if no descriptor is available.
+ * @param create
+ */
+ protected AbstractWebAppDescriptorService(String contextPath, boolean create) {
+ super(contextPath);
+ this.create = create;
+ }
+
+ /**
+ * Read the Web Application Deployment Descriptor.
+ *
+ * @return WebAppDD instance representing the descriptor.
+ * @throws IOException
+ */
+ public WebAppDD read() throws IOException {
+ WebAppDD webApp = (WebAppDD) readInternal();
+ if(webApp == null && create) {
+ webApp = new WebAppDD();
+ webApp.setDisplayName("Portal Application");
+ webApp.setDescription("Auto Generated Portal Application Wrapper");
+ }
+ return webApp;
+ }
+
+ /**
+ * Write the deployment descriptor.
+ * @param webApp
+ * @throws IOException
+ */
+ public void write(WebAppDD webApp) throws IOException {
+ writeInternal(webApp);
+ }
+
+ /**
+ * Retrieve the Web Application Deployment
+ * descriptor's public Id.
+ * @return
+ */
+ protected String getPublicId() {
+ return Constants.WEB_XML_PUBLIC_ID;
+ }
+
+ /**
+ * Retrieve the Web Application Deployment
+ * descriptor's DTD uri.
+ * @return
+ */
+ protected String getDTDUri() {
+ return Constants.WEB_XML_DTD;
+ }
+
+ /**
+ * Read and Retrieve the Web Application's Castor Mapping
+ * resource.
+ *
+ * @return
+ * @throws IOException
+ * @throws MappingException
+ */
+ protected Mapping getCastorMapping()
+ throws IOException, MappingException {
+ URL url = WebAppDD.class.getResource(WEB_XML_MAPPING);
+ Mapping mapping = new Mapping();
+ mapping.loadMapping(url);
+ return mapping;
+ }
+
+}
+