portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddew...@apache.org
Subject svn commit: r267366 - in /portals/pluto/branches/pluto-1.1: pluto-container/src/main/java/org/apache/pluto/core/PortletEntity.java pluto-descriptor-impl/src/resources/xml/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml
Date Sat, 03 Sep 2005 01:11:22 GMT
Author: ddewolf
Date: Fri Sep  2 18:11:16 2005
New Revision: 267366

URL: http://svn.apache.org/viewcvs?rev=267366&view=rev
Log:
Committing patch from:PLUTO-156
Thanks Magnus Johansson

This patch brings forward another bug - PreferencesValidatorImpl is not available (ClassNotFoundException),
however, I don't believe it's due to this patch - rather, this patch is half the solution.
 I have entered another bug to address the new issue.

Modified:
    portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/core/PortletEntity.java
    portals/pluto/branches/pluto-1.1/pluto-descriptor-impl/src/resources/xml/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml

Modified: portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/core/PortletEntity.java
URL: http://svn.apache.org/viewcvs/portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/core/PortletEntity.java?rev=267366&r1=267365&r2=267366&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/core/PortletEntity.java
(original)
+++ portals/pluto/branches/pluto-1.1/pluto-container/src/main/java/org/apache/pluto/core/PortletEntity.java
Fri Sep  2 18:11:16 2005
@@ -66,13 +66,15 @@
         if(prefs == null) {
             PortletDD dd = getPortletDefinition();
             PortletPreferencesDD ppdd = dd.getPortletPreferences();
-            PortletPreference[] prefs = new PortletPreference[ppdd.getPortletPreferences().size()];
-            Iterator pds = ppdd.getPortletPreferences().iterator();
-            for(int i=0;pds.hasNext();i++) {
-                PortletPreferenceDD pd = (PortletPreferenceDD)pds.next();
-                prefs[i] = new PortletPreferenceImpl(
-                    pd.getName(), new String[] { pd.getValue()}
-                );
+            if (ppdd != null) {
+                prefs = new PortletPreference[ppdd.getPortletPreferences().size()];
+                Iterator pds = ppdd.getPortletPreferences().iterator();
+                for(int i=0;pds.hasNext();i++) {
+                    PortletPreferenceDD pd = (PortletPreferenceDD)pds.next();
+                    prefs[i] = new PortletPreferenceImpl(
+                        pd.getName(), new String[] { pd.getValue()}
+                    );
+                }
             }
         }
         return prefs;

Modified: portals/pluto/branches/pluto-1.1/pluto-descriptor-impl/src/resources/xml/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml
URL: http://svn.apache.org/viewcvs/portals/pluto/branches/pluto-1.1/pluto-descriptor-impl/src/resources/xml/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml?rev=267366&r1=267365&r2=267366&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1/pluto-descriptor-impl/src/resources/xml/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml
(original)
+++ portals/pluto/branches/pluto-1.1/pluto-descriptor-impl/src/resources/xml/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml
Fri Sep  2 18:11:16 2005
@@ -63,6 +63,10 @@
            collection="arraylist">
       <bind-xml name="supports" node="element"/>
     </field>
+
+    <field name="PortletPreferences" type="org.apache.pluto.descriptors.portlet.PortletPreferencesDD">
+      <bind-xml name="portlet-preferences" node="element" />
+    </field>
   </class>
 
   <class name="org.apache.pluto.descriptors.portlet.PortletInfoDD">
@@ -96,6 +100,28 @@
       <bind-xml name="name" node="element"/>
     </field>
     <field name="ParamValue">
+      <bind-xml name="value" node="element"/>
+    </field>
+  </class>
+
+  <class name="org.apache.pluto.descriptors.portlet.PortletPreferencesDD">
+    <map-to xml="portlet-preferences" />
+
+    <field name="PortletPreferences" type="org.apache.pluto.descriptors.portlet.PortletPreferenceDD"
+          collection="arraylist">
+      <bind-xml name="preference" node="element"/>
+    </field>
+
+    <field name="PreferencesValidator">
+      <bind-xml name="preferences-validator" node="element" />
+    </field>
+  </class>
+
+  <class name="org.apache.pluto.descriptors.portlet.PortletPreferenceDD">
+    <field name="Name">
+      <bind-xml name="name" node="element"/>
+    </field>
+    <field name="Value">
       <bind-xml name="value" node="element"/>
     </field>
   </class>



Mime
View raw message