portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdore...@apache.org
Subject svn commit: r566125 - in /portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl: ./ src/main/java/org/apache/pluto/descriptors/services/castor/ src/main/resources/org/apache/pluto/descriptors/services/castor/
Date Wed, 15 Aug 2007 12:42:53 GMT
Author: cdoremus
Date: Wed Aug 15 05:42:51 2007
New Revision: 566125

URL: http://svn.apache.org/viewvc?view=rev&rev=566125
Log:
Moved over changes and new files from trunk.

Added:
    portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/DistributableCastorFieldHandler.java
      - copied unchanged from r563467, portals/pluto/trunk/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/DistributableCastorFieldHandler.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/DistributableDDCastorFieldHandler.java
      - copied unchanged from r563467, portals/pluto/trunk/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/DistributableDDCastorFieldHandler.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/ServletVersionCastorFieldHandler.java
      - copied unchanged from r563467, portals/pluto/trunk/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/ServletVersionCastorFieldHandler.java
Modified:
    portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/pom.xml
    portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/AbstractCastorDescriptorService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/EntityResolverImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/PortletAppDescriptorServiceImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/WebAppDescriptorServiceImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml
    portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/castor-web-xml-mapping.xml

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/pom.xml?view=diff&rev=566125&r1=566124&r2=566125
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/pom.xml (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/pom.xml Wed Aug 15 05:42:51
2007
@@ -39,6 +39,10 @@
 					</resourcesDirectory>
 				</configuration>
 			</plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-remote-resources-plugin</artifactId>
+      </plugin>
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-compiler-plugin</artifactId>
@@ -59,7 +63,7 @@
 		</dependency>
 
 		<dependency>
-			<groupId>castor</groupId>
+			<groupId>org.codehaus.castor</groupId>
 			<artifactId>castor</artifactId>
 			<version>${castor.version}</version>
 			<scope>compile</scope>

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/AbstractCastorDescriptorService.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/AbstractCastorDescriptorService.java?view=diff&rev=566125&r1=566124&r2=566125
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/AbstractCastorDescriptorService.java
(original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/AbstractCastorDescriptorService.java
Wed Aug 15 05:42:51 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 2005 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
+ * 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
  *
@@ -15,26 +16,63 @@
  */
 package org.apache.pluto.descriptors.services.castor;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.exolab.castor.mapping.Mapping;
 import org.exolab.castor.mapping.MappingException;
+import org.exolab.castor.util.LocalConfiguration;
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
-import org.xml.sax.helpers.DefaultHandler;
-
-import java.io.*;
 
 /**
  * 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 $Id: AbstractCastorDescriptorService.java 156743 2005-03-10 05:50:30Z ddewolf
$
  * @since Mar 5, 2005
  */
 abstract class AbstractCastorDescriptorService {
 
     /**
+     * Logger
+     */
+    private static final Log LOG = LogFactory.getLog(AbstractCastorDescriptorService.class);
+    
+    /**
+     * The name of the system property that when set to the string
+     * value "true" has Castor use JAXP instead of the parser specified
+     * by the <code>org.exolab.castor.parser</code> property.
+     * 
+     * By using JAXP, the Pluto descriptor services no longer require
+     * an XML parser in a shared classloader.
+     * 
+     * By default the value of this property is "true" For Pluto 1.2 and
+     * higher.
+     */
+    private static final String JAXP_PROPERTY = "org.apache.pluto.useJaxp";
+    
+    /**
+     * Default value of org.apache.pluto.useJaxp system property.
+     * In Pluto 1.2.x it should be "true".  In Pluto 1.1.4 and up (but still
+     * within the 1.1 line) it should be "false".
+     */
+    private static final String JAXP_DEFAULT = "true";
+
+    /**
+     * Whether or not Castor should use JAXP.  If Castor is not using
+     * JAXP, then default to the parser specified by 
+     * <code>org.exolab.castor.parser</code>.
+     */
+    protected static boolean USING_JAXP = System.getProperty(JAXP_PROPERTY, JAXP_DEFAULT).equalsIgnoreCase("true");
+    
+    /**
      * Read the and convert the descriptor into it's Object graph.
      * @return
      * @throws IOException
@@ -42,10 +80,24 @@
     protected Object readInternal(InputStream is) throws IOException {
         Object object = null;
         try {
+            // Use JAXP if we are instructed to do so.
+            if (USING_JAXP) {
+                LocalConfiguration castorConfig = LocalConfiguration.getInstance();
+                // empty string means "use JAXP" for Castor
+                castorConfig.getProperties().setProperty("org.exolab.castor.parser", "");
+                castorConfig.getProperties().setProperty("org.exolab.castor.xml.serializer.factory",

+                        "org.exolab.castor.xml.XercesJDK5XMLSerializerFactory" );
+            }
+            
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Pluto descriptor service implementation using JAXP: [" + USING_JAXP
+ "]");                        
+            }
+            
             Mapping mapping = getCastorMapping();
             Unmarshaller unmarshaller = new Unmarshaller(mapping);
             unmarshaller.setEntityResolver(new EntityResolverImpl());
             unmarshaller.setIgnoreExtraElements(getIgnoreExtraElements());
+
             if(is!=null) {
                 InputStreamReader in = new InputStreamReader(is);
                 object = unmarshaller.unmarshal(in);
@@ -74,9 +126,31 @@
             new OutputStreamWriter(out);
 
         try {
-            Marshaller marshaller =
-                new Marshaller(new DefaultHandler()); //serializer.asDocumentHandler());
+            // Construct the marshaller with a Writer instead of
+            // a SAX DocumentHandler.  When you supply a document
+            // handler, you can't set call marshaller.setDocType(String, String)
+
+            // See Also:
+            //  https://issues.apache.org/jira/browse/PLUTO-312
+            //  http://castor.org/javadoc/org/exolab/castor/xml/Marshaller.html#setDoctype(java.lang.String,%20java.lang.String)
+            Marshaller marshaller = new Marshaller(writer);
             marshaller.setMapping(getCastorMapping());
+            
+            // Use JAXP if we are instructed to do so.
+            LocalConfiguration castorConfig = LocalConfiguration.getInstance();
+            if (USING_JAXP) {                
+                // empty string means "use JAXP" for Castor
+                castorConfig.getProperties().setProperty("org.exolab.castor.parser", "" );
               
+                castorConfig.getProperties().setProperty("org.exolab.castor.xml.serializer.factory",

+                        "org.exolab.castor.xml.XercesJDK5XMLSerializerFactory" );
+            }
+            
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Pluto descriptor service implementation using JAXP: [" + USING_JAXP
+ "]");                        
+            }
+            
+            castorConfig.getProperties().setProperty("org.exolab.castor.indent", "true");
+            setCastorMarshallerOptions(marshaller, object);
             marshaller.marshal(object);
         } catch(IOException io) {
             throw io;
@@ -97,6 +171,16 @@
     protected abstract String getPublicId();
     protected abstract String getDTDUri();
 
+    /**
+     * Subclasses should override this method if they need to set
+     * options on the Castor marshaller, such as a doctype.
+     *
+     * @param marshaller the Castor Marshaller
+     * @param beingMarshalled the Object being marshalled by Castor.
+     */
+    protected void setCastorMarshallerOptions(final Marshaller marshaller, final Object beingMarshalled)
{
+
+    }
 
 }
 

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/EntityResolverImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/EntityResolverImpl.java?view=diff&rev=566125&r1=566124&r2=566125
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/EntityResolverImpl.java
(original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/EntityResolverImpl.java
Wed Aug 15 05:42:51 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 2003-2005 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
+ * 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
  *
@@ -26,7 +27,6 @@
  * Entity Resolver which first looks for dtd and xls
  * locally in our packaged.
  *
- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
  * @version 1.0
  * @since 1.1
  */

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/PortletAppDescriptorServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/PortletAppDescriptorServiceImpl.java?view=diff&rev=566125&r1=566124&r2=566125
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/PortletAppDescriptorServiceImpl.java
(original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/PortletAppDescriptorServiceImpl.java
Wed Aug 15 05:42:51 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 2005 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
+ * 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
  *
@@ -32,7 +33,6 @@
  * 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 $Id: PortletAppDescriptorServiceImpl.java 156743 2005-03-10 05:50:30Z ddewolf
$
  * @since Mar 5, 2005
  */

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/WebAppDescriptorServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/WebAppDescriptorServiceImpl.java?view=diff&rev=566125&r1=566124&r2=566125
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/WebAppDescriptorServiceImpl.java
(original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/WebAppDescriptorServiceImpl.java
Wed Aug 15 05:42:51 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 2005 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
+ * 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
  *
@@ -20,6 +21,7 @@
 import org.apache.pluto.descriptors.servlet.WebAppDD;
 import org.exolab.castor.mapping.Mapping;
 import org.exolab.castor.mapping.MappingException;
+import org.exolab.castor.xml.Marshaller;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -32,7 +34,6 @@
  * 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 $Id: WebAppDescriptorServiceImpl.java 156743 2005-03-10 05:50:30Z ddewolf $
  * @since Mar 5, 2005
  */
@@ -98,6 +99,14 @@
         Mapping mapping = new Mapping();
         mapping.loadMapping(url);
         return mapping;
+    }
+
+    protected void setCastorMarshallerOptions(Marshaller marshaller, Object beingMarshalled)
{
+        String servletVersion = ((WebAppDD)beingMarshalled).getServletVersion();
+        if ( "2.4".equals(servletVersion) )
+        {
+            marshaller.setDoctype(getPublicId(), getDTDUri());
+        }
     }
 
 }

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml?view=diff&rev=566125&r1=566124&r2=566125
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml
(original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml
Wed Aug 15 05:42:51 2007
@@ -1,23 +1,21 @@
 <?xml version="1.0"?>
 <!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Object Mapping DTD Version 1.0//EN"
-                         "http://castor.exolab.org/mapping.dtd">
+    "http://castor.exolab.org/mapping.dtd">
 <!-- 
-   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.
+  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.
 -->
 <mapping>
   <description>Portlet Deployment Descriptor Mapping</description>
@@ -28,6 +26,31 @@
 
 	<class name="org.apache.pluto.descriptors.portlet.PortletAppDD">
 		<map-to xml="portlet-app"/>
+
+        <field name="Version">
+            <bind-xml name="version" node="attribute"/>
+        </field>
+        <field name="CustomPortletModes"
+               type="org.apache.pluto.descriptors.portlet.CustomPortletModeDD"
+               collection="arraylist">
+            <bind-xml name="custom-portlet-mode" node="element"/>
+        </field>
+        <field name="CustomWindowStates"
+               type="org.apache.pluto.descriptors.portlet.CustomWindowStateDD"
+               collection="arraylist">
+            <bind-xml name="custom-window-state" node="element"/>
+        </field>
+        <field name="UserAttributes"
+               type="org.apache.pluto.descriptors.portlet.UserAttributeDD"
+               collection="arraylist">
+            <bind-xml name="user-attribute" node="element"/>
+        </field>
+
+        <field name="SecurityConstraints"
+               type="org.apache.pluto.descriptors.portlet.SecurityConstraintDD"
+               collection="arraylist">
+            <bind-xml name="security-constraint" node="element"/>
+         </field>
 		<field name="Portlets"
 			type="org.apache.pluto.descriptors.portlet.PortletDD"
 			collection="arraylist">
@@ -50,6 +73,20 @@
       <bind-xml name="portlet-name" node="element"/>
     </field>
 
+        <field name="DisplayNames" type="org.apache.pluto.descriptors.common.DisplayNameDD"
+               collection="arraylist">
+            <bind-xml name="display-name" node="element"/>
+        </field>
+
+        <field name="Descriptions" type="org.apache.pluto.descriptors.common.DescriptionDD"
+               collection="arraylist">
+            <bind-xml name="description" node="element"/>
+        </field>
+
+        <field name="ExpirationCache">
+            <bind-xml name="expiration-cache" node="element"/>
+        </field>
+
     <field name="PortletClass">
       <bind-xml name="portlet-class" node="element"/>
     </field>
@@ -92,6 +129,11 @@
       <bind-xml name="supports" node="element"/>
     </field>
 
+        <field name="SupportedLocales" type="java.lang.String"
+               collection="arraylist">
+            <bind-xml name="supported-locale" node="element"/>
+        </field>
+
     <field name="PortletPreferences" type="org.apache.pluto.descriptors.portlet.PortletPreferencesDD">
       <bind-xml name="portlet-preferences" node="element" />
     </field>
@@ -165,26 +207,6 @@
     </field>
   </class>
   
- <!--  <class name="org.apache.pluto.descriptors.portlet.SharingParamDD">
-		<field name="Description">
-			<bind-xml name="description" node="element" />
-		</field>
-    <field name="Name">
-      <bind-xml name="name" node="element"/>
-    </field>
-		<field name="JavaType">
-			<bind-xml name="java-type" node="element" />
-		</field>
-		<field name="XmlType">
-			<bind-xml name="xml-type" node="element" />
-		</field>			
-		<field name="Alias" type="java.lang.String" collection="arraylist">
-			<bind-xml name="alias" node="element" />
-		</field>
-		<field name="ID">
-			<bind-xml name="id" node="element" />
-		</field>
-  </class>-->
 
   <class name="org.apache.pluto.descriptors.portlet.PortletPreferencesDD">
     <map-to xml="portlet-preferences" />
@@ -211,5 +233,100 @@
     </field>
   </class>
 
+    <class name="org.apache.pluto.descriptors.portlet.CustomPortletModeDD">
+        <field name="PortletMode">
+            <bind-xml name="portlet-mode" node="element"/>
+        </field>
+        <field name="Descriptions" type="org.apache.pluto.descriptors.common.DescriptionDD"
+               collection="arraylist">
+            <bind-xml name="description" node="element"/>
+        </field>
+    </class>
+
+    <class name="org.apache.pluto.descriptors.portlet.CustomWindowStateDD">
+        <field name="WindowState">
+            <bind-xml name="window-state" node="element"/>
+        </field>
+        <field name="Descriptions" type="org.apache.pluto.descriptors.common.DescriptionDD"
+               collection="arraylist">
+            <bind-xml name="description" node="element"/>
+        </field>
+    </class>
+
+    <class name="org.apache.pluto.descriptors.portlet.UserAttributeDD">
+        <field name="Name">
+            <bind-xml name="name" node="element"/>
+        </field>
+        <field name="Descriptions" type="org.apache.pluto.descriptors.common.DescriptionDD"
+               collection="arraylist">
+            <bind-xml name="description" node="element"/>
+        </field>
+    </class>
+
+    <class name="org.apache.pluto.descriptors.portlet.SecurityConstraintDD">
+        <field name="DisplayNames" type="org.apache.pluto.descriptors.common.DisplayNameDD"
+            collection="arraylist">
+            <bind-xml name="display-name" node="element"/>
+        </field>
+
+        <field name="PortletCollection" type="org.apache.pluto.descriptors.portlet.PortletCollectionDD">
+            <bind-xml name="portlet-collection"/>
+        </field>
+
+        <field name="UserDataConstraint" type="org.apache.pluto.descriptors.common.UserDataConstraintDD">
+            <bind-xml name="user-data-constraint"/>
+        </field>
+    </class>
+
+    <class name="org.apache.pluto.descriptors.portlet.PortletCollectionDD">
+        <field name="PortletNames" type="java.lang.String" collection="arraylist">
+            <bind-xml name="portlet-name" node="element"/>
+        </field>
+    </class>
+
+    <class name="org.apache.pluto.descriptors.common.UserDataConstraintDD">
+        <field name="Descriptions" type="org.apache.pluto.descriptors.common.DescriptionDD"
+               collection="arraylist">
+            <bind-xml name="description" node="element"/>
+        </field>
+
+        <field name="TransportGuarantee">
+            <bind-xml name="transport-guarantee" node="element"/>
+        </field>
+    </class>
+
+    <class name="org.apache.pluto.descriptors.common.DisplayNameDD">
+        <field name="Lang">
+            <bind-xml name="lang" node="attribute"/>
+        </field>
+
+        <field name="DisplayName">
+            <bind-xml name="display-name" node="text"/>
+        </field>
+    </class>
+
+
+    <class name="org.apache.pluto.descriptors.common.DescriptionDD">
+        <field name="Lang">
+            <bind-xml name="lang" node="attribute"/>
+        </field>
+
+        <field name="Description">
+            <bind-xml name="description" node="text"/>
+        </field>
+    </class>
+
+    <class name="org.apache.pluto.descriptors.common.SecurityRoleRefDD">
+        <field name="RoleName">
+            <bind-xml name="role-name" node="element"/>
+        </field>
+        <field name="RoleLink">
+            <bind-xml name="role-link" node="element"/>
+        </field>
+        <field name="Descriptions" type="org.apache.pluto.descriptors.common.DescriptionDD"
+               collection="arraylist">
+            <bind-xml name="description"/>
+        </field>
+    </class>
 </mapping>
 

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/castor-web-xml-mapping.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/castor-web-xml-mapping.xml?view=diff&rev=566125&r1=566124&r2=566125
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/castor-web-xml-mapping.xml
(original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/castor-web-xml-mapping.xml
Wed Aug 15 05:42:51 2007
@@ -1,12 +1,13 @@
 <?xml version="1.0"?>
 <!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Object Mapping DTD Version 1.0//EN"
-                         "http://castor.exolab.org/mapping.dtd">
+                         "http://castor.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
+  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
 
@@ -22,7 +23,7 @@
   <!--
     The Root WebApplication Element
     This element should map each and every one of the possible 2.4
-    elments in order.
+    elements in order.
       + icon,
       + display-name
       + description
@@ -49,7 +50,13 @@
     -->
   <class name="org.apache.pluto.descriptors.servlet.WebAppDD">
     <map-to xml="web-app"/>
-      
+    
+    <field name="ServletVersion"
+           handler="org.apache.pluto.descriptors.services.castor.ServletVersionCastorFieldHandler"
+           type="java.lang.String">
+        <bind-xml name="version" node="attribute"/>
+    </field>
+        
     <field name="Icon"
            type="org.apache.pluto.descriptors.common.IconDD"/>
 
@@ -61,7 +68,9 @@
       <bind-xml name="description" node="element"/>
     </field>
 
-    <field name="Distributable" get-method="isDistributable">
+    <field name="Distributable"
+           type="org.apache.pluto.descriptors.servlet.DistributableDD"
+           handler="org.apache.pluto.descriptors.services.castor.DistributableDDCastorFieldHandler">
       <bind-xml name="distributable" node="element"/>
     </field>
 
@@ -192,7 +201,7 @@
       <field name="InitParams"
           type="org.apache.pluto.descriptors.common.InitParamDD"
           collection="arraylist">
-          <bind-xml name="init-param"/>
+          <bind-xml name="init-param" node="element"/>
       </field>
   </class>
   <class name="org.apache.pluto.descriptors.servlet.FilterMappingDD">
@@ -290,7 +299,7 @@
         <field name="AuthConstraint"
                type="org.apache.pluto.descriptors.servlet.AuthConstraintDD"/>
         <field name="UserDataConstraint"
-               type="org.apache.pluto.descriptors.servlet.UserDataConstraintDD"/>
+               type="org.apache.pluto.descriptors.common.UserDataConstraintDD"/>
     </class>
     <class name="org.apache.pluto.descriptors.servlet.WebResourceCollectionDD">
         <field name="description" type="java.lang.String"/>
@@ -317,7 +326,62 @@
             <bind-xml name="load-on-startup" node="text"/>
         </field>
     </class>
+    
+    <class name="org.apache.pluto.descriptors.common.DescriptionDD">
+        <field name="Lang">
+            <bind-xml name="lang" node="attribute"/>
+        </field>
+
+        <field name="Description">
+            <bind-xml name="description" node="text"/>
+        </field>
+    </class>
+
+    <class name="org.apache.pluto.descriptors.common.InitParamDD">
+        <field name="ParamName">
+            <bind-xml name="param-name" node="element"/>
+        </field>
+        <field name="ParamValue">
+            <bind-xml name="param-value" node="element"/>
+        </field>
+        <field name="Descriptions" type="org.apache.pluto.descriptors.common.DescriptionDD"
+               collection="arraylist">
+            <bind-xml name="description" node="element"/>
+        </field>
+    </class>
+
 
+    <class name="org.apache.pluto.descriptors.common.SecurityRoleRefDD">
+        <field name="RoleName">
+            <bind-xml name="role-name" node="element"/>
+        </field>
+        <field name="RoleLink">
+            <bind-xml name="role-link" node="element"/>
+        </field>
+        <field name="Descriptions" type="org.apache.pluto.descriptors.common.DescriptionDD"
+               collection="arraylist">
+            <bind-xml name="description"/>
+        </field>
+    </class>
+
+    <class name="org.apache.pluto.descriptors.common.UserDataConstraintDD">
+        <field name="Descriptions" type="org.apache.pluto.descriptors.common.DescriptionDD"
+               collection="arraylist">
+            <bind-xml name="description" node="element"/>
+        </field>
+
+        <field name="TransportGuarantee">
+            <bind-xml name="transport-guarantee" node="element"/>
+        </field>
+    </class>
+    
+    <class name="org.apache.pluto.descriptors.servlet.DistributableDD">
+         <field name="Distributable" 
+                type="java.lang.Boolean"
+                handler="org.apache.pluto.descriptors.services.castor.DistributableCastorFieldHandler">
+             <bind-xml name="distributable" node="element"/>
+         </field>
+    </class>        
 
 </mapping>
 



Mime
View raw message