[portal-commits] JBoss Portal SVN: r9091 - in branches/JBoss_Portal_Branch_2_6/wsrp/src: resources/portal-wsrp-sar/xsd and 1 other directory.

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Sun Nov 25 14:10:00 EST 2007


Author: chris.laprun at jboss.com
Date: 2007-11-25 14:10:00 -0500 (Sun, 25 Nov 2007)
New Revision: 9091

Modified:
   branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationFactory.java
   branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java
   branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd
Log:
- Use correct XML Schema types on RegistrationPropertyDescription name and type content model. This solves the CCE problem that had been blocking me... :( 
- Properly serialize value of LocalizedStrings. ProducerConfigurationProvider needs testing.
- Need to retrieve proper namespace when checking for RegistrationPropertyDescription type.

Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationFactory.java	2007-11-25 15:08:34 UTC (rev 9090)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationFactory.java	2007-11-25 19:10:00 UTC (rev 9091)
@@ -156,7 +156,8 @@
       else if ("type".equals(localName))
       {
          value = StringPropertyReplacer.replaceProperties(value);
-         if (!"xsd:string".equals(value))
+         QName type = new QName(value); 
+         if (!WSRPConstants.XSD_STRING.equals(type))
          {
             throw new IllegalArgumentException("'" + value + "' is not a supported type. Currently, only 'xsd:string' is supported.");
          }

Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java	2007-11-25 15:08:34 UTC (rev 9090)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java	2007-11-25 19:10:00 UTC (rev 9091)
@@ -144,4 +144,9 @@
       }
       return value;
    }
+
+    public Object getElementValue(LocalizedString localizedString, String namespaceUri, String localName)
+    {
+        return localizedString.getValue();
+    }
 }

Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd	2007-11-25 15:08:34 UTC (rev 9090)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd	2007-11-25 19:10:00 UTC (rev 9091)
@@ -49,8 +49,8 @@
 
    <xs:complexType name="RegistrationPropertyDescription">
       <xs:sequence>
-         <xs:element name="name" type="xs:string"/>
-         <xs:element name="type" type="xs:string"/>
+         <xs:element name="name" type="xs:QName"/>
+         <xs:element name="type" type="xs:QName"/>
          <xs:element name="label" type="LocalizedString"/>
          <xs:element name="hint" type="LocalizedString" minOccurs="0"/>
       </xs:sequence>




More information about the portal-commits mailing list