You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by cz...@apache.org on 2003/12/31 15:18:10 UTC

cvs commit: jakarta-pluto/war/WEB-INF/data/xml portletdefinitionmapping.xml

cziegeler    2003/12/31 06:18:10

  Modified:    war/WEB-INF/classes castor.properties
               src/portal/org/apache/pluto/portalImpl/services/portletdefinitionregistry
                        PortletDefinitionRegistryServiceFileImpl.java
               war/WEB-INF/data/xml portletdefinitionmapping.xml
  Added:       lib/portal castor-0.9.5.2-xml.jar
  Removed:     lib/portal castor-0.9.4.1-xml.jar
  Log:
  Updating to latest castor version
  Correcting mapping for portlet.xml (namespaces!)
  
  Revision  Changes    Path
  1.3       +2 -1      jakarta-pluto/war/WEB-INF/classes/castor.properties
  
  Index: castor.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-pluto/war/WEB-INF/classes/castor.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- castor.properties	11 Oct 2003 00:51:43 -0000	1.2
  +++ castor.properties	31 Dec 2003 14:18:10 -0000	1.3
  @@ -1,7 +1,8 @@
   # Example properties indent the output, require validation
   # on input and turn debugging on.
   #
  -org.exolab.castor.validation=false
  +org.exolab.castor.parser.validation=false
  +org.exolab.castor.parser.namespaces=true
   org.exolab.castor.indent=true
   org.exolab.castor.debug=true
   
  
  
  
  1.5       +5 -5      jakarta-pluto/src/portal/org/apache/pluto/portalImpl/services/portletdefinitionregistry/PortletDefinitionRegistryServiceFileImpl.java
  
  Index: PortletDefinitionRegistryServiceFileImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-pluto/src/portal/org/apache/pluto/portalImpl/services/portletdefinitionregistry/PortletDefinitionRegistryServiceFileImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PortletDefinitionRegistryServiceFileImpl.java	30 Oct 2003 03:32:40 -0000	1.4
  +++ PortletDefinitionRegistryServiceFileImpl.java	31 Dec 2003 14:18:10 -0000	1.5
  @@ -79,6 +79,7 @@
   import org.apache.pluto.portalImpl.xml.XmlParser;
   import org.exolab.castor.mapping.Mapping;
   import org.exolab.castor.xml.Unmarshaller;
  +import org.xml.sax.InputSource;
   
   /**
    * A simple XML Castor file based implementation of the <code>PortletRegistryService</config>
  @@ -208,13 +209,13 @@
                             "Loading the following Portlet Applications XML files..."+portletXml+", "+webXml);
               }
   
  -            org.w3c.dom.Document portletDocument = 
  -            XmlParser.parsePortletXml(new FileInputStream(portletXml));
  -
  +            InputSource source = new InputSource(new FileInputStream(portletXml));
  +            source.setSystemId(portletXml.toURL().toExternalForm());
  +            
               Unmarshaller unmarshaller = new Unmarshaller(this.mappingPortletXml);
   			unmarshaller.setIgnoreExtraElements(true);
               PortletApplicationDefinitionImpl portletApp = 
  -                (PortletApplicationDefinitionImpl)unmarshaller.unmarshal( portletDocument );
  +                (PortletApplicationDefinitionImpl)unmarshaller.unmarshal( source );
   
               WebApplicationDefinitionImpl webApp = null;
   
  @@ -303,5 +304,4 @@
           }
   
       }
  -
   }
  
  
  
  1.1                  jakarta-pluto/lib/portal/castor-0.9.5.2-xml.jar
  
  	<<Binary file>>
  
  
  1.3       +36 -36    jakarta-pluto/war/WEB-INF/data/xml/portletdefinitionmapping.xml
  
  Index: portletdefinitionmapping.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-pluto/war/WEB-INF/data/xml/portletdefinitionmapping.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- portletdefinitionmapping.xml	11 Oct 2003 00:51:43 -0000	1.2
  +++ portletdefinitionmapping.xml	31 Dec 2003 14:18:10 -0000	1.3
  @@ -1,7 +1,7 @@
   <?xml version="1.0"?>
   <!DOCTYPE databases PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN"
                              "http://castor.exolab.org/mapping.dtd">
  -<mapping>
  +<mapping xmlns:portlet="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
   
     <class name="org.apache.pluto.portalImpl.om.common.impl.DisplayNameImpl">
   
  @@ -30,13 +30,13 @@
       <field name="castorDescriptions" 
              type="org.apache.pluto.portalImpl.om.common.impl.DescriptionImpl" 
              collection="collection">
  -      <bind-xml name="description" node="element"/>
  +      <bind-xml name="portlet:description" node="element"/>
       </field>
       <field name="roleName" type="java.lang.String" required="true">
  -      <bind-xml name="role-name" node="element"/>
  +      <bind-xml name="portlet:role-name" node="element"/>
       </field>
       <field name="roleLink" type="java.lang.String">
  -        <bind-xml name="role-link" node="element"/>
  +        <bind-xml name="portlet:role-link" node="element"/>
       </field>
   
     </class>
  @@ -45,13 +45,13 @@
       <field name="castorDescriptions" 
              type="org.apache.pluto.portalImpl.om.common.impl.DescriptionImpl" 
              collection="collection">
  -      <bind-xml name="description" node="element"/>
  +      <bind-xml name="portlet:description" node="element"/>
       </field>
       <field name="name" type="java.lang.String" required="true">
  -      <bind-xml name="name" node="element"/>
  +      <bind-xml name="portlet:name" node="element"/>
       </field>
       <field name="value" type="java.lang.String" required="true">
  -      <bind-xml name="value" node="element"/>
  +      <bind-xml name="portlet:value" node="element"/>
       </field>
   
     </class>
  @@ -59,16 +59,16 @@
     <class name="org.apache.pluto.portalImpl.om.common.impl.PreferenceImpl">
         
       <field name="name" type="java.lang.String" required="true">
  -      <bind-xml name="name" node="element"/>
  +      <bind-xml name="portlet:name" node="element"/>
       </field>
       <field name="castorValues" type="java.lang.String" collection="collection" required="true">
  -      <bind-xml name="value" node="element"/>
  +      <bind-xml name="portlet:value" node="element"/>
       </field>
       <!--field name="modifiable" type="java.lang.Boolean">
  -      <bind-xml name="modifiable" node="element"/>
  +      <bind-xml name="portlet:modifiable" node="element"/>
       </field-->
       <field name="readOnly" type="java.lang.String">
  -      <bind-xml name="read-only" node="element"/>
  +      <bind-xml name="portlet:read-only" node="element"/>
       </field>
   
     </class>
  @@ -76,13 +76,13 @@
     <class name="org.apache.pluto.portalImpl.om.portlet.impl.ContentTypeImpl">
   
       <field name="contentType" type="java.lang.String">
  -      <bind-xml name="mime-type" node="element"/>
  +      <bind-xml name="portlet:mime-type" node="element"/>
       </field>
   
       <field name="castorPortletModes"
              type="java.lang.String"
              collection="collection">
  -      <bind-xml name="portlet-mode" node="element"/>
  +      <bind-xml name="portlet:portlet-mode" node="element"/>
       </field>
   
     </class>
  @@ -90,10 +90,10 @@
     <class name="org.apache.pluto.portalImpl.om.common.impl.PreferenceSetImpl">
         
       <field name="castorPreferences" type="org.apache.pluto.portalImpl.om.common.impl.PreferenceImpl" collection="collection">
  -      <bind-xml name="preference" node="element"/>
  +      <bind-xml name="portlet:preference" node="element"/>
       </field>
       <field name="castorPreferencesValidator" type="java.lang.String">
  -      <bind-xml name="preferences-validator" node="element"/>
  +      <bind-xml name="portlet:preferences-validator" node="element"/>
       </field>
   
     </class>
  @@ -101,13 +101,13 @@
     <class name="org.apache.pluto.portalImpl.om.common.impl.LanguageSetImpl">
   
       <field name="title" type="java.lang.String">
  -      <bind-xml name="title" node="element"/>
  +      <bind-xml name="portlet:title" node="element"/>
       </field>
       <field name="shortTitle" type="java.lang.String">
  -      <bind-xml name="short-title" node="element"/>
  +      <bind-xml name="portlet:short-title" node="element"/>
       </field>
       <field name="castorKeywords" type="java.lang.String">
  -      <bind-xml name="keywords" node="element"/>
  +      <bind-xml name="portlet:keywords" node="element"/>
       </field>
   
     </class>
  @@ -120,57 +120,57 @@
       <field name="castorDescriptions" 
            type="org.apache.pluto.portalImpl.om.common.impl.DescriptionImpl"
            collection="collection">
  -      <bind-xml name="description" node="element"/>
  +      <bind-xml name="portlet:description" node="element"/>
       </field>
       <field name="name" type="java.lang.String">
  -      <bind-xml name="portlet-name" node="element"/>
  +      <bind-xml name="portlet:portlet-name" node="element"/>
       </field>
       <field name="castorDisplayNames" 
            type="org.apache.pluto.portalImpl.om.common.impl.DisplayNameImpl"
            collection="collection">
  -      <bind-xml name="display-name" node="element"/>
  +      <bind-xml name="portlet:display-name" node="element"/>
       </field>
       <field name="className" type="java.lang.String">
  -      <bind-xml name="portlet-class" node="element"/>
  +      <bind-xml name="portlet:portlet-class" node="element"/>
       </field>
       <field name="castorInitParams"
              type="org.apache.pluto.portalImpl.om.common.impl.ParameterImpl"
              collection="collection">
  -      <bind-xml name="init-param" node="element"/>
  +      <bind-xml name="portlet:init-param" node="element"/>
       </field>
   
       <field name="expirationCache" type="java.lang.String">
  -      <bind-xml name="expiration-cache" node="element"/>
  +      <bind-xml name="portlet:expiration-cache" node="element"/>
       </field>
       <field name="castorContentTypes"
              type="org.apache.pluto.portalImpl.om.portlet.impl.ContentTypeImpl"
              collection="collection">
  -      <bind-xml name="supports" node="element"/>
  +      <bind-xml name="portlet:supports" node="element"/>
       </field>
       <field name="castorSupportedLocales" type="java.lang.String" collection="collection">
  -      <bind-xml name="supported-locale" node="element"/>
  +      <bind-xml name="portlet:supported-locale" node="element"/>
       </field>
       <field name="resourceBundle" type="java.lang.String">
  -      <bind-xml name="resource-bundle" node="element"/>
  +      <bind-xml name="portlet:resource-bundle" node="element"/>
       </field>
       <field name="castorResources" type="org.apache.pluto.portalImpl.om.common.impl.LanguageSetImpl">
  -      <bind-xml name="portlet-info" node="element"/>
  +      <bind-xml name="portlet:portlet-info" node="element"/>
       </field>
   
      <field name="castorPreferences"
              type="org.apache.pluto.portalImpl.om.common.impl.PreferenceSetImpl">
  -      <bind-xml name="portlet-preferences" node="element"/>
  +      <bind-xml name="portlet:portlet-preferences" node="element"/>
       </field>
       <field name="castorInitSecurityRoleRefs"
              type="org.apache.pluto.portalImpl.om.common.impl.SecurityRoleRefImpl"
              collection="collection">
  -      <bind-xml name="security-role-ref" node="element"/>
  +      <bind-xml name="portlet:security-role-ref" node="element"/>
       </field>
   
     </class>
   
     <class name="org.apache.pluto.portalImpl.om.portlet.impl.PortletApplicationDefinitionImpl">
  -    <map-to xml="portlet-app"/>
  +    <map-to xml="portlet-app" ns-uri="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"/>
   
       <field name="version" type="java.lang.String">
         <bind-xml name="version" node="attribute"/>
  @@ -182,19 +182,19 @@
       <field name="castorPortlets"
              type="org.apache.pluto.portalImpl.om.portlet.impl.PortletDefinitionImpl"
              collection="collection">
  -      <bind-xml name="portlet" node="element"/>
  +      <bind-xml name="portlet:portlet" node="element"/>
       </field>
       <field name="customPortletMode" type="java.lang.String" collection="collection">
  -      <bind-xml name="custom-portlet-mode" node="element"/>
  +      <bind-xml name="portlet:custom-portlet-mode" node="element"/>
       </field>
       <field name="customPortletState" type="java.lang.String" collection="collection">
  -      <bind-xml name="custom-window-state" node="element"/>
  +      <bind-xml name="portlet:custom-window-state" node="element"/>
       </field>
       <field name="userAttribute" type="java.lang.String" collection="collection">
  -      <bind-xml name="user-attribute" node="element"/>
  +      <bind-xml name="portlet:user-attribute" node="element"/>
       </field>
       <field name="securityConstraint" type="java.lang.String" collection="collection">
  -      <bind-xml name="security-constraint" node="element"/>
  +      <bind-xml name="portlet:security-constraint" node="element"/>
       </field>
   
     </class>